By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,051 Members | 1,198 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,051 IT Pros & Developers. It's quick & easy.

Include with strange phenomena...

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
"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

P: n/a
> 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

P: n/a
"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

P: n/a
> 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

P: n/a
"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.