Closed Thread Icon

Topic awaiting preservation: searching flat files (php) (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=28565" title="Pages that link to Topic awaiting preservation: searching flat files (php) (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: searching flat files (php) <span class="small">(Page 1 of 1)</span>\

 
Ensellitis
Paranoid (IV) Inmate

From: Kansas City, MO , USA
Insane since: Feb 2002

posted posted 10-21-2006 03:05

i'm having a problem here... my imagehost bug tracker uses flat files... typically, this worked just fine with no problems, however, i am switching servers. the old server is using php 4.4.4 and the new server is using php 5.1.4...

so far i have rewritten most parts that failed between versions... but the bug tracker. the new one for some reason isnt working at all...

here is an example of what i mean... this is a ticket on the old server, and this is the same ticket on the new one.

the commenting system works just fine, however it is not displaying the actual error

code:
$find_form .="<center>";
$find_form .="<form action=\"bug.php\" method=\"put\">";
$find_form .="View Report #<input type=\"hidden\" name=\"search\" value=\"add\">";
$find_form .="<input type=\"text\" name= \"string\" value=\"" . $_GET['string'] . "\">";
$find_form .="<input type =submit value=\"View it\">";
$find_form .="</form>";
$find_form .="</center>";


echo "\n<div class='gallitemmain left'>";
if (!$string) {
echo "<center><p>Please enter your tracking number to check on the status of your report.<br />
If you enter an invalid number, you will see this again.<br />
<br />If you need to submit a bug/error, <a href='?do=bugreport'>click here</a>.</p></center>";
}

$size=filesize("4.txt");
$string = $_GET['string'];
if (!$size =="0") {
if ($search) {
$fp = fopen("4.txt","r");
$line = 0;

while (!feof ($fp) ){ 
$uname = fgets($fp,filesize("4.txt"));
$line = $line + 1;
$uname2=Chop($uname);
$res = preg_split("/####/",$uname2);

if ($res[1]) {
$c= eregi("$string", $uname);

if ($c) {
echo "<p style='margin:0;font-size:20px;'><b>ERROR REPORT #$string</b></p>";
$res[0] = stripslashes($res[0]);
echo str_replace("|", " </span> ", "\n<p><span class=\"updates\">" . $res[0] . "</p>");
}
}
}
fclose($fp);
}

echo $find_form;

echo "\n</div>";



any help would be greatly appreciated

(Edited by Ensellitis on 10-21-2006 03:06)

terrestrialhost
Nervous Wreck (II) Inmate

From: Cleveland, OH
Insane since: Jan 2006

posted posted 10-22-2006 23:26

From what I see on your example pages, the new page can't see $_GET['string'] at all, because it's not even filling in the text box.

Try running a few tests where it doesn't execute the rest of the code, but just echos the value of $_GET['string'].
The problem might be related to the PHP configuration. Look through php.ini

The problem might relate to the 'register_argc_argv' variable in php.ini (it should be On) or the 'magic_quotes_gpc', if you're used to a certain setting that hasn't been set on the new server.

« BackwardsOnwards »

Show Forum Drop Down Menu