Zen Cart Warning Troubleshooting

May 25, 2013 / Web Hosting

ZenCart Warning: main(): failed to open stream: No such file or directory in <.

ZenCart Warning: main(): failed to open stream: No such file or directory in }

If you get the above error message, then it means that some of the files are not found in the set path including the .PHP files. To solve this error, ensure that all files you have uploaded with the accurate permissions.

If you still receive the error message, then you need to check your PHP “include_path”. You can see these paths along with the error messages that you have received.

If you are using a Windows Server then make sure the include_path started with .; and in the case of Linux / Unix, it must start with .:

If the include_path does not have this, then you must configure it in php.ini, or in a .htaccess file.

In the php.ini file, include the below lines:

Windows Server
include_path = “.;Drive:\path\to\php\includes”

Linux or Unix Server
include_path = “.:/path/to/php/includes”

In the same way, you can configure it by editing the .htaccess file.

Windows Server: Include the following line in the .htaccess file
php_value include_path “.; Drive:\path\to\php\includes”

Linux or Unix Server: Include the following line in the .htaccess file
php_value include_path “.:/path/to/php/includes”