That's not a PHP error.
You'll need to use mysql_error()
Or, perhaps there is a setting somewhere to get mysql_error() to also fill
in $php_errormsg, but I dunno what it is...
--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: Newmail <[EMAIL PROTECTED]>
To: Richard Lynch <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, September 22, 2001 10:50 AM
Subject: $php_errormsg is not workink correctly! I`m absolutely sure. Can
anybody fis this problem?
> Hy Richard,
>
> It`s me again. I understand what you suggest me but is not necesarry to
> declare GLOBAL, variable $php_errormsg !!! Elsewhere is the
problem!!!!!!!!
>
> I made a little script that can ilustrate my opinion:
> OR IS O BUG IN PHP, or my first computer require
> a little update.
>
> Run this script on your computer.
>
> <?php
> /* Intentional errors */
> #Here, selected file does not exist. Track_erros function is working!
> $test = @file ('tata.txt');
> echo "First error was $php_errormsg <br>";
>
> #Here, the variabile $cache is not initialized. Track_erros function is
> working!
> $value = @$cache;
> echo "Second error was $php_errormsg <br>";
>
> $link=mysql_connect("localhost", "php", "aa");
> mysql_select_db("ecomerce");
>
> #Here is another intentional error: The table selecteted does not exist!
> #HERE IS THE PROBLEM: Track_erros function is NOT WORKING!
> $result = @mysql_query ("select * from scontari") ;
> #echo mysql_error($link)."<br>";
> echo $php_errormsg;
> ?>
>
> This script produce the following output on my first system, with RedHat
> 6.2:
>
> I). syntax echo mysql_error($link)."<br>"; is COMMENTED
> First error was file("tata.txt") - No such file or directory
> Second error was Undefined variable: cache
> Undefined variable: cache
>
> II). syntax echo mysql_error($link)."<br>"; is UNCOMMENTED
> First error was file("tata.txt") - No such file or directory
> Second error was Undefined variable: cache
> Table 'ecomerce.scontari' doesn't exist
> Undefined variable: cache
>
> This is the output produced by the SAME script in case I) but on the
second
> system, with RedHat 7.1
>
> III). syntax echo mysql_error($link)."<br>"; is COMMENTED
> First error was file("tata.txt") - No such file or directory
> Second error was Undefined variable: cache
> MySQL: A link to the server could not be established
>
> So, track_errors function is WORKING!!!!!!!!!!!!
>
> In conclusion: Or is a BUG in php-4.0.6 in function track_errors,
> Or my first system require an upate with any new libraries!!!!!!!
> What is the name for this library?
>
> Can somebody FIX this problem?
>
> Many thanks in advance for your reply,
> Alex
>
> ----- Original Message -----
> From: Richard Lynch <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Saturday, September 22, 2001 6:20 AM
> Subject: Re: Track_errors function posibile a BUG or require an upadate
>
>
> > I'm guessing that maybe you are printing out $php_errormsg when there
was
> no
> > error?...
> >
> > Or are you forgetting to use global $php_errormsg inside your
function?...
> >
> >
> >
> > --
> > WARNING [EMAIL PROTECTED] address is an endangered species -- Use
> > [EMAIL PROTECTED]
> > Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
> > Volunteer a little time: http://chatmusic.com/volunteer.htm
> > ----- Original Message -----
> > From: <[EMAIL PROTECTED]>
> > Newsgroups: php.general
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, September 21, 2001 11:08 AM
> > Subject: Track_errors function posibile a BUG or require an upadate
> >
> >
> > >
> > > I have a serious problem with function track_errors in PHP4.0.6
> > > Every time i want to use variable php_errormsg to catch the error, i
> > > receive
> > > this message:
> > >
> > > Warning: Undefined variable: php_errormsg in
> > > /usr/local/apache/htdocs/teste/c10/ex19.php on line 85
> > > Query failed: error was ''
> > >
> > > I want to mention that:
> > > - no one errors in compilation process for PHP 4.0.6 and APACHE 1.3.20
> > > - in my php.ini file, the track_error function is turned ON
> > > - My web server is compiled using DSO and is configured correct(to
> support
> > > PHP4
> > > in httpd.conf and so on...........).
> > > -i use REDHAT 6.2 updated with vanilla kernel 2.4.9 (with reiserfs
> > > installed and
> > > all problems regardind upgrade to a new major version of kernel,
> solved).
> > > -the script used to test function track_errors is absolutely correct.
I
> > > said this,
> > > because i have the SECOND SYSTEM which is configured with the same
> options
> > > for
> > > Apache web server 1.3.20 AND PHP4.0.6, and this script WORKS ==>> so
in
> > > this case
> > > for my first system is exclus a problem regarding compilation AND ANY
> > > configuration
> > > options!!!
> > > -in rest, everything works fine.
> > >
> > > EXIST ONLY ONE DIFFERENCE BETWEEN THIS SYSTEMS:
> > > THE SECOND RUN UNDER REDHAT 7.1 (with native filesystem ext2fs)
> > >
> > > In conclusion, can anybody tell me what library is needed to be
upgraded
> > on
> > > my first
> > > system (wih REDHAT6.2) to enable track_error function and php_errormsg
?
> > >
> > > I want to mention that the same problem was with gd-library. In
> > compilation
> > > process everithing was fine, but all features of this libraryy in PHP
> > > didn`t
> > > work till gd-library was updated with a (minimal) correct version.
> > >
> > > I tryed to find an explanation for my problem reading PHP
documentation,
> > > but nowhere i can find a minimal information.
> > >
> > > A prompt reply would be appreciated.
> > >
> > > Alex
> >
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]