Zen Cart Logo
Forums / Installing on a Linux/Unix Server / Fatal error on attempting to launch installer

Fatal error on attempting to launch installer

Locked

Views: 1,614

Results 1 to 10 of 10
This thread is locked. New replies are disabled.
13 Jan 2007, 11:11 AM
#1
skello avatar

skello

New Zenner

Join Date:
Jan 2007
Location:
Romania
Posts:
5
Plugin Contributions:
0

Fatal error on attempting to launch installer

Hello everyone,

I hope someone will help me troubleshoot the fatal error and warnings i get when trying to run the installer for the first time.

The error/warnings are:

Warning: include(store/includes/auto_loaders/config.core.php) [function.include]: failed to open stream: No such file or directory in /var/www/store/includes/application_top.php on line 90

Warning: include() [function.include]: Failed opening 'store/includes/auto_loaders/config.core.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/store/includes/application_top.php on line 90

Warning: dir(store/includes/auto_loaders) [function.dir]: failed to open dir: No such file or directory in /var/www/store/includes/application_top.php on line 91

Warning: require(store/includes/counter.php) [function.require]: failed to open stream: No such file or directory in /var/www/store/includes/application_top.php on line 124

Fatal error: require() [function.require]: Failed opening required 'store/includes/counter.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/store/includes/application_top.php on line 124
My setup:

OS: Ubuntu Linux 6.10 (2.6.17-10-generic)
HTTPD: Apache/2.0.55
PHP: 5.1.6
MySQL: 5.0.24a-Debian_9-log
Zen Cart: 1.3.7

Steps taken:

  1. Zen Cart dir is /var/www/store

  2. Edited and chmod to 777:**
    store/**includes/configure.php
    store/admin/includes/configure.php

  3. Other files and dirs permissions:

Chmod to 777 (shown in bold):
store/cache
store/images <-- recursive, all subdirectories only
store/includes/languages/english/html_includes
store/media
store/pub
store/admin/backups
store/admin/images/graphs

All other directories permissions: 755
All other file permissions: 644

Content of store**/**includes/configure.php

<?php 
/** 
 * dist-configure.php 
 * 
 * @package initSystem 
 * @copyright Copyright 2003-2006 Zen Cart Development Team 
 * @copyright Portions Copyright 2003 osCommerce 
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 
 * @version $Id: dist-configure.php 4271 2006-08-26 01:21:02Z drbyte $ 
 * @private 
 */ 
// Define the webserver and path parameters 
// HTTP_SERVER is your Main webserver: eg, http://www.yourdomain.com 
// HTTPS_SERVER is your Secure webserver: eg, https://www.yourdomain.com 
define('HTTP_SERVER', 'http://localhost'); 
define('HTTPS_SERVER', 'https://localhost'); 
 
// Use secure webserver for checkout procedure? 
define('ENABLE_SSL', 'false'); 
 
// NOTE: be sure to leave the trailing '/' at the end of these lines if you make changes! 
 
// * DIR_WS_* = Webserver directories (virtual/URL) 
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder) 
define('DIR_WS_CATALOG', 'store/'); 
define('DIR_WS_HTTPS_CATALOG', 'store/'); 
 
define('DIR_WS_IMAGES', 'store/images/'); 
define('DIR_WS_INCLUDES', 'store/includes/'); 
define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'store/functions/'); 
define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'store/classes/'); 
define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'store/modules/'); 
define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'store/languages/'); 
define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'store/pub/'); 
define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'store/templates/'); 
 
define('DIR_WS_PHPBB', 'store/phpBB2/'); 
 
// * DIR_FS_* = Filesystem directories (local/physical) 
//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/ 
define('DIR_FS_CATALOG', '/var/www/store/'); 
 
define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . '/var/www/store/download/'); 
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . '/var/www/store/pub/'); 
define('DIR_WS_UPLOADS', DIR_WS_IMAGES . '/var/www/store/uploads/'); 
define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS); 
define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . '/var/www/store/email/'); 
 
// define our database connection 
define('DB_TYPE', 'mysql'); 
define('DB_PREFIX', ''); // prefix for database table names -- preferred to be left empty 
define('DB_SERVER', 'localhost'); 
define('DB_SERVER_USERNAME', '[removed]'); 
define('DB_SERVER_PASSWORD', '[removed]'); 
define('DB_DATABASE', '[removed]'); 
define('USE_PCONNECT', 'false'); // use persistent connections? 
define('STORE_SESSIONS', 'db'); // use 'db' for best support, or '' for file-based storage 
 
