LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-15-2006, 02:13 AM   #1
irvken
Member
 
Registered: Dec 2003
Location: uk
Distribution: Ubuntu/Debian/Android
Posts: 218

Rep: Reputation: 30
apache2 won't parse php


This problem seems to happen everytime I try to set up a Lamp stack. Apache won't deliver php pages, instead opening kedit and displaying the code as a text file, including phpinfo.php.

I've been through all the configs and it all seems set up the same way as working servers I have access too, although I'm not even sure how you make php "run"

Any suggestions appreciated.
 
Old 11-15-2006, 02:19 AM   #2
imagineers7
Member
 
Registered: Mar 2006
Distribution: BackTrack, RHEL, FC, CentOS, IPCop, Ubuntu, 64Studio, Elive, Dream Linux, Trix Box
Posts: 310

Rep: Reputation: 30
Hi Irvken,

Have you compiled apache with php support?



Aniruddha
 
Old 11-15-2006, 03:14 AM   #3
irvken
Member
 
Registered: Dec 2003
Location: uk
Distribution: Ubuntu/Debian/Android
Posts: 218

Original Poster
Rep: Reputation: 30
Interestingly enough I've never done that, I avoid compilation like the plague and use off the shelf binaries usually, but I've always managed to get php webapps working in the past with a combination of apt-get's and conf edits. I can just never remember which ones and in what order.
 
Old 11-15-2006, 10:58 AM   #4
baikonur
Member
 
Registered: Oct 2005
Location: germany
Distribution: debian
Posts: 255
Blog Entries: 5

Rep: Reputation: 30
Code:
apt-get install libapache2-mod-php4
should do it.
 
Old 11-15-2006, 11:22 AM   #5
irvken
Member
 
Registered: Dec 2003
Location: uk
Distribution: Ubuntu/Debian/Android
Posts: 218

Original Poster
Rep: Reputation: 30
libapache2-mod-php4 is already the newest version

that's what I thought too.
 
Old 11-15-2006, 11:41 AM   #6
baikonur
Member
 
Registered: Oct 2005
Location: germany
Distribution: debian
Posts: 255
Blog Entries: 5

Rep: Reputation: 30
hmmm... how about php4-common?
and is it really apache2 you're running?
 
Old 11-15-2006, 02:15 PM   #7
irvken
Member
 
Registered: Dec 2003
Location: uk
Distribution: Ubuntu/Debian/Android
Posts: 218

Original Poster
Rep: Reputation: 30
I thought so, but then realised that if apache was running too and turned it off. I restarted apache2 but nothing seems to be happening. I've decided to install another app now that requires php5. I've got that via synaptic but without apache2 running that's not going to work either.

I started apache2 with /etc/init.d/apache2 start and there were no errors, but it doesn't seem to be responding to requests and the logs are empty!

Could it be something in the apache2 conf files?
 
Old 11-15-2006, 02:42 PM   #8
irvken
Member
 
Registered: Dec 2003
Location: uk
Distribution: Ubuntu/Debian/Android
Posts: 218

Original Poster
Rep: Reputation: 30
hehe, I sheepishly admit apache2 wasn't installed
 
Old 11-15-2006, 04:16 PM   #9
irvken
Member
 
Registered: Dec 2003
Location: uk
Distribution: Ubuntu/Debian/Android
Posts: 218

Original Poster
Rep: Reputation: 30
ok, apache 2 didn't run, so I reinstalled the working apache. I've also installed php5 (part of another project) and libapache2-mod-php5 but no joy, apache still doesn't parse php files - see for example http://irvken.homleinux.net/phpinfo.php

Is compilation looming on the horizon, unfortunately I nothing about it besides "make, make install etc."
 
Old 11-26-2006, 06:19 AM   #10
irvken
Member
 
Registered: Dec 2003
Location: uk
Distribution: Ubuntu/Debian/Android
Posts: 218

Original Poster
Rep: Reputation: 30
just to finish off, the problem in the end was that the apache2 init script was not working properly, I can now launch apache2 from the command, and am investigating the problem, ta for all your help
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2.0.52, t1lib-5.0.2, php-apache2-5.0.2 wizard7423 Slackware 2 04-04-2011 08:09 PM
What's the meaning of "PHP Parse error: parse error, unexpected $ in..." frandalla Programming 23 03-04-2009 12:34 PM
Debian Sarge Apache2 Parse C cgi programs disturbed Debian 4 03-19-2006 10:03 PM
PHP parse error in config.inc.php.in Confusedious Linux - Software 2 11-03-2005 05:08 AM
My Apache2 fails to parse php-scripts in html pages 3-1415 Linux - Software 6 10-21-2004 05:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration