View Full Version : What does this warning message mean?
jianneng
06-08-2003, 03:44 PM
Hi,
I have encountered this warning message almost on every PHP page that I created when I use a search function on my webpages.
Warning: main(): stream does not support seeking in /home/jianneng/public_html/about.php on line 18
It doesn't appear at all previously when my server is still using PHP 4.3.1. When the server is upgraded with PHP 4.3.2, all these warning stuff appears. I can't make it disappear even if I deleted the E_ALL line in my previous code.
Do you know what this line actually means? Is it possible to fix this? Thanks.
Lim.
Vinsar
06-08-2003, 06:57 PM
What is there on line 18 of about.php, type it here, so that people will be able to understand it better.
jianneng
06-08-2003, 11:25 PM
Hi, this is the code which on every page at line 18 I have, they are all the same and I really don't see what is wrong with it:
Line 11 <?PHP
Line 12
Line 13 if (isset($HTTP_POST_VARS[Submit])) {
Line 14 include "http://www.trident-consultants.com.my/search-result.php?search_string=$search_string";
Line 15 exit;
Line 16 }
Line 17
Line 18 ?>
jianneng
06-09-2003, 12:59 AM
Hi There,
The problem has been solved. Looks like I have to put a "@" sign in front of the include statement. But strange, previously even if I didn't put that, it works too...
mordred
06-09-2003, 01:18 AM
Just curious, do you have control over the file referenced in the URL? If not, you're asking for trouble by including source-code from other domains. Big trouble.
jianneng
06-09-2003, 01:23 AM
No worries here mordred :)
It's my company website which I designed it (and code it as well). So no referencing to other URL here.
duniyadnd
06-11-2003, 01:28 PM
Just FYI, if its all from the same site and all that, and you happen to change domain names, you can save your time from changing the include links by just including like so:
include $_SERVER['DOCUMENT_ROOT']."/search-result.php?search_string=$search_string";
missing-score
06-11-2003, 04:27 PM
Does it include the file? Because an @ usually just stops any errors from being displayed.
jianneng
06-11-2003, 04:39 PM
It does include the file and stop the error from being displayed, since the search can go on to generate results. Previously without the @ sign, the search also can be performed except with the extra warning message.
I used "include" simply because the "header" statement cannot be applied at all (it will display error message saying the header has already been sent).
By the way, thanks to duniyadnd for the advanced method of including a file. It certainly saves my time in modifying the links one by one.
missing-score
06-11-2003, 04:44 PM
oh, right, I see... dunno where I was??? :rolleyes:
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.