[PHP] include_once behaves differently in mod_php4 vs php5-cgi

2005-11-30 Thread Toomas Aas
Hello! There's a website with a following structure index.php in the site's DocumentRoot directory (for this thread, let's call it /www) functions.php, init.php and db_connect.php in /www/library index.php includes line: include_once('library/functions.php'); functions.php includes lines:

Re: [PHP] include_once changed behavior?

2004-06-07 Thread Mattias Thorslund
Jason Wong wrote: Possibly: manual > Using PHP from the command line > -c switch From the manual: "The CLI SAPI does not change the current directory to the directory of the executed script!" "Note: The CGI SAPI supports the CLI SAPI behaviour by means of the -C switch when run from the command

Re: [PHP] include_once changed behavior?

2004-06-07 Thread Jason Wong
On Tuesday 08 June 2004 04:14, Mattias Thorslund wrote: > >>What could be the difference that caused this? As Marek had pointed out the behaviour was changed ... > >Possibly: > > > > manual > Using PHP from the command line > -c switch > > ...except I don't use the -c switch? ... IIRC just af

Re: [PHP] include_once changed behavior?

2004-06-07 Thread Mattias Thorslund
Marek Kilimajer wrote: cli php uses path relative to your current directory, cgi php uses path relative to the executing script. That IS interesting. That would explain why: php /var/www/myproject/util/my-cli-script.php ... will break unless I execute it from that same directory. I used to be abl

Re: [PHP] include_once changed behavior?

2004-06-07 Thread Marek Kilimajer
Marek Kilimajer wrote: Mattias Thorslund wrote: Hi, In order to keep configuration files outside the web root I use: include_once('../config.php'); This used to work also when running php scripts from the command line. Now I have a new server and I get "no such file or directory" when using this

Re: [PHP] include_once changed behavior?

2004-06-07 Thread Marek Kilimajer
Mattias Thorslund wrote: Hi, In order to keep configuration files outside the web root I use: include_once('../config.php'); This used to work also when running php scripts from the command line. Now I have a new server and I get "no such file or directory" when using this construct from the comm

Re: [PHP] include_once changed behavior?

2004-06-07 Thread Mattias Thorslund
Jason Wong wrote: On Tuesday 08 June 2004 03:21, Mattias Thorslund wrote: In order to keep configuration files outside the web root I use: include_once('../config.php'); This used to work also when running php scripts from the command line. Now I have a new server and I get "no such file or dir

Re: [PHP] include_once changed behavior?

2004-06-07 Thread Jason Wong
On Tuesday 08 June 2004 03:21, Mattias Thorslund wrote: > In order to keep configuration files outside the web root I use: > > include_once('../config.php'); > > This used to work also when running php scripts from the command line. > Now I have a new server and I get "no such file or directory" w

[PHP] include_once changed behavior?

2004-06-07 Thread Mattias Thorslund
Hi, In order to keep configuration files outside the web root I use: include_once('../config.php'); This used to work also when running php scripts from the command line. Now I have a new server and I get "no such file or directory" when using this construct from the command line. I have worked

Re: [PHP] include_once() isnt!

2004-02-07 Thread Adam Bregenzer
On Tue, 2004-02-03 at 17:04, Rob wrote: > Ive programmed with C/C++ for years and have recently started to dabble in > PHP. Ive written a multi-part script for a friend and Ive run into a > problem. > Heres where the problem lies. Each component is in a separate file, and when > I run the script,

[PHP] include_once() isnt!

2004-02-03 Thread Rob
Ive programmed with C/C++ for years and have recently started to dabble in PHP. Ive written a multi-part script for a friend and Ive run into a problem. Ive got 14 include files 3 of which are basic components that may or may not be used by other components. One is an authorisation class, another

Re: [PHP] include_once("blah"); vs $blah="blah"; include($blah);

2002-06-11 Thread Jim lucas
blah... Jim Lucas - Original Message - From: "Martin Towell" <[EMAIL PROTECTED]> To: "'Henry'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Sent: Tuesday, June 11, 2002 4:31 PM Subject: RE: [PHP] include_once("blah"); vs $blah=&qu

RE: [PHP] include_once("blah"); vs $blah="blah"; include($blah);

2002-06-11 Thread Martin Towell
02 11:11 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] include_once("blah"); vs $blah="blah"; include($blah); I did as you suggest with an interesting result: include_once "blah.php"; worked var $blah="blah.php"; include_once $blah; gave the following erro

RE: [PHP] include_once("blah"); vs $blah="blah"; include($blah);

