LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-06-2008, 01:07 AM   #1
rehat
LQ Newbie
 
Registered: Jun 2008
Posts: 2

Rep: Reputation: 0
Need help with getting PHP5 to work on Apache2


Hi, I'm kinda new with using linux and I'm having problems getting apache2 to work with php5. I installed all the LAMP stuff before and it worked when I used these two commands:

apt-get install apache2 php5 libapache2-mod-php5
apt-get install mysql-server mysql-client php5-mysql

I removed these packages through Synaptic Package Manager and then reinstalled them with the same commands. But now the test.php that I made that had phpinfo(); does not display.

Any help would be great. If you need to see my apache2.conf let me know.
 
Old 08-06-2008, 06:02 AM   #2
flandou
LQ Newbie
 
Registered: Jul 2008
Distribution: Gentoo / Debian
Posts: 16

Rep: Reputation: 0
Hi,

Since you didn't post your configuration yet i can only guess, but most of the time this behaviour comes from:

- Not restarting apache.
- The lines to load the php5 module are still commented out.

The second can be fixed by running 'dpkg --reconfigure php5 libapache2-mod-php5' (Debian/Ubuntu only)
If that doesnt help look for lines like: 'LoadModule php5_module modules/libphp5.so' and 'AddType application/x-httpd-php .php' in your apache config and make sure they are not commented out. These lines should be in '/etc/apache2/modules.d/XX_mod_php5.conf'

If both don't work you should post your configuration

greetz,

Henry
 
Old 08-06-2008, 12:17 PM   #3
rehat
LQ Newbie
 
Registered: Jun 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks that helped
 
  


Reply



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 and php5 barrythai Mandriva 2 05-08-2007 08:09 AM
Apache2 and PHP5 SpiderIRE Linux - Software 3 09-30-2005 03:25 PM
Apache2 and PHP5 rul3r Slackware 7 09-11-2005 05:21 PM
Apache2 + PHP5.0.3 24jedi *BSD 1 07-21-2005 03:07 PM
php5 apache2 mysql4 don't work, php does not seem to read php.ini atom Linux - Software 5 03-24-2005 11:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:33 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
Open Source Consulting | Domain Registration