I have PHP 4.3.7 running on my client's Windows 2003 server. The same
computer also runs SQL Server and I am trying to connect from PHP to a
database. This fails, so I would like to track down the cause for this
failure.
However, PHP does not display error messages about the failure. I have tried
these:
php.ini:
display_errors = On
test.php:
error_reporting(E_ALL);
phpinfo() says error_reporting is set to 2047 (E_ALL).
Yet I still do not get any errors.
Even when I write arglebargle code, PHP still produces a blank HTML-page
instead of syntax error message.
Are there any other settings in addition to the two forementioned which may
affect error reporting?
-Jani 9 2987
"Jani Jalkala" <ja**********@mail.htk.fi> wrote in message
news:cl***************@read3.inet.fi... I have PHP 4.3.7 running on my client's Windows 2003 server. The same computer also runs SQL Server and I am trying to connect from PHP to a database. This fails, so I would like to track down the cause for this failure.
However, PHP does not display error messages about the failure. I have
tried these:
php.ini: display_errors = On
test.php: error_reporting(E_ALL);
phpinfo() says error_reporting is set to 2047 (E_ALL).
Yet I still do not get any errors.
Even when I write arglebargle code, PHP still produces a blank HTML-page instead of syntax error message.
Are there any other settings in addition to the two forementioned which
may affect error reporting?
-Jani
Does PHP code without withoug database access code run properly?
Show us your code. We are only guessing that you want to connect to SQL
Server. You only said it runs on the same box. For all I know you're trying
to access a mySQL server on some other box. You didn't say how you were
attempting to connect. ODBC? For all we know, you are using incorrect
function calls all around.
- Virgil
The database connection was only a reference to what I was ultimately trying
to achieve. At the moment, I don't want help with the connection problems.
My problem was about PHP not displaying error messages, even after I have
(supposedly) turned on all necessary directives in php.ini and manually with
error_reporting().
The following code in test.php:
<?php
arglebargle
?>
Does not display error messages, but this HTML output:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html;
charset=windows-1252"></HEAD>
<BODY></BODY></HTML>
"Virgil Green" <vj*@DESPAMobsydian.com> wrote in message
news:a4*****************@newssvr22.news.prodigy.co m... "Jani Jalkala" <ja**********@mail.htk.fi> wrote in message news:cl***************@read3.inet.fi... I have PHP 4.3.7 running on my client's Windows 2003 server. The same computer also runs SQL Server and I am trying to connect from PHP to a database. This fails, so I would like to track down the cause for this failure.
However, PHP does not display error messages about the failure. I have tried these:
php.ini: display_errors = On
test.php: error_reporting(E_ALL);
phpinfo() says error_reporting is set to 2047 (E_ALL).
Yet I still do not get any errors.
Even when I write arglebargle code, PHP still produces a blank HTML-page instead of syntax error message.
Are there any other settings in addition to the two forementioned which may affect error reporting?
-Jani
Does PHP code without withoug database access code run properly?
Show us your code. We are only guessing that you want to connect to SQL Server. You only said it runs on the same box. For all I know you're
trying to access a mySQL server on some other box. You didn't say how you were attempting to connect. ODBC? For all we know, you are using incorrect function calls all around.
- Virgil
"Jani Jalkala" <ja**********@mail.htk.fi> wrote in message
news:0l**************@read3.inet.fi... "Virgil Green" <vj*@DESPAMobsydian.com> wrote in message news:a4*****************@newssvr22.news.prodigy.co m... Does PHP code without withoug database access code run properly?
Show us your code. We are only guessing that you want to connect to SQL Server. You only said it runs on the same box. For all I know you're trying to access a mySQL server on some other box. You didn't say how you were attempting to connect. ODBC? For all we know, you are using incorrect function calls all around.
- Virgil The database connection was only a reference to what I was ultimately
trying to achieve. At the moment, I don't want help with the connection problems.
My problem was about PHP not displaying error messages, even after I have (supposedly) turned on all necessary directives in php.ini and manually
with error_reporting().
The following code in test.php:
<?php arglebargle ?>
Does not display error messages, but this HTML output:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD> <BODY></BODY></HTML>
That code did exactly the same thing on my server.
This, however, gave a fatal error:
<?php
arglebargle();
?>
- Virgil
I would understand if PHP interpreted "arglebargle" as an undefined constant
and simply did nothing on that line, but in that case I would expect a
completely empty output, not the HTML-page it PHP seens to generate.
I have been using PHP on a server provided by our ISP for a while, and a few
years ago they removed displayed error reports due to security reasons,
after which erroneous code started to result in this same empty HTML page
instead of error messages.
Thus I am fairly sure that in my current case PHP does correctly recognize
the errors in the code, but for some reason chooses to not display the error
messages.
In any case, I tried "arglebargle();" as a function call, but that didn't
change the output at all.
"Virgil Green" <vj*@DESPAMobsydian.com> wrote in message
news:2J***************@newssvr22.news.prodigy.com. .. The following code in test.php:
<?php arglebargle ?>
Does not display error messages, but this HTML output:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD> <BODY></BODY></HTML>
That code did exactly the same thing on my server.
This, however, gave a fatal error:
<?php arglebargle(); ?>
- Virgil
On Tue, 08 Jun 2004 15:53:21 GMT, "Jani Jalkala" <ja**********@mail.htk.fi>
wrote: "Virgil Green" <vj*@DESPAMobsydian.com> wrote in message news:2J***************@newssvr22.news.prodigy.com ... > > The following code in test.php: > > <?php > arglebargle > ?> > > Does not display error messages, but this HTML output: > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> > <HTML><HEAD> > <META http-equiv=Content-Type content="text/html; > charset=windows-1252"></HEAD> > <BODY></BODY></HTML>
That code did exactly the same thing on my server.
This, however, gave a fatal error:
<?php arglebargle(); ?>
I would understand if PHP interpreted "arglebargle" as an undefined constant and simply did nothing on that line, but in that case I would expect a completely empty output, not the HTML-page it PHP seens to generate.
FWIW isn't the HTML snippet above generated by IE when it gets no output, and
not generated by PHP and/or the webserver? Try viewing a blank file through a
webserver with IE - I get the snippet above in view source from IE, but from
Mozilla I get a blank screen i.e. the actual output.
--
Andy Hassall <an**@andyh.co.uk> / Space: disk usage analysis tool http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space
Oh yes, you are right about that. Still doesn't explain why PHP doesn't
display error messages. > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> > <HTML><HEAD> > <META http-equiv=Content-Type content="text/html; > charset=windows-1252"></HEAD> > <BODY></BODY></HTML> FWIW isn't the HTML snippet above generated by IE when it gets no output,
and not generated by PHP and/or the webserver? Try viewing a blank file
through a webserver with IE - I get the snippet above in view source from IE, but
from Mozilla I get a blank screen i.e. the actual output.
-- Andy Hassall <an**@andyh.co.uk> / Space: disk usage analysis tool http://www.andyh.co.uk / http://www.andyhsoftware.co.uk/space
"Jani Jalkala" <ja**********@mail.htk.fi> wrote in message
news:Rh***************@read3.inet.fi... "Virgil Green" <vj*@DESPAMobsydian.com> wrote in message news:2J***************@newssvr22.news.prodigy.com. .. The following code in test.php:
<?php arglebargle ?>
Does not display error messages, but this HTML output:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD> <BODY></BODY></HTML> That code did exactly the same thing on my server.
This, however, gave a fatal error:
<?php arglebargle(); ?>
- Virgil
I would understand if PHP interpreted "arglebargle" as an undefined
constant and simply did nothing on that line, but in that case I would expect a completely empty output, not the HTML-page it PHP seens to generate.
I have been using PHP on a server provided by our ISP for a while, and a
few years ago they removed displayed error reports due to security reasons, after which erroneous code started to result in this same empty HTML page instead of error messages.
Thus I am fairly sure that in my current case PHP does correctly recognize the errors in the code, but for some reason chooses to not display the
error messages.
In any case, I tried "arglebargle();" as a function call, but that didn't change the output at all.
Earlier, you indicated that you had display_errors on in your php.ini file.
Can you confirm that this is also true via phpinfo()? Too often I see people
look in their php.ini only to discover that something else has affected the
settings and they are not really running with those settings.
Please try the code I presented and include a phpinfo() call before the call
to the fake function. Confirm all the parameters from there and report back
along with any output resulting from the fake functions.
- Virgil
Ok, seems that it indeed was my mistake in configuring PHP.
Firstly, I had confused "error_reporting" for "display_errors" when I was
looking at the output from phpinfo(). You were right about that, phpinfo()
did say that display_errors is Off.
After I got that right in my head and applied them to php.ini properly (I
thought), it still didn't work.
Then I browsed through all of php.ini, and noticed that I had changed these
settings in the beginning of the file, in "About this file" section, while
later in the same file the same settings were set to Off. Thus when PHP
interpreted php.ini it took the settings appearing later in the file than my
modifications.
Thanks for your help Virgil and Andy!
"Virgil Green" <vj*@DESPAMobsydian.com> wrote in message
news:6_***************@newssvr23.news.prodigy.com. .. "Jani Jalkala" <ja**********@mail.htk.fi> wrote in message news:Rh***************@read3.inet.fi... "Virgil Green" <vj*@DESPAMobsydian.com> wrote in message news:2J***************@newssvr22.news.prodigy.com. .. > > The following code in test.php: > > <?php > arglebargle > ?> > > Does not display error messages, but this HTML output: > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> > <HTML><HEAD> > <META http-equiv=Content-Type content="text/html; > charset=windows-1252"></HEAD> > <BODY></BODY></HTML>
That code did exactly the same thing on my server.
This, however, gave a fatal error:
<?php arglebargle(); ?>
- Virgil I would understand if PHP interpreted "arglebargle" as an undefined
constant and simply did nothing on that line, but in that case I would expect a completely empty output, not the HTML-page it PHP seens to generate.
I have been using PHP on a server provided by our ISP for a while, and a few years ago they removed displayed error reports due to security reasons, after which erroneous code started to result in this same empty HTML
page instead of error messages.
Thus I am fairly sure that in my current case PHP does correctly
recognize the errors in the code, but for some reason chooses to not display the error messages.
In any case, I tried "arglebargle();" as a function call, but that
didn't change the output at all.
Earlier, you indicated that you had display_errors on in your php.ini
file. Can you confirm that this is also true via phpinfo()? Too often I see
people look in their php.ini only to discover that something else has affected
the settings and they are not really running with those settings.
Please try the code I presented and include a phpinfo() call before the
call to the fake function. Confirm all the parameters from there and report
back along with any output resulting from the fake functions.
- Virgil
"Jani Jalkala" <ja**********@mail.htk.fi> wrote in message
news:pT***************@read3.inet.fi... "Virgil Green" <vj*@DESPAMobsydian.com> wrote in message news:6_***************@newssvr23.news.prodigy.com. .. "Jani Jalkala" <ja**********@mail.htk.fi> wrote in message news:Rh***************@read3.inet.fi... "Virgil Green" <vj*@DESPAMobsydian.com> wrote in message news:2J***************@newssvr22.news.prodigy.com. .. > > > > > The following code in test.php: > > > > <?php > > arglebargle > > ?> > > > > Does not display error messages, but this HTML output: > > > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> > > <HTML><HEAD> > > <META http-equiv=Content-Type content="text/html; > > charset=windows-1252"></HEAD> > > <BODY></BODY></HTML> > > That code did exactly the same thing on my server. > > This, however, gave a fatal error: > > <?php > arglebargle(); > ?> > > - Virgil > I would understand if PHP interpreted "arglebargle" as an undefined constant and simply did nothing on that line, but in that case I would expect a completely empty output, not the HTML-page it PHP seens to generate.
I have been using PHP on a server provided by our ISP for a while, and
a few years ago they removed displayed error reports due to security
reasons, after which erroneous code started to result in this same empty HTML
page instead of error messages.
Thus I am fairly sure that in my current case PHP does correctly recognize the errors in the code, but for some reason chooses to not display the error messages.
In any case, I tried "arglebargle();" as a function call, but that didn't change the output at all.
Earlier, you indicated that you had display_errors on in your php.ini file. Can you confirm that this is also true via phpinfo()? Too often I see people look in their php.ini only to discover that something else has affected the settings and they are not really running with those settings.
Please try the code I presented and include a phpinfo() call before the call to the fake function. Confirm all the parameters from there and report back along with any output resulting from the fake functions.
- Virgil
Ok, seems that it indeed was my mistake in configuring PHP.
Firstly, I had confused "error_reporting" for "display_errors" when I was looking at the output from phpinfo(). You were right about that, phpinfo() did say that display_errors is Off.
After I got that right in my head and applied them to php.ini properly (I thought), it still didn't work.
Then I browsed through all of php.ini, and noticed that I had changed
these settings in the beginning of the file, in "About this file" section, while later in the same file the same settings were set to Off. Thus when PHP interpreted php.ini it took the settings appearing later in the file than
my modifications.
Thanks for your help Virgil and Andy!
Excellent news!
phpinfo() is definitely your friend. I "often" encounter situations where a
setting has been set in multiple places in the php.ini or in the wrong
php.ini. phpinfo() will always tell you what's actually happening rather
than what you think is happening.
- Virgil This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Bazza5385 |
last post by:
I have installed Reporting Services Developer Edition on a box running XP SP2
and using .NET 2003.
When i try to create a new Reporting Services project i receive the
following error.
"There...
|
by: kt |
last post by:
We want to automatically turn off the error reporting options using Windows
API functions for the following functions area
Click on Start, Settings, Control Panel, System, the Advanced tab and...
|
by: Joshua V. |
last post by:
We are trying to implement Windows Error Reporting from within our VB.Net
application. Basically we want to replace the standard unhandled exception
message we use with the Windows Error Reporting...
|
by: Paul Furman |
last post by:
What is the proper way to turn off error reporting? I'm on a shared
server so...
"Note: Although display_errors may be set at runtime (with ini_set ()),
it won't have any affect if the script...
|
by: RdS |
last post by:
Hello,
I use sourcesafe and vb 2003 for my dev environment. on the sourcesafe
server I also have sql2005 and reporting services installed. The web app
references this sql server for db. When...
|
by: Melissa Nava |
last post by:
Have an online system. Currently the error reporting either does: A)
logs to a file, B) databases errors or C) emails individual errors.
Also have phone notifications for systematically calling the...
|
by: Horst Wutscher |
last post by:
Hello,
I hope somebody can help me!
I get an error message from ASP.NET 2.0 if i want open one report from SQL
Server 2005 -
Reporting Services over the url, for example:...
|
by: Horst Wutscher |
last post by:
Hello,
I hope somebody can help me, because i know 1% over ASP.NET Framework!
I get an error message from ASP.NET 2.0 if i want open one report from SQL
Server 2005 -
Reporting Services over...
|
by: Paul Furman |
last post by:
How do I turn off MySQL error reporting? I set error_reporting(0); but
that doesn't seem to be working.
|
by: fperri |
last post by:
Hi,
I am trying to configure reporting services which I just added to an already existing installation of SQL Server 2005. When I am in the reporting services configuration manager and I am trying...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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
|
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...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
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...
|
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...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |