Jump to content

[SOLVED] Failed opening '/home/*****/public_html/classes/../404.php' for inclusion


Ray UK

Recommended Posts

Hi

 

I have just checked the error log on my ps1.6 shopand in a 13 day period I have 6830 errors all saying this

[20-Oct-2015 10:13:02 Europe/London] PHP Warning:  include(): Failed opening '/home/*****/public_html/classes/../404.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php:/home/*****/php') in /home/*****/public_html/classes/Tools.php on line 2965

 Any idea how to resolve this.

Cheers

Edited by MerseyRay (see edit history)
Link to comment
Share on other sites

Any ideas on how to solve this ? my error log file is building to over 2Mb every week due to this error.

 

I think it could possibly be something to do with the clean url alteration I made ?

 

So my url's dont have the product number in them, just the product name

Link to comment
Share on other sites

in my tools.php I have this

/**
    * @deprecated as of 1.5 use Controller::getController('PageNotFoundController')->run();
    */
    public static function display404Error()
    {
        header('HTTP/1.1 404 Not Found');
        header('Status: 404 Not Found');
        include(dirname(__FILE__).'/../404.php');
        die;
    }

Is that causing the problem ?

Link to comment
Share on other sites

Ok so think I found the cause.

 

Following the Clean URL process from here

https://www.prestashop.com/forums/topic/204935-override-friendly-urls-without-id-number-for-v15/page-34

 

In the overrides, they have:

else
			{
				Tools::display404Error();
				die;
			}

So I change this to:

else
			{
				Controller::getController('PageNotFoundController')->run();
				die;
			}

and it seems to be ok now.

 

 

Before i was getting a blank page when a product/category didnt exist.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...