// The next 2 "defines" are for SQL cache support. 
// For SQL_CACHE_METHOD, you can select from:  none, database, or file 
// If you choose "file", then you need to set the DIR_FS_SQL_CACHE to a directory where your apache 
// or webserver user has write privileges (chmod 666 or 777). We recommend using the "cache" folder inside the Zen Cart folder 
// ie: /path/to/your/webspace/public_html/zen/cache   -- leave no trailing slash 
define('SQL_CACHE_METHOD', 'file'); 
define('DIR_FS_SQL_CACHE', '/var/www/store/cache'); 
 
?>

Thank you in advance. I really appreciate any suggestion.

Best regards,
Lucian Constantin (Skello)

13 Jan 2007, 11:31 AM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Fatal error on attempting to launch installer

Have you checked whether store/includes/auto_loaders/config.core.php is there? And if so, whether it is all there, i.e. not corrupt or empty?

13 Jan 2007, 11:48 AM
#3
skello avatar

skello

New Zenner

Join Date:
Jan 2007
Location:
Romania
Posts:
5
Plugin Contributions:
0

Re: Fatal error on attempting to launch installer

Hi,

Thank you for your reply. Yes. It is there and doesn't appear to be corrupted. Sorry i haven't mentioned it, but I though it's self-implied. I wouldn't have posted otherwise. Those were the first things i checked. I'm thinking i might have missed some components when installing php, but i don't know if that's related. For example i installed the php-pear package after i got this error, but i don't have an /usr/share/pear. Any connection ?

Best regards,
Lucian Constantin (Skello)

13 Jan 2007, 12:31 PM
#4
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Fatal error on attempting to launch installer

Amazingly people do post the errors and warnings without appearing to read them first, though I would have been surprised if that were the case here from the quality of information that you subsequently provided.

Instead I think that the problem is simply that you have prefixed your DIR_WS_* constants with 'store/'. As a result php is looking for a 'store' subdirectory inside your 'store' directory (I hope that makes sense) and of course not finding one. So all you need to do is remove the 'store/' from the define statements below> define('DIR_WS_IMAGES', 'store/images/');

define('DIR_WS_INCLUDES', 'store/includes/');
define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'store/functions/');
define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'store/classes/');
define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'store/modules/');
define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'store/languages/');
define('DIR_WS_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'store/pub/');
define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'store/templates/');

13 Jan 2007, 12:59 PM
#5
skello avatar

skello

New Zenner

Join Date:
Jan 2007
Location:
Romania
Posts:
5
Plugin Contributions:
0

Re: Fatal error on attempting to launch installer

Hi,

Thank you kuroi. It appears that was the problem. However this means the comments in the configuration-dist.php are a bit confusing. As in:

// * DIR_WS_* = Webserver directories (virtual/URL)
// these paths are relative to top of your webspace ... (ie: under the public_html or httpdocs folder)Makes you think all DIR_WS_* (implied by *) are relative to the top of your webspace. Thus not only:
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');which i have modified to:
define('DIR_WS_CATALOG', 'store/');
define('DIR_WS_HTTPS_CATALOG', 'store/');and by you not mentioning them, i assume those are the only ones that should have been modified. What about:
define('DIR_WS_PHPBB', 'store/phpBB2/');Should i modify this one back to:
define('DIR_WS_PHPBB', 'phpBB2/');as it orginaly was ?

If this is the case then i assume that i also have to modify back

// * DIR_FS_* = Filesystem directories (local/physical)
//the following path is a COMPLETE path to your Zen Cart files. eg: /var/www/vhost/accountname/public_html/store/
define('DIR_FS_CATALOG', '/var/www/store/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . '/var/www/store/download/');
define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . '/var/www/store/pub/');
define('DIR_WS_UPLOADS', DIR_WS_IMAGES . '/var/www/store/uploads/');
define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS);
define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . '/var/www/store/email/'); and only leave > define('DIR_FS_CATALOG', '/var/www/store/'); as it is ?

Also i need to do the same in the /store/admin/includes/configuration.php file too right ? Where i only have to leave:

define('DIR_WS_ADMIN', 'store/admin/');
define('DIR_WS_CATALOG', 'store/');
define('DIR_WS_HTTPS_ADMIN', 'store/admin/');
define('DIR_WS_HTTPS_CATALOG', 'store/'); and > define('DIR_FS_ADMIN', '/var/www/store/admin/');
define('DIR_FS_CATALOG', '/var/www/store/'); and change everything else back as it originally was.

If everything i said is accurate, i get a new error.

