Failed opening required files

I installed on Mac IOS localhost this software but I m getting error:

Warning: require_once(/Library/WebServer/Documents/Users/user/Sites/litecart-dev/public_html/includes/compatibility.inc.php): failed to open stream: No such file or directory in /Users/user/Sites/litecart-dev/public_html/includes/app_header.inc.php on line 17

Fatal error: require_once(): Failed opening required '/Library/WebServer/Documents/Users/user/Sites/litecart-dev/public_html/includes/compatibility.inc.php' (include_path='.:/usr/local/php5/lib/php') in /Users/user/Sites/litecart-dev/public_html/includes/app_header.inc.php on line 17

How do I resolve this?

I am getting blank screen if I replace the below lines:

// File System
  define('FS_DIR_HTTP_ROOT', rtrim(str_replace("\\", '/', realpath($_SERVER['DOCUMENT_ROOT'])), '/'));
  
// Web System
  define('WS_DIR_HTTP_HOME', str_replace(FS_DIR_HTTP_ROOT, '', str_replace("\\", '/', realpath(dirname(__FILE__) . '/' . '..') . '/')));
tim

§8.1

I assume you have an invalidly configured php.ini if /Library/WebServer/Documents/Users/user/Sites/litecart-dev/public_html/ is not your document root.

// File System
  define('FS_DIR_HTTP_ROOT', rtrim(str_replace("\\", '/', realpath($_SERVER['DOCUMENT_ROOT'])), '/'));
  
// Web System
  define('WS_DIR_HTTP_HOME', str_replace(FS_DIR_HTTP_ROOT, '', str_replace("\\", '/', realpath(dirname(__FILE__) . '/' . '..') . '/')));

this is config file after install. 
Not sure what I have to change to make it work 
It does works on live server but not on local 

tim

You are not supposed to "need to change" LiteCart's include/config.inc.php.

I'm talking about your servers PHP.ini.

I assume you have an invalidly configured php.ini if /Library/WebServer/Documents/Users/user/Sites/litecart-dev/public_html/ is not your document root.

tim

If you need to set your document root to a custom folder in litecart because your web server doesn't resolve it correctly:

includes/config.inc.php

define('FS_DIR_HTTP_ROOT', '/Your/actual/path/to/litecart');
define('WS_DIR_HTTP_HOME', '/');

hmm..all default settings in php.ini. Haven't change any details in there.
Do you know which part I have to change or include in php.ini file?

tim

Where is your actual document root, meaning your machine's path to the web root?
Is it in /Library/WebServer/Documents/Users/user/Sites/litecart-dev/public_html/ where you find your content in Finder?

TiM, I can't offer any technical support here, but, Ive been following your work here for a while now and I have to commend you for your quick reaction and willing to support people. Well done.

tim

Thank you ginboomerang :) Tell me, what is a buck reaction? :b

TiM, I edited. Made a spelling error, was meant to say 'quick'

Sorry was away. so my localhost server root is: /Users/user
and website is placed in folder: /Users/user/Sites/litecart-dev

Do I include into this into config.inc.php or php.ini file?

define('FS_DIR_HTTP_ROOT', '/Users/user/Sites/');
define('WS_DIR_HTTP_HOME', '/');

Thank you!

tim

If your site is http://localhost/

define('FS_DIR_HTTP_ROOT', '/Users/user/Sites/litecart-dev');
define('WS_DIR_HTTP_HOME', '/');

If your site is http://localhost/litecart-dev/

define('FS_DIR_HTTP_ROOT', '/Users/user/Sites');
define('WS_DIR_HTTP_HOME', '/litecart-dev/');

Thank you for your help.

  define('FS_DIR_HTTP_ROOT', rtrim(str_replace("\", '/', realpath($_SERVER['DOCUMENT_ROOT'])), '/'));
// Web System
  define('WS_DIR_HTTP_HOME', str_replace(FS_DIR_HTTP_ROOT, '', str_replace("\", '/', realpath(dirname(FILE) . '/' . '..') . '/')));

the above lines I replaced with two below lines: 

define('FS_DIR_HTTP_ROOT', '/Users/user/Sites/');
define('WS_DIR_HTTP_HOME', '/litecart-dev/public_html/');

My site is: http://localhost/~user/litecart-dev/public_html/

now I m getting different error: 

"Content Encoding Error
The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.
    Please contact the website owners to inform them of this problem."

tim

Try turning off GZIP compression in Admin -> Settings -> Advanced. Most likely an early error is output before the output buffer initates. See logs/errors.log.

I am unsure if LiteCart will function properly with username mounting. In fact I don't think it does. Try creating a virtualhost instead so /var/www/litecart-dev/ or similar points to http://localhost/litecart-dev/

Btw, you are not supposed to upload the folder public_html but the contents inside it.

Den här tråden har stängts på grund av lång inaktivitet. Det går inte att posta inlägg till den.
Se kod på GitHub