Post by feed » Mon Oct 03, 2011 2:46 am

After I moved to the new server on my VPS, I got this error and I just can not fix it even I reupload the latest version.


Warning: require_once(/home/user/public_html/domain.com/shop/system/startup.php) [function.require-once]: failed to open stream: No such file or directory in /home/user/public_html/shop/index.php on line 15

Fatal error: require_once() [function.require]: Failed opening required '/home/user/public_html/domain.com/shop/system/startup.php' (include_path='.:/usr/lib/php') in /home/user/public_html/shop/index.php on line 15

Please help me how do I fix this, thank you ;D

Please try my Free and real time web translator made with Google API. and let me know what ya think :)


User avatar
New member

Posts

Joined
Fri Jun 11, 2010 5:21 am

Post by uksitebuilder » Mon Oct 03, 2011 2:55 am

Looks like a server or PHP configuration problem

To test that it is not OpenCart, create a file called test.php with the following content

Code: Select all

<?php
if(!require_once('test2.php')){
echo 'Require Function Failed.  PHP is not configured correctly.';
}
?>
Create a second file called test2.php with the following content

Code: Select all

<?php 
echo 'Require Function Seems to work OK';
?>
Upload both files to your domain root and run test.php in a browser.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by feed » Mon Oct 03, 2011 3:15 am

uksitebuilder wrote:Looks like a server or PHP configuration problem

To test that it is not OpenCart, create a file called test.php with the following content

Code: Select all

<?php
if(!require_once('test2.php')){
echo 'Require Function Failed.  PHP is not configured correctly.';
}
?>
Create a second file called test2.php with the following content

Code: Select all

<?php 
echo 'Require Function Seems to work OK';
?>
Upload both files to your domain root and run test.php in a browser.
Hi Simon, thank you for very fast respond, and I this follow your instructions, and I got this answer.
Require Function Seems to work OK
???

Please try my Free and real time web translator made with Google API. and let me know what ya think :)


User avatar
New member

Posts

Joined
Fri Jun 11, 2010 5:21 am

Post by uksitebuilder » Mon Oct 03, 2011 3:24 am

Delete those test files

Check your config.php and admin/config.php have correct paths.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by feed » Mon Oct 03, 2011 3:34 am

uksitebuilder wrote:Delete those test files

Check your config.php and admin/config.php have correct paths.
Yes, I have deleted those php(s)

and this is the first 2 //
config.php
<?php
// HTTP
define('HTTP_SERVER', 'http://domain.com/shop/');
define('HTTP_IMAGE', 'http://domain.com/shop/image/');
define('HTTP_ADMIN', 'http://domain.com/shop/admin/');
// HTTPS
define('HTTPS_SERVER', 'http://domain.com/shop/');
define('HTTPS_IMAGE', 'http://domain.com/shop/image/');


admin/config.php
<?php
// HTTP
define('HTTP_SERVER', 'http://domain.com/shop/admin/');
define('HTTP_CATALOG', 'http://domain.com/shop/');
define('HTTP_IMAGE', 'http://domain.com/shop/image/');

// HTTPS
define('HTTPS_SERVER', 'http://domain.com/shop/admin/');
define('HTTPS_IMAGE', 'http://domain.com/shop/image/');


I think the rest are just the same for both.

Please try my Free and real time web translator made with Google API. and let me know what ya think :)


User avatar
New member

Posts

Joined
Fri Jun 11, 2010 5:21 am

Post by uksitebuilder » Mon Oct 03, 2011 3:40 am

check the //DIR sections of your config files to make sure full paths are correct and include your subfolder

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by feed » Mon Oct 03, 2011 3:44 am

uksitebuilder wrote:check the //DIR sections of your config files to make sure full paths are correct and include your subfolder
Yeah,... I am sure they all set and correct.

// DIR
define('DIR_APPLICATION', '/home/cpanel-user/public_html/domain.com/shop/catalog/');
define('DIR_SYSTEM', '/home/cpanel-user/public_html/domain.com/shop/system/');
define('DIR_DATABASE', '/home/cpanel-user/public_html/domain.com/shop/system/database/');
define('DIR_LANGUAGE', '/home/cpanel-user/public_html/domain.com/shop/catalog/language/');
define('DIR_TEMPLATE', '/home/cpanel-user/public_html/domain.com/shop/catalog/view/theme/');
define('DIR_CONFIG', '/home/cpanel-user/public_html/domain.com/shop/system/config/');
define('DIR_IMAGE', '/home/cpanel-user/public_html/domain.com/shop/image/');
define('DIR_CACHE', '/home/cpanel-user/public_html/domain.com/shop/system/cache/');
define('DIR_DOWNLOAD', '/home/cpanel-user/public_html/domain.com/shop/download/');
define('DIR_LOGS', '/home/cpanel-user/public_html/domain.com/shop/system/logs/');

Please try my Free and real time web translator made with Google API. and let me know what ya think :)


User avatar
New member

Posts

Joined
Fri Jun 11, 2010 5:21 am

Post by uksitebuilder » Mon Oct 03, 2011 3:55 am

I think you need to double check that all files have been correctly uploaded to your new VPS

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by feed » Mon Oct 03, 2011 4:08 am

