473,412 Members | 2,994 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 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 1675
"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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.