Linux Forums - Linux Help,Advice & support community:LinuxSolved.com

Network Troublshooting => Linux Servers Support => Topic started by: creator on February 21, 2004, 06:15:37 PM

Title: Apache & PHP
Post by: creator on February 21, 2004, 06:15:37 PM
Hi there...
I have installed apache server and is running fine. The http://localhost and all that works..
I have installed the reqd php modules for Red Hat 9.0..
I have made the following changes to httpd.conf
1. AddType ....
2. <IfDirectory>....

I followed what was said in the tutorials to make .php files run..but somehow doesnt seemt to work..It always gives me a server error 500! and says 'premature end of script'... what could possibly be wrong  

Please Let me know..
Thanks!!
Title: Apache & PHP
Post by: dragoncity99 on February 22, 2004, 03:55:20 AM
Which version of apache r u using now?

If u are using latest version of Apache that is 2.0 then, u should not do so in httpd.conf.
Instead, u goto /etc/httpd/conf.d and check php.conf file to see if
1) AddType... u mentioned is added

How do u install apache and php? I mean do u install it early during the installation of Linux or after it?
Title: Apache & PHP
Post by: deven_01 on May 04, 2005, 10:33:43 AM
write on cmd prompt  
service httpd start < Press Enter>
say
apachectl <Press Eenter>
Title: Apache & PHP
Post by: gauravbajaj on May 05, 2005, 08:51:03 AM
Its not a BIG ISSUE,

Just add this line to start of ur program or script

#!/usr/bin/php  





tha above line tells the path where php is installed.. By defaults it installed in /usr/bin/php, but i  dont know where u have installed ur PHP

if u want to find where it is installed , just give this command at command prompt:

#which php
 The above command tells where ur PHP is installed , so if its not like above , Change it with this path.

After that run it ... it will definitly work,