Seen in other places an article, a little older, these two days are also looking to find a time to use the Iis+apache with a different port to do two PHP coexistence .... Then send them again. Read the original. ------------------------------------------------------------- The benefits are not much to say,:D What's the downside? Is the CGI way (quote official Original: We consider installing PHP like this Suicidal.--esayr Note: E is not good? Ah, the last one is suicide) Say less nonsense, look directly at the method: First, this article deals with software Extreme versions: Windows PROFESSIONAL/XP Apache 1.3.28 for WIN Microsoft Internet Server Information (IIS6) PHP 4.3.3 (4.3.5), PHP 5.0.0 Beta (5.0.0RC1) MySQL 3.23.57 (3.23.58) Two, approximate steps: (two, three optional)
1. Install each version of PHP separately 2. Install Apache, set up Apache and PHP 3. Install IIS and set PHP versions in IIS [Note 1] 4. Install MySQL Three, prepare before installation: Copy the required program to each folder, this article according to the following directory structure, you can modify ^ ^ According to your own needs:
C:/httpd/apache C:/httpd/mysql C:/httpd/php4 C:/httpd/php5 C:/httpd/php-includes C:/httpd/phpmyadmin C:/httpd/tmp C:/httpd/www
To the C:/WINNT/SYSTEM32/DRIVERS/ETC (XP is c:/windows/system32/drivers/etc) folder, locate the Hosts file (no?! @_@ so ...:D), add at the bottom 127.0.0.1 PhP4 # Waiter PHP 4 127.0.0.1 php5 # Waiter PHP 5 Roar ... If you understand ~ ~ Modify Other names yourself 8D We continue to ... Save File ...
Four, install each version of PHP Suppose you have downloaded all the versions of PHP you need ... (which download??:P find it yourself ...) Here take 4.3.3 and 5.0.0-beta as an example ... (4.3.5vs5.0.0rc1 I tried too. If it's not the same as your environment, don't blame me:(, much the same, I think about it);)
㈠ installation PHP4.3.3 ① Unzip the download file (:) The people of the Earth know) ② PHP4.3.3 Php.exe, php.ini-recommended, Phpêmbed.lib, Php4ts.dll, Php4ts.lib, Dll/*.* and Extensions/*.* to c:/httpd/ PHP4 ③ Modifying php.ini-recommended: Extension_dir = "c:/httpd/php4/extensions/" Cgi.force_redirect = 0 Save As PHP.ini (just under c:/httpd/php4/) ㈡ installation Php5.0.0beta ① decompression ... ② copies Php.exe, php.ini-recommended, Phpêmbed.lib, Php4ts.dll, Php4ts.lib, Dll/*.* and Extensions/*.* to C:HTTPDPHP5 If it is PHP5.0.0RC1, then there is no DLL and extensions directory, only ext--is extensions pull If... You're a loyal user of MySQL, and don't forget to cuff libmysql.dll too [Note 2]. ③ Modifying php.ini-recommended: Extension_dir = "c:/httpd/php5/extensions/" Cgi.force_redirect = 0 If it is php4.0.0rc1, then Extension_dir = "c:/httpd/php5/ext/" Save As PHP.ini (just under c:/httpd/php5/) Five, configure Apache Open c:/httpd/apache/conf/httpd.conf and add some settings at the bottom:
ServerAdmin test@php433 ServerName PHP4 Serveralias www DocumentRoot "C:/httpd/www" Options Indexes followsymlinks MultiViews AllowOverride None Order Allow,deny Allow from all scriptalias/php4/"c:/httpd/php4/" AddType application/x-httpd-php. php Action application/x-httpd-php "/php4/php.exe" ServerAdmin test@php500 ServerName PHP5 DocumentRoot "C:/httpd/www" Options Indexes followsymlinks MultiViews AllowOverride None Order Allow,deny Allow from all scriptalias/php5/"c:/httpd/php5/" AddType application/x-httpd-php. php Action application/x-httpd-php "/php5/php-cgi.exe"
Six, about PHP5 and MySQL MySQL installation, I will not say more, I put it down ... (Skip this paragraph, okay?) You can load MySQL by modifying the php.ini. (Sad ...) Seven, test ... Start Apache (if the httpd.conf configuration is wrong, there will be an error prompt ...), then the address bar input HTTP://PHP4 and http://php5 to start PHP4 and PHP5 respectively ... Is it cool? :D:D:D [Note 3] Believe that the vast number of PHP programmers, and want to learn PHP5 and do not want to give up PHP4 comrades, this will be a good way. ENJOY it! To summarize: In fact, the idea is very simple, the use of CGI to achieve the coexistence of PHP4 and PHP5. I found a lot of information, this is the simplest and most practical. But only for everyone to play this machine, do not do this on the server ... Otherwise ~ The consequence is self-esteem ... Don't look for me. If you have a problem with the method above, you can try other ways, here are some examples of foreign success: Http://wiki.coggeshall.org/37.html Http://www.circle.ch/blog/p1387.html Http://www.schlitt.info/applications/blog/..._5_prallel.html Interested can continue to study under ... Continuation of a significant complement to the programme:
PHP4 and PHP5 coexist, there is a problem of php.ini conflict ... As you all know, the general practice is to copy the php.ini to the System folder (C:winnt or c:windows). If you install multiple versions at the same time, it is bound to cause conflicts ... In fact, if you read the PHP installation document carefully, there will be the following text: Does Where C I cut to could the php.ini? The php.ini files are only searched in and places:1) in your Apache installation directory (e.g. C:apacheapache) 2) R%SYSTEMROOT% Directory. And we're just using the first way ... (Did the authorities expect this to happen??) GOD KNOWS ...) I tested successfully in the above environment ... If you encounter difficulties, you can leave a message or discuss it with the discussion area. Conclusion: I'm not very good at writing tutorials and stuff like that ... I read it, but it is not easy for others to understand, we have to be patient. Although the process is relatively simple, but it took me a lot of time (there are two places ...) I was looking for the wrong information, and I was badly hurt, this big a testified to pull ... (:D Big a slept up the toilet, I was still ... This is not suitable for children, delete 500 words) PHP5 era more and more close, hurriedly understand go ... ------------------------------------------------------------------------- [Note 1]: Originally wanted to write for IIS ... But I really don't want to put a useless thing on my machine (:(for me), so ... The title column, but gave up writing ... Say sorry to some spectators ... [Note 2]: Here said humorous: In the PHP5.0.0RC1, do not know that you see a mysqli.dll under the ext, and php.exe the same level under the directory there is a libmysqli.dll it? What the hell is this? This is the official new version of MySQL (4.1.0 seems to be ... BAR) for an upgrade, for the high version MySQL players can try ... is said to support MySQL some new features OH [Note 3]: When you start Apache, if you see anything "overlap on port 80" ... Don't worry, in the httpd.conf, put Namevirtualhost *:80 before the comments go ... (This place is very difficult for me for a long time ...) It's only strange that Apache settings are unfamiliar. But this time is good to the Apache set up to see all over, or there is a harvest) |