Chris Cant's developer blog

Web Name: Chris Cant's developer blog

WebSite: http://chriscant.phdcc.com

ID:118869

Keywords:

Cant,Chris,blog,

Description:

Here are some programming tips, be it ASP.NET, C#, CSS, Java, JavaScript, PHP, SQL, XHTML, etc. I am director of PHD Computer Consultants Ltd, based in Cumbria, England, UK - we sell our own software and undertake software projects and consultancy.I'm running an Ubuntu 14.04.4 LTS server with Apache2 and phpMyAdmin running several Drupal7 and 8 sites. I saw this message when getting updates and this is how I updated my system to the new PHP5.6 PPA:Following the instructions from root I ran these commands:LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php5apt-get dist-upgradeThis got PHP 7.0 on my system. To get PHP 5.6 I ran this:apt-get install php5.6I later found that I needed these extensions:apt-get install php5.6-mysqlapt-get install php5.6-xmlapt-get install php5.6-gdapt-get install php5.6-mbstringapt-get install php5.6-mcryptapt-get install php5.6-zipApache was still running the old version, I disabled the php5 module, enabled php5.6 and restarted:a2dismod php5a2enmod php5.6service apache2 restartI had changed my PHP.INI file - whichwas in /etc/php5/apache2/php.iniSo I did similar changes in here /etc/php/5.6/apache2/php.iniand restarted: service apache2 restartThe command line php was now running 7.0 so I changed it using this command:update-alternatives --config phpThanks to Ondřej Surý at https://launchpad.net/~ondrej/+archive/ubuntu/phpI recently needed to copy some tables from one SQL Server Express database to another - as part of a server move on a CMS where I wanted a fresh install to clean things up. I needed to copy several tables across, keeping the primary keys the same so as to ensure the data integrity. Here's what I had to do to do the transfer:Ensure that SQL Server Management Studio and Import and Export Data tools are installed.Ensure that the SQL Server (SQLEXPRESS) and SQL Server Browser services are started.You probably need to make sure that your login has admin access to SQL Server Express.I started by copying the MDF and LDF files (for both databases) to a new location so I can work with a clean copy that won't be used by something elseOpen Management Studio and connect to (local)\SQLEXPRESSClick right on Databases then select Attach, then click Add and choose your MDFAmend "Attach as" if desired and check the MDF and LDF file paths below, then click OKDo the same for the other databaseOpen the Import and Export WizardSelect the SQL Server Native ClientEnter (local)\SQLEXPRESS in the Server name boxChoose the required source database below, then click NextDo the same to choose the destination databaseSelect "Copy data from one or more tables and views"Select which tables you wish to copyFor each table, click Edit Mappings.Ensure that "Enable identity insert" is tickedChoose the appropriate action on the left, eg "Delete rows in destination table", then click OKRemember: do this for each tableClick Next, then Next then FinishOpen up the destination database in Management Studio to confirm that the tables have got the correct data.You had probably best use Tasks+Detach in Management Studio to make sure that all connections are dropped before copy the destination database files into the desired locationNot so bad after all. To celebrate, here's a photo of some nicely padded swallow eggs:It is possible to buy a single code signing certificate that can be used to sign both Java jar files and Windows executable exe files.A cheap source for a certificate is Tucows with one year currently costing US$75. Tucows are a reseller for Comodo, but the certificates are more expensive from Comodo direct.Along the way, I'm going to create P12, 2 x PFX, PEM, PVK, CERT and SPC files. You'll need one of the PFX files to sign JARs and the SPC/PVK files to sign EXEs.Getting the certificatesWorking in Windows, I bought the certificate in Firefox. Within a couple of days I was phoned by Comodo to confirm my identity and the certificate issued. I collected the certificate in the same browser, ie it was installed in Firefox.Using these instructions, I saved the certificate from Firefox into a .P12 file.The next task is to import the certificate into Windows Internet Explorer. In Windows Explorer, double-click on the P12 file to start the Certificate Import Wizard. Choose your .p12 file. Tick (a) Enable strong private key encryption (b) Mark this key as exportable and (c) Include all extended properties. Click through until you can set the security level to High with a password of your choice.The certificate should now be installed in Internet Explorer. Find it in Tools, Internet Options, Content, Certificates. Follow these instructions to create a PFX file suitable for signing JAR files. As per the instructions, tick the "Include all certificates" option. I saved the eventual file with a name like mycert.jar.pfxTo get the SPC/PVK files to sign EXEs, you need to run the Internet Explorer certificate export wizard again. This time do not tick "Include all certificates". I saved the eventual file with a name like mycert.exe.pfxNow continue with these instructions to create the PVK and SPC files. You will need to install openssl if you don't have it already. I ran these from the openssl bin directory:openssl pkcs12 -in \certs\mycert.exe.pfx -nocerts -nodes -out \certs\mycert.pemopenssl rsa -in \certs\mycert.pem -outform PVK -pvk-strong -out \certs\mycert.pvkopenssl pkcs12 -in \certs\mycert.exe.pfx -nokeys -out \certs\mycert.certopenssl crl2pkcs7 -nocrl -certfile \certs\mycert.cert -outform DER -out \certs\mycert.spcI ignored the warning "WARNING: can't open config file: /usr/local/ssl/openssl.cnf"Backup all the created files carefully.Signing JAR filesFollow these instructions to find the alias you have been given - before the first comma which is followed by a date. This can either be a friendly name or a {GUID}. Make a note of the alias.keytool -list -storetype pkcs12 -keystore \certs\mycert.jar.pfxYou can then sign JAR files like this:jarsigner -storetype pkcs12 -keystore \certs\mycert.jar.pfx myfile.jar "myalias"jarsigner.exe -verify -certs myfile.jarSigning EXE filesSign EXE files like this, replacing the Description and the website with something appropriate:signcode -spc \certs\mycert.spc -v \certs\mycert.pvk -n "Description" -i "http://www.example.com/" -t http://timestamp.verisign.com/scripts/timstamp.dll myfile.exe

