Re: [PHP] location of the PHP executable

2007-04-12 Thread Davi
Em Quarta 11 Abril 2007 19:38, Buesching, Logan J escreveu: > IF db not exists THEN > locate -u > END-IF > > I'd hate to see the time it'd take to create a first-time database... > this could take awhile to run. > _maybe_ locate -u is faster than ls / -Rv... Need to test before

Re: [PHP] location of the PHP executable

2007-04-11 Thread Chris
Børge Holen wrote: On Wednesday 11 April 2007 23:50, Jarrel Cobb wrote: Don't you have to run locate -u first to generate the database before using locate? You can't just assume a database exists already can you? not an updated one at least, updatedb can also be used to update. Probably can

Re: [PHP] location of the PHP executable

2007-04-11 Thread Børge Holen
On Wednesday 11 April 2007 23:50, Jarrel Cobb wrote: > Don't you have to run locate -u first to generate the database before using > locate? You can't just assume a database exists already can you? not an updated one at least, updatedb can also be used to update. and if you're in a little bit of

Re: [PHP] location of the PHP executable

2007-04-11 Thread Jochem Maas
your script should try it's best to find the executable, on failure you might consider having it mail an error to you so at least you can pre-empt the client with regard to getting things working. most windows machines will probably have there php binary at: $_ENV['PHPRC'].'php.exe' vari

Re: [PHP] location of the PHP executable

2007-04-11 Thread Mattias Thorslund
Jochem Maas wrote: > > have you tried looking for this info you want? > > > Yup, but the manual seems kind of "light" on the subject. > > I can't say for sure if it always exists but on the few boxes > > I tried I found and entry in both $_SERVER and $_ENV: > > > > "_" => '/usr/bin/php' >

Re: [PHP] location of the PHP executable

2007-04-11 Thread Richard Lynch
On Wed, April 11, 2007 2:49 pm, Mattias Thorslund wrote: > I have looked in the documentation but can't find it: > > My PHP script (which is run from the command prompt - CLI) needs to > know > the file system location of the PHP executable. This is because it > needs > to run a second PHP script.

Re: [PHP] location of the PHP executable

2007-04-11 Thread Jochem Maas
Mattias Thorslund wrote: > Jim Lucas wrote: ... > $ /my-location-of/php myscript.php > /my-location-of/php > $ > > I was hoping there's a function or $_SERVER property that would contain > this? have you tried looking for this info you want? I can't say for sure if it always exists but on the fe

RE: [PHP] location of the PHP executable

2007-04-11 Thread Buesching, Logan J
ts.php.net Subject: Re: [PHP] location of the PHP executable Em Quarta 11 Abril 2007 18:50, Jarrel Cobb escreveu: > Don't you have to run locate -u first to generate the database before using > locate? You can't just assume a database exists already can you? > If you can use lo

Re: [PHP] location of the PHP executable

2007-04-11 Thread Mattias Thorslund
Jim Lucas wrote: > Mattias Thorslund wrote: >> Hi, >> >> I have looked in the documentation but can't find it: >> >> My PHP script (which is run from the command prompt - CLI) needs to know >> the file system location of the PHP executable. This is because it needs >> to run a second PHP script. I

Re: [PHP] location of the PHP executable

2007-04-11 Thread Davi
Em Quarta 11 Abril 2007 18:50, Jarrel Cobb escreveu: > Don't you have to run locate -u first to generate the database before using > locate? You can't just assume a database exists already can you? > If you can use locate, you can use which... =P BTW, do something to check OS then: IF OS == *ni

Re: [PHP] location of the PHP executable

2007-04-11 Thread Jarrel Cobb
Don't you have to run locate -u first to generate the database before using locate? You can't just assume a database exists already can you? On 4/11/07, Jim Lucas <[EMAIL PROTECTED]> wrote: Mattias Thorslund wrote: > Hi, > > I have looked in the documentation but can't find it: > > My PHP scri

Re: [PHP] location of the PHP executable

2007-04-11 Thread Jim Lucas
Mattias Thorslund wrote: Hi, I have looked in the documentation but can't find it: My PHP script (which is run from the command prompt - CLI) needs to know the file system location of the PHP executable. This is because it needs to run a second PHP script. I know about the "which" command but i