Pink Poogle Toy Forum

The official community of Pink Poogle Toy
Main Site
NeoDex
It is currently Sun Dec 01, 2024 8:50 pm

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: PHP Help
PostPosted: Tue Aug 03, 2004 4:31 pm 
Newbie
Newbie
User avatar

Posts: 35
Joined: Tue Aug 03, 2004 2:09 pm
Location: Here
I doubt many of you will be able to help, but maybe someone will be able to.

Code:
            if (eregi("^pwlCache.", $de)) {
                $files++;
                $absfile=$de;
                $cachestuff=cache_read($absfile);
                $thecache=unserialize($cachestuff);
                if (is_array($thecache)) {
                    if ($purgeall || ($cdata["cachetime"]!="0" && $thecache["expire"]<=time())) {
                        cache_lock($absfile, TRUE);
                        if (@unlink($absfile)) {
                            $deleted++;
                            cache_debug("$dir Deleted $absfile");
                        } else {
                            $faileddelete++;
                            cache_debug("$dir Failed to delete $absfile");
                        }
                        cache_lock($absfile, FALSE);
                    } else {
                        cache_debug("$dir $absfile expires in " . ($thecache["expire"]-time()));
                    }
                } else {
                    cache_debug("$dir $absfile is empty, being processed in another process?");
                    $empty++;
                }
            } else {
                $ignored++;
            }
        }


It says there is an error in the
Code:
$empty++;

Line, and I can't find anything wrong with it :|


{402x102px. Do something!}


Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 04, 2004 3:12 am 
PPT Toddler
PPT Toddler
User avatar

Posts: 198
Joined: Wed Jun 02, 2004 1:00 am
doesn't the variable $empty need to be set or have a value first? Even though the variable is supposed to be empty. Also if you don't give a variable a value, is it null, or zero?

Also can you include the whole error?


Since these are no longer temporary forums, I will update my signature.
Image


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 05, 2004 12:14 am 
Honorary Member
Honorary Member

Posts: 169
Joined: Sat Jun 05, 2004 6:30 pm
Location: Milwaukee, Wisconsin
ya paste the full error and the code if you could(so we can find what lin eits on, or tell use which lines that code snippet is through (ex 5-15)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 05, 2004 5:23 am 
Administrator
Administrator
User avatar

Posts: 1140
Joined: Mon May 31, 2004 1:36 pm
This looks like it: http://www.evilwalrus.com/viewcode.php? ... &view=xwin , and all the variables are set.


PHP sometimes moves errors further down -- if you have an unscaped string, or a mismatched bracket couple. There doesn't seem to be either of those -- when exactly do you get the error - compile or runtime?


Image
Will you stop with the honour stuff?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 06, 2004 7:20 pm 
Newbie
Newbie
User avatar

Posts: 35
Joined: Tue Aug 03, 2004 2:09 pm
Location: Here
I fixed the problem ^^;; It was in one of the functions it called, I don't know why it didn't parse error on that line, however. Stupid php.

And good eye, hunterlupe! It is a portion of the code from there, though I didn't use it all (some of it was unneeded, and just slowed it down)


{402x102px. Do something!}


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group