defendtheweb / hackthis.co.uk

HackThis!!
http://www.hackthis.co.uk
Other
46 stars 55 forks source link

Error saving cache... #165

Open JustinPuksic opened 9 years ago

JustinPuksic commented 9 years ago

Hey,

After setting up a vhost under xampp(windows 7 home), i got the following error: Error saving cache...

So, I decided to look up what's throwing such an error.

I found that line in class.cache.php:

function set($file, $content) { $file = pregreplace("/[^A-Za-z0-9-]/", '', $file);

        if (($fp = @fopen($this->app->config['cache'] . $file, 'w')) !== false) {
            fwrite($fp, $content);
            fclose($fp);
        } else {
            echo "Error saving cache...";
        }
    }

So I assumed it's not able to open or write the file. I tried to change the permissions to chmod 777.

Still getting this error, any solutions ?

JustinPuksic commented 9 years ago

Finally fixed it.

the root directory wasn't html/.

After correcting it in my vhost config, it worked.