Using XAMPP, how do i swap out PHP 5.3 for PHP 5.2?

后端 未结 8 814
情书的邮戳
情书的邮戳 2020-12-04 15:59

I\'m using XAMPP 1.7.2, but need to swap out PHP 5.3 for PHP 5.2 - how do I do this?

8条回答
  •  无人及你
    2020-12-04 16:22

    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, add the lines

    (snip)

    
      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
        
          
            
                php_admin_flag safe_mode off
            
          
        
    
    

    (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.

    cheers,

    Jake

提交回复
热议问题