ok, im trying to manually install apache mysql and PHP on my windows system instead of a all in one installer. all went fine, but apache isnt running php, only html. now how would i configure apache so it does run php? ive made a phpinfo document to test php, but it just outputs <?PHP phpinfo(); ?>. ive been told to edit the httpd file in the apache/conf folder, so i googled it. ive tried all possible ways i could find, but everytime i go to localhost/phpinfo.php i get this error message.
The requested URL /php/php.exe/phpinfo.php was not found on this server.
now where the hell does that /php/php.exe come from?
ive beem trying to fix this ** problem like all day and im starting to get pissed...
so please help me before i smash my computer
PHP + Apache = hell
Started by Av-, Sep 11 2005 04:08 PM
5 replies to this topic
#1
Posted 11 September 2005 - 04:08 PM
#3
Posted 11 September 2005 - 04:13 PM
yeah i know that i installed php already but its just not working. when installing php you can select the which server you are using, so i select apache. but after the installation it sais something like i have to manualy configure that conf file. google sais this error is normal...
#4
Posted 12 September 2005 - 09:28 AM
anybody???? or is there a good all in one installer maybe? better than the one i had before...
#5
Posted 12 September 2005 - 05:33 PM
try this:
Quote
Installing PHP
Unzip the distribution into your C:\ drive and rename the top directory that it's in from C:\php-5.0.3-Win32 to C:\php.
Now rename php.ini-dist in this directory to php.ini. You'll need to edit it a little in a moment, so open it in a text editor.
Go back to your http.conf file that you opened during the Apache configuration. Somewhere in the file will be a whole raft of LoadModule directives. Add the following lines at the bottom of the block:
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php .php3 .php4 .phtml
AddType application/x-httpd-php-source .phps
PHPIniDir "C:/php"
Finally, find a line that starts with DirectoryIndex and add index.php to the end of the list.
DirectoryIndex index.html index.html.var index.php
Now add c:\php to your path: Right-click on "My Computer", select "Properties" and the "Advanced" tab. At the bottom of the tab, click on "Environment Variables". In the window that opens, go to the bottom list "System Variables" and add c:\php to the existing entry for Path.
Almost done - just that we can't quite talk to MySQL yet. Copy the file c:\php\libmysql.dll to c:\Windows\system32 and overwrite any older version there. Now edit php.ini and remove the semicolon in front of extension=php_mysql.dll and in front of extension=php_sockets.dll. Also, look for the entry extension_dir and set it to "c:/php/ext" - note that the forward slashes are well understood by Windows and are in fact the preferred notation in php.ini.
Save php.ini and httpd.conf and restart Apache.
Unzip the distribution into your C:\ drive and rename the top directory that it's in from C:\php-5.0.3-Win32 to C:\php.
Now rename php.ini-dist in this directory to php.ini. You'll need to edit it a little in a moment, so open it in a text editor.
Go back to your http.conf file that you opened during the Apache configuration. Somewhere in the file will be a whole raft of LoadModule directives. Add the following lines at the bottom of the block:
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php .php3 .php4 .phtml
AddType application/x-httpd-php-source .phps
PHPIniDir "C:/php"
Finally, find a line that starts with DirectoryIndex and add index.php to the end of the list.
DirectoryIndex index.html index.html.var index.php
Now add c:\php to your path: Right-click on "My Computer", select "Properties" and the "Advanced" tab. At the bottom of the tab, click on "Environment Variables". In the window that opens, go to the bottom list "System Variables" and add c:\php to the existing entry for Path.
Almost done - just that we can't quite talk to MySQL yet. Copy the file c:\php\libmysql.dll to c:\Windows\system32 and overwrite any older version there. Now edit php.ini and remove the semicolon in front of extension=php_mysql.dll and in front of extension=php_sockets.dll. Also, look for the entry extension_dir and set it to "c:/php/ext" - note that the forward slashes are well understood by Windows and are in fact the preferred notation in php.ini.
Save php.ini and httpd.conf and restart Apache.
#6
Posted 13 September 2005 - 08:25 AM
thanks for this but i already installed xampp, a all in 1 installer, workd just as good and is much easier to install. still thanks for looking this up for me tho. much appriciated
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
