New to PHP 3 Problems/Questions

Post everything else here

Moderators: Website/Forum Admins, Other/Off Topic Moderators

rf
Posts: 30
Joined: Wed Apr 05, 2006 10:16 pm

Postby rf » Thu Apr 20, 2006 12:14 am

:D Thanks for the explanations re start/stop and graceful.

"now you have a working apache/php.
try pointing your webbrowser to http://localhost/test.php"

If I point my browser to http://localhost/test.php It simply asks me what I want to do with the php script file - open it with what text editor or save it.

My browser does not seem to get the idea to process a .php file. This is in spite of the test.php being in the /var/www directory where web pages are to be kept.

The browser displays .html files ok. But seems not to want to process any .php.

Your further advice and patience is much appreciated.

:) rf
User avatar
munky
Site Admin
Posts: 826
Joined: Wed Jul 02, 2003 4:54 pm
Location: Phoenix AZ
Contact:

Postby munky » Thu Apr 20, 2006 2:01 pm

your browser does not process PHP files, your webserver does. the webserver processes PHP files to generate HTML (usually)

check your httpd.conf, you should have lines similar to the following (path and filenames may differ depending on your installation)
if the lines start with #, they are commented out, and may need to be uncommented for PHP to work properly

LoadModule php4_module libexec/libphp4.so
AddModule mod_php4.c
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
In God we trust,
Everyone else must have an X.509 certificate.
rf
Posts: 30
Joined: Wed Apr 05, 2006 10:16 pm

Postby rf » Sun Apr 23, 2006 6:59 pm

:D Thanks for your ever-green help.
:D :D Everything works now!
:? Only problem - I am not sure what made the difference!

"LoadModule php4_module libexec/libphp4.so
AddModule mod_php4.c
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps"

was tried in /etc/apache/httpd.conf lines 204 -208 and all were refused - giving various error messages!
Two things I did that may account for the why the server now will process .php files instead of asking how they want to be opened:
1) added "Include /etc/apache/modulo.conf" in httpd.conf
2) uninstalled php4 (in XandrosNetwork) which I could not tell did anything.

So thanks so much for all the help - my server now works on .php files.


:D :? rf

Who is online

Users browsing this forum: No registered users and 8 guests