TAGS:Cant Chris blog 

<<< Thank you for your visit >>>

Websites to related :
Management, Leadership and Econo

  Leadership and People ManagementCovid-19 and the Unfolding of Global LeadershipSebastian Reiche | POSTED IN ExpatriatusNovember 2, 2020As Covid-19 u

Accueil -

  Etre "bien dans ses baskets", cela tient pour nous en quelques mots...Découvrez la philosophie de Milémil : FABRIQUER EN FRANCEEtre bien dans ses b

IKF Kickboxing

  IKF CALIFORNIACLICK HERE____________________IKF ARIZONACLICK HEREWHYSHOULD YOU BE A PART OF THE IKF?- CLICKHERE - If you are aKickboxer, Muay Thai Fig

Séjour en Auvergne - Office de

  Horaires d'ouverture Du 15 novembre au 31 mars : Lundi de 13h30 à 18h00 - Mardi au samedi de 9h30 à 12h30 et de 13h30 à 18h00.Du 1er avril au 14 n

Malaysia Scholarships 2020/2021

  Free Subscribe Scholarships Info 2020 Direct to your Email:Delivered by Biasiswa.Online

SOUTHERN SKI - Ski Shop dedicate

  Boots should be 1st purchase. Ski boots should always be a skiers first purchase. Boots give the greatest return on investment of all ski gear. Withou

Home - 21 FSS - Peterson Air For

  21 FSS Peterson Air Force Base 21st Force Support Squadron Force Support leaders providing outstanding care for our total force family at home and dep

The Shoe Guys Specialty Footwear

  Nature intended for us to walk barefoot. Society expects a shoe. Laurie first found the first pair of the Walk the Walk shoes at a consignment store i

Welcome to 220 Triathlon - 220 T

  By entering your details, you are agreeing to the 220 Triathlon terms and conditions. You can unsubscribe at any time.

2020 ?FREEDNB.COM - 耜圜囹?祗琨

  Support!!! PayPal; Bitcoin; WMZ; 圗UR; Cards; RUB; Pound; $USD1. https://new.donatepay.ru/en/@260328 (UK)2. https://donatepay.ru/don/260328 (RU+UK)Don

ads

Hot Websites