Hi Friends, I am trying to configure a blog on Centos4.0. The blog is written in php and I am not able to run the php applications on this system. php-pear-4.3.9-3.2 php-4.3.9-3.2 php-ldap-4.3.9-3.2 php-mysql-4.3.9-3. Php is installed on the system and in the httpd.conf file I have added index.php for Directory Index but whenever I try to access the blog i get the contents of the file and php is not executing. The permissions on the directory under /var/www/html/blog is set to 777 but still the problem is persisting. What should I do and where to check ? Thanks & Regards Ankush Grover
> Hi Friends, > > > I am trying to configure a blog on Centos4.0. The blog is written in > php and I am not able to run the php applications on this system. > > > php-pear-4.3.9-3.2 > php-4.3.9-3.2 > php-ldap-4.3.9-3.2 > php-mysql-4.3.9-3. > > > Php is installed on the system and in the httpd.conf file I have added > index.php for Directory Index but whenever I try to access the blog i > get the contents of the file and php is not executing. > > The permissions on the directory under /var/www/html/blog is set to > 777 but still the problem is persisting. > > > What should I do and where to check ? > > > Thanks & Regards > > > Ankush Grover > _______________________________________________ > CentOS mailing list > CentOS at centos.org > http://lists.centos.org/mailman/listinfo/centos >Can you show whats on the error_log ? Leonel
> Php is installed on the system and in the httpd.conf file I have added > index.php for Directory Index but whenever I try to access the blog i > get the contents of the file and php is not executing.eh? Why did you add index.php to the directory index setting? This is all taken care of within the php package.> > The permissions on the directory under /var/www/html/blog is set to > 777 but still the problem is persisting.777 is a bad set of permissions for a web app. Standard web permissions are usually 644 or 755. giving world writeable permissions (777) on a php app is basically like handing a bum the keys to your car.> What should I do and where to check ?Look in /var/log/httpd/error_log and see what it's complaining about. -- During times of universal deceit, telling the truth becomes a revolutionary act. George Orwell
dwisp at rumahweb.com
2007-Feb-15 13:40 UTC
[CentOS] unable to run php application on centos4.0
On Thu, February 15, 2007 7:51 pm, ankush grover wrote:> Php is installed on the system and in the httpd.conf file I have added > index.php for Directory Index but whenever I try to access the blog i > get the contents of the file and php is not executing. > > The permissions on the directory under /var/www/html/blog is set to > 777 but still the problem is persisting.Maybe you should add this line at httpd.conf: AddType application/x-httpd-php .php Dwi Suharto -------------------------- Technical Support Rumahweb http://www.rumahweb.com