LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 06-11-2012, 05:58 AM   #1
hahaso
LQ Newbie
 
Registered: Nov 2011
Posts: 4

Rep: Reputation: Disabled
Question php.ini doesn't work


Hi all,

Recently I configured a LAMP environment.

But I found the php.ini doesn't work. I checked the phpinfo(). The Configuration File (php.ini) Path is correct. But the php configure doesn't change even I delete the php.ini file.(I restarted apache thousands times, just nothing happend...)

PHP version: 5.4.3
apache version: 2.4.2

Could anyone help for this issue. THANKS VERY MUCH~
 
Old 06-11-2012, 06:35 AM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,334

Rep: Reputation: Disabled
Does the path reported by php --ini match the location of your php.ini file?

Who is the owner of php.ini and what are the access rights?
 
Old 06-11-2012, 06:46 AM   #3
tronayne
Senior Member
 
Registered: Oct 2003
Location: Northeastern Michigan, where Carhartt is a Designer Label
Distribution: Slackware 32- & 64-bit Stable
Posts: 3,541

Rep: Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065Reputation: 1065
In your httpd.conf file do you have something similar to this:
Code:
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
    DirectoryIndex index.html index.php
</IfModule>
and
Code:
# Uncomment the following line to enable PHP:
#
Include /etc/httpd/mod_php.conf
Also, in your php.ini file (which is usually in /etc/httpd)
Code:
; Enable the PHP scripting language engine under Apache.
; http://php.net/engine
engine = On
Those, at least, must be there.

Also, make sure that you've actually stopped httpd. If you're using apachectl,
Code:
su -
<password>
apachectl stop
then run
Code:
ps -ef | grep hpptd
and there should be zero lines that look like these
Code:
root      2215     1  0 Apr06 ?        00:01:34 /usr/sbin/httpd -k start
apache    2571  2215  0 Apr06 ?        00:00:04 /usr/sbin/httpd -k start
apache   16667  2215  0 May19 ?        00:00:00 /usr/sbin/httpd -k start
If there are, you'll need to kill them by hand (or reboot the thing, but that's cheating):
Code:
su -
password
kill -9 2215 2275 16667
Somethings a restart will leave corpses running (not often, but it's been known to happen) and you need to make sure you're doing a clean start (no httpd processes running).

Hope this helps some.
 
  


Reply

Tags
apache, php5, phpini


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
[SOLVED] php.ini.rpmsave instead of php.ini ilvista Linux - Server 3 02-01-2011 04:39 PM
PHP won't recognize my Configuration File (php.ini) path kriezo Programming 4 02-14-2008 02:31 AM
php.ini-dist to php.ini lord-fu Programming 10 05-02-2006 05:24 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
Apache doesn't start first try after tweaking php.ini JBR Linux - Software 1 02-02-2005 07:12 AM

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

All times are GMT -5. The time now is 11:57 AM.

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