Search code examples
phpopencartfopenopencart2.xocmod

Warning and get error in admin modification page OpenCart 2.1.0.2


When I hit the refresh button in the admin > Extensions > Modifications page the page crashes and produces a page of failure errors in OpenCart 2.1.0.2

Following error got. Please help me. how can i fixed this issue.

Warning: fopen(/home/onlybrands1/public_html/system/modification/system/engine/action.php) failed to open stream: No such file or directory in /home/onlybrands1/public_html/admin/controller/extension/modification.php on line 408

Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/onlybrands1/public_html/admin/controller/extension/modification.php on line 410

Warning: fclose() expects parameter 1 to be resource, boolean given in /home/onlybrands1/public_html/admin/controller/extension/modification.php on line 412

Warning: fopen(/home/onlybrands1/public_html/system/modification/system/engine/loader.php): failed to open stream: No such file or directory in /home/onlybrands1/public_html/admin/controller/extension/modification.php on line 408

Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/onlybrands1/public_html/admin/controller/extension/modification.php on line 410

Warning: fclose() expects parameter 1 to be resource, boolean given in /home/onlybrands1/public_html/admin/controller/extension/modification.php on line 412

Warning: fopen(/home/onlybrands1/public_html/system/modification/system/library/config.php): failed to open stream: No such file or directory in /home/onlybrands1/public_html/admin/controller/extension/modification.php on line 408

Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/onlybrands1/public_html/admin/controller/extension/modification.php on line 410

Warning: fclose() expects parameter 1 to be resource, boolean given in /home/onlybrands1/public_html/admin/controller/extension/modification.php on line 412

Warning: fopen(/home/onlybrands1/public_html/system/modification/system/library/language.php): failed to open stream: No such file or directory in /home/onlybrands1/public_html/admin/controller/extension/modification.php on line 408

Warning: fwrite() expects parameter 1 to be resource, boolean given in /home/onlybrands1/public_html/admin/controller/extension/modification.phpon line 410

Warning: fclose() expects parameter 1 to be resource, boolean given in /home/onlybrands1/public_html/admin/controller/extension/modification.php on line 412

Warning: Cannot modify header information - headers already sent by (output started at /home/onlybrands1/public_html/admin/index.php:80) in /home/onlybrands1/public_html/system/library/response.php on line 12


Solution

  • I have realized. this issue happen with wrong path in config.php file. has been modification folder location change(inside storage folder) than older version in OpenCart 2.1.0.2 by OpenCart.

    and, Some user install OpenCart with quick setup feature from Hosting provider services. So, there, The proper path is not set in the config.php file with Hosting quick install feature in OpenCart 2.1.x. Version.

    Here, You will need to set properly path for DIR_CACHE DIR_DOWNLOAD DIR_LOGS DIR_MODIFICATION DIR_UPLOAD in config.php(front & admin both config.php) file.

    Wrong path for OpenCart 2.1.0.2. (this following path is for 2.0.x version)

    define('DIR_CACHE', 'YOURSITE/system/cache/');
    define('DIR_DOWNLOAD', 'YOURSITE/system/download/');
    define('DIR_LOGS', 'YOURSITE/system/logs/');
    define('DIR_MODIFICATION', 'YOURSITE/system/modification/');
    define('DIR_UPLOAD', 'YOURSITE/system/upload/');
    

    Correct Path for OpenCart 2.1.0.2. Here, You will need to add /storage/ in following path. (front & admin both config.php file)

    define('DIR_CACHE', 'YOURSITE/system/storage/cache/');
    define('DIR_DOWNLOAD', 'YOURSITE/system/storage/download/');
    define('DIR_LOGS', 'YOURSITE/system/storage/logs/');
    define('DIR_MODIFICATION', 'YOURSITE/system/storage/modification/');
    define('DIR_UPLOAD', 'YOURSITE/system/storage/upload/');
    

    Hope this will helpful for you.