uksitebuilder wrote:I think you need to double check that all files have been correctly uploaded to your new VPS
I cannot see any chance that I missed a file since they way I moved is zip the whole content under /public_html and then executed the wget bla bla bla and all done via PuTTY

Also created exactly the same database, user and password.

In fact, the shop is a dir and the main site is a wordpress site which I moved them in the same time and way.

Not just that, I also have tried to upload the latest and fresh opencart file I just downloaded once I knew this issue.
I upload the whole file except the config.php and /admin/config.php


I really do know what next for now. :o

Please try my Free and real time web translator made with Google API. and let me know what ya think :)


User avatar
New member

Posts

Joined
Fri Jun 11, 2010 5:21 am

Post by uksitebuilder » Mon Oct 03, 2011 4:10 am

OK, so you have

root (wordpress) - shop

Do you have a htaccess in root that could be messing with the subfolder ? htaccess affect all files/directories in their path and below

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by feed » Mon Oct 03, 2011 4:19 am

uksitebuilder wrote:OK, so you have

root (wordpress) - shop

Do you have a htaccess in root that could be messing with the subfolder ? htaccess affect all files/directories in their path and below
Yes, I have in the root (wordpress) - shop (opencart)
Both have their own standard .htaccess which it worked normal before I move them, and nothing has changed inside those .htaccess

Please try my Free and real time web translator made with Google API. and let me know what ya think :)


User avatar
New member

Posts

Joined
Fri Jun 11, 2010 5:21 am

Post by uksitebuilder » Mon Oct 03, 2011 4:23 am

Just for a moment, remove the htaccess from the wordpress root and see if opencart loads

If it does, we know where the problem lies

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by feed » Mon Oct 03, 2011 4:37 am

uksitebuilder wrote:Just for a moment, remove the htaccess from the wordpress root and see if opencart loads

If it does, we know where the problem lies
I do not this it is a good idea at the moment since the site (wordpress) is busy right now since I am seeing the orders from buyers are coming in....

Please try my Free and real time web translator made with Google API. and let me know what ya think :)


User avatar
New member

Posts

Joined
Fri Jun 11, 2010 5:21 am

Post by feed » Mon Oct 03, 2011 2:23 pm

Yeah, I finally tried that and it did not help, in fact the wordpress page were 404 while the .htaccess was deleted. :crazy:

Please try my Free and real time web translator made with Google API. and let me know what ya think :)


User avatar
New member

Posts

Joined
Fri Jun 11, 2010 5:21 am

Post by uksitebuilder » Mon Oct 03, 2011 2:43 pm

Was worth testing for the couple of seconds it took to try.

Register Globals is definitely off ?

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by feed » Mon Oct 03, 2011 3:13 pm

uksitebuilder wrote:Was worth testing for the couple of seconds it took to try.

Register Globals is definitely off ?
Sorry Simon, but I am not sure if I fully understand your last message

Please try my Free and real time web translator made with Google API. and let me know what ya think :)


User avatar
New member

Posts

Joined
Fri Jun 11, 2010 5:21 am

Post by uksitebuilder » Mon Oct 03, 2011 3:26 pm

Your new VPS server allows php.ini overrides ?

There is a setting in the root OC php.ini that that should turn Register_Globals off

I am alas resorting to plucking straws now

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by feed » Mon Oct 03, 2011 3:43 pm

uksitebuilder wrote:Your new VPS server allows php.ini overrides ?

There is a setting in the root OC php.ini that that should turn Register_Globals off

I am alas resorting to plucking straws now
Hi Simon, How do I know if my new VPS allows php.ini overrides?

and if for some reason my new VPS does not allow that, which is required for opencart, how do change it?
Many thanks

Please try my Free and real time web translator made with Google API. and let me know what ya think :)


User avatar
New member

Posts

Joined
Fri Jun 11, 2010 5:21 am

Post by uksitebuilder » Mon Oct 03, 2011 3:52 pm

Create a test.php file

enter the following

Code: Select all

<?php
if (ini_get('register_globals') == 1)
echo 'Register Globals is ON - it should be off';
?>
If when run you get a message stating register globals is on and your OC php.ini files has a line turning it off, then php.ini overrides are being blocked.

Register Globals needs to be off for OC to function correctly.

User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by feed » Mon Oct 03, 2011 4:23 pm

uksitebuilder wrote:Create a test.php file

enter the following

Code: Select all

<?php
if (ini_get('register_globals') == 1)
echo 'Register Globals is ON - it should be off';
?>
If when run you get a message stating register globals is on and your OC php.ini files has a line turning it off, then php.ini overrides are being blocked.

Register Globals needs to be off for OC to function correctly.
I tried that test.php with the code you provided.
Uploaded to the root and to the opencart directory.
Both gave me a blank page with nothing at all when I access root/test.php and root/shop/test.php

what does it mean and what should I do now?

Please try my Free and real time web translator made with Google API. and let me know what ya think :)


User avatar
New member

Posts

Joined
Fri Jun 11, 2010 5:21 am
Who is online

Users browsing this forum: Majestic-12 [Bot] and 59 guests