I can run php scripts on the command line:
root$ php testscript.php
I verify Php is installed
$ rpm -q php php-4.3.9-3.22
However, if I try to run them through the webserver, I get no output.. nothing ie
opening up with firefox http://localhost/testscript.php
So, is there like a PHP module for Apahce that needs to be installed, and if so, what is it called, and I assume once I know its name I can install it with up2date
Is PHP module for Apache installed by default?
Re: Is PHP module for Apache installed by default?
It should.
check /etc/httpd/conf.d/php.conf
This is the file places by php in order to run from withing apache. It is placed automagically.
regards
epe
check /etc/httpd/conf.d/php.conf
This is the file places by php in order to run from withing apache. It is placed automagically.
regards
epe
Re: Is PHP module for Apache installed by default?
Starguy:
Even there is notting on the screen you can check apache log file for errors.... WHAT IS THE ERROR.??
Even there is notting on the screen you can check apache log file for errors.... WHAT IS THE ERROR.??
PHP/Apache problem...
Hey all,
I have php-4.3.9-3.22 with Apache(httpd) 2.0.52-28.ent.centos4 on CentOS4.4. Both of these were included in the OS install. When I open a .php file, at first it was just the garbled code showing up in the browser, now the browser says "The file install.php is of type application/x-httpd-php, and seamonkey does not know how to handle this file. I need to install dokuwiki, and I can't because of this setback.
Here are the changes I've made so far.
In /etc/httpd/conf/httpd.conf, added:
AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php-source .phps
PHPIniDir "/etc/httpd/conf"
This is what's in the /etc/httpd/conf.d/php.conf file (called by httpd.conf):
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#
LoadModule php4_module modules/libphp4.so
#
# Cause the PHP interpreter to handle files with a .php extension.
#
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 9524288
AddType application/x-x509-ca-cert .crt
AddType application/x-httpd-php-source .phps
#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php
I have also copied the php.ini file from /etc to /etc/httpd/conf. Am I missing something?? I am really stuck, and would appreciate any help!
Thanks,
Mark
I have php-4.3.9-3.22 with Apache(httpd) 2.0.52-28.ent.centos4 on CentOS4.4. Both of these were included in the OS install. When I open a .php file, at first it was just the garbled code showing up in the browser, now the browser says "The file install.php is of type application/x-httpd-php, and seamonkey does not know how to handle this file. I need to install dokuwiki, and I can't because of this setback.
Here are the changes I've made so far.
In /etc/httpd/conf/httpd.conf, added:
AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
AddType application/x-httpd-php-source .phps
PHPIniDir "/etc/httpd/conf"
This is what's in the /etc/httpd/conf.d/php.conf file (called by httpd.conf):
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#
LoadModule php4_module modules/libphp4.so
#
# Cause the PHP interpreter to handle files with a .php extension.
#
SetOutputFilter PHP
SetInputFilter PHP
LimitRequestBody 9524288
AddType application/x-x509-ca-cert .crt
AddType application/x-httpd-php-source .phps
#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php
I have also copied the php.ini file from /etc to /etc/httpd/conf. Am I missing something?? I am really stuck, and would appreciate any help!
Thanks,
Mark
Re: PHP/Apache problem...
Here is my /etc/httpd/conf.d/php.conf
[code]
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#
LoadModule php4_module modules/libphp4.so
#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddType application/x-httpd-php .php
# AddType application/x-httpd-php-source .phps
#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php
[/code]
Erase all changes you've made in httpd.conf
php.conf is called to setup php
See error log for details on error.
[code]
#
# PHP is an HTML-embedded scripting language which attempts to make it
# easy for developers to write dynamically generated webpages.
#
LoadModule php4_module modules/libphp4.so
#
# Cause the PHP interpreter to handle files with a .php extension.
#
AddType application/x-httpd-php .php
# AddType application/x-httpd-php-source .phps
#
# Add index.php to the list of files that will be served as directory
# indexes.
#
DirectoryIndex index.php
[/code]
Erase all changes you've made in httpd.conf
php.conf is called to setup php
See error log for details on error.