PHP doesn't run on Red Hat 9 system

From: Scott Sherratt (sjsherratt_at_REMOVETHIS.yahoo.com)
Date: 11/24/03


Date: Sun, 23 Nov 2003 17:27:25 -0800

I'm trying to get PHP running on my RH9 system, but can't seem to get it
to work. My test php program results in a blank browser screen (though
I can see the source),and it runs fine on at a 'hosted' site using RH.
I understand that PHP should work without having to compile source
code. Is there anything else I need to configure ?

Basically I installed the RPM's, added types to httpd.conf and restarted
httpd.

I added the following in /etc/httpd/conf/httpd.conf

<Files *.php>
    AcceptPathInfo On
</Files>

AddType application/x-httpd-php .php .php3 .php4 .shtml .phtml
AddType application/x-httpd-php-source .phps

Here are the RPM's that are installed:

[root@srv root]# rpm -qa | grep php
php-imap-4.2.2-17.2
php-mysql-4.2.2-17.2
php-pgsql-4.2.2-17.2
php-4.2.2-17.2
php-ldap-4.2.2-17.2
php-devel-4.2.2-17.2
[root@srv root]# rpm -qa | grep httpd
httpd-manual-2.0.40-21.5
redhat-config-httpd-1.0.1-18
httpd-2.0.40-21.5
[root@srv root]# httpd -l
Compiled in modules:
  core.c
  prefork.c
  http_core.c
  mod_so.c

Test PHP script in /var/www/html/temp.php

<HTML>
<HEAD>
<TITLE>Test</TITLE>
</HEAD>
<BODY>
<?
 /*
 * Print Info
 */
 phpinfo();
?>
</BODY>
</HTML>

Again, what else do I need to do in order to get PHP running under RH9 &
Apache 2 (other than uninstalling RPM's and complining everything from
source).

Thanks. Scott sjsherratt@REMOVE_THIS@yahoo.com



Relevant Pages

  • Re: Debian Wheezy Compromised - www-data user is sending 1000 emails an hour
    ... Was directory in question was owned by root, ... Was php files in question was owned by root, ... directory is owned by root or user-created account is irrelevant. ... If the needed usage of certain php script does not require creating or ...
    (Debian-User)
  • Re: Site root question: Newbie
    ... That was a variable that only sits in front of all of the site includes, all of the root-relative links in the site are still looking at http://www.site.com/ as the root rather than http://www.site.com/client/dev/2006/. ... and that is the root folder. ... In all of the PHP sites I've seen there are always a couple of folder levels outside the web site root and these seem to contain necessary php files like pear, and setting root-relative links, especially with include files, can be a real pain, in my limited experience. ... For security reasons you may not want it to be possible for someone outside the server to execute some scripts, those you place outside the root for the website, this way no one can use an url and try to run a script. ...
    (alt.php)
  • RE: Linux hacked
    ... Was any of the sites running a php nuke or another portal or system that is vuln ... been able to use that with a locla root exploit to gain root on the machine. ... > hack the box, pull the drive and save it. ... > Use the newest versions of Gentoo, Apache, SSH, PHP and Squirl Mail. ...
    (Security-Basics)
  • Re: include_path related issue
    ... The actual path of the root dir of my account with hosting provider ... I can specify additional subdomains in the control panel of my account. ... The .htaccess file in httpdocs is similar to the one in my master domain. ... PHP recognizes the include_path setting properly, ...
    (comp.lang.php)
  • Re: idiot question about chown
    ... > I want to chown htdocs. ... I want htdocs to belong to the same user as ... Apparently PHP is running as root. ...
    (alt.linux)