Hi guys,
Need some help here, I accidently overwrote config.php on root directory.
I managed to find the sample config on giy hub, I replaced the path but website is still not loading giving HTT{ 500 error page.
Strange thing is that a back end works perfect, just the front end is not.
https://github.com/W0lfw00d/opencart/co ... de1be9676c
Need some help here, I accidently overwrote config.php on root directory.
I managed to find the sample config on giy hub, I replaced the path but website is still not loading giving HTT{ 500 error page.
Strange thing is that a back end works perfect, just the front end is not.
https://github.com/W0lfw00d/opencart/co ... de1be9676c
The frontend and backend have their own config file, which is why your backend is still working.
The config file on Github is blank. The config file contents are generated during the install process.
I recommend backing up your database and running the OC installer again. After the installation, you can restore your current database to get your products/categories/orders/etc. back.
Regards,
Joel.
The config file on Github is blank. The config file contents are generated during the install process.
I recommend backing up your database and running the OC installer again. After the installation, you can restore your current database to get your products/categories/orders/etc. back.
Regards,
Joel.
There is no need to reinstall Opencart for missing configurations. By simply creating a sub-folder from the root and adding an empty index.html file into that sub-directory to protect your folder including a PHP file that provides paths should do it with the following code to add into the PHP file:
Then, once all the path captured in order to place them into your config.php file and admin/config.php file (with some additions to the admin/config.php compared to the root config.php), remove the PHP file showing these paths for protection purposes.
There are also several tips that can be followed from StackOverFlow.com for capturing constants: https://stackoverflow.com/questions/188 ... e-constant
Code: Select all
<?php
// DIR
define('DIR_APPLICATION', str_replace('\\', '/', realpath(dirname(__FILE__))) . '/');
define('DIR_SYSTEM', str_replace('\\', '/', realpath(dirname(__FILE__) . '/../')) . '/system/');
define('DIR_IMAGE', str_replace('\\', '/', realpath(dirname(__FILE__) . '/../')) . '/image/');
define('DIR_OPENCART', str_replace('\\', '/', realpath(DIR_APPLICATION . '../')) . '/');
define('DIR_DATABASE', DIR_SYSTEM . 'database/');
define('DIR_LANGUAGE', DIR_APPLICATION . 'language/');
define('DIR_TEMPLATE', DIR_APPLICATION . 'view/template/');
define('DIR_CONFIG', DIR_SYSTEM . 'config/');
define('DIR_MODIFICATION', DIR_SYSTEM . 'modification/');
define('DIR_STORAGE', DIR_SYSTEM . 'storage/');
define('DIR_CACHE', DIR_STORAGE . 'cache/');
echo 'DIR_APPLICATION: ' . DIR_APPLICATION . '<br />';
echo 'DIR_SYSTEM: ' . DIR_SYSTEM . '<br />';
echo 'DIR_OPENCART: ' . DIR_OPENCART . '<br />';
echo 'DIR_DATABASE: ' . DIR_DATABASE . '<br />';
echo 'DIR_LANGUAGE: ' . DIR_LANGUAGE . '<br />';
echo 'DIR_TEMPLATE: ' . DIR_TEMPLATE . '<br />';
echo 'DIR_CONFIG: ' . DIR_CONFIG . '<br />';
// This one might be tricky if you moved your storage folder.
echo 'DIR_MODIFICATION: ' . DIR_MODIFICATION . '<br />';
echo 'DIR_STORAGE: ' . DIR_STORAGE . '<br />';
echo 'DIR_CACHE: ' . DIR_CACHE . '<br />';
?>
There are also several tips that can be followed from StackOverFlow.com for capturing constants: https://stackoverflow.com/questions/188 ... e-constant
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
I am still struggling to get this working :-(.... I have done exactly what you recommend and now it lists more errors ... any advice?
Code: Select all
Warning: fopen(/var/sites/t/domainame.co.uk/Storage_1//var/sites/t/domainame.co.uk/public_html/system/storage/cache/cache.catalog.language.1523663156): failed to open stream: No such file or directory in /var/sites/t/domainame.co.uk/public_html/system/library/cache/file.php on line 49Warning: fwrite() expects parameter 1 to be resource, boolean given in /var/sites/t/domainame.co.uk/public_html/system/library/cache/file.php on line 53Warning: fflush() expects parameter 1 to be resource, boolean given in /var/sites/t/domainame.co.uk/public_html/system/library/cache/file.php on line 55Warning: fclose() expects parameter 1 to be resource, boolean given in /var/sites/t/domainame.co.uk/public_html/system/library/cache/file.php on line 59Warning: fopen(/var/sites/t/domainame.co.uk/Storage_1//var/sites/t/domainame.co.uk/public_html/system/storage/cache/cache.currency.1523663156): failed to open stream: No such file or directory in /var/sites/t/domainame.co.uk/public_html/system/library/cache/file.php on line 49Warning: fwrite() expects parameter 1 to be resource, boolean given in /var/sites/t/domainame.co.uk/public_html/system/library/cache/file.php on line 53Warning: fflush() expects parameter 1 to be resource, boolean given in /var/sites/t/domainame.co.uk/public_html/system/library/cache/file.php on line 55Warning: fclose() expects parameter 1 to be resource, boolean given in /var/sites/t/domainame.co.uk/public_html/system/library/cache/file.php on line 59
Last edited by straightlight on Mon Feb 24, 2020 7:43 pm, edited 1 time in total.
Reason: Added code tags.
Reason: Added code tags.
No need to post it twice. Already seen your last post from : viewtopic.php?f=202&t=202917
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
You may delete this comments i already figure out the issue was with path in config file.straightlight wrote: ↑Fri Feb 25, 2022 1:07 amOC version. New topic.
Thanks
Who is online
Users browsing this forum: No registered users and 202 guests