Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Configuration file path: php.ini

Discussion in 'General Discussion' started by RedFutura, Aug 14, 2003.

  1. RedFutura

    RedFutura Well-Known Member

    Joined:
    Jun 11, 2003
    Messages:
    72
    Likes Received:
    0
    Trophy Points:
    156
    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:
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. katz_global

    katz_global Well-Known Member
    PartnerNOC

    Joined:
    Oct 18, 2003
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    Hosting from: Panama, Hong Kong, Singapore, Malays
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. whitehat

    whitehat Member

    Joined:
    Mar 6, 2004
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    151
    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 [COLOR=darkred][B]4.2.3[/B] [/COLOR]
    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 [COLOR=darkred][B]CGI[/B][/COLOR]
    
    Configuration File (php.ini) path /usr/local/cpanel/3rdparty/etc/php.ini 
    
    This program makes use of the Zend Scripting Language Engine:
    Zend Engine [COLOR=darkred]v1.2.0[/COLOR] , Copyright (c) 1998-2002 Zend Technologies
    
    
    
    But if I run phpinfo from inside a public_html directory, I get different results:
    Code:
    PHP Version [COLOR=darkred][B]4.3.3 [/B][/COLOR] 
    
    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  [COLOR=darkred][B]Apache[/B][/COLOR]
    
    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 [COLOR=darkred]v1.3.0[/COLOR], Copyright (c) 1998-2003 Zend Technologies  
    
    and at the shell:
    Code:
    [/]# [B]php -v[/B]
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. katz_global

    katz_global Well-Known Member
    PartnerNOC

    Joined:
    Oct 18, 2003
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    Hosting from: Panama, Hong Kong, Singapore, Malays
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. erwinfa

    erwinfa Well-Known Member

    Joined:
    Jun 14, 2003
    Messages:
    108
    Likes Received:
    0
    Trophy Points:
    166
    Anyone can explain below ?

     
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice