Bug 19888 - /usr/bin/php не реагирует на изменения в /etc/php/5.2.5/cli/php.ini
Summary: /usr/bin/php не реагирует на изменения в /etc/php/5.2.5/cli/php.ini
Status: CLOSED DUPLICATE of bug 17455
Alias: None
Product: Branch 4.1
Classification: Distributions
Component: php5 (show other bugs)
Version: unspecified
Hardware: all Linux
: P3 critical
Assignee: Grigory Batalov
QA Contact: qa-4.1@altlinux.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-01 15:46 MSD by stalker
Modified: 2009-05-09 01:17 MSD (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description stalker 2009-05-01 15:46:22 MSD
Долго не мог понять почему молча умирает poller от cacti и совсем при этом не выводит ошибок. Запустил под strace и обнаружил что php ищет свой php.ini не там где он лежит на самом деле,а именно:

lstat("/etc", {st_mode=S_IFDIR|0755, st_size=8192, ...}) = 0
lstat("/etc/alternatives", {st_mode=S_IFDIR|0755, st_size=59, ...}) = 0
lstat("/etc/alternatives/links", {st_mode=S_IFDIR|0755, st_size=8192, ...}) = 0
lstat("/etc/alternatives/links/|usr|bin|php", {st_mode=S_IFLNK|0777, st_size=18, ...}) = 0
readlink("/etc/alternatives/links/|usr|bin|php", "/usr/bin/php-5.2.5"..., 4095) = 18
lstat("/usr", {st_mode=S_IFDIR|0755, st_size=155, ...}) = 0
lstat("/usr/bin", {st_mode=S_IFDIR|0755, st_size=61440, ...}) = 0
lstat("/usr/bin/php-5.2.5", {st_mode=S_IFREG|0755, st_size=28768, ...}) = 0
access("/usr/bin/php-5.2.5", X_OK)      = 0
open("/usr/bin/php-cli.ini", O_RDONLY)  = -1 ENOENT (No such file or directory)
open("/etc/php-cli.ini", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/usr/bin/php.ini", O_RDONLY)      = -1 ENOENT (No such file or directory)
open("/etc/php.ini", O_RDONLY)          = -1 ENOENT (No such file or directory)
brk(0x64a000)                           = 0x64a000
brk(0x66b000)                           = 0x66b000
brk(0x68c000)                           = 0x68c000

если сделать симлинк с 
ll php.ini
lrwxrwxrwx 1 root root 26 May  1 15:31 php.ini -> /etc/php/5.2.5/cli/php.ini

То всё начинает работать
rpm -q php5
php5-5.2.5-alt1.M41.3
Comment 1 Grigory Batalov 2009-05-09 01:17:35 MSD
Уже было

*** This bug has been marked as a duplicate of bug 17455 ***