1146 Table 'store.configuration' doesn't exist
in:
[select configuration_key as cfgkey, configuration_value as cfgvalue from configuration]Should i make a new thread about it, or keep it here ?

Thanks.

Best regards,
Lucian Constantin (Skello)

13 Jan 2007, 1:23 PM
#6
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Fatal error on attempting to launch installer

You asked it here, so let's tackle it here. Its a legitimate follow-on from your original question.

What's probably a little unusual here is that you have edited the configure files yourself. More normal is for users to create the configure files by renaming the dist-configure.php files and then run the installer to correctly populate them.

The first time a user would normally go into the configure files themselves would be when he or she wishes to move their site and is told that they can do so simply by moving the files and editing the configures to point to the new location and database.

However you've set up a linux box and are clearly more sophisticated than most store owners and many developers and, being more used to configuring by hand, have discovered the way that us old hands are more likely to go about it. So let me fill in some gaps ...

The comment about the paths being relative to the top of the webspace only refers to the two lines immediately below it. Those after the gap are relative to the two above it. For most this is semi-explicit as they are defined as the concatonation of DIR_WS_INCLUDES and the relevant directory.

DIR_WS_PHPBB reflects a slightly strange relationship between Zen Cart and phpBB. They're not integrated, but there is some code in Zen Cart to allow a visitor setting up a Zen Cart account to use the same details for a phpBB account. So that line is kind off stuck in here because there's not really anywhere more appropriate. The path name should be that which reflect the location in which you have installed phpBB relative to the top of your webspace. If you haven't the contents won't matter anyway.

Yes, you do need to trim down your DIR_FS_* settings. The DIR_FS_CATALOG define takes you on an absolute path to your Zen cart's root directory, the rest then concatenate that with relevant local directories.

Finally, I suspect that the table error that you are getting is because you have gotten everything else right and so Zen Cart is now looking into your database, but having bypassed the installer, it's not finding the tables that it expects to see there.

13 Jan 2007, 2:14 PM
#7
skello avatar

skello

New Zenner

Join Date:
Jan 2007
Location:
Romania
Posts:
5
Plugin Contributions:
0

Re: Fatal error on attempting to launch installer

Thank you kuroi for all your helpful replies so far. I think i got all settings right now and figured out that i have to start the installer manually, even though the 1.readme_installation.html in the docs folder states:

In your browser, enter the URL to your new shop, and the Installer should automatically start.
Example: http://www.mydomain.com/catalog

  • or - to start the installer directly, use: http://www.mydomain.com/catalog/zc_installThus i opted for the first version, but realized that instead of starting the installer it attempts to read from the db.
    I also managed to meet all the Prerequisites the installer asks for except for two warnings:
    MySQL Version = 5.0.24a-Debian_9-log
    Apparently Zen Cart is not fully compatible with MySQL 5 yet, or so the installer states. From your personal experience, have there been many errors reported while using it with MySQL 5 ? Should i keep it as it is or would it be a good idea to downgrade MySQL ? This is a test box not a production one. I wouldn't mind doing it if it's necessary.
    and:
    PHP Output Buffering (gzip) = OFF
    I'll try to solve this one too, even though it's not critical and i guess i can live without it :)

Best regards,
Lucian Constantin (Skello)

13 Jan 2007, 2:34 PM
#8
merlinpa1969 avatar

merlinpa1969

Totally Zenned

Join Date:
Mar 2004
Posts:
13,031
Plugin Contributions:
4

Re: Fatal error on attempting to launch installer

The reason that your installer didnt automatically start is because you already have the paths set in the configure.php file and it can now find the application top file right where it supposed to be so the index page passes the test,
you need to just upload fresh dist_configure.php files then just rename them
set permissions, and then run the installer,

remember this installer was designed for the novice user.

13 Jan 2007, 2:44 PM
#9
skello avatar

skello

New Zenner

Join Date:
Jan 2007
Location:
Romania
Posts:
5
Plugin Contributions:
0

Re: Fatal error on attempting to launch installer

Hi,

I understand now why it didn't start automatically. Thank you Merlinpa. I ran the installer and my only question now is: How big of a risk is to run Zen Cart with MySQL 5 (error-wise). Should i downgrade MySQL or go ahead with MySQL 5 ?

Best regards,
Lucian Constantin (Skello)

13 Jan 2007, 3:49 PM
#10
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: Fatal error on attempting to launch installer

I run numerous (over a 100) test databases under Windows and Linux using different versions of MySQL 5 without problems, and not until I tested the installer for Zen Cart 1.3.7, which added the test for PHP Buffering, did I discover that it's OFF for all of my environments (earlier installers didn't test for this).