Page 1 of 1
php5/mysql/apache configure for xp
Posted: Wed Sep 28, 2005 10:03 am
by ndjustin20
Trying to use php5/mysql/apache but when i try a test page i see the code but the code doesn't do anything. I am brand new so any help would be greatly appreciated.
Posted: Wed Sep 28, 2005 10:48 am
by feyd
sounds like you haven't told apache that you want php files to be processed by php.
viewtopic.php?t=37951 may be of interest.
and please don't cross post again:
Posted: Wed Sep 28, 2005 11:18 am
by ndjustin20
C:\Program Files\Apache Group\Apache2\htdocs\phpinfo.php that is the path that comes up when i try to open my phpinfo file in internet explorer though what is shown is just the code. <?php phpinfo(); ?> Nothing else shows though and I have no idea why. Sorry about the double post......I have been at this thing for like 6 hours just trying to get apache/mysql/php to work fine together to keep reading in a SAMS book on the subject....brand spankin new to this so I would appreciate any help possible.
Posted: Wed Sep 28, 2005 11:39 am
by andre_c
you need to use a url like:
http://localhost/phpinfo.php
if you use a regular file path, apache won't read the file, the file system will
Posted: Wed Sep 28, 2005 11:44 am
by ndjustin20
just tried using
http://localhost/phpinfo.php but now all i get is a page can not be displayed error message.
Posted: Wed Sep 28, 2005 11:48 am
by andre_c
are you sure apache is running?
try just
http://localhost or
http://127.0.0.1
what's specified for DocumentRoot in your httpd.conf file (or whatever the conf file for apache on xp is called)
Posted: Wed Sep 28, 2005 11:57 am
by ndjustin20
tried localhost and 127.0.0.1 and neither worked just keeps saying page can not be displayed....
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
that is what is currently specified...
Posted: Wed Sep 28, 2005 12:01 pm
by ndjustin20
I am using the apache monitoring system and it says the service has started though i don't understand why i can not use localhost then
Posted: Wed Sep 28, 2005 12:14 pm
by andre_c
looks like apache is set to listen on port 8080
try going to
http://localhost:8080/phpinfo.php
or change your configuration to say
Listen *:80
restart apache and try
http://localhost again
Posted: Wed Sep 28, 2005 12:18 pm
by ndjustin20
I think i may fall in love with you by the end of this

so everytime i create some php script i need to include
http://localhost:8080/ and it will show just fine?..........oh and yes it worked......i can't even tell you how much i appreciate your help....is there anything else in my config file that is a little hokie? I am reading a step by step book from SAMS but it forgot to tell me about the port 8080 thingy.....any tips for a new guy like me?
Posted: Wed Sep 28, 2005 12:21 pm
by andre_c
usually what you want to do is setup apache to listen to port 80, unless some other program is using that port or you're just using apache for internal purposes...
enjoy

Posted: Wed Sep 28, 2005 12:23 pm
by ndjustin20
I just set it to listen on port 80 so it looks like i should be able to use just localhost now instead of including 8080.....what about the ip address though? does the ip change dynamically or is it fixed on the ip it was given when installed? I have a dynamic ip so if it changes do i need to go into the config file and change this or will apache take this info into consideration when restarting? As far as security goes then am i at any risk with this port open now?
Posted: Wed Sep 28, 2005 12:27 pm
by ndjustin20
I actually want to use apache to test php and mysql db that i create to hopefully upload to my hosting site in the near future. I have a long way to go I know but just configuring it alone took me forever and a day

my current website is a site i created for a restaurant i am currently working for called boston's the gourmet pizza...www.bostonsmenu.com....what i would like to create is an online order processing module using php and mysql so i got a lot of reading to do.
Posted: Wed Sep 28, 2005 12:31 pm
by ndjustin20
I know I just asked like ten million more questions in this thread and I'm sorry I just got a little excited when it finally worked. Thank you so so much for your time today and hopefully in a few months I can get on here and pay it forward to someone just like me who is just starting out also.