954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

can't open php pages

After were installed apache server and php I can not browse web pages with extension php ... why so?

Smoke
Newbie Poster
3 posts since Aug 2006
Reputation Points: 10
Solved Threads: 0
 

Is your httpd.conf file setup properly? Because from the little information I am thinking that there are some things you need to do in your httpd.conf file to get php to work properly. I don't know if your on Linux or Windows or exactly what version of apache you are using but here is the install for php on a unix system, it explains what you need to do to the httpd.conf. Remember after you edit your httpd.conf you have to restart apache.

http://www.php.net/manual/en/install.unix.php

big_k105
PFO Founder
Team Colleague
357 posts since May 2003
Reputation Points: 36
Solved Threads: 2
 

i think you will get good info in this site http://www.w3schools.com/

aarya
Junior Poster
139 posts since Sep 2005
Reputation Points: 11
Solved Threads: 0
 

Hello, I've got the same small problem. I've installed XAMPP and I've got everything running apart from Mercury. This is the first time I've tried to parse php scripts on my own server, normally I use my uni's server.

Anyways, I read in a Sam's book that I'm meant to put documents in the 'htdocs' folder, and I've done that, and in my browsers I can't "see" my pages. Even something as simple as a phpinfo script doesn't work. IE acts like your standard Windows Explorer window, and Firefox also shows the folders, but when it comes to parsing, in Firefox the page is blank, and in IE if I double click on the file, it opens it up in my editor.

Reading around it is apparent that the problem is in some configuration somewhere, but where?! I thought XAMPP was good cos I wouldn't have problems like this?

******
Edit
When I open up my own scripts in Firefox, it basically shows me the code, but with no formatting etc. And when I try to open the phpinfo script it is just a blank page. I begin all these scripts with a 'file' protocol, this is correct right? I tried using "http://localhost" but that gave me an error 404 - "Object not found!".

Thinka
Posting Whiz
Team Colleague
378 posts since Aug 2004
Reputation Points: 50
Solved Threads: 11
 
jbennet
Moderator
Moderator
18,523 posts since Apr 2005
Reputation Points: 1,826
Solved Threads: 601
 

That too doesn't work mate. Could there be something wrong with my XAMPP installation because in the XAMPP "Welcome" localhost website, I tried the phpMyAdmin link and it says:
"MySQL said:

#2003 - The server is not responding "

But the Status page shows:

"MySQL database ACTIVATED

PHP ACTIVATED

HTTPS (SSL) ACTIVATED

Common Gateway Interface (CGI) ACTIVATED

Server Side Includes (SSI) ACTIVATED

SMTP Service DEACTIVATED

FTP Service ACTIVATED "

It's a weird one right?

Thinka
Posting Whiz
Team Colleague
378 posts since Aug 2004
Reputation Points: 50
Solved Threads: 11
 

Oh no, my fault, the code was in a folder that was inside the htdocs folder. I took it out of the folder and it worked...

And now I've written the link properly with the folder and it's worked... must have been doing something silly before. Cheers!

Thinka
Posting Whiz
Team Colleague
378 posts since Aug 2004
Reputation Points: 50
Solved Threads: 11
 

The most likely reason for this is that you haven't told Apache that .php files are acceptable.

If you followed a tutorial (there should be one in with the PHP distro you installed), then there will be instructions on setting it up with Apache in order to work properly.

What you need to change depends on the version of Apache and of PHP which you have installed, so I would recommend that you check your PHP files for an installation guide and still if problem persists then visit to web design company to have some help there online or let us know what versions of Apache and PHP you have and someone may be able to help further.

Of course the problem could be as simple as starting the server , but I'm assuming .html files work since you said specifically you had problems with .php files, which would imply that you have the Apache server up and running...

pattersonz
Newbie Poster
2 posts since Sep 2007
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You