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

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

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!".

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?

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!

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.