PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.php > Loaded Configuration File (none) ? Why ?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Loaded Configuration File (none) ? Why ?

Réponse
 
LinkBack Outils de la discussion
Vieux 15/02/2008, 02h01   #1
SPK
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Loaded Configuration File (none) ? Why ?

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
  Réponse avec citation
Vieux 15/02/2008, 12h09   #2
C. (http://symcbean.blogspot.com/)
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Loaded Configuration File (none) ? Why ?

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.
  Réponse avec citation
Vieux 15/02/2008, 13h33   #3
SPK
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Loaded Configuration File (none) ? Why ?

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...
  Réponse avec citation
Vieux 18/02/2008, 10h29   #4
C. (http://symcbean.blogspot.com/)
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Loaded Configuration File (none) ? Why ?

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.
  Réponse avec citation
Vieux 19/02/2008, 17h06   #5
AnrDaemon
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Loaded Configuration File (none) ? Why ?

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>

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 07h28.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10729 seconds with 13 queries