Re: [PHP] Where does PHP look for php.ini??

2007-07-11 Thread Richard Lynch


On Fri, July 6, 2007 7:53 pm, Stut wrote:
 Tijnema wrote:
 I just noted that my php (CLI and Apache2 SAPI) doesn't read my
 php.ini
 in /etc
 I have compiled php with --prefix=/usr, and my /usr/etc is symlinked
 to /etc, but it doesn't read the php.ini file..
 when I use the CLI with -c /etc it works fine :)

 php -i on the command line, or phpinfo() in a SAPI script will tell
 you
 where it expects to find it, as well as whether it did find it.

For the archives:

That's not quite 100% correct...

If you've set PhpIniDirectory in Apache2, for example, and php.ini
isn't in that directory, php will fall back onto looking for it in the
default compile-in location, and then it will tell you in phpinfo()
that it couldn't find php.ini in that compiled-in location, with no
mention that it looked in the PhpIniDirectory as well...

I spent about half an hour trying to figure out what was wrong with my
httpd.conf because of this...

Then threw php.ini into the directory and it worked just fine.

YMMV

-- 
Some people have a gift link here.
Know what I want?
I want you to buy a CD from some indie artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Where does PHP look for php.ini??

2007-07-09 Thread clive

Nathan Nobbe wrote:

On 7/6/07, Tijnema [EMAIL PROTECTED] wrote:
Completely missed it LOL, it looks for it in /usr/lib :S
Is that normal?


i beleive it depends on the OS/distribution.  on gentoo php.ini is located


my ubuntu box looks like this:

etc/php5
|-- apache2
|   `-- php.ini
|-- cgi
|   `-- php.ini
`-- cli
`-- php.ini

--
Regards,

Clive.

Real Time Travel Connections


{No electrons were harmed in the creation, transmission or reading of 
this email. However, many were excited and some may well have enjoyed 
the experience.}


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Where does PHP look for php.ini??

2007-07-09 Thread Tijnema

On 7/8/07, Mario Guenterberg [EMAIL PROTECTED] wrote:

On Sat, Jul 07, 2007 at 02:08:21AM +0200, Tijnema wrote:
  Hi,

  I just noted that my php (CLI and Apache2 SAPI) doesn't read my php.ini in
  /etc
  I have compiled php with --prefix=/usr, and my /usr/etc is symlinked
  to /etc, but it doesn't read the php.ini file..
  when I use the CLI with -c /etc it works fine :)

Hi...

you can use the configure parameter --with-config-file-path.

Greetings
Mario
--


I've build my own Linux, so good to know how to change it :)

Tijnema
--
Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Where does PHP look for php.ini??

2007-07-09 Thread Mario Guenterberg
On Mon, Jul 09, 2007 at 05:16:20PM +0200, Tijnema wrote:
  I've build my own Linux, so good to know how to change it :)
 
  Tijnema

Ahh, a linux from scratch user, eh? :-)
If you need it or want some usefull input, I have very usefull
build scripts for apache/php and mysql/postgresql. I use this scripts
for my own builds from scratch or vanilla source.

Greetings
Mario

-- 
 -
| havelsoft.com - Ihr Service Partner für Open Source |
| Tel:  033876-21 966 |
| Notruf: 0173-277 33 60  |
| http://www.havelsoft.com|
| |
| Inhaber: Mario Günterberg   |
| Mützlitzer Strasse 19   |
| 14715 Märkisch Luch |
 -


pgpfL9WPzFBoe.pgp
Description: PGP signature


Re: [PHP] Where does PHP look for php.ini??

2007-07-09 Thread Tijnema

On 7/9/07, Mario Guenterberg [EMAIL PROTECTED] wrote:

On Mon, Jul 09, 2007 at 05:16:20PM +0200, Tijnema wrote:
  I've build my own Linux, so good to know how to change it :)

  Tijnema

Ahh, a linux from scratch user, eh? :-)
If you need it or want some usefull input, I have very usefull
build scripts for apache/php and mysql/postgresql. I use this scripts
for my own builds from scratch or vanilla source.

