[PHP] Re: PHP Installation Questions
Errm... Just unzip the php zip, so that php.exe is located in c:\php (or D:\ or something).. For example C:\php\php.exe... Then, find your Apache config file in the Apache\conf folder, named httpd.conf.. Open it, scroll down to the bottom, then add LoadFile C:/PHP/php5ts.dll LoadModule C:/PHP/php5Apache.dll AddType application/x-httpd-php .php .php5 AddType application/x-httpd-php-source .phps Then restart Apache, 'NET STOP Apache', 'NET START Apache' for example... php.net/manual/en/, click install.. -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com Freedomware [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] I'm running Windows XP Pro and just installed Apache 1.3. It appears to be running, so I guess I'm ready to install PHP. I visited http://snaps.php.net and downloaded the latest PHP program - CVS (5.0.x-dev). I'm reading the installation instructions at http://cvs.php.net/co.php/php-src/win32/install.txt and find them fairly confusing. First, it says, There are two main ways to install PHP for Windows: either manually or by using the InstallShield installer. I definitely want to do it the easy way, but how do I access the InstallShield installer? But it appears that I first have to do two other things: 1. Stop Apache 2. Decide whether I want to install PHP as a CGI or something else (a module?) So how do I stop Apache, and should I install PHP as a CGI or choose the other option? I'm going to be using PHP on websites, primarily to make server side includes and, eventually, to do some work with databases. The instructions say, Once the installation has completed the installer will inform you if you need to restart your system, restart the server, or just start using PHP. I assume this refers to using the InstallShield, which renders just about everything else on the installation instructions page moot, right? If I use the InstallShield, will I still have to install the Windows extensions, or are they installed automatically? Later, the instructions talk about Installing PHP on Windows with Apache 1.3.x. It says, There are two ways to set up PHP to work with Apache 1.3.x on Windows. One is to use the CGI binary (php.exe), the other is to use the Apache module dll. In either case you need to stop the Apache server, and edit your httpd.conf or srm.conf to configure Apache to work with PHP. We'll refer to either of these files with httpd.conf in the text. Is this all done automatically if I use the InstallShield? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP Installation Questions
Dvdmandt wrote: Errm... Just unzip the php zip, so that php.exe is located in c:\php (or D:\ or something).. For example C:\php\php.exe... Then, find your Apache config file in the Apache\conf folder, named httpd.conf.. Open it, scroll down to the bottom, then add LoadFile C:/PHP/php5ts.dll LoadModule C:/PHP/php5Apache.dll AddType application/x-httpd-php .php .php5 AddType application/x-httpd-php-source .phps Then restart Apache, 'NET STOP Apache', 'NET START Apache' for example... php.net/manual/en/, click install.. H... I can't locate a file named httpd.conf, but the conf folder contains two files named httpd and httpd.default, which appear to be identical twins. They both end with this: # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for requests without a known # server name. # #VirtualHost *:80 #ServerAdmin [EMAIL PROTECTED] #DocumentRoot /www/docs/dummy-host.example.com #ServerName dummy-host.example.com #ErrorLog logs/dummy-host.example.com-error_log #CustomLog logs/dummy-host.example.com-access_log common #/VirtualHost * * * * * * * * * * So I'm assuming you're teling me to change it to this: # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for requests without a known # server name. # #VirtualHost *:80 #ServerAdmin [EMAIL PROTECTED] #DocumentRoot /www/docs/dummy-host.example.com #ServerName dummy-host.example.com #ErrorLog logs/dummy-host.example.com-error_log #CustomLog logs/dummy-host.example.com-access_log common #/VirtualHost LoadFile C:/PHP/php5ts.dll LoadModule C:/PHP/php5Apache.dll AddType application/x-httpd-php .php .php5 AddType application/x-httpd-php-source .phps * * * * * * * * * * Right? And do you think I should do it to the httpd file, the httpd.default file or both? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP Installation Questions
There really should be one named httpd.conf.. Otherwise, that might be the one named httpd if you have extensions on filenames off (not recommended in any way)... Also, it should be LoadModule php5_module C:/PHP/php5Apache.dll sorry, my misstake.. :) -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com Freedomware [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] Dvdmandt wrote: Errm... Just unzip the php zip, so that php.exe is located in c:\php (or D:\ or something).. For example C:\php\php.exe... Then, find your Apache config file in the Apache\conf folder, named httpd.conf.. Open it, scroll down to the bottom, then add LoadFile C:/PHP/php5ts.dll LoadModule C:/PHP/php5Apache.dll AddType application/x-httpd-php .php .php5 AddType application/x-httpd-php-source .phps Then restart Apache, 'NET STOP Apache', 'NET START Apache' for example... php.net/manual/en/, click install.. H... I can't locate a file named httpd.conf, but the conf folder contains two files named httpd and httpd.default, which appear to be identical twins. They both end with this: # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for requests without a known # server name. # #VirtualHost *:80 #ServerAdmin [EMAIL PROTECTED] #DocumentRoot /www/docs/dummy-host.example.com #ServerName dummy-host.example.com #ErrorLog logs/dummy-host.example.com-error_log #CustomLog logs/dummy-host.example.com-access_log common #/VirtualHost * * * * * * * * * * So I'm assuming you're teling me to change it to this: # # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for requests without a known # server name. # #VirtualHost *:80 #ServerAdmin [EMAIL PROTECTED] #DocumentRoot /www/docs/dummy-host.example.com #ServerName dummy-host.example.com #ErrorLog logs/dummy-host.example.com-error_log #CustomLog logs/dummy-host.example.com-access_log common #/VirtualHost LoadFile C:/PHP/php5ts.dll LoadModule C:/PHP/php5Apache.dll AddType application/x-httpd-php .php .php5 AddType application/x-httpd-php-source .phps * * * * * * * * * * Right? And do you think I should do it to the httpd file, the httpd.default file or both? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP Installation Questions
H... The first installation ended with this message: Sorry, the software to automatically configure the Apache httpd.conf file has not yet been written. You will have to configure Apache manually. See the install txt file for more details. It then occurred to me that I forgot to tell you that I'm installing PHP 4.3.4; there was a problem with 5.0, so I downloaded 4.3.4 instead. So instead of adding this to my conf/httpd file: LoadFile C:/PHP/php5ts.dll LoadModule php5_module C:/PHP/php5Apache.dll AddType application/x-httpd-php .php .php5 AddType application/x-httpd-php-source .phps I replaced every instance of php5 with php4, so the conf/httpd file ends like this: # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for requests without a known # server name. # #VirtualHost *:80 #ServerAdmin [EMAIL PROTECTED] #DocumentRoot /www/docs/dummy-host.example.com #ServerName dummy-host.example.com #ErrorLog logs/dummy-host.example.com-error_log #CustomLog logs/dummy-host.example.com-access_log common #/VirtualHost LoadFile C:/PHP/php4ts.dll LoadModule php4_module C:/PHP/php4Apache.dll AddType application/x-httpd-php .php .php4 AddType application/x-httpd-php-source .phps * * * * * * * * * * But I get the same error message. Then I replaced the four lines I added to the conf/httpd file with three lines I copied from the Installation.txt: LoadModule php4_module c:/php/sapi/php4apache.dll AddModule mod_php4.c AddType application/x-httpd-php .php I still get the same error message. However, on all three occasions when I clicked out of the error message, I got a message telling me PHP was successfully installed. Do you have a hunch what I should do next? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP Installation Questions
Errm.. Ok, don't download the installer.. That'll just bring you more problems.. :s The easiest way is to just download the *-win32.zip file, and extract to c:\php, and possibly move all files cause the extraction proggy might place them in C:\php\php-4.3.4... when you want them in C:\php... Now, in php5, the dll's are placed somewhat different... Here's a snippet from my httpd.conf: ### # PHP 4 LoadFile C:/PHP/php4ts.dll Loadmodule php4_module c:\php\sapi\php4apache.dll # PHP 5 (deactivated) # LoadFile D:/PHP5/php5ts.dll # Loadmodule php5_module D:\php5\php5apache.dll # Associate files AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps If you add them as the last lines, you don't need that AddModule line.. That loadfile line is there to ease upgrades, you can workaround that if you move some files... -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com Freedomware [EMAIL PROTECTED] skrev i meddelandet news:[EMAIL PROTECTED] H... The first installation ended with this message: Sorry, the software to automatically configure the Apache httpd.conf file has not yet been written. You will have to configure Apache manually. See the install txt file for more details. It then occurred to me that I forgot to tell you that I'm installing PHP 4.3.4; there was a problem with 5.0, so I downloaded 4.3.4 instead. So instead of adding this to my conf/httpd file: LoadFile C:/PHP/php5ts.dll LoadModule php5_module C:/PHP/php5Apache.dll AddType application/x-httpd-php .php .php5 AddType application/x-httpd-php-source .phps I replaced every instance of php5 with php4, so the conf/httpd file ends like this: # VirtualHost example: # Almost any Apache directive may go into a VirtualHost container. # The first VirtualHost section is used for requests without a known # server name. # #VirtualHost *:80 #ServerAdmin [EMAIL PROTECTED] #DocumentRoot /www/docs/dummy-host.example.com #ServerName dummy-host.example.com #ErrorLog logs/dummy-host.example.com-error_log #CustomLog logs/dummy-host.example.com-access_log common #/VirtualHost LoadFile C:/PHP/php4ts.dll LoadModule php4_module C:/PHP/php4Apache.dll AddType application/x-httpd-php .php .php4 AddType application/x-httpd-php-source .phps * * * * * * * * * * But I get the same error message. Then I replaced the four lines I added to the conf/httpd file with three lines I copied from the Installation.txt: LoadModule php4_module c:/php/sapi/php4apache.dll AddModule mod_php4.c AddType application/x-httpd-php .php I still get the same error message. However, on all three occasions when I clicked out of the error message, I got a message telling me PHP was successfully installed. Do you have a hunch what I should do next? Thanks. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php