首页 > 其他 > 修改xampp中的php5.3为php 5.2版本

修改xampp中的php5.3为php 5.2版本

Thanks for the answer. I just got this working on Windows XP, with a few modifications. Here are my steps.

  1. Download and install latest xampp to G:\xampp. As of 2010/03/12, this is 1.7.3.
  2. Download the zip of xampp-win32-1.7.0.zip, which is the latest xampp distro without php 5.3. Extract somewhere, e.g. G:\xampp-win32-1.7.0\
  3. Remove directory G:\xampp\php
  4. Remove G:\xampp\apache\modules\php5apache2_2.dll and php5apache2_2_filter.dll
  5. Copy G:\xampp-win32-1.7.0\xampp\php to G:\xampp\php.
  6. Copy G:\xampp-win32-1.7.0\xampp\apache\bin\php* to G:\xampp\apache\bin
  7. Edit G:\xampp\apache\conf\extra\httpd-xampp.conf.
    • Immediately after the line, <IfModule alias_module> add the lines

(snip)

<IfModule mime_module>
  LoadModule php5_module "/xampp/apache/bin/php5apache2_2.dll"
  AddType application/x-httpd-php-source .phps
  AddType application/x-httpd-php .php .php5 .php4 .php3 .phtml .phpt
   
<Directory "/xampp/htdocs/xampp">
     
<IfModule php5_module>
       
<Files "status.php">
            php_admin_flag safe_mode off
       
</Files>
     
</IfModule>
   
</Directory>
</IfModule>

(注意)删除原文件的PHP配置

#
# PHP-Module setup
#
LoadFile “D:/xampp/php/php5ts.dll”
LoadModule php5_module modules/php5apache2_2.dll

<IfModule php5_module>
    <FilesMatch “\.php$”>
        SetHandler application/x-httpd-php
    </FilesMatch>
    <FilesMatch “\.phps$”>
        SetHandler application/x-httpd-php-source
    </FilesMatch>

    PHPINIDir “D:/xampp/php”
</IfModule>

仔细想想就知道,会有配置冲突

(Note that this is taken from the same file in the 1.7.0 xampp distribution. If you run into trouble, check that conf file and make the new one match it.)

You should then be able to start the apache server with PHP 5.2.8. You can tail the G:\xampp\apache\logs\error.log file to see whether there are any errors on startup. If not, you should be able to see the XAMPP splash screen when you navigate to localhost.

Hope this helps the next guy.

 

原文:http://stackoverflow.com/questions/1302168/using-xampp-how-do-i-swap-out-php-5-3-for-php-5-2

分类: 其他 标签:
  1. 本文目前尚无任何评论.
  1. 本文目前尚无任何 trackbacks 和 pingbacks.

=3加7(必填)请输入两数相加的结果。