I'm getting back into writing some php, after quite some time. I'm a little rusty.
I have apache started. Document Root is /srv/www/htdocs. The site I am working on is in /srv/www/htdoc/MySite/. In that directory are index.htm and mypage.php. index.htm displays, with a link to mypage.php.When I click on this link, firefox says:
You have chosen to open mypage.php
which is a: PHP file
from: /srv/www/htdocs/MySite
What should firefox do with this file?
Open with [Browse[
Save to disk
What have I forgotten to set up, initialize, turn on ...?
running php locally
Moderator: General Moderators
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Yuo need to add the directive in httpd.conf that tells apache what to do with php files. I added this at the end of my apache config file
Code: Select all
# For PHP 5 do something like this:
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "C:/php"-
allelopath
- Forum Commoner
- Posts: 34
- Joined: Tue Mar 16, 2004 5:21 am
Running linux, not windows, my bad for not specifying.
I already have this in /etc/apache2/httpd.conf:
AddType application/x-httpd-php .php
Also there is this statement:
# generated from APACHE_MODULES in /etc/sysconfig/apache2
Include /etc/apache2/sysconfig.d/loadmodule.conf
loadmodule.conf has this line:
LoadModule php4_module /usr/lib/apache2-prefork/libphp4.so
I have verified that libphp4.so is there.
hmph.
I already have this in /etc/apache2/httpd.conf:
AddType application/x-httpd-php .php
Also there is this statement:
# generated from APACHE_MODULES in /etc/sysconfig/apache2
Include /etc/apache2/sysconfig.d/loadmodule.conf
loadmodule.conf has this line:
LoadModule php4_module /usr/lib/apache2-prefork/libphp4.so
I have verified that libphp4.so is there.
hmph.
-
allelopath
- Forum Commoner
- Posts: 34
- Joined: Tue Mar 16, 2004 5:21 am