Reputation: 4221
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
Upvotes: -2
Views: 6515
Reputation: 2914
I was facing the similar issues from Loopback IP address. But on the live site, warnings were suppressed, since storage directory was manually moved to YOURSITE/system/storage and incorrectly configured in config.php and I couldn't get the Front-End display since it was showing
Go to admin, find Extensions >> Modifications and click 'Refresh' button. To apply the changes characterized by the uploaded modification file
In OpenCart 3.0.2.x version, there is a notification from admin side:
It is very important that you move the storage directory outside of the web directory (e.g. public_html, www or htdocs)
The above quote was not showing in order to rectify the root cause of the issue and after correcting the config.php. It began to show in the pop-up screen and finally noticed, this was the issue. Follow the below procedure to get rid:
Changing the following code from both the front-end & admin-end in config.php file
From
define('DIR_STORAGE', 'YOURSITE/storage/');
To
define('DIR_STORAGE', 'YOURSITE/system/storage/');
and modifying
$ sudo chmod -R 777 /var/www/html/YOURFOLDER/*
solved the issue from both front-end as well as in back-end
Upvotes: 0
Reputation: 4221
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.
Upvotes: 1
Reputation: 4128
Just change the permission of the ~/system/modification/ folder to writeable (777).
Reference Link: http://forum.opencart.com/viewtopic.php?t=144373
Upvotes: 1