2002-06-11 Thread Jonathan Rosenberg
comment. > -Original Message- > From: Henry [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 11, 2002 9:45 AM > To: [EMAIL PROTECTED] > Subject: Re: [PHP] include_once("blah"); vs $blah="blah"; > include($blah); > > > No, the line number is

Re: [PHP] include_once("blah"); vs $blah="blah"; include($blah);

2002-06-11 Thread Henry
file you are including? > > > -Original Message- > > From: Henry [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, June 11, 2002 9:11 AM > > To: [EMAIL PROTECTED] > > Subject: Re: [PHP] include_once("blah"); vs $blah="blah"; > > include($b

RE: [PHP] include_once("blah"); vs $blah="blah"; include($blah);

2002-06-11 Thread Jonathan Rosenberg
IL PROTECTED] > Subject: Re: [PHP] include_once("blah"); vs $blah="blah"; > include($blah); > > > I did as you suggest with an interesting result: > > include_once "blah.php"; > > worked > > var $blah="blah.php"; > include_once $bla

Re: [PHP] include_once("blah"); vs $blah="blah"; include($blah);

2002-06-11 Thread Henry
> ?> > > & see if it behaves differently (i.e., no parens around the > include file name). > > > -Original Message- > > From: Henry [mailto:[EMAIL PROTECTED]] > > Sent: Tuesday, June 11, 2002 8:15 AM > > To: [EMAIL PROTECTED] > > Sub

RE: [PHP] include_once("blah"); vs $blah="blah"; include($blah);

2002-06-11 Thread Jonathan Rosenberg
Out of curiosity, try & see if it behaves differently (i.e., no parens around the include file name). > -Original Message- > From: Henry [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, June 11, 2002 8:15 AM > To: [EMAIL PROTECTED] > Subject: [PHP] include_onc

[PHP] include_once("blah"); vs $blah="blah"; include($blah);

2002-06-11 Thread Henry
My web hosting company is running php 4.0.4pl1 Why should it be that these are different and When I say different I mean; 1) global variable are not avaiable in the second version 2) functions defined in the included file are not accessable in the including file. 3) in both examples the f

RE: [PHP] include_once()

2002-03-19 Thread Martin Towell
the "child" script has an error (dunno if this is a php setting or it's default behaviour???) -Original Message- From: Mauricio Cuenca [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 20, 2002 11:14 AM To: anders nawroth; [EMAIL PROTECTED] Subject: Re: [PHP] include_once() Yes,

Re: [PHP] include_once()

2002-03-19 Thread Mauricio Cuenca
nt: Tuesday, March 19, 2002 12:30 PM Subject: Re: [PHP] include_once() > Have you remembered to set up PHP's include_path to point to the area where > your scripts are located? > > Neil > > Mauricio Cuenca wrote: > > > Hello, > > > > I have a very long sc

Re: [PHP] include_once()

2002-03-19 Thread Mauricio Cuenca
, 2002 2:26 PM Subject: Re: [PHP] include_once() > Have you put > Anders > > - Ursprungligt meddelande - > Från: "Mauricio Cuenca" <> > Till: <> > Skickat: den 19 mars 2002 17:43 > Ämne: [PHP] include_once() > > > > Hello, > > &

Re: [PHP] include_once()

2002-03-19 Thread anders nawroth
Have you put Till: <[EMAIL PROTECTED]> Skickat: den 19 mars 2002 17:43 Ämne: [PHP] include_once() > Hello, > > I have a very long script with several functions in it. I wanted to split > the script into several files, so I created two sub-scripts and one main > script.

Re: [PHP] include_once()

2002-03-19 Thread Neil Freeman
Have you remembered to set up PHP's include_path to point to the area where your scripts are located? Neil Mauricio Cuenca wrote: > Hello, > > I have a very long script with several functions in it. I wanted to split > the script into several files, so I created two sub-scripts and one main > s

[PHP] include_once()

2002-03-19 Thread Mauricio Cuenca
Hello, I have a very long script with several functions in it. I wanted to split the script into several files, so I created two sub-scripts and one main script. This is the code from the main script: MyFunction() is contained in the file "sub_script_1.php" which is properly enclosed with vali

[PHP] include_once vs require_once

2001-07-31 Thread mike cullerton
hey folks, i'm wondering about the difference between include_once and require_once. the manual says The require_once() statement replaces itself with the specified file The include_once() statement includes and evaluates the specified file so, what is the difference? it's almost like one

Re: [PHP] include_once

2001-02-28 Thread Hardy Merrill
Solved - I was changing a copy of the code that the webserver was NOT looking at. "include_once" works fine. Appologies. -- Hardy Merrill Mission Critical Linux, Inc. http://www.missioncriticallinux.com Hardy Merrill [[EMAIL PROTECTED]] wrote: > Redhat 6.1 Linux > PHP 4.0.4pl1 > Apache 1.3.14

[PHP] include_once

2001-02-28 Thread Hardy Merrill
Redhat 6.1 Linux PHP 4.0.4pl1 Apache 1.3.14 Anyone using "include_once"? I'm executing a PHP script "A.php" by referring to it in my Netscape browser URL - script A.php does an include_once of "B.php" - B.php contains a database connect function that does a connect to an Oracle database. I purp