Categories
Windows

Upgrading from PHP5.6 to PHP7.0.

同一記事の日本語版

   Finally, PHP7.0.0 was released. Congrats and thanks, PHP developers!!
   Windows version appeared on windows.php.net around 21:00 UTC of December 3. Therefore, I upgraded from PHP5.6 to PHP7.0 this morning. Around 10:00 JST of December 4.

   There are some differences between 7.0.0’s php.ini-production and 5.6.16’s. Particularly, the big difference among them is MySQL extension. By default, all directives about MySQL extension are deleted from the php.ini-production (i.e. php.ini). You will have errors when you turn PHP7.0 on if your php files use MySQL extension. You have to use MySQLi extension. So your MySQL needs version 4.1 and above.

   I haven’t loaded MySQL extension since PHP5.6.0, so my php.ini has nothing changed at this time. I downloaded php-7.0.0-Win32-VC14-x86.zip because my sever OS is Windows7 HE SP1 x86 and took normal update steps.

   Don’t forget. You need to edit the httpd.conf. You must load php7apache2_4.dll instead of php5apache2_4.dll. So, do this.
LoadModule php5_module "(exact path of PHProot)/php5apache2_4.dll"
   ☟
LoadModule php7_module "(exact path of PHProot)/php7apache2_4.dll"

   They say ‘PHP 7 is up to twice as fast as PHP 5.6’. Do you feel such speed about my sites responses?

Leave a Reply

Your email address will not be published. Required fields are marked *