php5/mysql/apache configure for xp

Need help installing PHP, configuring a script, or configuring a server? Then come on in and post your questions! We'll try to help the best we can!

Moderator: General Moderators

Post Reply
ndjustin20
Forum Commoner
Posts: 31
Joined: Wed Sep 28, 2005 8:25 am

php5/mysql/apache configure for xp

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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:
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:4. Do not make multiple, identical posts. This is viewed as spam and will be deleted.
ndjustin20
Forum Commoner
Posts: 31
Joined: Wed Sep 28, 2005 8:25 am

Post 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.
User avatar
andre_c
Forum Contributor
Posts: 412
Joined: Sun Feb 29, 2004 6:49 pm
Location: Salt Lake City, Utah

Post 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
ndjustin20
Forum Commoner
Posts: 31
Joined: Wed Sep 28, 2005 8:25 am

Post by ndjustin20 »

just tried using http://localhost/phpinfo.php but now all i get is a page can not be displayed error message.
User avatar
andre_c
Forum Contributor
Posts: 412
Joined: Sun Feb 29, 2004 6:49 pm
Location: Salt Lake City, Utah

Post 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)
ndjustin20
Forum Commoner
Posts: 31
Joined: Wed Sep 28, 2005 8:25 am

Post 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...
ndjustin20
Forum Commoner
Posts: 31
Joined: Wed Sep 28, 2005 8:25 am

Post 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
User avatar
andre_c
Forum Contributor
Posts: 412
Joined: Sun Feb 29, 2004 6:49 pm
Location: Salt Lake City, Utah

Post 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
ndjustin20
Forum Commoner
Posts: 31
Joined: Wed Sep 28, 2005 8:25 am

Post by ndjustin20 »

I think i may fall in love with you by the end of this :lol: 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?
User avatar
andre_c
Forum Contributor
Posts: 412
Joined: Sun Feb 29, 2004 6:49 pm
Location: Salt Lake City, Utah

Post 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 :D
ndjustin20
Forum Commoner
Posts: 31
Joined: Wed Sep 28, 2005 8:25 am

Post 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?
ndjustin20
Forum Commoner
Posts: 31
Joined: Wed Sep 28, 2005 8:25 am

Post 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 :oops: 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.
ndjustin20
Forum Commoner
Posts: 31
Joined: Wed Sep 28, 2005 8:25 am

Post 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.
Post Reply