RedFutura

Well-Known Member
Jun 11, 2003
72
0
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:
 

katz_global

Well-Known Member
PartnerNOC
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.
 

whitehat

Member
Mar 6, 2004
8
0
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.
 

katz_global

Well-Known Member
PartnerNOC
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.
 

erwinfa

Well-Known Member
Jun 14, 2003
108
0
166
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 [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.