Link to home
Start Free TrialLog in
Avatar of Victor Kimura
Victor KimuraFlag for Canada

asked on

phpinfo include_path, extension_dir is wrong: php 5.4

Hi,

I compiled php 5.4 from source on my Centos 5.x system. Everything seemed to go okay. But when I look at my phpinfo() output my:

extension_dir =       /usr/local/bin/php/lib/php/extensions/debug-non-zts-20100525
include_path =       .:/usr/local/bin/php/lib/php

Configuration File (php.ini) Path = /usr/local/lib/php
Loaded Configuration File  = /usr/local/lib/php.ini

But in my php.ini file has:
include_path = ".:/usr/local/lib:/usr/lib64/php"
extension_dir = "/usr/lib64/php/modules"

Where is the phpinfo() getting this information from?

Victor
SOLUTION
Avatar of Shaun McNicholas
Shaun McNicholas
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Victor Kimura

ASKER

I have this in my /usr/local/lib/php.ini (made double sure of it):
; Directory in which the loadable extensions (modules) reside.
; http://php.net/extension-dir
; extension_dir = "./"
;extension_dir = "/usr/local/include/php/ext"
extension_dir = "/usr/lib64/php/modules"

; PHP's default setting for include_path is ".;/path/to/php/pear"
; http://php.net/include-path
include_path = ".:/usr/local/lib:/usr/lib64/php"

I have this in my /usr/local/apache/conf/httpd.conf:

NameVirtualHost *

<VirtualHost *>
    ServerAdmin admin@howtomarketyourstuff.com
    ServerName localhost
    PHPIniDir /usr/local/lib/php.ini
    DocumentRoot /usr/local/apache/htdocs/
    ErrorLog logs/localhost-error_log
    CustomLog logs/localhost-access_log common
</VirtualHost>


I checked to see if there are any other php.in files since the default for Centos is /etc/php.ini so I renamed it to /etc/php_backup.ini and then stopped and started apache. But the phpinfo() is the same.

Here is the output for a find for all php.ini files:
[root@seokingdomheaven etc]# find / -name php.ini
/home/vkimura/ZendStudio/plugins/com.zend.php.debug.debugger.linux.x86_64_5.3.18.v20111214/resources/php53/php.ini
/home/vkimura/eclipse/plugins/org.zend.php.debug.debugger.linux.x86_64_5.3.7.v20091124/resources/php5/php.ini
/home/vkimura/eclipse/plugins/org.zend.php.debug.debugger.linux.x86_64_5.3.7.v20091124/resources/php53/php.ini
/usr/local/lib/php.ini
/root/Downloads/eclipse/plugins/org.zend.php.debug.debugger.linux.x86_5.2.15.v20081217/resources/php4/php.ini
/root/Downloads/eclipse/plugins/org.zend.php.debug.debugger.linux.x86_5.2.15.v20081217/resources/php5/php.ini
/root/Downloads/eclipse/plugins/org.zend.php.debug.debugger.win32.x86_5.2.15.v20081217/resources/php4/php.ini
/root/Downloads/eclipse/plugins/org.zend.php.debug.debugger.win32.x86_5.2.15.v20081217/resources/php5/php.ini
/root/Downloads/eclipse/plugins/org.zend.php.debug.debugger.macosx_5.2.15.v20081217/resources/php4/php.ini
/root/Downloads/eclipse/plugins/org.zend.php.debug.debugger.macosx_5.2.15.v20081217/resources/php5/php.ini

What am I missing?
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
hey did u restart your web server apache after making change in php.in file just want to double ensure
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
The part:
PHPIniDir /usr/local/lib/php.ini

needs to be in quotes like:
PHPIniDir "/usr/local/lib/php.ini"