[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: apache and php



Thanks freek, Stefan and Shyamal

Php files now work in the browser!

The answer was in uncommenting the lines you suggested in the
/etc/apache/httpd.conf file and using apachectl to restart the server.
What I did not realise for a while was that I needed to exit and reload
the browser too.

Here are the changes:
	LoadModule php4_module /usr/lib/apache/1.3/libphp4.so
	ServerName http://127.0.0.1/
	AddType application/x-httpd-php .php
	AddType application/x-httpd-php-source .phps

Shyamal Prasad wrote:
 > I can't help with your PHP problem, but you really need to fix this
 > if you ever browse your apache served pages from another place. Your
 > best bet is to edit the config file and set ServerName to the IP
 > address of the system. Otherwise redirects fail and things can be
 > quite bizzare. This might even be the source of your PHP problem, but
 > it might not (never used PHP).

The system is a stand-alone home box with a dial-up modem. I assume that
setting ServerName http://127.0.0.1/ is appropriate.


Cheers,

Chris
--
  ___   Chris Lale   <ctlale@coolscience.co.uk>
/   \
| <_/  My PC runs Debian GNU/Linux 3.0.
\      Robust, secure and free operating system + applications.
  \     Available at http://www.debian.org






Reply to: