Re: Breaking out of loop with Warning.
| From: | Ananth Kesari | Date: | Tue, 27 May 2003 13:34:57 +0000 |
| Subject: | Re: Breaking out of loop with Warning. | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-149113@lists.php.net to get a copy of this message | ||
Hi Joe,
Thanks for the prompt and early reply.
I type the URL given below in the Internet Explorer Web Browser and
execute it from there.
Well, I have just downloaded phpMyAdmin and started using it. I see
exit()'s after header() calls. But actually I haven't changed the
application after downloading. Even on Linux, it is the unchanged
downloaded application.
Thanks,
Ananth.
>>> Joe Stump <jstump@aa.acinc.com> 5/27/2003 6:30:34 PM >>>
I can only assume that you mean you use a header("Location:") call when
you "issue the following URL". There are two possible problems:
1.) You aren't wrapping your reset($arr) calls with if(is_array($arr))
or
2.) You aren't executing exit() after your header() call.
As per two: PHP doesn't quit executing after the header() call. As per
one: if you are creating code that error's out it has sent data to
STDOUT, which will throw more errors if you try to send a header().
--Joe
On Tuesday, May 27, 2003, at 08:55 AM, Ananth Kesari wrote:
> Hi,
>
> I am part of the team that ports PHP onto NetWare. I am having an
issue
> which is like this:
>
> I am using phpMyAdmin application and I have created a database
called
> "test" and a table inside it called "tablea". I then issue the
> following
> URL:
>
> http://<Server_IP_Address>/phpMyAdmin/tbl_replace.php?lang=en-iso-
>
> 8859-1&server=1&db=test&table=tablea&goto=tbl_replace.php
>
>
> On Linux, I get the following error message:
>
> Warning: Variable passed to reset() is not an array or object in
> <phpMyAdmin_path>/tbl_replace.php on line 63
>
> Warning: Variable passed to each() is not an array or object in
> <phpMyAdmin_path>/tbl_replace.php on line 144
>
> Warning: Cannot add header information - headers already sent by
> (output started at <phpMyAdmin_path>/tbl_replace.php:63) in
> <phpMyAdmin_path>/libraries/ob.lib.php on line 65
>
> After this the processing stops.
>
>
> But on NetWare, I get these and more error messages and the
processing
> doesn't stop. It keeps going through the error message loop and then
> crashes the server. I get:
>
> Warning: Variable passed to reset() is not an array or object in
> <phpMyAdmin_path>/tbl_replace.php on line 63
>
> Warning: Variable passed to each() is not an array or object in
> <phpMyAdmin_path>/tbl_replace.php on line 144
>
> Warning: Cannot add header information - headers already sent by
> (output started at <phpMyAdmin_path>/tbl_replace.php:63) in
> <phpMyAdmin_path>/libraries/ob.lib.php on line 65
>
> Warning: Cannot add header information - headers already sent by
> (output started at <phpMyAdmin_path>/tbl_replace.php:63) in
> <phpMyAdmin_path>/libraries/header_http.inc.php on line 14
>
> Warning: Cannot add header information - headers already sent by
> (output started at <phpMyAdmin_path>/tbl_replace.php:63) in
> <phpMyAdmin_path>/libraries/header_http.inc.php on line 15
>
> Warning: Cannot add header information - headers already sent by
> (output started at <phpMyAdmin_path>/tbl_replace.php:63) in
> <phpMyAdmin_path>/libraries/header_http.inc.php on line 16
>
> Warning: Cannot add header information - headers already sent by
> (output started at <phpMyAdmin_path>/tbl_replace.php:63) in
> <phpMyAdmin_path>/libraries/header_http.inc.php on line 17
>
> Warning: Cannot add header information - headers already sent by
> (output started at <phpMyAdmin_path>/tbl_replace.php:63) in
> <phpMyAdmin_path>/libraries/header_http.inc.php on line 20
>
> Database test - Table tablea running on localhost
>
> Warning: Variable passed to reset() is not an array or object in
> <phpMyAdmin_path>/tbl_replace.php on line 63
>
> Warning: Variable passed to each() is not an array or object in
> <phpMyAdmin_path>/tbl_replace.php on line 144
>
> Warning: Cannot add header information - headers already sent by
> (output started at <phpMyAdmin_path>/tbl_replace.php:63) in
> <phpMyAdmin_path>/libraries/ob.lib.php on line 65
>
> Warning: Cannot add header information - headers already sent by
> (output started at <phpMyAdmin_path>/tbl_replace.php:63) in
> <phpMyAdmin_path>/libraries/header_http.inc.php on line 14
>
> Warning: Cannot add header information - headers already sent by
> (output started at <phpMyAdmin_path>/tbl_replace.php:63) in
> <phpMyAdmin_path>/libraries/header_http.inc.php on line 15
>
> Warning: Cannot add header information - headers already sent by
> (output started at <phpMyAdmin_path>/tbl_replace.php:63) in
> <phpMyAdmin_path>/libraries/header_http.inc.php on line 16
>
> Warning: Cannot add header information - headers already sent by
> (output started at <phpMyAdmin_path>/tbl_replace.php:63) in
> <phpMyAdmin_path>/libraries/header_http.inc.php on line 17
>
> Warning: Cannot add header information - headers already sent by
> (output started at <phpMyAdmin_path>/tbl_replace.php:63) in
> <phpMyAdmin_path>/libraries/header_http.inc.php on line 20
>
> Database test - Table tablea running on localhost
>
> This goes on without stopping and then crashes the server.
>
> As you can see, on Linux after a couple of initial error messages,
it
> is coming out of the loop. This is not happening on NetWare. We have
> used the same code base as that of Linux as far as the error
processing
> is concerned. So, we are wondering what is bailing out of the loop
on
> Linux? Is it a configuration issue? Or a code issue that we may have
> unknowingly ignored? Please advice.
>
> FYI, we have used, error_reporting = E_ALL & ~E_NOTICE in the
php.ini
> file.
>
> We deeply appreciate a reply to this.
>
> Thanks,
> Ananth.
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
Joe Stump - joe@joestump.net
http://www.jerum.com
"Software never has bugs. It just develops random features."
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php