|
|
|
|
||||||
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi,
I compiled PHP 5.2.5 from source, and configured as follow : './configure' '--sysconfdir=/etc/php' '--enable-debug' '--enable-magic-quotes' '--with-openssl' '--with-zlib' '--with-bz2' '--enable-calendar' '--with-curl' '--with-gdbm' '--enable-ftp' '--with-gd' '--with-gettext' '--with-mcrypt' '--with-mhash' '--enable-zip' '--with-kerberos' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql' '--with-config-file-path=/etc/php' '--with-xsl' '--enable-shared' '--with-curlwrappers' '--enable-zip' '--enable-exif' '--enable-mbstring' '--with-config-file-scan-dir=/etc/php/more' i used the config-file-scan cause i would, in the future, use a per virtual host/per directory php configuration. But for the moment, i'm unable to load any configuration file... I specified --with-config-file-path=/etc/php and cp the php.ini-recommend into it and the ls command returns : drwxr-xr-x 2 root root 4096 2008-02-14 15:15 more -rw-r--r-- 1 root root 962 2008-02-15 02:05 pear.conf -rw-r--r-- 1 root root 48618 2008-02-14 13:50 php.ini So php should be able read the file... I can't understand why the php.ini file is not being read... Any ideas ? BTW : how could i load different php.ini in my virtual directory and use (what i suppose being to do) --with-config-file-scan-dir=/etc/php/more I check php documentation but wasn't able to find a solution to just give the configuration file to load... Thx PS : debian etch, apache 2.2, php 5.2.5 |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On 15 Feb, 02:01, SPK <speedballkills+nos...@gmail.com> wrote:
> Hi, > > I compiled PHP 5.2.5 from source, and configured as follow : > './configure' '--sysconfdir=/etc/php' '--enable-debug' > '--enable-magic-quotes' '--with-openssl' '--with-zlib' '--with-bz2' > '--enable-calendar' '--with-curl' '--with-gdbm' '--enable-ftp' > '--with-gd' '--with-gettext' '--with-mcrypt' '--with-mhash' > '--enable-zip' '--with-kerberos' > '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-mysql' > '--with-config-file-path=/etc/php' '--with-xsl' '--enable-shared' > '--with-curlwrappers' '--enable-zip' '--enable-exif' '--enable-mbstring' > '--with-config-file-scan-dir=/etc/php/more' > > i used the config-file-scan cause i would, in the future, use a per > virtual host/per directory php configuration. > But for the moment, i'm unable to load any configuration file... > I specified --with-config-file-path=/etc/php and cp the > php.ini-recommend into it and the ls command returns : > drwxr-xr-x 2 root root 4096 2008-02-14 15:15 more > -rw-r--r-- 1 root root 962 2008-02-15 02:05 pear.conf > -rw-r--r-- 1 root root 48618 2008-02-14 13:50 php.ini > So php should be able read the file... > I can't understand why the php.ini file is not being read... > > Any ideas ? Nothing immediately springs to mind - have you tried accessing the file from within your own php code? > > BTW : how could i load different php.ini in my virtual directory and use > (what i suppose being to do) --with-config-file-scan-dir=/etc/php/more > I check php documentation but wasn't able to find a solution to just > give the configuration file to load... > You can override most settings from the ini file within your Apache config - see http://us2.php.net/configuration.changes but I think you need PHP5.3 to change the ini file used. C. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
C. (http://symcbean.blogspot.com/) a écrit :
> > Nothing immediately springs to mind - have you tried accessing the > file from within your own php code? > > > You can override most settings from the ini file within your Apache > config - see http://us2.php.net/configuration.changes but I think you > need PHP5.3 to change the ini file used. > > C. Well, i tried to do : <?php $filename = "/etc/php/php.ini"; $handle = fopen ($filename, "r"); $contents = fread ($handle, filesize ($filename)); fclose ($handle); echo "$contents"; ?> No problems occured when reading the file.. So, it's definitivly not a permission problem... |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On 15 Feb, 13:33, SPK <speedballkills+nos...@gmail.com> wrote:
> C. (http://symcbean.blogspot.com/) a écrit : > > > > > Nothing immediately springs to mind - have you tried accessing the > > file from within your own php code? > > > You can override most settings from the ini file within your Apache > > config - seehttp://us2.php.net/configuration.changesbut I think you > > need PHP5.3 to change the ini file used. > > > C. > > Well, i tried to do : > <?php > $filename = "/etc/php/php.ini"; > $handle = fopen ($filename, "r"); > $contents = fread ($handle, filesize ($filename)); > fclose ($handle); > echo "$contents"; > ?> > > No problems occured when reading the file.. So, it's definitivly not a > permission problem... I'm stumped - strace might . C. |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
Greetings, SPK.
In reply to Your message dated Friday, February 15, 2008, 16:33:00, >> Nothing immediately springs to mind - have you tried accessing the >> file from within your own php code? >> >> >> You can override most settings from the ini file within your Apache >> config - see http://us2.php.net/configuration.changes but I think you >> need PHP5.3 to change the ini file used. >> >> C. > Well, i tried to do : > <?php > $filename = "/etc/php/php.ini"; > $handle = fopen ($filename, "r"); > $contents = fread ($handle, filesize ($filename)); > fclose ($handle); > echo "$contents"; ?>> > No problems occured when reading the file.. So, it's definitivly not a > permission problem... Did You supplied a PHPIniDir into Apache configuration script to point to the correct INI file location? Does Your settings at phpinfo(); page looks correct even if there are wrong "Used INI file" mentioned in the start of page? I'm asking cause I had similar issue on Windows. PHP told me that it read the %WinDir%\php.ini while there are no php.ini at all, and actual settings were taken from the correct ini file in the PHPIniDir directory. -- Sincerely Yours, AnrDaemon <anrdaemon@freemail.ru> |
|
![]() |
| Outils de la discussion | |
|
|