Re: Problem: php not working with apache on RedHat 9.0 - solved

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

 



Steve,

Than you very much. I did have a standard installation from cds that I purchased from RedHat. I have done all upgrades as they became available.

The missing link was "Include conf.d/*.conf" in /etc/httpd/conf/httpd.conf. I also
had the "LoadModule php4_module modules/libphp4.so" in the httpd.conf file.


	php is working on our web pages.

	Thank you again.

On Wednesday, July 14, 2004, at 12:02 AM, Steve Phillips wrote:

On Tue, 13 Jul 2004, Margaret Doll wrote:

I found on one of the RedHat archives that said:

"I havenchecked the lists lateley, b but I do not believe PHP works with
Apache 2.x, Upgrade/downgrape to apache 1.3x. Check the PHP and Apache
sites for changes. "



This used to be the case when apache2 was still rather new (2.0.2x afaik) but the later versions of apache and php are designed to co-operate nicely.


Apache2 rpms and php that ships with redhat 9.0 does work nicely together, have you done something such as an upgrade to get to redhat 9 ? if this is the case then you may find that your old httpd.conf file has been saved and is being used. if i remember rightly they moved the configuration for php out into /etc/httpd/conf.d and the httpd.conf file includes this directory on loadup.check to ensure that there is a php config file in this directory and that it has the correct php configuration directives.

On my RH9 system here the file contains..

LoadModule php4_module modules/libphp4.so

#
# Cause the PHP interpreter handle files with a .php extension.
#
<Files *.php>
    SetOutputFilter PHP
    SetInputFilter PHP
    LimitRequestBody 52428800
</Files>

and the main httpd.conf file contains the lines..

# Load config files from the config directory "/etc/httpd/conf.d".
Include conf.d/*.conf

I am guessing that you have a non-standard installation if it is not working out of the box.

--
Steve.


This was an old note from On Sun, May 11, 2003

I assume that you used the latest version when you built the packages.

On Tuesday, July 13, 2004, at 02:26 PM, Margaret Doll wrote:

Thanks. I hate to go through all the building, but that's what I will have to try. Perhaps the apache rpm was not built to handle the php functionality.
On Tuesday, July 13, 2004, at 02:18 PM, rufusss2001@xxxxxxx wrote:
I had same problem when installing apache and php from rpms,so i installed from source. I installed apache2 and php from source and mysql from rpms and everything works great.
In a message dated 7/13/2004 11:56:33 AM Eastern Daylight Time, Margaret Doll <Margaret_Doll@xxxxxxxxx> writes:
I am not able to get php working with apache on
RedHat 9.0. I have read through the php documentation. I am starting
through the apache documentation. Any ideas as to the problem?
uname -r
2.4.20-30.9
httpd -l
Compiled in modules:
core.c
prefork.c
http_core.c
mod_so.c
In /etc/httpd/conf/httpd.conf I added the next line after the loading
of the other modules.
LoadModule php4_module modules/libphp4.so
The AddType statements were already in /etc/httpd/conf/httpd/conf
DirectoryIndex index.html index.htm index.shtml index.php index.php4
index.php3 index.cgi
<IfModule mod_php4.c>
AddType application/x-httpd-php .php4 .php3 .phtml .php
AddType application/x-httpd-php-source .phps
<IfModule mod_php3.c>
AddType application/x-httpd-php3 .php3
AddType application/x-httpd-php3-source .phps
<IfModule mod_php.c>
AddType application/x-httpd-php .phtml
When I added the "AddModule" list as suggested in the php document
listed below,
httpd wouldn't start.
"Apache 1.3 configuration directives found
please read /usr/share/doc/httpd-2.0.40/migration.html"
I tried to view two test.php files
more mad.php
<html>
<head></head>
<body>
<?php
$myvar = "Hello World";
echo( $myvar);
?>
</body>
</html>
I get a blank screen on this file.
and
more test.php
<?php phpinfo(); ?>
I get a screen with "<?php phpinfo(); ?>" typed
exactly on it.
rpm -aq | grep httpd
httpd-2.0.40-21.9
redhat-config-httpd-1.0.1-18
httpd-manual-2.0.40-21.9
[root@chemps Software]# rpm -aq | grep php
php-imap-4.2.2-17.2
php-4.2.2-17.2
php-ldap-4.2.2-17.2
php-pgsql-4.2.2-17.2
php-mysql-4.2.2-17.2
-rwxr-xr-x 1 apache apache 93 Jul 13 10:45 mad.php
from us2.php.net/manual
4. Unix: I installed PHP using RPMS, but Apache isn't processing the
PHP pages! What's going on here?
Assuming you installed both Apache and PHP from RPM packages,
you need to uncomment or add some or all of the following lines
in your httpd.conf file:
# Extra Modules
AddModule mod_php.c
AddModule mod_php3.c
AddModule mod_perl.c
# Extra Modules
LoadModule php_module modules/mod_php.so
LoadModule php3_module modules/libphp3.so # for PHP 3
LoadModule php4_module modules/libphp4.so # for PHP 4
LoadModule perl_module modules/libperl.so
And add:
AddType application/x-httpd-php3 .php3 # for PHP 3
AddType application/x-httpd-php .php # for PHP 4
... to the global properties, or to the properties of the
VirtualDomain you want to have PHP support added to.
7. Unix/Windows: I have installed PHP, but when I try to access a
PHP script file via my browser, I get a blank screen.
Do a 'view source' in the web browser and you will probably find
that you can see the source code of your PHP script. This means
that the web server did not send the script to PHP for
interpretation. Something is wrong with the server configuration
- double check the server configuration against the PHP
installation instructions.
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
-- redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
-- redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux