Automatic switch between the php4 and php5 environments...-PHP source code

Source: Internet
Author: User
Ec (2); & nbsp; Because php4 has been terminated for a long time, it is necessary to switch to php5, so sometimes debugging needs to be integrated into a script, let them automatically switch after batch processing. The environment is Windows XP SP2 + apache2.2.6 + PHP4.4.7 + PHP5.2.5PHP4 Directory: E: webphp4PHP5 Directory: E: webphp5APACHE Directory: E: webApache2.2 script ec (2); script

Because php4 has already ended, it is necessary to switch to php5, so sometimes debugging needs to be integrated.

A script is made to allow them to automatically switch after batch processing.

Environment:

Window XP SP2 + apache2.2.6 + PHP4.4.7 + PHP5.2.5

PHP4 Directory: E: webphp4

PHP5 Directory: E: webphp5

APACHE directory: E: webApache2.2

1. Two apache httpd. conf files are required, because apache2.2.6 does not support php4.47 well, so you need to add plug-ins. (Reference: http://pakapaka.jp/softwareinfo/146.html)

For php4: httpd_php4.conf

PHP5: httpd_php5.conf

2. Prepare two batch files.

To php4:



Copy php. ini c: windows
Copy php4ts. dll c: windows
Copy php4ts. lib c: windows
Copy E: webApache2.2confhttpd _ php4.conf E: webApache2.2confhttpd. conf

Net stop apache2.2
Net start apache2.2

Change to php5



Del c: windowsphp. ini
Del c: windowsphp4ts. dll
Del c: windowsphp4ts. lib

Copy E: webApache2.2confhttpd _ php5.conf E: webApache2.2confhttpd. conf

Net stop apache2.2
Net start apache2.2

Of course, the above directories are all stored in the php4 root directory. You only need to modify them according to the directory.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.