470,833 Members | 1,463 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,833 developers. It's quick & easy.

Include with strange phenomena...

Hi everybody!

I developed a suite of php scripts and i've tested it with PHP 4.3.3 and
Apache; obiouvsly all works fine.
Now I had a customer that want to buy my application and it needs to run all
the scripts on IIS 5 and possibly with PHP5 (i've warned him that is not a
production release but it want to look forward (...!!)) BUT a very strange
things happens; this is the code:

-----------------------------------------------
<?PHP
require "globvar.php";
require "globfunc.php";

-----------------------------------------------

When i call the function contained into "globfunc.php" the messages are:

Notice: Undefined variable: db_host in E:\WWWTest\globfunc.php on line 46

Obiouvsly the variables he's looking for are correctly defined in
"globvar.php".
The values of the variables (printed into the function defined in
"globfunc.php" are null).

Same problem when i replace PHP5 with PHP4.3.3!

The only way to solve the problem is to... reinstall Apache instead of
IIS!!!

Suggestion? Any configuration that I forget?

Well... my OS is XpPro + SP1 but my customer want to run on Windows Server
2003.

Thanx everybody!
Francesco

Jul 17 '05 #1
5 1591
"Francesco [tRO]" <pi*****@nospam.libero.it> wrote:
Hi everybody!


Couldn't you post code snipplets of the important code or at least the basic
structure?
It's kinda hard to imagine this based on your descriprion.

Ja ne
Adrian

--
Sou desu-ka? O_o -_- x_x _
http://www.animelayer.net/ (Reviewdatenbank)

Jul 17 '05 #2
> Couldn't you post code snipplets of the important code or at least the
basic
structure?
It's kinda hard to imagine this based on your descriprion.


Important code is already posted! Yeah, it's very simple:

+ index.php
-- require "globvar.php";
-- require "globfunc.php";

+ globvar.php
-- Variable declarations....

+ globfunc.php
-- Functions.

Bye!
Francesco
Jul 17 '05 #3
"Francesco [tRO]" <pi*****@nospam.libero.it> wrote in message
news:c5**********@news.ngi.it...
Hi everybody!

I developed a suite of php scripts and i've tested it with PHP 4.3.3 and
Apache; obiouvsly all works fine.
Now I had a customer that want to buy my application and it needs to run all the scripts on IIS 5 and possibly with PHP5 (i've warned him that is not a
production release but it want to look forward (...!!)) BUT a very strange
things happens; this is the code:

-----------------------------------------------
<?PHP
require "globvar.php";
require "globfunc.php";

-----------------------------------------------

When i call the function contained into "globfunc.php" the messages are:

Notice: Undefined variable: db_host in E:\WWWTest\globfunc.php on line 46

Obiouvsly the variables he's looking for are correctly defined in
"globvar.php".
The values of the variables (printed into the function defined in
"globfunc.php" are null).

Same problem when i replace PHP5 with PHP4.3.3!

The only way to solve the problem is to... reinstall Apache instead of
IIS!!!

Suggestion? Any configuration that I forget?

Well... my OS is XpPro + SP1 but my customer want to run on Windows Server
2003.


Under IIS, PHP likes to emit Notices about undefined fields, even though
they are perfectly valid (not that I like them) in PHP. When running PHP
under Windows, it seems to be customary to change the error_reporting to
eliminate Notices. Most php.ini files I've seen contain sample code showing
you how to report all messages except Notices.

- Virgil
Jul 17 '05 #4
> Under IIS, PHP likes to emit Notices about undefined fields, even though
they are perfectly valid (not that I like them) in PHP. When running PHP
under Windows, it seems to be customary to change the error_reporting to
eliminate Notices. Most php.ini files I've seen contain sample code showing you how to report all messages except Notices.


Hi Virgil, thanx for answer!

The problem is that also the value of the variable is null...

Bye!
Francesco
Jul 17 '05 #5
"Francesco [tRO]" <pi*****@nospam.libero.it> wrote in message
news:c5**********@news.ngi.it...
Hi everybody!

I developed a suite of php scripts and i've tested it with PHP 4.3.3 and
Apache; obiouvsly all works fine.
Now I had a customer that want to buy my application and it needs to run all the scripts on IIS 5 and possibly with PHP5 (i've warned him that is not a
production release but it want to look forward (...!!)) BUT a very strange
things happens; this is the code:

-----------------------------------------------
<?PHP
require "globvar.php";
require "globfunc.php";

-----------------------------------------------

When i call the function contained into "globfunc.php" the messages are:

Notice: Undefined variable: db_host in E:\WWWTest\globfunc.php on line 46

Obiouvsly the variables he's looking for are correctly defined in
"globvar.php".
The values of the variables (printed into the function defined in
"globfunc.php" are null).

Same problem when i replace PHP5 with PHP4.3.3!

The only way to solve the problem is to... reinstall Apache instead of
IIS!!!

Suggestion? Any configuration that I forget?

Well... my OS is XpPro + SP1 but my customer want to run on Windows Server
2003.


Put a die() inside globvar.php and see what happens. Maybe the file isn't
getting parsed?
Jul 17 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Christopher Brandsdal | last post: by
1 post views Thread by cduden | last post: by
6 posts views Thread by atv | last post: by
23 posts views Thread by Mike Fellows | last post: by
1 post views Thread by Peter van der Veen | last post: by
1 post views Thread by Zbigniew | last post: by
13 posts views Thread by Sebastian Faust | last post: by
reply views Thread by mihailmihai484 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.