Home  >  Article  >  Backend Development  >  php5.3 php5.4 install and config on windows VC6 and VC9,php5.3php5.4_PHP教程

php5.3 php5.4 install and config on windows VC6 and VC9,php5.3php5.4_PHP教程

WBOY
WBOYOriginal
2016-07-13 10:23:031050browse

php5.3 php5.4 install and config on windows VC6 and VC9, php5.3php5.4

Senario

Yii2 framework starts to require PHP version above PHP 5.4.0

<p>eg. yii2 中用到这样的代码 php 5.3.5 就不支持</p>
<code>	$extension = [
		&#39;name&#39; => $package->getName(),
		&#39;version&#39; => $package->getVersion(),
	];</code>

Download & Install PHP5.4 for Windows

<p>window php-5.4.0 之后不再支持 VC6 的编译包, 只下载到了 VC9 的编译包。</p>

php5.4 [VC9] Installation in VC6 environment

<p>win下的apache是用VC6编译的,其插件(apache module)也必须用VC6编译。<br />PHP5.4为什么不支持VC6?因为VC6太旧了,1998年的工具..<br />不能用是指php以apache mod的方式不能用。<br />现在php都以fast-cgi的方式挂载支持apache,连微软iis都放弃isapi转采用fast-cgi了。<br />在不同的进程下,VC9的php fast-cgi通过进程间通讯支持apache,即使apache不是vc不是win版都没问题。<br />去下载apache的mod_fcgid,然后把php配置到fcgid上。就可以用了</p>

Download php-5.4.30

From http://windows.php.net/downloads/releases/php-5.4.30-Win32-VC9-x86.zip

  • extract .zip file into C:php5.4
  • copy php.ini-production php.ini
  • modify C:php5.4php.ini
    php.ini

    <code>; Directory in which the loadable extensions (modules) reside.
    ; http://php.net/extension-dir
    ; extension_dir = "./"
    ; On windows:
    ; extension_dir = "ext"
     extension_dir = "C:\php5.4\ext</code>

download mod_fcgid-2.3.6-win32-x86.zip

From http://www.apache.org/dist/httpd/binaries/win32/

  • extract mod_fcgid.so into C:Apache2.2modules
  • modify C:Apache2.2confhttpd.conf
    httpd.conf

    <code>#LoadModule cgi_module modules/mod_cgi.so
    LoadModule fcgid_module modules/mod_fcgid.s
    #php-5.4.30-Win32-VC9-x86
    #BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
    PHPIniDir "C:/php5.4/"
    LoadModule php5_module "C:/php5.4/php5apache2_2.dll"
    #END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTAL</code>

    (Original article http://www.cnblogs.com/ganiks/)[http://www.cnblogs.com/ganiks/]

Restart Apache

Check your version

Check apache_php version and php console version

  • echo phpinfo(); to check
  • open a cmd window, 'php -v' to check

enable php_memcache.dll

Keep an eye on the version, otherwise you can't restart apache normally

Load the correct version of php_memcache.dll

My environment:
Thread Safety enabled
Compiler MSVC9 (Visual C++ 2008)
Architecture x86
Loaded Configuration File C:php5.4php.ini
PHP Version 5.4.30

http://windows.php.net/downloads/pecl/releases/memcache/3.0.8/
Tuesday, October 22, 2013 2:19 AM 182281 php_memcache-3.0.8-5.4-ts-vc9 -x86.zip

Of course, some old projects were not well supported under PHP5.4. For example, the split function is not supported in 5.4.

Switch between php5.3 php5.4

  • apache web side: reconfig httpd.conf
  • cmd console: reconfig computer $PATH

php5310 wants to use IIS and Apache together, how to download it, what about VC9 and VC6

(PHP installation)
zhidao.baidu.com/question/322636938.html
Refer to the best answer

Why is there no VC6 version on the official website of PHP 53 Windows Binary?

Hello, the latest official 5.3.6 currently only has vc9, not vc6 yet. It is said that 5.3.6 has a bug that has not been resolved yet. If you want to use vc6, you have to use version 5.3.5.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/844684.htmlTechArticlephp5.3 php5.4 install and config on windows VC6 and VC9, php5.3php5.4 Senario Yii2 framework starts The PHP version is required to be above PHP 5.4.0, eg. If you use such code in yii2, php 5.3.5 will not...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn