Zen Cart Logo
Forums / Upgrading from 1.3.x to 1.3.9 / Error message when trying to access store admin login page

Error message when trying to access store admin login page

Locked

Views: 2,667

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
2 Feb 2007, 8:28 PM
#1
wagster avatar

wagster

New Zenner

Join Date:
May 2006
Posts:
3
Plugin Contributions:
0

Error message when trying to access store admin login page

When I try to open Admin, I get this on a page:

Warning: main(/includes/autoload_func.php) [function.main]: failed to open stream: No such file or directory in /home/www/MySite.com/docs/zencart/admin/includes/application_top.php on line 147

Warning: main(/includes/autoload_func.php) [function.main]: failed to open stream: No such file or directory in /home/www/MySite.com/docs/zencart/admin/includes/application_top.php on line 147

Fatal error: main() [function.require]: Failed opening required '/includes/autoload_func.php' (include_path='.:/usr/local/share/pear:/usr/local/share/adodb:/usr/local/lib/php/pear') in /home/www/MySite.com/docs/zencart/admin/includes/application_top.php on line 147

Line 147 says this in admin/includes/application_top.php, either at the server file or the local file on my computer:

require(DIR_FS_CATALOG . 'includes/autoload_func.php');

A search in this forum suggested these files may not have uploaded properly, so I have tried downloading new files and reloading admin/includes/application_top.php.

What else can be done to correct this error?

Thanks, W.

2 Feb 2007, 8:32 PM
#2
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Error message when trying to access store admin login page

/includes/autoload_func.php << this is the missing file, confirm it is there

3 Feb 2007, 2:40 AM
#3
wagster avatar

wagster

New Zenner

Join Date:
May 2006
Posts:
3
Plugin Contributions:
0

Re: Error message when trying to access store admin login page

Hi Rob,

The file exists on the server as it should.

I ran it through Winmerge against the file I have on my computer with no differences.

W.

3 Feb 2007, 2:06 PM
#4
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Error message when trying to access store admin login page

/home/www/MySite.com/docs/zencart/admin/includes/application_top.php

is telling you there is no such file as

/home/www/MySite.com/docs/zencart/includes/autoload_func.php

but you can confirm the file is there.

Most curious. What version of ZenCart are you running and does the cart show properly?

Presuming the file is the same size on your Hosting account as on your computer, is the file permission 644? If the file size and permissions are correct, the only other answer is wrong path in the Admin config file.

Can you confirm that in your Admin config file, you have this line:
define('DIR_FS_CATALOG', '/home/www/MySite.com/docs/zencart/');

Otherwise, best to paste the first 70 lines of your Admin config file for further review; the more eyes looking at the problem the better results philosophy. :smile:

4 Feb 2007, 9:30 AM
#5
vivaraquel avatar

vivaraquel

Zen Follower

Join Date:
Sep 2004
Location:
Australia
Posts:
305
Plugin Contributions:
0

Re: Error message when trying to access store admin login page

I have the same problem. I had to upload the upgrade manuallt via FTP since the upgrade link on Fantastico just made my page disappear.

I can't access the admin area cuz I get the same error messages but my cattalog works except for this

Warning: I am able to write to the configuration file: /home/easybead/public_html/includes/configure.php. This is a potential security risk - please set the right user permissions on this file (read-only, CHMOD 644 or 444 are typical). You may need to use your webhost control panel/file-manager to change the permissions effectively. Contact your webhost for assistance.

which I tried to change permissions on but it's not working.

I checked that I have the file u mentioned and I do. I upgraded from 1.3.6 to 1.3.7.
I didn't find the line define('DIR_FS_CATALOG', '/home/www/MySite.com/docs/zencart/');
in my Admin config file. I will paste the file here see if anyone can help. I hope so, I'm trying not to freak out too much and I hate the red warning in my catalog Here goes my admin > configure.php

<?php // // +----------------------------------------------------------------------+ // |zen-cart Open Source E-commerce | // +----------------------------------------------------------------------+ // | Copyright (c) 2003 The zen-cart developers | // | | // | <http://www.zen-cart.com/index.php> | // | | // | Portions Copyright (c) 2003 osCommerce | // +----------------------------------------------------------------------+ // | This source file is subject to version 2.0 of the GPL license, | // | that is bundled with this package in the file LICENSE, and is | // | available through the world-wide-web at the following url: | // | <http://www.zen-cart.com/license/2_0.txt>. | // | If you did not receive a copy of the zen-cart license and are unable | // | to obtain it through the world-wide-web, please send a note to | // | [email protected] so we can mail you a copy immediately. | // +----------------------------------------------------------------------+ // $Id: configuration.php 3993 2006-07-20 21:46:55Z drbyte $ // require('includes/application_top.php'); $action = (isset($_GET['action']) ? $_GET['action'] : ''); if (zen_not_null($action)) { switch ($action) { case 'save': // demo active test if (zen_admin_demo()) { $_GET['action']= ''; $messageStack->add_session(ERROR_ADMIN_DEMO, 'caution'); zen_redirect(zen_href_link(FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cID)); } $configuration_value = zen_db_prepare_input($_POST['configuration_value']); $cID = zen_db_prepare_input($_GET['cID']); $db->Execute("update " . TABLE_CONFIGURATION . " set configuration_value = '" . zen_db_input($configuration_value) . "', last_modified = now() where configuration_id = '" . (int)$cID . "'"); $configuration_query = 'select configuration_key as cfgkey, configuration_value as cfgvalue from ' . TABLE_CONFIGURATION; $configuration = $db->Execute($configuration_query); // set the WARN_BEFORE_DOWN_FOR_MAINTENANCE to false if DOWN_FOR_MAINTENANCE = true if ( (WARN_BEFORE_DOWN_FOR_MAINTENANCE == 'true') && (DOWN_FOR_MAINTENANCE == 'true') ) { $db->Execute("update " . TABLE_CONFIGURATION . " set configuration_value = 'false', last_modified = '" . NOW . "' where configuration_key = 'WARN_BEFORE_DOWN_FOR_MAINTENANCE'"); } $configuration_query = 'select configuration_key as cfgkey, configuration_value as cfgvalue from ' . TABLE_CONFIGURATION; $configuration = $db->Execute($configuration_query); zen_redirect(zen_href_link(FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cID)); break; } } $gID = (isset($_GET['gID'])) ? $_GET['gID'] : 1; $_GET['gID'] = $gID; $cfg_group = $db->Execute("select configuration_group_title from " . TABLE_CONFIGURATION_GROUP . " where configuration_group_id = '" . (int)$gID . "'"); if ($gID == 7) { $shipping_errors = ''; if (zen_get_configuration_key_value('SHIPPING_ORIGIN_ZIP') == 'NONE' or zen_get_configuration_key_value('SHIPPING_ORIGIN_ZIP') == '') { $shipping_errors .= '<br />' . ERROR_SHIPPING_ORIGIN_ZIP; } if (zen_get_configuration_key_value('ORDER_WEIGHT_ZERO_STATUS') == '1' and !defined('MODULE_SHIPPING_FREESHIPPER_STATUS')) { $shipping_errors .= '<br />' . ERROR_ORDER_WEIGHT_ZERO_STATUS; } if (defined('MODULE_SHIPPING_USPS_STATUS') and (MODULE_SHIPPING_USPS_USERID=='NONE' or MODULE_SHIPPING_USPS_SERVER == 'test')) { $shipping_errors .= '<br />' . ERROR_USPS_STATUS; } if ($shipping_errors != '') { $messageStack->add(ERROR_SHIPPING_CONFIGURATION . $shipping_errors, 'caution'); } } ?> <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN"> <html <?php echo HTML_PARAMS; ?>> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>"> <title><?php echo TITLE; ?></title> <link rel="stylesheet" type="text/css" href="includes/stylesheet.css"> <link rel="stylesheet" type="text/css" href="includes/cssjsmenuhover.css" media="all" id="hoverJS"> <script language="javascript" src="includes/menu.js"></script> <script language="javascript" src="includes/general.js"></script> <script type="text/javascript"> <!-- function init() { cssjsmenu('navbar'); if (document.getElementById) { var kill = document.getElementById('hoverJS'); kill.disabled = true; } } // --> </script> </head> <body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" bgcolor="#FFFFFF" onLoad="init()"> <!-- header //--> <?php require(DIR_WS_INCLUDES . 'header.php'); ?> <!-- header_eof //--> <!-- body //--> <table border="0" width="100%" cellspacing="2" cellpadding="2"> <tr> <!-- body_text //--> <td width="100%" valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td class="pageHeading"><?php echo $cfg_group->fields['configuration_group_title']; ?></td> <td class="pageHeading" align="right"><?php echo zen_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT); ?></td> </tr> </table></td> </tr> <tr> <td><table border="0" width="100%" cellspacing="0" cellpadding="0"> <tr> <td valign="top"><table border="0" width="100%" cellspacing="0" cellpadding="2"> <tr class="dataTableHeadingRow"> <td class="dataTableHeadingContent" width="55%"><?php echo TABLE_HEADING_CONFIGURATION_TITLE; ?></td> <td class="dataTableHeadingContent"><?php echo TABLE_HEADING_CONFIGURATION_VALUE; ?></td> <td class="dataTableHeadingContent" align="right"><?php echo TABLE_HEADING_ACTION; ?> </td> </tr> <?php $configuration = $db->Execute("select configuration_id, configuration_title, configuration_value, configuration_key, use_function from " . TABLE_CONFIGURATION . " where configuration_group_id = '" . (int)$gID . "' order by sort_order"); while (!$configuration->EOF) { if (zen_not_null($configuration->fields['use_function'])) { $use_function = $configuration->fields['use_function']; if (ereg('->', $use_function)) { $class_method = explode('->', $use_function); if (!is_object(${$class_method[0]})) { include(DIR_WS_CLASSES . $class_method[0] . '.php'); ${$class_method[0]} = new $class_method[0](); } $cfgValue = zen_call_function($class_method[1], $configuration->fields['configuration_value'], ${$class_method[0]}); } else { $cfgValue = zen_call_function($use_function, $configuration->fields['configuration_value']); } } else { $cfgValue = $configuration->fields['configuration_value']; }
if ((!isset($_GET['cID']) || (isset($_GET['cID']) && ($_GET['cID'] == $configuration->fields['configuration_id']))) && !isset($cInfo) && (substr($action, 0, 3) != 'new')) {
  $cfg_extra = $db->Execute("select configuration_key, configuration_description, date_added,
                                    last_modified, use_function, set_function
                             from " . TABLE_CONFIGURATION . "
                             where configuration_id = '" . (int)$configuration->fields['configuration_id'] . "'");
  $cInfo_array = array_merge($configuration->fields, $cfg_extra->fields);
  $cInfo = new objectInfo($cInfo_array);
}

if ( (isset($cInfo) && is_object($cInfo)) && ($configuration->fields['configuration_id'] == $cInfo->configuration_id) ) {
  echo '                  <tr id="defaultSelected" class="dataTableRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cInfo->configuration_id . '&action=edit') . '\'">' . "\n";
} else {
  echo '                  <tr class="dataTableRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="document.location.href=\'' . zen_href_link(FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $configuration->fields['configuration_id'] . '&action=edit') . '\'">' . "\n";
}

?>
<td class="dataTableContent"><?php echo $configuration->fields['configuration_title']; ?></td>
<td class="dataTableContent"><?php echo htmlspecialchars($cfgValue); ?></td>
<td class="dataTableContent" align="right"><?php if ( (isset($cInfo) && is_object($cInfo)) && ($configuration->fields['configuration_id'] == $cInfo->configuration_id) ) { echo zen_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '<a href="' . zen_href_link(FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $configuration->fields['configuration_id']) . '">' . zen_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . '</a>'; } ?> </td>
</tr>

<?php $configuration->MoveNext(); } ?>
        </table></td>
<?php $heading = array(); $contents = array(); switch ($action) { case 'edit': $heading[] = array('text' => '<b>' . $cInfo->configuration_title . '</b>'); if ($cInfo->set_function) { eval('$value_field = ' . $cInfo->set_function . '"' . htmlspecialchars($cInfo->configuration_value) . '");'); } else { $value_field = zen_draw_input_field('configuration_value', $cInfo->configuration_value, 'size="60"'); } $contents = array('form' => zen_draw_form('configuration', FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cInfo->configuration_id . '&action=save')); if (ADMIN_CONFIGURATION_KEY_ON == 1) { $contents[] = array('text' => '<strong>Key: ' . $cInfo->configuration_key . '</strong><br />'); } $contents[] = array('text' => TEXT_INFO_EDIT_INTRO); $contents[] = array('text' => '<br><b>' . $cInfo->configuration_title . '</b><br>' . $cInfo->configuration_description . '<br>' . $value_field); $contents[] = array('align' => 'center', 'text' => '<br>' . zen_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . zen_href_link(FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cInfo->configuration_id) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>'); break; default: if (isset($cInfo) && is_object($cInfo)) { $heading[] = array('text' => '<b>' . $cInfo->configuration_title . '</b>'); if (ADMIN_CONFIGURATION_KEY_ON == 1) { $contents[] = array('text' => '<strong>Key: ' . $cInfo->configuration_key . '</strong><br />'); } $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_CONFIGURATION, 'gID=' . $_GET['gID'] . '&cID=' . $cInfo->configuration_id . '&action=edit') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a>'); $contents[] = array('text' => '<br>' . $cInfo->configuration_description); $contents[] = array('text' => '<br>' . TEXT_INFO_DATE_ADDED . ' ' . zen_date_short($cInfo->date_added)); if (zen_not_null($cInfo->last_modified)) $contents[] = array('text' => TEXT_INFO_LAST_MODIFIED . ' ' . zen_date_short($cInfo->last_modified)); } break; } if ( (zen_not_null($heading)) && (zen_not_null($contents)) ) { echo ' <td width="25%" valign="top">' . "\n"; $box = new box; echo $box->infoBox($heading, $contents); echo ' </td>' . "\n"; } ?>
      </tr>
    </table></td>
  </tr>
</table></td>
<!-- body_text_eof //--> </tr> </table> <!-- body_eof //--> <!-- footer //--> <?php require(DIR_WS_INCLUDES . 'footer.php'); ?> <!-- footer_eof //--> <br> </body> </html> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>
5 Feb 2007, 12:12 AM
#6
theoracle avatar

theoracle

Suspended

Join Date:
Aug 2004
Posts:
3,180
Plugin Contributions:
1

Re: Error message when trying to access store admin login page

Warning: I am able to write to the configuration file: /home/easybead/public_html/includes/configure.php. This is a potential security risk - please set the right user permissions on this file (read-only, CHMOD 644 or 444 are typical). You may need to use your webhost control panel/file-manager to change the permissions effectively. Contact your webhost for assistance.

Under your FTP/cPanel, make sure to switch your includes/configure.php file from CHMOD 666 to CHMOD 644. This should clear out the problem.

5 Feb 2007, 4:04 AM
#7
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Error message when trying to access store admin login page

vivaraquel, the path I mentioned in the Admin config file was specific to wagster's situation -- would be a different path for you. Speaking of which, the file information you posted is not from your Admin config file.

8 Feb 2007, 4:33 AM
#8
wagster avatar

wagster

New Zenner

Join Date:
May 2006
Posts:
3
Plugin Contributions:
0

Re: Error message when trying to access store admin login page

Hi Rob,

Thanks for taking the time to help me try to find a solution to my problem.

Since I had very little material to lose if I just tried to do a full install of 1.3.7, I took that route with the cart. I did get rid of the error messages I was asking about, but because something else wasn't right with the installation, I found other problems appearing that I can't figure out.

I'm finding Zencart to just be too troublesome to deal with. I've been working lightly with it over the last year, just recently going deep into it, trying to get it all figured out. Everytime upgrades were done, problems seemed to come up that took endless hours to figure out if ever. Not a good situation since it was a continuous occurence

I was hoping to get this cart online in a few weeks, but I wasted almost a week just on this one problem. I can't afford to keep tying up my schedule with problems that defy simple repairs, especially if it was my primary cart.

Zencart should be a simple cart to work with but it isn't. It's definitely not designed to be user friendly. Admin configuration and store pages that require editing have no, or limited examples to follow. Searching for info in the forums or other places either returns no good info, or may take forever to find if anything exists at all.

Luckily, I have found a good alternative. While not totally free, it is reasonable, and setting it up and populating the store took only a couple days.

The only good thing about my Zencart experience is the knowledge I gained working with these files in a shopping cart environment, making things do what I wanted. Unfortunately, being unable to control everything important in a reasonable amount of time, I had to give up and move on.

W.