Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Jun 2003
    Posts
    79

    Default Configuration file path: php.ini

    I have found out something strange with PHP.ini after recompiling with phpsuexec support.

    From phpinfo() I saw that the php.ini location was /usr/lib but there was no php.ini file there! The solution was easy, just copy a php.ini file there, but I just wanted to tell everyone in case you ran into the same "problem", and maybe cPanel guys could "fix" this

    cPanel.net Support Ticket Number:

  2. #2
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Oct 2003
    Location
    Hosting from: Panama, Hong Kong, Singapore, Malaysia, China, India, USA and Australia
    Posts
    68

    Default

    I have just noticed this change this week for some reason. 2 new servers and both paths are showing usr/php.ini when it should be usr/local/bin/php.ini or with zend usr/local/Zend/bin/php.ini

    So when I install zend it relocates the php.ini file and the server wont pick up the zend module.

    I suppose you could symlink it but this is not correct.

    I also noticed the first server decided to default back on its own for some reason after doing some operation but I am not sure what that was now.

    It gets more interesting:

    [/]# locate php.ini
    /etc/php.ini
    /installd/buildapache/php-4.3.3/php.ini-dist
    /installd/buildapache/php-4.3.3/php.ini-recommended
    /installd/buildapache/php-4.3.3/pear/tests/php.ini

    where is:

    usr/local/bin/php.ini
    usr/local/Zend/bin/php.ini
    usr/local/Zend/bin/php.ini.bak

    They are there but locate wont show them.

    ???

    I would really be interested in the fix as I can see all sorts of issues arising from this.

  3. #3
    Member
    Join Date
    Mar 2004
    Posts
    8

    Default

    Let me add my own confusion to this thread.

    If I run phpMyAdmin from WHM and then click on "Show PHP information", I get the following info:
    Code:
    PHP Version 4.2.3 
    System Linux vortex.cpanel.net 2.4.20-grsec #2 Wed May 28 18:24:19 EDT 2003 i686 unknown 
    
    Build Date Mar 8 2004 21:37:31
    
    Configure Command './configure' '--enable-static' '--enable-mbstring' 
    '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-zlib'
    '--with-imap=../../bsd/imap' '--enable-ftp'
    '--with-gettext' '--with-xml' '--enable-track-vars' 
    '--enable-sockets' '--with-mysql' '--with-pgsql' 
    '--with-config-file-path=/usr/local/cpanel/3rdparty/etc' 
    '--prefix=/usr/local/cpanel/3rdparty' 
    
    Server API CGI
    
    Configuration File (php.ini) path /usr/local/cpanel/3rdparty/etc/php.ini 
    
    This program makes use of the Zend Scripting Language Engine:
    Zend Engine v1.2.0 , Copyright (c) 1998-2002 Zend Technologies
    But if I run phpinfo from inside a public_html directory, I get different results:
    Code:
    PHP Version 4.3.3  
    
    System  Linux xxx.xxx.org 2.4.20-020stab009.21.777-smp #1 SMP Tue Jun 15 13:43:32 MSD 2004 i686
      
    Build Date  Jun 17 2004 07:48:39
    
    Configure Command  './configure' '--with-apxs=/usr/local/apache/bin/apxs' 
    '--with-xml' '--enable-bcmath' '--enable-calendar' 
    '--enable-ftp' '--enable-magic-quotes' '--with-mysql'
    '--enable-discard-path' '--with-pear' 
    '--enable-sockets' '--enable-track-vars' '--enable-versioning' '--with-zlib'
    
    Server API  Apache
    
    Virtual Directory Support  disabled
    
    Configuration File (php.ini) Path  /usr/local/lib/php.ini
    This program makes use of the Zend Scripting Language Engine:
    Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
    and at the shell:
    Code:
    [/]# php -v
    PHP 4.3.3 (cgi) (built: Jun 17 2004 07:52:21)
    Copyright (c) 1997-2003 The PHP Group
    Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
    Furthermore, I had php 4.3.6 installed before updating apache (which already was 1.3.31) and cpanel (to WHM 9.4.0,cPanel 9.4.0-R21 on RedHat 7.3), but after the last update, Php has reverted back to 4.3.3.

    So....why would I get different phpinfo results? The phpinfo from the public_html reflects the correct php version, but the wrong Server API. The cPanel phpinfo had the correct Server API, but the wrong version. And which php.ini file should I concern myself with? I have several:

    [/]# locate php.ini
    /var/cpanel/version/php.ini-2
    /etc/php.ini
    /usr/lib/php.ini
    /usr/local/lib/php.ini
    /usr/local/lib/php.ini.new
    /usr/local/cpanel/3rdparty/etc/php.ini
    /usr/local/cpanel/3rdparty/lib/php.ini
    /home/cpins/installd/buildapache/php-4.3.3/php.ini-dist
    /home/cpins/installd/buildapache/php-4.3.3/php.ini-recommended
    /home/cpins/installd/buildapache/php-4.3.3/pear/tests/php.ini
    /home/cpapachebuild/buildapache/php-4.3.6/pear/tests/php.ini
    /home/cpapachebuild/buildapache/php-4.3.6/php.ini-recommended
    /home/cpapachebuild/buildapache/php-4.3.6/php.ini-dist

    [/]# whereis php.ini
    /etc/php.ini
    /usr/lib/php.ini
    /usr/local/lib/php.ini

    Any simple explanations out there? This looks like a genuine clusterflock to me.
    Good deeds rarely go unpunished.

  4. #4
    cPanel Partner NOC cPanel Partner NOC Badge
    Join Date
    Oct 2003
    Location
    Hosting from: Panama, Hong Kong, Singapore, Malaysia, China, India, USA and Australia
    Posts
    68

    Default

    even more strange is that I found out that if you wait 24 hours the server automatically changed from usr/php.ini to usr/local/Zend/bin/php.ini without any intervention.

    If it was just one time I would call it a fluke, but it happened on 3 servers that were fresh out of the box last month.

    Finally I learned to just wait and let it fix itself.
    International Offshore Hosting from Hong Kong, Singapore, Panama, Malaysia, India, China, Australia and the USA.

    Authorized cPanel PartnerNOC in 8 countries.

    www.katzglobal.com

  5. #5
    Registered User
    Join Date
    Jun 2003
    Posts
    111

    Default

    Anyone can explain below ?

    Originally posted by whitehat
    Let me add my own confusion to this thread.

    If I run phpMyAdmin from WHM and then click on "Show PHP information", I get the following info:
    Code:
    PHP Version 4.2.3 
    System Linux vortex.cpanel.net 2.4.20-grsec #2 Wed May 28 18:24:19 EDT 2003 i686 unknown 
    
    Build Date Mar 8 2004 21:37:31
    
    Configure Command './configure' '--enable-static' '--enable-mbstring' 
    '--enable-mbstr-enc-trans' '--enable-mbregex' '--with-zlib'
    '--with-imap=../../bsd/imap' '--enable-ftp'
    '--with-gettext' '--with-xml' '--enable-track-vars' 
    '--enable-sockets' '--with-mysql' '--with-pgsql' 
    '--with-config-file-path=/usr/local/cpanel/3rdparty/etc' 
    '--prefix=/usr/local/cpanel/3rdparty' 
    
    Server API CGI
    
    Configuration File (php.ini) path /usr/local/cpanel/3rdparty/etc/php.ini 
    
    This program makes use of the Zend Scripting Language Engine:
    Zend Engine v1.2.0 , Copyright (c) 1998-2002 Zend Technologies
    But if I run phpinfo from inside a public_html directory, I get different results:
    Code:
    PHP Version 4.3.3  
    
    System  Linux xxx.xxx.org 2.4.20-020stab009.21.777-smp #1 SMP Tue Jun 15 13:43:32 MSD 2004 i686
      
    Build Date  Jun 17 2004 07:48:39
    
    Configure Command  './configure' '--with-apxs=/usr/local/apache/bin/apxs' 
    '--with-xml' '--enable-bcmath' '--enable-calendar' 
    '--enable-ftp' '--enable-magic-quotes' '--with-mysql'
    '--enable-discard-path' '--with-pear' 
    '--enable-sockets' '--enable-track-vars' '--enable-versioning' '--with-zlib'
    
    Server API  Apache
    
    Virtual Directory Support  disabled
    
    Configuration File (php.ini) Path  /usr/local/lib/php.ini
    This program makes use of the Zend Scripting Language Engine:
    Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
    and at the shell:
    Code:
    [/]# php -v
    PHP 4.3.3 (cgi) (built: Jun 17 2004 07:52:21)
    Copyright (c) 1997-2003 The PHP Group
    Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
    Furthermore, I had php 4.3.6 installed before updating apache (which already was 1.3.31) and cpanel (to WHM 9.4.0,cPanel 9.4.0-R21 on RedHat 7.3), but after the last update, Php has reverted back to 4.3.3.

    So....why would I get different phpinfo results? The phpinfo from the public_html reflects the correct php version, but the wrong Server API. The cPanel phpinfo had the correct Server API, but the wrong version. And which php.ini file should I concern myself with? I have several:

    [/]# locate php.ini
    /var/cpanel/version/php.ini-2
    /etc/php.ini
    /usr/lib/php.ini
    /usr/local/lib/php.ini
    /usr/local/lib/php.ini.new
    /usr/local/cpanel/3rdparty/etc/php.ini
    /usr/local/cpanel/3rdparty/lib/php.ini
    /home/cpins/installd/buildapache/php-4.3.3/php.ini-dist
    /home/cpins/installd/buildapache/php-4.3.3/php.ini-recommended
    /home/cpins/installd/buildapache/php-4.3.3/pear/tests/php.ini
    /home/cpapachebuild/buildapache/php-4.3.6/pear/tests/php.ini
    /home/cpapachebuild/buildapache/php-4.3.6/php.ini-recommended
    /home/cpapachebuild/buildapache/php-4.3.6/php.ini-dist

    [/]# whereis php.ini
    /etc/php.ini
    /usr/lib/php.ini
    /usr/local/lib/php.ini

    Any simple explanations out there? This looks like a genuine clusterflock to me.

Similar Threads & Tags
Similar threads

  1. Loaded Configuration File path
    By ullalla in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-29-2011, 02:06 PM
  2. Session save path in php.ini commented
    By 4u123 in forum cPanel and WHM Discussions
    Replies: 10
    Last Post: 12-11-2009, 03:40 PM
  3. sessions save path in php.ini
    By NoAgendas in forum cPanel and WHM Discussions
    Replies: 7
    Last Post: 05-27-2007, 11:59 PM
  4. php.ini path?
    By mitk in forum New User Questions
    Replies: 2
    Last Post: 02-02-2006, 01:29 PM
  5. Correct Path To Working PHP.INI
    By purple-support in forum New User Questions
    Replies: 5
    Last Post: 01-20-2006, 12:15 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube