November 24, 2024, 11:20:37 PM

News : LinuxSolved.com Linux Help Community Forum..


Author Topic: Apache & PHP  (Read 5943 times)

Offline creator

  • Linux Noob !
  • *
  • Posts: 7
Apache & PHP
« 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!!

Offline dragoncity99

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 551
Apache & PHP
« Reply #1 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?

Offline deven_01

  • Linux Learner
  • ***
  • Posts: 143
Apache & PHP
« Reply #2 on: May 04, 2005, 10:33:43 AM »
write on cmd prompt  
service httpd start < Press Enter>
say
apachectl <Press Eenter>

Offline gauravbajaj

  • LST CareTaker
  • Experienced
  • *****
  • Posts: 658
Apache & PHP
« Reply #3 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,