Greetings
Mario



It has an LFS base yes ;)

When I had the base LFS system, I continued on my own, no BLFS or
such, and a lot of unstable code fixes, which was more like making
bugs in programs to fix compile errors ;), commenting out some mem
calls or such :P

Can't remember that I've changed anything in PHP/Apache/MySQL or
PostgreSQL, but still interested in your scripts :)

Tijnema

--
Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Where does PHP look for php.ini??

2007-07-09 Thread Mario Guenterberg
On Mon, Jul 09, 2007 at 10:38:24PM +0200, Tijnema wrote:
  On 7/9/07, Mario Guenterberg [EMAIL PROTECTED] wrote:
  On Mon, Jul 09, 2007 at 05:16:20PM +0200, Tijnema wrote:
I've build my own Linux, so good to know how to change it :)
  
Tijnema
 
  Ahh, a linux from scratch user, eh? :-)
  If you need it or want some usefull input, I have very usefull
  build scripts for apache/php and mysql/postgresql. I use this scripts
  for my own builds from scratch or vanilla source.
 
  Greetings
  Mario
 
 
  It has an LFS base yes ;)
 
  When I had the base LFS system, I continued on my own, no BLFS or
  such, and a lot of unstable code fixes, which was more like making
  bugs in programs to fix compile errors ;), commenting out some mem
  calls or such :P

  Can't remember that I've changed anything in PHP/Apache/MySQL or
  PostgreSQL, but still interested in your scripts :)
 
  Tijnema

I don't change the sources even if security bugs or issues are known.
The only 3rd party patch I ever applied for php is hardened php/suhosin.

I attach the scripts to this mail.

Greetings
Mario

-- 
 -
| havelsoft.com - Ihr Service Partner für Open Source |
| Tel:  033876-21 966 |
| Notruf: 0173-277 33 60  |
| http://www.havelsoft.com|
| |
| Inhaber: Mario Günterberg   |
| Mützlitzer Strasse 19   |
| 14715 Märkisch Luch |
 -


build-apache2.sh
Description: Bourne shell script


build-mysql5.sh
Description: Bourne shell script


build-pgsql8.sh
Description: Bourne shell script


build-php5.sh
Description: Bourne shell script


pgpXXBXUvZAVs.pgp
Description: PGP signature


Re: [PHP] Where does PHP look for php.ini??

2007-07-09 Thread Tijnema

On 7/9/07, Mario Guenterberg [EMAIL PROTECTED] wrote:

On Mon, Jul 09, 2007 at 10:38:24PM +0200, Tijnema wrote:
  On 7/9/07, Mario Guenterberg [EMAIL PROTECTED] wrote:
  On Mon, Jul 09, 2007 at 05:16:20PM +0200, Tijnema wrote:
I've build my own Linux, so good to know how to change it :)
  
Tijnema
 
  Ahh, a linux from scratch user, eh? :-)
  If you need it or want some usefull input, I have very usefull
  build scripts for apache/php and mysql/postgresql. I use this scripts
  for my own builds from scratch or vanilla source.
 
  Greetings
  Mario
 

  It has an LFS base yes ;)

  When I had the base LFS system, I continued on my own, no BLFS or
  such, and a lot of unstable code fixes, which was more like making
  bugs in programs to fix compile errors ;), commenting out some mem
  calls or such :P

  Can't remember that I've changed anything in PHP/Apache/MySQL or
  PostgreSQL, but still interested in your scripts :)

  Tijnema

I don't change the sources even if security bugs or issues are known.
The only 3rd party patch I ever applied for php is hardened php/suhosin.

I attach the scripts to this mail.

Greetings
Mario


I didn't say security fixes , I only change the source for compile errors ;)

Thanks for the scripts :)
I'll take a look at them and see if I can learn something from
them/use them in my own environment :)

Tijnema

--
Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Where does PHP look for php.ini??

2007-07-08 Thread Nathan Nobbe

On 7/6/07, Tijnema [EMAIL PROTECTED] wrote:
Completely missed it LOL, it looks for it in /usr/lib :S
Is that normal?


