Question

I'm moving my open cart website to a shared hosting server. When I log in with FTP, I see my path to the files is /webspace/httpdocs/mydomain.com/

In index.php of Open Cart, there is a line

require_once(DIR_SYSTEM . 'startup.php');

This throws an error. When I do:

echo file_exists(DIR_SYSTEM . 'startup.php');

I get false. DIR_SYSTEM is returning the correct path - /webspace/httpdocs/mydomain.com/

I have always had dedicated hosting and am used to using paths such as /var/www/mydomain.com/. With shared hosting, so I need to put something before /webspace?

Était-ce utile?

La solution

Your problem is probably linked to the leading backslash which is saying webspace should be a subfolder of the root.

Which of course it is not on a shared server.

As to adding something before webspace, you should never be able to find out what that is, or you could possibly attempt to compromise another site.

Use reletive addressing always, as its the only way to ensure portability

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top