Jump to content


Photo

Installing PHP/MySQL on a PC


  • Please log in to reply
6 replies to this topic

#1 ablaye

ablaye
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 19 June 2006 - 11:42 PM

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
[a href="http://www.project4hire.com" target="_blank"][!--coloro:#990000--][span style="color:#990000"][!--/coloro--][!--sizeo:2--][span style="font-size:10pt;line-height:100%"][!--/sizeo--]Find Freelance Programmers and Graphic Designers[!--sizec--][/span][!--/sizec--][!--colorc--][/span][!--/colorc--][/a]
[a href="http://www.techslick.com/technology-forums" target="_blank"][!--coloro:#3333FF--][span style="color:#3333FF"][!--/coloro--][!--sizeo:2--][span style="font-size:10pt;line-height:100%"][!--/sizeo--]Computers and Consumer Electronics Forums[!--sizec--][/span][!--/sizec--][!--colorc--][/span][!--/colorc--][/a]

#2 hackerkts

hackerkts
  • Members
  • PipPipPip
  • Advanced Member
  • 593 posts
  • LocationSingapore
  • Age:18

Posted 20 June 2006 - 07:45 AM

Download wamp5
from: [a href=\"http://www.wampsever.com/en/\" target=\"_blank\"]http://www.wampsever.com/en/[/a]

Regards,
hackerkts

To be a coder, you must learn how to think and not to give up so easily.


#3 grubesteak

grubesteak
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 22 June 2006 - 03:02 PM

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

#4 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 22 June 2006 - 03:12 PM

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:
#LoadModule ssl_module modules/mod_ssl.so

Add the following after it:
LoadModule php4_module "C:/php/sapi/php4apache2.dll"

#PHPIniDir
PHPIniDir "C:/WINDOWS/
Note: 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:
DirectoryIndex index.html index.html.var
Now append index.php to the end of that line, like so:
DirectoryIndex index.html index.html.var index.php

Now scroll a litttle further and find this line:
AddType application/x-gzip .gz .tgz
And add the following after it:
AddType application/x-httpd-php .php

Save your httpd.conf and restart Apache. Next open up notepad ands put the following in it
<?php
phpinfo ();
?>
Save it as phpinfo.php (making sure that the file type pull down menu has all files selected) and save it to the folder where apache accesses your files, by defualt it is something like C :/program files/apache group/apache2/htdocs

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.

#5 grubesteak

grubesteak
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 22 June 2006 - 03:26 PM

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) View Post[/div][div class=\'quotemain\'][!--quotec--]
Add the following after it:
LoadModule php4_module "C:/php/sapi/php4apache2.dll"[/quote]

I did this also
[quote]#PHPIniDir
PHPIniDir "C:/WINDOWS/
Note: 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:
DirectoryIndex index.html index.html.var
Now append index.php to the end of that line, like so:
DirectoryIndex index.html index.html.var index.php
[/quote]

And this ...
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--]
Now scroll a litttle further and find this line:
AddType application/x-gzip .gz .tgz
And add the following after it:
AddType application/x-httpd-php .php
[/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
<?php
phpinfo ();
?>
Save it as phpinfo.php (making sure that the file type pull down menu has all files selected) and save it to the folder where apache accesses your files, by defualt it is something like C :/program files/apache group/apache2/htdocs[/quote]

And I still get the same result.

#6 grubesteak

grubesteak
  • New Members
  • Pip
  • Newbie
  • 3 posts

Posted 22 June 2006 - 04:13 PM

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?

#7 wildteen88

wildteen88
  • Staff Alumni
  • Advanced Member
  • 10,482 posts
  • LocationUK, Bournemouth

Posted 22 June 2006 - 04:24 PM

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:
;C:\php;
Now click Ok, OK, OK

Once you have returned to the desktop you'll need to restart your computer in order for the new Path variable become available.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users