ablaye Posted June 19, 2006 Share Posted June 19, 2006 Hi,How do I go about installing PHP/MySQL on a PC running Windows XP?Does anyone know what I need to download or setup to do this?Thanks Quote Link to comment https://forums.phpfreaks.com/topic/12424-installing-phpmysql-on-a-pc/ Share on other sites More sharing options...
hackerkts Posted June 20, 2006 Share Posted June 20, 2006 Download wamp5from: [a href=\"http://www.wampsever.com/en/\" target=\"_blank\"]http://www.wampsever.com/en/[/a] Quote Link to comment https://forums.phpfreaks.com/topic/12424-installing-phpmysql-on-a-pc/#findComment-47559 Share on other sites More sharing options...
grubesteak Posted June 22, 2006 Share Posted June 22, 2006 wamp is great, but I'm in the position where I need to install PHP the "hard" way for testing purposes. So far, all I have is frustration.My work has PHP 4.3.2 running on Apache 2 for it's web server. I'm trying to mimic that on my desktop machine but it's no use.Apache is installed fine. I can display html files perfectly. But the php files, when ran, how the script as text instead of executing them. Any ideas on how to get the server to run the php scripts instead of displaying their contents?Much thanks in advance ...Eric Quote Link to comment https://forums.phpfreaks.com/topic/12424-installing-phpmysql-on-a-pc/#findComment-48469 Share on other sites More sharing options...
wildteen88 Posted June 22, 2006 Share Posted June 22, 2006 In order for your PHP pages to be parsed you need to configure Apace to send these files to PHP intepreter like so:Find and opne you httpd.conf file for editing.Now find the following line:[code]#LoadModule ssl_module modules/mod_ssl.so[/code]Add the following after it:[code]LoadModule php4_module "C:/php/sapi/php4apache2.dll"#PHPIniDirPHPIniDir "C:/WINDOWS/[/code][b]Note:[/b] I am assuming you have PHP located in a folder called PHP in the root of the hard drive. Change C:/php to the correct path of you PHP folder.Now scroll down and find this line:[code]DirectoryIndex index.html index.html.var[/code]Now append index.php to the end of that line, like so:[code]DirectoryIndex index.html index.html.var index.php[/code]Now scroll a litttle further and find this line:[code]AddType application/x-gzip .gz .tgz[/code]And add the following after it:[code]AddType application/x-httpd-php .php[/code]Save your httpd.conf and restart Apache. Next open up notepad ands put the following in it[code]<?phpphpinfo ();?>[/code]Save it as phpinfo.php (making sure that the file type pull down menu has [b]all files[/b] selected) and save it to the folder where apache accesses your files, by defualt it is something like [i]C :/program files/apache group/apache2/htdocs[/i]Now open up your web browser and type this in:[a href=\"http://localhost/phpinfo.php\" target=\"_blank\"]http://localhost/phpinfo.php[/a]You should now get a page full of current PHP and server settings. Quote Link to comment https://forums.phpfreaks.com/topic/12424-installing-phpmysql-on-a-pc/#findComment-48475 Share on other sites More sharing options...
grubesteak Posted June 22, 2006 Share Posted June 22, 2006 OK, I did that and am sure it's pointing to the correct dictory and file. I check and the php4apache2.dll file is in the sapi directory in my php folder at the root of the C drive. [!--quoteo(post=386845:date=Jun 22 2006, 10:12 AM:name=wildteen88)--][div class=\'quotetop\']QUOTE(wildteen88 @ Jun 22 2006, 10:12 AM) [snapback]386845[/snapback][/div][div class=\'quotemain\'][!--quotec--]Add the following after it:[code]LoadModule php4_module "C:/php/sapi/php4apache2.dll"[/quote]I did this also[quote]#PHPIniDirPHPIniDir "C:/WINDOWS/[/code][b]Note:[/b] I am assuming you have PHP located in a folder called PHP in the root of the hard drive. Change C:/php to the correct path of you PHP folder.[/quote]Yep, I did this.[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Now scroll down and find this line:[code]DirectoryIndex index.html index.html.var[/code]Now append index.php to the end of that line, like so:[code]DirectoryIndex index.html index.html.var index.php[/code][/quote]And this ...[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Now scroll a litttle further and find this line:[code]AddType application/x-gzip .gz .tgz[/code]And add the following after it:[code]AddType application/x-httpd-php .php[/code][/quote]And this, and I already had a phpinfo file on hand and I know it works.[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]Save your httpd.conf and restart Apache. Next open up notepad ands put the following in it[code]<?phpphpinfo ();?>[/code]Save it as phpinfo.php (making sure that the file type pull down menu has [b]all files[/b] selected) and save it to the folder where apache accesses your files, by defualt it is something like [i]C :/program files/apache group/apache2/htdocs[/i][/quote]And I still get the same result. Quote Link to comment https://forums.phpfreaks.com/topic/12424-installing-phpmysql-on-a-pc/#findComment-48479 Share on other sites More sharing options...
grubesteak Posted June 22, 2006 Share Posted June 22, 2006 What's odd is that I tried testing the Apache configuration, and it says the php4apache2.dll file can't be found, but the path in the httpd.conf file is right and everything. Ideas? Quote Link to comment https://forums.phpfreaks.com/topic/12424-installing-phpmysql-on-a-pc/#findComment-48507 Share on other sites More sharing options...
wildteen88 Posted June 22, 2006 Share Posted June 22, 2006 Try adding your PHP folder to the Windows PATH variable by doing the following:Start -> Control Panel -> double click System icon (classic view).Now click the Advanced tab and click the Environment variables button. Now goto the Systems box and select the PATH variable from the list. Now click the Edit button. Now click the END key on your keyboard. This will make the cursor go to the end of the list of variables.Type in the following:[code];C:\php;[/code]Now click Ok, OK, OKOnce you have returned to the desktop you'll need to restart your computer in order for the new Path variable become available. Quote Link to comment https://forums.phpfreaks.com/topic/12424-installing-phpmysql-on-a-pc/#findComment-48509 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.