Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   CentOS (http://www.linux-archive.org/centos/)
-   -   apache 2 and php 5.2 (http://www.linux-archive.org/centos/489863-apache-2-php-5-2-a.html)

Keith Roberts 02-15-2011 08:52 PM

apache 2 and php 5.2
 
On Tue, 15 Feb 2011, Paul A wrote:

> To: 'CentOS mailing list' <centos@centos.org>
> From: Paul A <razor@meganet.net>
> Subject: [CentOS] apache 2 and php 5.2
>
> Hi originally I installed php 4 on centos 5.5 and then a
> few repos including the remi repo to upgrade to php5,
> which seems to upgrade/work without any issues.

*snip*

> I was wondering if anyone can tell me why apache is not
> taking the settings from the /etc/php.ini file and it
> works without that file.

Hi Paul.

Creat a php file with this as the contents:


<head>
<title>php-info</title>
</head>

<?php phpinfo(); ?>


Then load that file into your web browser.

It should produce a page showing all the active php
configuration settings. Check the paths where php looks for
it's php.ini files.

Obviously you need to restart apache to make the php
module read the changes you have made to the php.ini file.

Putting a deliberate error in the php.ini file will confirm
that you are in fact editing the correct php.ini file.

; === uncomment this line to force a php.ini parse error ===
; you need to do apachectl stop [CR] apachectl start
; to force re-reading of php.ini
; 'apachectl restart' doesn't work under Linux

;-----------------------------------------------------------

If this is a busy live server, then I'm not sure how you are
going to do apachectl stop then apachectl start


> rpm -qa php
>
> php-5.2.17-1.el5.art

[root@karsites ~]# rpm -qa php
php-5.3.3-1.el5.remi


> php --ini
>
> PHP Warning: PHP Startup: Unable to load dynamic library
> '/usr/lib/php/modules/pdo_odbc.so' - /usr/lib/php/modules/pdo_odbc.so:
> undefined symbol: php_pdo_get_dbh_ce in Unknown on line 0
>
> Configuration File (php.ini) Path: /etc
>
> Loaded Configuration File: (none)

^^^^^^
This could be where your problem is. The above line should
contain the name of the configuration file php has found and
loaded, like this:

[root@karsites ~]# php --ini
Configuration File (php.ini) Path: /etc
Loaded Configuration File: /etc/php.ini
Scan for additional .ini files in: /etc/php.d
Additional .ini files parsed: /etc/php.d/curl.ini,
/etc/php.d/dom.ini,
/etc/php.d/fileinfo.ini,
/etc/php.d/json.ini,
/etc/php.d/mbstring.ini,
/etc/php.d/mysql.ini,
/etc/php.d/mysqli.ini,
/etc/php.d/pdo.ini,
/etc/php.d/pdo_mysql.ini,
/etc/php.d/pdo_sqlite.ini,
/etc/php.d/phar.ini,
/etc/php.d/soap.ini,
/etc/php.d/sqlite.ini,
/etc/php.d/wddx.ini,
/etc/php.d/xdebug.ini,
/etc/php.d/xmlreader.ini,
/etc/php.d/xmlwriter.ini,
/etc/php.d/xsl.ini,
/etc/php.d/zip.ini

[root@karsites ~]#

HTH

Keith Roberts

-----------------------------------------------------------------
Websites:
http://www.karsites.net
http://www.php-debuggers.net
http://www.raised-from-the-dead.org.uk

All email addresses are challenge-response protected with
TMDA [http://tmda.net]
-----------------------------------------------------------------
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

02-15-2011 09:07 PM

apache 2 and php 5.2
 
Keith Roberts wrote:
> On Tue, 15 Feb 2011, Paul A wrote:
>
>> To: 'CentOS mailing list' <centos@centos.org>
>> From: Paul A <razor@meganet.net>
>> Subject: [CentOS] apache 2 and php 5.2
>>
>> Hi originally I installed php 4 on centos 5.5 and then a
>> few repos including the remi repo to upgrade to php5,
>> which seems to upgrade/work without any issues.
>
> *snip*
>
>> I was wondering if anyone can tell me why apache is not
>> taking the settings from the /etc/php.ini file and it
>> works without that file.
>
> Creat a php file with this as the contents:
>
> <head>
> <title>php-info</title>
> </head>
>
> <?php phpinfo(); ?>
>
>
> Then load that file into your web browser.

And when you're done, be 100% POSITIVE that you deleted it. The attacks
that are constant will be looking for it, guaranteed. (I see them all the
time.)

mark

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Keith Roberts 02-15-2011 09:39 PM

apache 2 and php 5.2
 
On Tue, 15 Feb 2011, m.roth@5-cent.us wrote:

> To: CentOS mailing list <centos@centos.org>
> From: m.roth@5-cent.us
> Subject: Re: [CentOS] apache 2 and php 5.2
>
> Keith Roberts wrote:
>> On Tue, 15 Feb 2011, Paul A wrote:
>>
>>> To: 'CentOS mailing list' <centos@centos.org>
>>> From: Paul A <razor@meganet.net>
>>> Subject: [CentOS] apache 2 and php 5.2
>>>
>>> Hi originally I installed php 4 on centos 5.5 and then a
>>> few repos including the remi repo to upgrade to php5,
>>> which seems to upgrade/work without any issues.
>>
>> *snip*
>>
>>> I was wondering if anyone can tell me why apache is not
>>> taking the settings from the /etc/php.ini file and it
>>> works without that file.
>>
>> Creat a php file with this as the contents:
>>
>> <head>
>> <title>php-info</title>
>> </head>
>>
>> <?php phpinfo(); ?>
>>
>>
>> Then load that file into your web browser.
>
> And when you're done, be 100% POSITIVE that you deleted it. The attacks
> that are constant will be looking for it, guaranteed. (I see them all the
> time.)

Good point Mark. Surely it could be placed in a hidden
directory, and protected with httpd.conf directives, so
only localhost can access it?

Keith

-----------------------------------------------------------------
Websites:
http://www.karsites.net
http://www.php-debuggers.net
http://www.raised-from-the-dead.org.uk

All email addresses are challenge-response protected with
TMDA [http://tmda.net]
-----------------------------------------------------------------
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Eero Volotinen 02-15-2011 09:43 PM

apache 2 and php 5.2
 
2011/2/16 Keith Roberts <keith@karsites.net>:
> On Tue, 15 Feb 2011, m.roth@5-cent.us wrote:
>
>> To: CentOS mailing list <centos@centos.org>
>> From: m.roth@5-cent.us
>> Subject: Re: [CentOS] apache 2 and php 5.2
>>
>> Keith Roberts wrote:
>>> On Tue, 15 Feb 2011, Paul A wrote:
>>>
>>>> To: 'CentOS mailing list' <centos@centos.org>
>>>> From: Paul A <razor@meganet.net>
>>>> Subject: [CentOS] apache 2 and php 5.2
>>>>
>>>> Hi originally I installed php 4 on centos 5.5 and then a
>>>> few repos including the remi repo to upgrade to php5,
>>>> which seems to upgrade/work without any issues.
>>>
>>> *snip*
>>>
>>>> I was wondering if anyone can tell me why apache is not
>>>> taking the settings from the /etc/php.ini file and it
>>>> works without that file.
>>>
>>> Creat a php file with this as the contents:
>>>
>>> <head>
>>> <title>php-info</title>
>>> </head>
>>>
>>> <?php phpinfo(); ?>
>>>
>>>
>>> Then load that file into your web browser.
>>
>> And when you're done, be 100% POSITIVE that you deleted it. The attacks
>> that are constant will be looking for it, guaranteed. (I see them all the
>> time.)
>
> Good point Mark. Surely it could be placed in a hidden
> directory, and protected with httpd.conf directives, so
> only localhost can access it?

how about running php --info from commandline?

--
Eero
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Keith Roberts 02-15-2011 10:00 PM

apache 2 and php 5.2
 
On Wed, 16 Feb 2011, Eero Volotinen wrote:

*snip*

> how about running php --info from commandline?

Good point Eero.

Would that not just return the basic configuration settings
for the CLI version of php?

What if the OP has used a different php configuration for
the apache php module, by using php configuration directives
in the httpd.conf file?

These php config settings would not show up when running the
CLI version of php.

Eg.

/etc/php.ini

; open_basedir, if set, limits all file operations to the
; defined directory and below. This directive makes most
; sense if used in a per-directory or per-virtualhost web server
; configuration file. This directive is *NOT* affected by
; whether Safe Mode is turned On or Off.
;

; see also /etc/httpd.conf for overriding these settings for
; the apache php module.

; for CLI PHP version only
open_basedir = "./:/tmp/:/loads/of/different/paths/here/:"
;open_basedir = ""


/etc/httpd/conf/httpd.conf

#================================================= =========================
# APACHE ACCESS TO FILESYSTEM & SERVER DOCUMENT
TREE
#================================================= =========================

<Directory />
Options None
AllowOverride None
Order Deny,Allow
Deny from all

# These are the only directories which apache's PHP module
# can have access to. This setting overrides the default
# settings in the global php.ini file, which applies to
# the CLI version of PHP.
#
php_admin_value open_basedir '/path/to/apache/doc_root:/another/path/to/linked/files/'
php_admin_flag display_errors OFF

</Directory>

So using the httpd.conf php_admin_xxx directives, I can
selectively turn on php errors for my development
directories, only accessible by me (localhost). Any publicly
accesible directories get php error reporting turned off.

I do my web development in a seperate protected development
tree, and then push the live code into another 'accessible
to all' branch.

Kind Regards,

Keith Roberts

-----------------------------------------------------------------
Websites:
http://www.karsites.net
http://www.php-debuggers.net
http://www.raised-from-the-dead.org.uk

All email addresses are challenge-response protected with
TMDA [http://tmda.net]
-----------------------------------------------------------------
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

"Paul A" 02-16-2011 02:08 PM

apache 2 and php 5.2
 
Keith/guys thanks for the suggestions, here is what I have found. It shows
loaded config file is /etc/php.ini but if I remove that file and restart
apache it still works. I also did as Keith suggested I removed a comment ';'
and I got no errors apache started and it loaded the /etc/php.ini file. It's
just completely ignoring that file, if its there or if its not there.



PHP Version 5.2.17

System Linux testip5.meganet.net 2.6.18-194.26.1.el5PAE #1 SMP Tue Nov 9
13:34:42 EST 2010 i686
Build Date Jan 7 2011 08:50:02
Configure Command './configure' '--build=i686-redhat-linux-gnu'
'--host=i686-redhat-linux-gnu' '--target=i386-redhat-linux-gnu'
'--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin'
'--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share'
'--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec'
'--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--cache-file=../config.cache'
'--with-libdir=lib' '--with-config-file-path=/etc'
'--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic'
'--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin'
'--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr'
'--enable-gd-native-ttf' '--with-t1lib=/usr' '--without-gdbm'
'--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr'
'--with-openssl' '--with-pcre-regex' '--with-zlib' '--with-layout=GNU'
'--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets'
'--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with-kerberos'
'--enable-ucd-snmp-hack' '--enable-shmop' '--enable-calendar'
'--without-mime-magic' '--without-sqlite' '--with-libxml-dir=/usr'
'--with-xml' '--with-system-tzdata' '--with-apxs2=/usr/sbin/apxs'
'--without-mysql' '--without-gd' '--disable-dom' '--disable-dba'
'--without-unixODBC' '--disable-pdo' '--disable-xmlreader'
'--disable-xmlwriter' '--disable-json' '--without-pspell' '--disable-wddx'
'--without-curl' '--disable-posix' '--disable-sysvmsg' '--disable-sysvshm'
'--disable-sysvsem'
Server API Apache 2.0 Handler
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc
Loaded Configuration File /etc/php.ini
Scan this dir for additional .ini files /etc/php.d
additional .ini files parsed /etc/php.d/Fileinfo.ini,
/etc/php.d/curl.ini, /etc/php.d/dba.ini, /etc/php.d/dbase.ini,
/etc/php.d/dom.ini, /etc/php.d/gd.ini, /etc/php.d/imap.ini,
/etc/php.d/json.ini, /etc/php.d/ldap.ini, /etc/php.d/mbstring.ini,
/etc/php.d/mcrypt.ini, /etc/php.d/mysql.ini, /etc/php.d/mysqli.ini,
/etc/php.d/odbc.ini, /etc/php.d/pdo.ini, /etc/php.d/pdo_mysql.ini,
/etc/php.d/pdo_odbc.ini, /etc/php.d/pdo_pgsql.ini,
/etc/php.d/pdo_sqlite.ini, /etc/php.d/pgsql.ini, /etc/php.d/soap.ini,
/etc/php.d/wddx.ini, /etc/php.d/xmlreader.ini, /etc/php.d/xmlrpc.ini,
/etc/php.d/xmlwriter.ini, /etc/php.d/xsl.ini, /etc/php.d/zip.ini
PHP API 20041225
PHP Extension 20060613
Zend Extension 220060519
Debug Build no
Thread Safety disabled
Zend Memory Manager enabled
IPv6 Support enabled
Registered PHP Streams https, ftps, compress.zlib, compress.bzip2, php,
file, data, http, ftp, zip
Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3,
sslv2, tls
Registered Stream Filters zlib.*, bzip2.*, convert.iconv.*,
string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*,
consumed

Zend logo This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies


-----Original Message-----
From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf
Of Keith Roberts
Sent: Tuesday, February 15, 2011 6:01 PM
To: CentOS mailing list
Subject: Re: [CentOS] apache 2 and php 5.2

On Wed, 16 Feb 2011, Eero Volotinen wrote:

*snip*

> how about running php --info from commandline?

Good point Eero.

Would that not just return the basic configuration settings
for the CLI version of php?

What if the OP has used a different php configuration for
the apache php module, by using php configuration directives
in the httpd.conf file?

These php config settings would not show up when running the
CLI version of php.

Eg.

/etc/php.ini

; open_basedir, if set, limits all file operations to the
; defined directory and below. This directive makes most
; sense if used in a per-directory or per-virtualhost web server
; configuration file. This directive is *NOT* affected by
; whether Safe Mode is turned On or Off.
;

; see also /etc/httpd.conf for overriding these settings for
; the apache php module.

; for CLI PHP version only
open_basedir = "./:/tmp/:/loads/of/different/paths/here/:"
;open_basedir = ""


/etc/httpd/conf/httpd.conf

#================================================= =========================
# APACHE ACCESS TO FILESYSTEM & SERVER DOCUMENT
TREE
#================================================= =========================

<Directory />
Options None
AllowOverride None
Order Deny,Allow
Deny from all

# These are the only directories which apache's PHP module
# can have access to. This setting overrides the default
# settings in the global php.ini file, which applies to
# the CLI version of PHP.
#
php_admin_value open_basedir
'/path/to/apache/doc_root:/another/path/to/linked/files/'
php_admin_flag display_errors OFF

</Directory>

So using the httpd.conf php_admin_xxx directives, I can
selectively turn on php errors for my development
directories, only accessible by me (localhost). Any publicly
accesible directories get php error reporting turned off.

I do my web development in a seperate protected development
tree, and then push the live code into another 'accessible
to all' branch.

Kind Regards,

Keith Roberts

-----------------------------------------------------------------
Websites:
http://www.karsites.net
http://www.php-debuggers.net
http://www.raised-from-the-dead.org.uk

All email addresses are challenge-response protected with
TMDA [http://tmda.net]
-----------------------------------------------------------------
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Keith Roberts 02-16-2011 03:56 PM

apache 2 and php 5.2
 
On Wed, 16 Feb 2011, Paul A wrote:

> To: 'CentOS mailing list' <centos@centos.org>
> From: Paul A <razor@meganet.net>
> Subject: Re: [CentOS] apache 2 and php 5.2
>
> Keith/guys thanks for the suggestions, here is what I have
> found. It shows loaded config file is /etc/php.ini but if
> I remove that file and restart apache it still works. I
> also did as Keith suggested I removed a comment ';' and I
> got no errors apache started and it loaded the
> /etc/php.ini file. It's just completely ignoring that
> file, if its there or if its not there.

All I can think of is that you have more than one version of
PHP installed, and it's looking in a non-standard place for
the php.ini - possibly under /usr/php-version or
/usr/local/php-version.

Try a file search on your system, and see how many php.ini
files you can find there.

Eg.

[root@karsites ~]# locate php.ini
/downloads/php-src/5.2.1/php-5.2.1/php.ini-dist
/downloads/php-src/5.2.1/php-5.2.1/php.ini-recommended
/downloads/php-src/5.2.4/php-5.2.4/php.ini-dist
/downloads/php-src/5.2.4/php-5.2.4/php.ini-recommended
/downloads/php-src/5.2.4/php-5.2.4/tmp-php.ini
/downloads/php-src/5.2.5/php-5.2.5/php.ini-dist
/downloads/php-src/5.2.5/php-5.2.5/php.ini-recommended
/etc/php.ini
/etc/php.ini.bak
/etc/php.ini.centos5-5.org
/home/keith/my-docs/system/Centos/5.5/FEDORA-DEFAULT-PACKAGES/php-5.3.2/php.ini
/home/keith/my-docs/system/Centos/5.5/FEDORA-DEFAULT-PACKAGES/php-5.3.2/php.ini.bak
/home/keith/my-docs/system/Centos/5.5/FEDORA-DEFAULT-PACKAGES/php-5.3.2/php.ini.centos5-5.org
/home/keith/my-docs/system/Centos/5.5/FEDORA-DEFAULT-PACKAGES/php-5.3.3/php.ini
/home/keith/my-docs/system/Centos/5.5/FEDORA-DEFAULT-PACKAGES/php-5.3.3/php.ini.bak
/home/keith/my-docs/system/Centos/5.5/FEDORA-DEFAULT-PACKAGES/php-5.3.3/php.ini.centos5-5.org
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.4/php.ini
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.4/php.ini.bak
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.4/tmp-backups/php.ini
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.4/tmp-backups/php.ini.bak
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/php.ini
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/php.ini-DBG
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/php.ini-DBG.bak
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/php.ini-XDEBUG
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/php.ini-XDEBUG.bak
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/php.ini.bak
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini-DBG
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini-DBG.bak
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini-XDEBUG
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini-XDEBUG.bak
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini.bak
/home/keith/my-docs/system/fedora/12/FEDORA-DEFAULT-PACKAGES/php-5.3.1/php.ini
/home/keith/my-docs/system/fedora/12/FEDORA-DEFAULT-PACKAGES/php-5.3.1/php.ini.bak
/home/keith/my-docs/system/fedora/12/FEDORA-DEFAULT-PACKAGES/php-5.3.1/php.ini.f12.org
/home/keith/my-docs/system/fedora/12/FEDORA-DEFAULT-PACKAGES/php-5.3.2/php.ini
/home/keith/my-docs/system/fedora/12/FEDORA-DEFAULT-PACKAGES/php-5.3.2/php.ini.bak
/home/keith/my-docs/system/fedora/12/FEDORA-DEFAULT-PACKAGES/php-5.3.2/php.ini.f12.org
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.4/php.ini
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.4/php.ini.bak
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.4/tmp-backups/php.ini
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.4/tmp-backups/php.ini.bak
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/php.ini
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/php.ini-DBG
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/php.ini-DBG.bak
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/php.ini-XDEBUG
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/php.ini-XDEBUG.bak
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/php.ini.bak
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini-DBG
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini-DBG.bak
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini-XDEBUG
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini-XDEBUG.bak
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini.bak
/home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.4/php.ini
/home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.4/php.ini.bak
/home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.4/php.ini.orig
/home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.6/php.ini
/home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.6/php.ini.bak
/home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.6/php.ini.org
/home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.6/php-gtk2/php.ini
/home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.6/php-gtk2/php.ini.bak
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.4/php.ini
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.4/php.ini.bak
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.4/tmp-backups/php.ini
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.4/tmp-backups/php.ini.bak
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.5/php.ini
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.5/php.ini.bak
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.5/php-cli/php.ini
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.5/php-cli/php.ini.bak
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups/php.ini.bak
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.6/php.ini
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.6/php.ini.bak
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.6/tmp-backups/php.ini
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.6/tmp-backups/php.ini.bak
/home/keith/my-docs/system/suse-keep/ZendDocs/ZendPlatform-2.2.2/etc/php.ini
/home/keith/my-docs/system/suse-keep/ZendDocs/ZendPlatform-2.2.2/etc/php.ini.bak
/home/keith/my-docs/system/suse-keep/ZendDocs/ZendPlatform-2.2.2/etc/php.ini.twin
/home/keith/my-docs/system/suse-keep/ZendDocs/ZendPlatform-2.2.2/etc/php.ini.twin.bak
/home/keith/my-docs/system/suse-keep/ZendDocs/ZendStudio-5.2.0/bin/php5/php.ini
/home/keith/my-docs/system/suse-keep/ZendDocs/ZendStudio-5.2.0/bin/php5/php.ini.bak
/home/keith/my-docs/system/suse-keep/ZendStudio-5.2.0/php5/php.ini
/home/keith/my-docs/system/suse-keep/ZendStudio-5.2.0/php5/php.ini.bak
/home/keith/my-docs/system/suse-keep/php-5.1.2/php.ini
/home/keith/my-docs/system/suse-keep/php-5.1.2/php.ini.bak
/home/keith/my-docs/system/suse-keep/php-5.1.2/tmp-backups/php.ini
/home/keith/my-docs/system/suse-keep/php-5.1.2/tmp-backups/php.ini.bak
/home/keith/my-docs/system/suse-keep/php-5.1.4/php.ini
/home/keith/my-docs/system/suse-keep/php-5.1.4/php.ini.bak
/home/keith/my-docs/system/suse-keep/php-5.1.4/php.ini.bk1
/home/keith/my-docs/system/suse-keep/php-5.1.4/tmp-backups/php.ini
/home/keith/my-docs/system/suse-keep/php-5.1.4/tmp-backups/php.ini.bak
/home/keith/my-docs/system/suse-keep/php-5.1.4/tmp-backups/php.ini.bk1
/home/keith/my-docs/system/suse-keep/php-5.1.6/php.ini
/home/keith/my-docs/system/suse-keep/php-5.1.6/php.ini.bak
/home/keith/my-docs/system/suse-keep/php-5.1.6/tmp-backups/php.ini
/home/keith/my-docs/system/suse-keep/php-5.1.6/tmp-backups/php.ini.bak
/usr/share/doc/php-common-5.3.3/php.ini-development
/usr/share/doc/php-common-5.3.3/php.ini-production

there's no shortage of them around here - but at least I
know which one PHP is loading (I think!)

HTH

Keith

> -----------------------------------------------------------------
> Websites:
> http://www.karsites.net
> http://www.php-debuggers.net
> http://www.raised-from-the-dead.org.uk
>
> All email addresses are challenge-response protected with
> TMDA [http://tmda.net]
> -----------------------------------------------------------------
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>

--
-----------------------------------------------------------------
Websites:
http://www.karsites.net
http://www.php-debuggers.net
http://www.raised-from-the-dead.org.uk

All email addresses are challenge-response protected with
TMDA [http://tmda.net]
-----------------------------------------------------------------
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

"Paul A" 02-16-2011 05:10 PM

apache 2 and php 5.2
 
No there is only on php.ini on there located in /etc/php.ini, this is so
weird.

-----Original Message-----
From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf
Of Keith Roberts
Sent: Wednesday, February 16, 2011 11:56 AM
To: CentOS mailing list
Subject: Re: [CentOS] apache 2 and php 5.2

On Wed, 16 Feb 2011, Paul A wrote:

> To: 'CentOS mailing list' <centos@centos.org>
> From: Paul A <razor@meganet.net>
> Subject: Re: [CentOS] apache 2 and php 5.2
>
> Keith/guys thanks for the suggestions, here is what I have
> found. It shows loaded config file is /etc/php.ini but if
> I remove that file and restart apache it still works. I
> also did as Keith suggested I removed a comment ';' and I
> got no errors apache started and it loaded the
> /etc/php.ini file. It's just completely ignoring that
> file, if its there or if its not there.

All I can think of is that you have more than one version of
PHP installed, and it's looking in a non-standard place for
the php.ini - possibly under /usr/php-version or
/usr/local/php-version.

Try a file search on your system, and see how many php.ini
files you can find there.

Eg.

[root@karsites ~]# locate php.ini
/downloads/php-src/5.2.1/php-5.2.1/php.ini-dist
/downloads/php-src/5.2.1/php-5.2.1/php.ini-recommended
/downloads/php-src/5.2.4/php-5.2.4/php.ini-dist
/downloads/php-src/5.2.4/php-5.2.4/php.ini-recommended
/downloads/php-src/5.2.4/php-5.2.4/tmp-php.ini
/downloads/php-src/5.2.5/php-5.2.5/php.ini-dist
/downloads/php-src/5.2.5/php-5.2.5/php.ini-recommended
/etc/php.ini
/etc/php.ini.bak
/etc/php.ini.centos5-5.org
/home/keith/my-docs/system/Centos/5.5/FEDORA-DEFAULT-PACKAGES/php-5.3.2/php.
ini
/home/keith/my-docs/system/Centos/5.5/FEDORA-DEFAULT-PACKAGES/php-5.3.2/php.
ini.bak
/home/keith/my-docs/system/Centos/5.5/FEDORA-DEFAULT-PACKAGES/php-5.3.2/php.
ini.centos5-5.org
/home/keith/my-docs/system/Centos/5.5/FEDORA-DEFAULT-PACKAGES/php-5.3.3/php.
ini
/home/keith/my-docs/system/Centos/5.5/FEDORA-DEFAULT-PACKAGES/php-5.3.3/php.
ini.bak
/home/keith/my-docs/system/Centos/5.5/FEDORA-DEFAULT-PACKAGES/php-5.3.3/php.
ini.centos5-5.org
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.4/php.ini
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.4/php.ini.b
ak
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.4/tmp-backu
ps/php.ini
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.4/tmp-backu
ps/php.ini.bak
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/php.ini
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/php.ini-D
BG
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/php.ini-D
BG.bak
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/php.ini-X
DEBUG
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/php.ini-X
DEBUG.bak
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/php.ini.b
ak
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/tmp-backu
ps/php.ini
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/tmp-backu
ps/php.ini-DBG
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/tmp-backu
ps/php.ini-DBG.bak
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/tmp-backu
ps/php.ini-XDEBUG
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/tmp-backu
ps/php.ini-XDEBUG.bak
/home/keith/my-docs/system/Centos/5.5/SELF-COMPILED-PKGS/php-5.2.5/tmp-backu
ps/php.ini.bak
/home/keith/my-docs/system/fedora/12/FEDORA-DEFAULT-PACKAGES/php-5.3.1/php.i
ni
/home/keith/my-docs/system/fedora/12/FEDORA-DEFAULT-PACKAGES/php-5.3.1/php.i
ni.bak
/home/keith/my-docs/system/fedora/12/FEDORA-DEFAULT-PACKAGES/php-5.3.1/php.i
ni.f12.org
/home/keith/my-docs/system/fedora/12/FEDORA-DEFAULT-PACKAGES/php-5.3.2/php.i
ni
/home/keith/my-docs/system/fedora/12/FEDORA-DEFAULT-PACKAGES/php-5.3.2/php.i
ni.bak
/home/keith/my-docs/system/fedora/12/FEDORA-DEFAULT-PACKAGES/php-5.3.2/php.i
ni.f12.org
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.4/php.ini
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.4/php.ini.ba
k
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.4/tmp-backup
s/php.ini
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.4/tmp-backup
s/php.ini.bak
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/php.ini
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/php.ini-DB
G
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/php.ini-DB
G.bak
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/php.ini-XD
EBUG
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/php.ini-XD
EBUG.bak
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/php.ini.ba
k
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/tmp-backup
s/php.ini
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/tmp-backup
s/php.ini-DBG
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/tmp-backup
s/php.ini-DBG.bak
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/tmp-backup
s/php.ini-XDEBUG
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/tmp-backup
s/php.ini-XDEBUG.bak
/home/keith/my-docs/system/fedora/12/SELF-COMPILED-PKGS/php-5.2.5/tmp-backup
s/php.ini.bak
/home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.4/php.in
i
/home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.4/php.in
i.bak
/home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.4/php.in
i.orig
/home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.6/php.in
i
/home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.6/php.in
i.bak
/home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.6/php.in
i.org
/home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.6/php-gt
k2/php.ini
/home/keith/my-docs/system/fedora/8/FEDORA-DEFAULT-PACKAGES/php-5.2.6/php-gt
k2/php.ini.bak
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.4/php.ini
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.4/php.ini.bak
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.4/tmp-backups
/php.ini
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.4/tmp-backups
/php.ini.bak
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.5/php.ini
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.5/php.ini.bak
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.5/php-cli/php
.ini
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.5/php-cli/php
.ini.bak
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups
/php.ini
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.5/tmp-backups
/php.ini.bak
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.6/php.ini
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.6/php.ini.bak
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.6/tmp-backups
/php.ini
/home/keith/my-docs/system/fedora/8/SELF-COMPILED-PKGS/php-5.2.6/tmp-backups
/php.ini.bak
/home/keith/my-docs/system/suse-keep/ZendDocs/ZendPlatform-2.2.2/etc/php.ini
/home/keith/my-docs/system/suse-keep/ZendDocs/ZendPlatform-2.2.2/etc/php.ini
.bak
/home/keith/my-docs/system/suse-keep/ZendDocs/ZendPlatform-2.2.2/etc/php.ini
.twin
/home/keith/my-docs/system/suse-keep/ZendDocs/ZendPlatform-2.2.2/etc/php.ini
.twin.bak
/home/keith/my-docs/system/suse-keep/ZendDocs/ZendStudio-5.2.0/bin/php5/php.
ini
/home/keith/my-docs/system/suse-keep/ZendDocs/ZendStudio-5.2.0/bin/php5/php.
ini.bak
/home/keith/my-docs/system/suse-keep/ZendStudio-5.2.0/php5/php.ini
/home/keith/my-docs/system/suse-keep/ZendStudio-5.2.0/php5/php.ini.bak
/home/keith/my-docs/system/suse-keep/php-5.1.2/php.ini
/home/keith/my-docs/system/suse-keep/php-5.1.2/php.ini.bak
/home/keith/my-docs/system/suse-keep/php-5.1.2/tmp-backups/php.ini
/home/keith/my-docs/system/suse-keep/php-5.1.2/tmp-backups/php.ini.bak
/home/keith/my-docs/system/suse-keep/php-5.1.4/php.ini
/home/keith/my-docs/system/suse-keep/php-5.1.4/php.ini.bak
/home/keith/my-docs/system/suse-keep/php-5.1.4/php.ini.bk1
/home/keith/my-docs/system/suse-keep/php-5.1.4/tmp-backups/php.ini
/home/keith/my-docs/system/suse-keep/php-5.1.4/tmp-backups/php.ini.bak
/home/keith/my-docs/system/suse-keep/php-5.1.4/tmp-backups/php.ini.bk1
/home/keith/my-docs/system/suse-keep/php-5.1.6/php.ini
/home/keith/my-docs/system/suse-keep/php-5.1.6/php.ini.bak
/home/keith/my-docs/system/suse-keep/php-5.1.6/tmp-backups/php.ini
/home/keith/my-docs/system/suse-keep/php-5.1.6/tmp-backups/php.ini.bak
/usr/share/doc/php-common-5.3.3/php.ini-development
/usr/share/doc/php-common-5.3.3/php.ini-production

there's no shortage of them around here - but at least I
know which one PHP is loading (I think!)

HTH

Keith

> -----------------------------------------------------------------
> Websites:
> http://www.karsites.net
> http://www.php-debuggers.net
> http://www.raised-from-the-dead.org.uk
>
> All email addresses are challenge-response protected with
> TMDA [http://tmda.net]
> -----------------------------------------------------------------
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos
>

--
-----------------------------------------------------------------
Websites:
http://www.karsites.net
http://www.php-debuggers.net
http://www.raised-from-the-dead.org.uk

All email addresses are challenge-response protected with
TMDA [http://tmda.net]
-----------------------------------------------------------------
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

02-16-2011 05:38 PM

apache 2 and php 5.2
 
Paul A wrote:
> From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On
> Behalf
> Of Keith Roberts
> On Wed, 16 Feb 2011, Paul A wrote:
>> From: Paul A <razor@meganet.net>
>>
>> Keith/guys thanks for the suggestions, here is what I have
>> found. It shows loaded config file is /etc/php.ini but if
>> I remove that file and restart apache it still works. I
>> also did as Keith suggested I removed a comment ';' and I
>> got no errors apache started and it loaded the
>> /etc/php.ini file. It's just completely ignoring that
>> file, if its there or if its not there.
>
> All I can think of is that you have more than one version of
> PHP installed, and it's looking in a non-standard place for
> the php.ini - possibly under /usr/php-version or
> /usr/local/php-version.
>
> Try a file search on your system, and see how many php.ini
> files you can find there.
>
> Eg.
>
> [root@karsites ~]# locate php.ini
> /downloads/php-src/5.2.1/php-5.2.1/php.ini-dist
> /downloads/php-src/5.2.1/php-5.2.1/php.ini-recommended
> /downloads/php-src/5.2.4/php-5.2.4/php.ini-dist
> /downloads/php-src/5.2.4/php-5.2.4/php.ini-recommended

> No there is only on php.ini on there located in /etc/php.ini, this is so
> weird.
>
May we assume that you did
locate php.ini
?

And *please* stop top posting.

mark

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos

Keith Roberts 02-16-2011 06:00 PM

apache 2 and php 5.2
 
On Wed, 16 Feb 2011, Paul A wrote:

> To: 'CentOS mailing list' <centos@centos.org>
> From: Paul A <razor@meganet.net>
> Subject: Re: [CentOS] apache 2 and php 5.2
>
> No there is only on php.ini on there located in
> /etc/php.ini, this is so weird.

It is - very odd!

What's your file permissions for php.ini ?

Mine are:

-rw-r--r-- root root 76376 Nov 1 11:55 php.ini

Try some of these commands to identify which php you have
installed:

[root@karsites ~]# rpm -qv php
php-5.3.3-1.el5.remi

[root@karsites ~]# rpm -qf `which php`
file /usr/local/bin/php is not owned by any package

[root@karsites ~]# ls -l /usr/local/bin/php
lrwxrwxrwx 1 root root 12 Jan 1 15:25 /usr/local/bin/php -> /usr/bin/php

[root@karsites ~]# which php
/usr/local/bin/php

The symlink is my own doing for when I used to compile
upstream php from source tar.gz

I tried to generate a php error in my /etc/php.ini but
nothing happened.


Keith

-----------------------------------------------------------------
Websites:
http://www.karsites.net
http://www.php-debuggers.net
http://www.raised-from-the-dead.org.uk

All email addresses are challenge-response protected with
TMDA [http://tmda.net]
-----------------------------------------------------------------
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


All times are GMT. The time now is 09:06 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.