472,962 Members | 2,396 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,962 software developers and data experts.

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 1662
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Christopher Brandsdal | last post by:
If I want to include a file to my webpage that is not placed in the same folder asd the application, but in another folder on the same disk... I found out that this is not going to work:...
1
by: cduden | last post by:
Not sure which group this question would go in so if this isn't the appropriate place I apologize. Here is the setup -- Rather large project consisting of a Winform client that communicates...
2
by: Garry Freemyer | last post by:
I wrote a screensaver, via Visual Studio 2003 in C# and I decided a wiser choice for me was to use an xml file to save my configs. Btw: I wonder if this is why every bit of documentation I've found...
6
by: atv | last post by:
Alright, i have some questions concerning include files en global variables.I hope someone is willing to answer these. 1).Why is it that if i define a global variable in a file, say main.c, and...
23
by: Mike Fellows | last post by:
ok my code that im doing in .net is now starting to look fairly complicated, what started out as a small project has grown and grown and its time for some house keeping of my code im trying to...
1
by: Peter van der Veen | last post by:
Hi I have some strange behavior in one project. Normally when an error is found the bedugger shows the line with the error in visual studio and mark it yellow. In one project however it...
12
by: TMN | last post by:
Hi All I am new to PHP and I do not understand why the following works ?? $file=urlencode("displayIncidents.php"); echo "<a href=statistics.php?fileName=$file&delete=true>Delete...
1
by: Zbigniew | last post by:
Hi, Compiler: GCC 3.3.5 OS: SuSE Linux (Kernel: 2.6.11) I reorganized my source code and now almost all my header files went to "Include" folder. Now when compiling with -I option I have...
13
by: Sebastian Faust | last post by:
Hi, I hava a somehow strange problem. I hope I am not wrong in this group; if this is the case please let me know. I am trying to compile a rather simple C program. As long as I use: #include...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.