- how startup.php is loaded
- Re: how startup.php is loaded
- Re: how startup.php is loaded
- Re: how startup.php is loaded
- Failed opening required ‘/system/startup.php’
- OpenCart will not Open
- Re: OpenCart will not Open
- Re: OpenCart will not Open
- Re: OpenCart will not Open
- Re: OpenCart will not Open
- Re: OpenCart will not Open
- Re: OpenCart will not Open
- Re: OpenCart will not Open
- Re: OpenCart will not Open
- Re: OpenCart will not Open
how startup.php is loaded
I am new to Opencart development and new to OOPS in PHP. I would like to know how opencart loads startup.php. What it is used for ?
Pls bear with me if the questions are a bit dumb which you might encounter as I try to understand the system completely.
Re: how startup.php is loaded
Post by Axansh » Thu Sep 20, 2012 2:37 pm
If you want to learn then just open index.php and go though — line by line code.
From that you can understand flow of opencart system.
Thanks and Best Regards,
Axansh Sheth
Re: how startup.php is loaded
Post by bhavani » Wed Sep 26, 2012 12:29 pm
thanks for replying. As directed, I started going through index.php The following code is defined in index.php in mywebsite.com/admin/ folder. Could you please explain in detail what the following code actually does ? I would like to know how it actually works.
// Registry
$registry = new Registry();
// Loader
$loader = new Loader($registry);
$registry->set(‘load’, $loader);
Re: how startup.php is loaded
Post by Axansh » Thu Sep 27, 2012 3:50 pm
// Registry
$registry = new Registry();
$registry saves all the necessary objects in its $data relational array,
and system pass $registry as argument to all other class for accessing that object.
// Loader
$loader = new Loader($registry);
$registry->set(‘load’, $loader);
In loader.php, model.php and controller.php (system/engine folder),
they all defined and $registry member, which is initiated in the constructor by passing type Registry object.
Please refer system->library and system->helper files to understand it.
Thanks and Best Regards,
Axansh Sheth
Failed opening required ‘/system/startup.php’
Searching for the answer I see this has happened to many folks and the answer always seems to be to check the config and index files. I have checked them and altered them (full path. relative path) and nothing seems to be working.
My host in Dreamhost (I’ve dropped them a line as well. waiting for a response) and their path to the public folder is /home/[username]/[site address]/ where the site address is actually the «public folder».
My errors as as follows:
[Thu Apr 14 11:21:44.425439 2022] [fcgid:warn] [pid 99698:tid 119451464468224] [client 68.200.14.116:52364] mod_fcgid: stderr: PHP Warning: require_once(/system/startup.php): Failed to open stream: No such file or directory in /home/paumaz3/mazcrafters.com/index.php on line 17
[Thu Apr 14 11:21:44.425617 2022] [fcgid:warn] [pid 99698:tid 119451464468224] [client 68.200.14.116:52364] mod_fcgid: stderr: PHP Fatal error: Uncaught Error: Failed opening required ‘/system/startup.php’ (include_path=’.:’) in /home/paumaz3/mazcrafters.com/index.php:17
[Thu Apr 14 11:21:44.425642 2022] [fcgid:warn] [pid 99698:tid 119451464468224] [client 68.200.14.116:52364] mod_fcgid: stderr: Stack trace:
[Thu Apr 14 11:21:44.425663 2022] [fcgid:warn] [pid 99698:tid 119451464468224] [client 68.200.14.116:52364] mod_fcgid: stderr: #0
[Thu Apr 14 11:21:44.425686 2022] [fcgid:warn] [pid 99698:tid 119451464468224] [client 68.200.14.116:52364] mod_fcgid: stderr: thrown in /home/paumaz3/mazcrafters.com/index.php on line 17
startup.php does in fact exist in /home/paumaz3/mazcrafters.com/system.
INDEX FILE IS:
// Version
define(‘VERSION’, ‘3.0.3.8’);
// Configuration
if (is_file(‘config.php’)) require_once(‘config.php’);
>
// Install
if (!defined(‘DIR_APPLICATION’)) header(‘Location: install/index.php’);
exit;
>
// Startup
require_once(DIR_SYSTEM . ‘startup.php’);
// DIR
define(‘DIR_APPLICATION’, ‘/catalog/’);
define(‘DIR_SYSTEM’, ‘/system/’);
define(‘DIR_IMAGE’, ‘/image/’);
define(‘DIR_STORAGE’, ‘/home/paumaz3/storage/’);
define(‘DIR_CATALOG’, ‘/catalog/’);
define(‘DIR_LANGUAGE’, DIR_APPLICATION . ‘language/’);
define(‘DIR_TEMPLATE’, DIR_APPLICATION . ‘view/template/’);
define(‘DIR_CONFIG’, DIR_SYSTEM . ‘config/’);
define(‘DIR_CACHE’, DIR_STORAGE . ‘cache/’);
define(‘DIR_DOWNLOAD’, DIR_STORAGE . ‘download/’);
define(‘DIR_LOGS’, DIR_STORAGE . ‘logs/’);
define(‘DIR_MODIFICATION’, DIR_STORAGE . ‘modification/’);
define(‘DIR_SESSION’, DIR_STORAGE . ‘session/’);
define(‘DIR_UPLOAD’, DIR_STORAGE . ‘upload/’);
// DB
define(‘DB_DRIVER’, ‘mysqli’);
define(‘DB_HOSTNAME’, ‘HOSTNAME’);
define(‘DB_USERNAME’, ‘[USERNAME’);
define(‘DB_PASSWORD’, ‘PWD’);
define(‘DB_DATABASE’, ‘DB’);
define(‘DB_PORT’, ‘3306’);
define(‘DB_PREFIX’, ‘oc_’);
I tried putting the full path into the config file but that generated a whole new slew of errors. So I put them back.
Any help greatly appreciated!
OpenCart will not Open
When I try to access my OpenCart website I get the follwong error:
Warning: require_once(/hermes/web08/b2200/blu.hornetperformance/OpenCart/system/startup.php) [function.require-once]: failed to open stream: No such file or directory in /hermes/waloraweb090/b2200/blu.hornetperformance/OpenCart/admin/index.php on line 15
Fatal error: require_once() [function.require]: Failed opening required ‘/hermes/web08/b2200/blu.hornetperformance/OpenCart/system/startup.php’ (include_path=’.:/usr/local/lib/php-5.2.17/lib/php’) in /hermes/waloraweb090/b2200/blu.hornetperformance/OpenCart/admin/index.php on line 15
I get a similar error when I try to open the OpenCart admin. The OpenCart was working Normally but for no reason quit. I check the paths indicated above and the startup.php file and directory do exist. I am using OpenCart 1.5.1.2.
Can anybody expalin what might have happen and How I can restore the OpenCart back into operation.
Re: OpenCart will not Open
Post by uksitebuilder » Tue Mar 06, 2012 7:16 pm
check your server paths in config.php and admin/config.php
you seem to have 2 different path ‘web08’ and ‘waloraweb090’
Re: OpenCart will not Open
Post by Qphoria » Tue Mar 06, 2012 9:58 pm
Please tell me what host this is for.
I’ve had to deal with this ‘web08’ vs ‘waloraweb090’ thing about 4 times now with clients.
This host uses some sort of symlinking that causes files to not update on the store
Something to do with ftp pointing to the «waloraweb» path
while the automatic detection of files points to «web08» path.
When you update files in ftp, you will find that they don’t update on the site because of this.
And the webhost «claims» there is no linking or cache but they are obviously clueless of their own system.
Solution #1: Be sure you are always using the «waloraweb» path and don’t use the «web08» path
Solution #2: Get rid of this shit hosting company
Re: OpenCart will not Open
Post by sgower » Fri Apr 06, 2012 7:16 am
www.bluedomino.com is the hosting service that we are using. We set up another OpenCart to work around it.
Re: OpenCart will not Open
Post by sgower » Fri Apr 06, 2012 10:20 am
uksitebuilder wrote: check your server paths in config.php and admin/config.php
you seem to have 2 different path ‘web08’ and ‘waloraweb090’
I went back to our original opencart setup and made the changes to both config files and the opencart now works again.
Re: OpenCart will not Open
Post by DavidF » Wed Jul 04, 2012 5:47 am
Sorry to bump this thread.
I am the Customer Service Manager for a small company called simBOOT and we have been using Open Cart for about over two months and everything was working flawlessly. I checked our sales email and noticed we had a new order and when attempting to open the Open Cart Administration page and the regular cart page I received the same error as above.
Somehow the config.php file modified itself to say web05 (I believe) when the website itself was attempting to read from waloraweb026. We are using ‘FatCow’ for our hosting needs and it has never happened again. I have since gone in and adjusted the config.php file in both Admin and Index areas and it works as it used to do, we did not loose any data.
Just wanted to add more to this thread.
Re: OpenCart will not Open
Post by lovol » Sun Dec 30, 2012 5:52 am
Thanks for this. I have this problem with the Grid Hosting at TSOHost. You can expect these types of problems when moving from ‘standard’ hosting to ‘cloud’ hosting. As long as we document the problems and solutions, there’s no need to change hosts!
For future reference, the error I had was:
PHP Warning: require_once(/var/sites/o/oc1541.vinyldyeuk.com/public_html/system/startup.php) [function.require-once]: failed to open stream: No such file or directory in \\PDC2\sites\o\oc1541.vinyldyeuk.com\public_html\admin\index.php on line 19 PHP Fatal error: require_once() [function.require]: Failed opening required ‘/var/sites/o/oc1541.vinyldyeuk.com/public_html/system/startup.php’ (include_path=’.;C:\php5\pear’) in \\PDC2\sites\o\oc1541.vinyldyeuk.com\public_html\admin\index.php on line 19
the solution was to do a Find And Replace inside
\config.php
\admin\config.php
do this on both the above files, all working fine.
Also, for other’s on TSOHost grid platform, you have to DELETE the php.ini files as well!
Actually, this fixes things when you visit the website root, but not when actually using the website (clicking on a category).. hmmmm
Re: OpenCart will not Open
Post by suziekirk1962 » Thu Apr 18, 2013 3:30 am
So its over a year later and I am having this exact same problem. opencart store working fine one day and the next day can’t open it. I came into this forum to try to find the solution and came upon this thread.
I updated my config.php and admin/config.php by changing web048 to bosoraweb140 for all instances, but its still not working. Here is my original error:
Warning: require_once(/hermes/bosweb/web048/b484/ipg.suziekirk/store/system/startup.php) [function.require-once]: failed to open stream: No such file or directory in /hermes/bosoraweb140/b484/ipg.suziekirk/store/admin/index.php on line 15
Fatal error: require_once() [function.require]: Failed opening required ‘/hermes/bosweb/web048/b484/ipg.suziekirk/store/system/startup.php’ (include_path=’.:/usr/local/lib/php-5.2.17/lib/php’) in /hermes/bosoraweb140/b484/ipg.suziekirk/store/admin/index.php on line 15
Re: OpenCart will not Open
Post by suziekirk1962 » Thu Apr 18, 2013 8:37 am
UPDATE: I installed a new instance of Opencart in a new directory called store2, and copied the contents of those new config.php files into my existing store’s config.php files (minus the //DB section). I am now able to access my admin area of the store, but the store front is still down. entering the store creates this error:
Notice: Error: Table ‘pnc_ib562d72nl.opn_category_path’ doesn’t exist
Error No: 1146
SELECT COUNT(DISTINCT p.product_id) AS total FROM opn_category_path cp LEFT JOIN opn_product_to_category p2c ON (cp.category_id = p2c.category_id) LEFT JOIN opn_product p ON (p2c.product_id = p.product_id) LEFT JOIN opn_product_description pd ON (p.product_id = pd.product_id) LEFT JOIN opn_product_to_store p2s ON (p.product_id = p2s.product_id) WHERE pd.language_id = ‘1’ AND p.status = ‘1’ AND p.date_available
Does anyone have any ideas what is going wrong?? I would hate to have to recreate the whole store!
Re: OpenCart will not Open
Post by butte » Thu Apr 18, 2013 9:29 am
Spanning 13 months we seem to have several things going on here, «‘web08’ and ‘waloraweb090′» and hosts along with startup.php and config.php, with a long quiet spell till now, with a new wrinkle or two.
As to hosts, it can be a good idea to run THEM through whois to see which might be intertwined as in the instance noted by Qphoria last year. Whenever «Somehow the config.php file modified itself» the likelihood of a hacker’s assistance looms (unless the wrong copies of the files were uploaded inadvertently), and accordingly more than fixing the config.php files probably must be done to correct everything and to prevent recurrences.
For suzikirk1962, you’re showing «changing web048 to bosoraweb140» followed by «require_once(/hermes/bosweb/web048/b484/ipg.suziekirk/store/system/startup.php) [function.require-once]: failed to open stream: No such».
That suggests that your two config.php files’ http, https, and particularly their directories and database sections should be edited to ensure that they conform to the present server and present database name (including prefix). The directory structure and database details are seen by the server itself (while it interacts with OC installed on it); the http and https paths are seen the server itself (while it interacts with both Apache and OC installed on it), and by Apache, by OC, and by browsers. All four sections are critically important.