| ★ wanayoo — archive 1999 http://www.phpbuilder.com/columns/moon19990716-2.php3 | Nouvelle recherche | Portail wanayoo |
|
|
|||
|
|
|
|
||
|
|
|
Using Windows and Apache to develop PHP3 - Part 2Setting Up PHP3There is a readme that comes with PHP3 on doing this. I will however walk through it here as well. There is a file called php3.ini-dist that came in the zip file. Copy that file to your 'windows' or 'winnt' folder. Rename it php3.ini. You will need to edit this file. The main thing is to load any modules that you want to use in PHP3 such as mysql. To do this, find the section in the .ini file that reads like:
;;;;;;;;;;;;;;;;;;;;;; Following that will be several commented out lines. For example:
;Windows Extensions More than likely, all you need to do is uncomment the ones that you need. In my case, I needed mysql enabled. So, I removed the ; from the line ;extension=php3_mysql.dll. If for some reason there is a dll that you need to load that is not listed, simply put it in here like: extension=mydll.dll Ok, so PHP3 is now ready to go. Setting Up Apache To Use PHP3 Remember I told you that you would need to get to the folder where you installed Apache? Well, it is now time. Open up your favorite text editor. The open the file called httpd.conf. It will be in the conf folder under the folder in which you installed Apache. In our case it will be at 'c:\apache\conf\httpd.conf'. For a full determination of what all this stuff does, see the Apache documentation. You need to add 3 lines to this file:
ScriptAlias /php3/ "c:/php306/" You can copy and paste the last two. In the first one you will need to put the actual path to the folder where you installed PHP3. Save this file and you are ready to try it out. Running Apache on NT If you are on NT you will want to install Apache as a service. To do this select Start, Programs, Apache, Install Apache As Service. Now Apache can be started and stopped using the 'Services' Control Panel Applet. Unless you have a good reason, I would suggest setting this to be started manually. To do this go to Control Panel and select Services. Select the Apache service and click 'Startup'. Set 'Start Up Type' to 'Manual'. This will make you have to start Apache when you need it. The good thing is that it will shut down when NT does. You will not see any Apache windows with this setup. Running Apache on Windows 9x If you are using Windows 9x, I would suggest downloading the Apache Manager for Windows from my website (http://brian.threadnet.com/apmgr.html). It stays in the system tray and hides all the console windows that Apache creates. It will allow you to start, stop and restart Apache without worrying about command line mess. If you do not want to use Apache Manager, you can start Apache by selecting Start, Programs, Apache Web Server, Apache Server. This will create a console (MS-DOS) window. DO NOT CLOSE THIS WINDOW. To stop Apache you will need to open an MS-DOS window, switch to your Apache folder ('c:\apache') and type: apache -k shutdown It may take a moment for the Apache console window to close. This ensures a proper shutdown of all all the threads and properly closes all the .conf and .log files. Now you know why I wrote Apache Manager.
|
||
|
|
|
Sample Code | Columns | Mail Archive | Support | Get Started! | Links | Contribute!
Contact (non support questions) By viewing these pages you agree to the Legal Terms of Service.
Geocrawler.com | GoToCity.com | DirectriCity.com | PHPBuilder.com | The Des Moines City.net |