i beleive it depends on the OS/distribution.  on gentoo php.ini is located
at
/etc/php/apache2-php5
Here is a bit of output from phpinfo() on a gentoo box of mine [w/ no
changes to php.ini]

Configuration File (php.ini) Path /etc/php/apache2-php5
Loaded Configuration File /etc/php/apache2-php5/php.ini
Scan this dir for additional .ini files /etc/php/apache2-php5/ext-active
additional .ini files parsed /etc/php/apache2-php5/ext-active/http.ini,
/etc/php/apache2-php5/ext-active/mcve.ini,
/etc/php/apache2-php5/ext-active/memcache.ini

-nathan

On 7/6/07, Tijnema [EMAIL PROTECTED] wrote:


On 7/7/07, Stut [EMAIL PROTECTED] wrote:
 Tijnema wrote:
  I just noted that my php (CLI and Apache2 SAPI) doesn't read my
php.ini
  in /etc
  I have compiled php with --prefix=/usr, and my /usr/etc is symlinked
  to /etc, but it doesn't read the php.ini file..
  when I use the CLI with -c /etc it works fine :)

 php -i on the command line, or phpinfo() in a SAPI script will tell you
 where it expects to find it, as well as whether it did find it.

 -Stut

Completely missed it LOL, it looks for it in /usr/lib :S
Is that normal?

Tijnema


--
Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Where does PHP look for php.ini??

2007-07-08 Thread Mario Guenterberg
On Sat, Jul 07, 2007 at 02:08:21AM +0200, Tijnema wrote:
  Hi,
 
  I just noted that my php (CLI and Apache2 SAPI) doesn't read my php.ini in 
  /etc
  I have compiled php with --prefix=/usr, and my /usr/etc is symlinked
  to /etc, but it doesn't read the php.ini file..
  when I use the CLI with -c /etc it works fine :)
 
Hi...

you can use the configure parameter --with-config-file-path.

Greetings
Mario
-- 
 -
| havelsoft.com - Ihr Service Partner für Open Source |
| Tel:  033876-21 966 |
| Notruf: 0173-277 33 60  |
| http://www.havelsoft.com|
| |
| Inhaber: Mario Günterberg   |
| Mützlitzer Strasse 19   |
| 14715 Märkisch Luch |
 -


pgpxq2gntGTLy.pgp
Description: PGP signature


[PHP] Where does PHP look for php.ini??

2007-07-06 Thread Tijnema

Hi,

I just noted that my php (CLI and Apache2 SAPI) doesn't read my php.ini in /etc
I have compiled php with --prefix=/usr, and my /usr/etc is symlinked
to /etc, but it doesn't read the php.ini file..
when I use the CLI with -c /etc it works fine :)

Tijnema
--
Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Where does PHP look for php.ini??

2007-07-06 Thread Stut

Tijnema wrote:
I just noted that my php (CLI and Apache2 SAPI) doesn't read my php.ini 
in /etc

I have compiled php with --prefix=/usr, and my /usr/etc is symlinked
to /etc, but it doesn't read the php.ini file..
when I use the CLI with -c /etc it works fine :)


php -i on the command line, or phpinfo() in a SAPI script will tell you 
where it expects to find it, as well as whether it did find it.


-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Where does PHP look for php.ini??

2007-07-06 Thread Tijnema

On 7/7/07, Stut [EMAIL PROTECTED] wrote:

Tijnema wrote:
 I just noted that my php (CLI and Apache2 SAPI) doesn't read my php.ini
 in /etc
 I have compiled php with --prefix=/usr, and my /usr/etc is symlinked
 to /etc, but it doesn't read the php.ini file..
 when I use the CLI with -c /etc it works fine :)

php -i on the command line, or phpinfo() in a SAPI script will tell you
where it expects to find it, as well as whether it did find it.

-Stut


Completely missed it LOL, it looks for it in /usr/lib :S
Is that normal?

Tijnema


--
Vote for PHP Color Coding in Gmail! - http://gpcc.tijnema.info

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php