Zen Cart Logo
Forums / Basic Configuration / Admin Page Won't Load

Admin Page Won't Load

Views: 3,671

Results 1 to 18 of 18
15 Jul 2024, 7:01 PM
#1
cjdarling avatar

cjdarling

New Zenner

Join Date:
Mar 2022
Location:
CJ Darling
Posts:
25
Plugin Contributions:
0

Admin Page Won't Load

I think I'm using version 1.58, but since I can't log into the admin page, I'm not sure.

I just installed (for about the 8th time since I've been having this same problem repeatedly) a shopping cart on https://www.rainforest-pets.com. The generic shopping cart index page shows up fine. The admin page will not show up at all. On Chrome, it's giving me a 500 error. On Firefox, there's no error at all...just a blank page.

I deleted the zc_install folder, and changed the admin folder to something I could actually remember. All files appear to be there. So why won't the <admin>/index.php page load so I can start working? I have other shopping carts on this same server, and none of them are giving me any grief at all. Just this one.

This is what the log says, and I don't know how to fix things because it seems to be missing a file.

[15-Jul-2024 13:32:10 America/Chicago] Request URI: /clAss-DFO-graSp/, IP address: 108.189.243.79, Language id 1
#1 require_once() called at [/home2/boruma/public_html/rainforest-pets.com/includes/autoload_func.php:40]
#2 require(/home2/boruma/public_html/rainforest-pets.com/includes/autoload_func.php) called at [/home2/boruma/public_html/rainforest-pets.com/clAss-DFO-graSp/includes/application_top.php:42]
#3 require(/home2/boruma/public_html/rainforest-pets.com/clAss-DFO-graSp/includes/application_top.php) called at [/home2/boruma/public_html/rainforest-pets.com/clAss-DFO-graSp/home.php:9]
#4 require(/home2/boruma/public_html/rainforest-pets.com/clAss-DFO-graSp/home.php) called at [/home2/boruma/public_html/rainforest-pets.com/clAss-DFO-graSp/index.php:11]
--> PHP Warning: require_once(includes/init_includes/init_special_funcs.php): failed to open stream: No such file or directory in /home2/boruma/public_html/rainforest-pets.com/includes/autoload_func.php on line 40.

[15-Jul-2024 13:32:10 America/Chicago] PHP Fatal error: require_once(): Failed opening required 'includes/init_includes/init_special_funcs.php' (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home2/boruma/public_html/rainforest-pets.com/includes/autoload_func.php on line 40

I also don't know why it still shows the admin drectory as clAss-DFO-graSp because I changed that over an hour ago.

Please help? Thank you!

15 Jul 2024, 7:24 PM
#2
cjdarling avatar

cjdarling

New Zenner

Join Date:
Mar 2022
Location:
CJ Darling
Posts:
25
Plugin Contributions:
0

Re: Admin Page Won't Load

I tried to edit the above post, but it won't allow me to, so here's a quick update.

I tried logging in again, and this is the newest log report. At least it finally showed the proper admin folder, so I changed that to xxxxxx in this post.

[15-Jul-2024 13:59:12 America/Chicago] Request URI: /xxxxxx/, IP address: 108.189.243.79, Language id 1
#1 require_once() called at [/home2/boruma/public_html/rainforest-pets.com/includes/autoload_func.php:40]
#2 require(/home2/boruma/public_html/rainforest-pets.com/includes/autoload_func.php) called at [/home2/boruma/public_html/rainforest-pets.com/xxxxxx/includes/application_top.php:42]
#3 require(/home2/boruma/public_html/rainforest-pets.com/xxxxxx/includes/application_top.php) called at [/home2/boruma/public_html/rainforest-pets.com/xxxxxx/home.php:9]
#4 require(/home2/boruma/public_html/rainforest-pets.com/xxxxxx/home.php) called at [/home2/boruma/public_html/rainforest-pets.com/xxxxxx/index.php:11]
--> PHP Warning: require_once(includes/init_includes/init_special_funcs.php): failed to open stream: No such file or directory in /home2/boruma/public_html/rainforest-pets.com/includes/autoload_func.php on line 40.

[15-Jul-2024 13:59:12 America/Chicago] PHP Fatal error: require_once(): Failed opening required 'includes/init_includes/init_special_funcs.php' (include_path='.:/opt/cpanel/ea-php74/root/usr/share/pear') in /home2/boruma/public_html/rainforest-pets.com/includes/autoload_func.php on line 40

But here's what's really weird: The two files it's saying aren't there: (includes/autoload_func.php) and (includes/init_includes/init_special_funcs.php) ARE both there, right where they belong! So why is it saying they're not there??

15 Jul 2024, 7:49 PM
#3
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,086
Plugin Contributions:
56

Re: Admin Page Won't Load

It "sounds like" the /admin/includes/configure.php has some extra/unwanted information present. Please post the contents (minus the database settings, towards the bottom of the file) using the "CODE" tag (the big **# **in the menu-bar when you write your response).

15 Jul 2024, 7:55 PM
#4
cjdarling avatar

cjdarling

New Zenner

Join Date:
Mar 2022
Location:
CJ Darling
Posts:
25
Plugin Contributions:
0

Re: Admin Page Won't Load

Thanks for your quick reply, lat9! Is this what you're looking for?

<?php
/**
 * @copyright Copyright 2003-2022 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * File Built by Zen Cart Installer on Mon Jul 15 2024 13:31:11
 */


/*************** NOTE: This file is VERY similar to, but DIFFERENT from the "store" version of configure.php. ***********/
/***************       The 2 files should be kept separate and not used to overwrite each other.              ***********/

/**
 * Enter the domain for your Admin URL. If you have SSL, enter the correct https address in the HTTP_SERVER setting, instead of just an http address.
 */
define('HTTP_SERVER', 'https://rainforest-pets.com');
/**
 * Note about HTTPS_SERVER:
 * There is no longer an HTTPS_SERVER setting for the Admin. Instead, put your SSL URL in the HTTP_SERVER setting above.
 */

/**
 * Note about DIR_WS_ADMIN
 * The DIR_WS_ADMIN value is now auto-detected.
 * In the rare case where it cannot be detected properly, you can add your own DIR_WS_ADMIN definition below.
 */

/**
 * Enter the domain for your storefront URL.
 * Enter a separate SSL URL in HTTPS_CATALOG_SERVER if your store supports SSL.
 */
define('HTTP_CATALOG_SERVER', 'https://rainforest-pets.com');
define('HTTPS_CATALOG_SERVER', 'https://rainforest-pets.com');

/**
 * Do you use SSL for your customers login/checkout on the storefront? If so, enter 'true'. Else 'false'.
 */
define('ENABLE_SSL_CATALOG', 'true');

/**
 * These DIR_WS_xxxx values refer to the name of any subdirectory in which your store is located.
 * These values get added to the HTTP_CATALOG_SERVER and HTTPS_CATALOG_SERVER values to form the complete URLs to your storefront.
 * They should always start and end with a slash ... ie: '/' or '/foldername/'
 */
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');

/**
 * This is the complete physical path to your store's files.  eg: /var/www/vhost/accountname/public_html/store/
 * Should have a closing / on it.
 */
define('DIR_FS_CATALOG', '/home2/boruma/public_html/rainforest-pets.com/');

/**
 * NOTE about DIR_FS_ADMIN
 * The value for DIR_FS_ADMIN is now auto-detected.
 * In the very rare case where there is a need to override the autodetection, simply add your own definition for it below.
 */
15 Jul 2024, 9:44 PM
#5
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,086
Plugin Contributions:
56

Re: Admin Page Won't Load

There should also be a file /admin/includes/init_includes/init_special_funcs.php (where admin is your site's admin directory name).

You can find your Zen Cart version by viewing the contents of /includes/version.php, BTW.

16 Jul 2024, 12:12 AM
#6
cjdarling avatar

cjdarling

New Zenner

Join Date:
Mar 2022
Location:
CJ Darling
Posts:
25
Plugin Contributions:
0

Re: Admin Page Won't Load

Good to know. I'm definitely using version 1.5.8a.

The admin/includes/init_includes/init_special_funcs.php file is not there. How do I correct this?

16 Jul 2024, 7:19 AM
#7
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,793
Plugin Contributions:
15

Re: Admin Page Won't Load

CJDarling:

Thanks for your quick reply, lat9! Is this what you're looking for?

<?php /** * @copyright Copyright 2003-2022 Zen Cart Development Team * @copyright Portions Copyright 2003 osCommerce * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0 * File Built by Zen Cart Installer on Mon Jul 15 2024 13:31:11 */ /*************** NOTE: This file is VERY similar to, but DIFFERENT from the "store" version of configure.php. ***********/ /*************** The 2 files should be kept separate and not used to overwrite each other. ***********/ /** * Enter the domain for your Admin URL. If you have SSL, enter the correct https address in the HTTP_SERVER setting, instead of just an http address. */ define('HTTP_SERVER', 'https://rainforest-pets.com'); /** * Note about HTTPS_SERVER: * There is no longer an HTTPS_SERVER setting for the Admin. Instead, put your SSL URL in the HTTP_SERVER setting above. */ /** * Note about DIR_WS_ADMIN * The DIR_WS_ADMIN value is now auto-detected. * In the rare case where it cannot be detected properly, you can add your own DIR_WS_ADMIN definition below. */ /** * Enter the domain for your storefront URL. * Enter a separate SSL URL in HTTPS_CATALOG_SERVER if your store supports SSL. */ define('HTTP_CATALOG_SERVER', 'https://rainforest-pets.com'); define('HTTPS_CATALOG_SERVER', 'https://rainforest-pets.com'); /** * Do you use SSL for your customers login/checkout on the storefront? If so, enter 'true'. Else 'false'. */ define('ENABLE_SSL_CATALOG', 'true'); /** * These DIR_WS_xxxx values refer to the name of any subdirectory in which your store is located. * These values get added to the HTTP_CATALOG_SERVER and HTTPS_CATALOG_SERVER values to form the complete URLs to your storefront. * They should always start and end with a slash ... ie: '/' or '/foldername/' */ define('DIR_WS_CATALOG', '/'); define('DIR_WS_HTTPS_CATALOG', '/'); /** * This is the complete physical path to your store's files. eg: /var/www/vhost/accountname/public_html/store/ * Should have a closing / on it. */ define('DIR_FS_CATALOG', '/home2/boruma/public_html/rainforest-pets.com/'); /** * NOTE about DIR_FS_ADMIN * The value for DIR_FS_ADMIN is now auto-detected. * In the very rare case where there is a need to override the autodetection, simply add your own definition for it below. */ ``` Delete the above in red. Should be``` define('DIR_FS_CATALOG', '/home2/boruma/public_html/'); ```
16 Jul 2024, 10:56 AM
#8
cjdarling avatar

cjdarling

New Zenner

Join Date:
Mar 2022
Location:
CJ Darling
Posts:
25
Plugin Contributions:
0

Re: Admin Page Won't Load

Okay, that helped...I think. Now I'm seeing an error page that says I either need to upload and run the zc_install folder (which I removed yesterday following the install instructions, or the admin folder would have been blocked, or

This is not your first time using Zen Cart® and you have previously completed the normal installation procedures.
If this is the case for you, then...
Your /includes/configure.php and/or /admin/includes/configure.php files contain invalid path information and/or invalid database-connection information.
If you recently edited your configure.php files for any reason, or perhaps moved your site to a different folder or different server, then you will need to review and update all your settings to the correct values for your server.
Additionally, if the permissions have been changed on your configure.php files, then perhaps they are too low for the files to be read.
Or the configure.php files could be missing altogether.
Or your web hosting provider has recently changed the server's PHP configuration (or upgraded its version) then they may have broken things as well.
See the Online Documentation area on the Zen Cart® website for assistance.

I tried editing includes/configure.php, removing the same section of code, but nothing has changed. I'm still getting the same error page. So what else do I need to check?

16 Jul 2024, 11:09 AM
#9
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,793
Plugin Contributions:
15

Re: Admin Page Won't Load

We really need to see both config files (with database names and passwords changed) in order to get everything set correctly.

Again, use the # and add them separately.

16 Jul 2024, 11:30 AM
#10
cjdarling avatar

cjdarling

New Zenner

Join Date:
Mar 2022
Location:
CJ Darling
Posts:
25
Plugin Contributions:
0

Re: Admin Page Won't Load

Sure, no problem.

admin/includes/configure.php:

<?php
/**
 * @copyright Copyright 2003-2022 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * File Built by Zen Cart Installer on Mon Jul 15 2024 13:31:11
 */


/*************** NOTE: This file is VERY similar to, but DIFFERENT from the "store" version of configure.php. ***********/
/***************       The 2 files should be kept separate and not used to overwrite each other.              ***********/

/**
 * Enter the domain for your Admin URL. If you have SSL, enter the correct https address in the HTTP_SERVER setting, instead of just an http address.
 */
define('HTTP_SERVER', 'https://rainforest-pets.com');
/**
 * Note about HTTPS_SERVER:
 * There is no longer an HTTPS_SERVER setting for the Admin. Instead, put your SSL URL in the HTTP_SERVER setting above.
 */

/**
 * Note about DIR_WS_ADMIN
 * The DIR_WS_ADMIN value is now auto-detected.
 * In the rare case where it cannot be detected properly, you can add your own DIR_WS_ADMIN definition below.
 */

/**
 * Enter the domain for your storefront URL.
 * Enter a separate SSL URL in HTTPS_CATALOG_SERVER if your store supports SSL.
 */
define('HTTP_CATALOG_SERVER', 'https://rainforest-pets.com');
define('HTTPS_CATALOG_SERVER', 'https://rainforest-pets.com');

/**
 * Do you use SSL for your customers login/checkout on the storefront? If so, enter 'true'. Else 'false'.
 */
define('ENABLE_SSL_CATALOG', 'true');

/**
 * These DIR_WS_xxxx values refer to the name of any subdirectory in which your store is located.
 * These values get added to the HTTP_CATALOG_SERVER and HTTPS_CATALOG_SERVER values to form the complete URLs to your storefront.
 * They should always start and end with a slash ... ie: '/' or '/foldername/'
 */
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');

/**
 * This is the complete physical path to your store's files.  eg: /var/www/vhost/accountname/public_html/store/
 * Should have a closing / on it.
 */
define('DIR_FS_CATALOG', '/home2/boruma/public_html/');

/**
 * NOTE about DIR_FS_ADMIN
 * The value for DIR_FS_ADMIN is now auto-detected.
 * In the very rare case where there is a need to override the autodetection, simply add your own definition for it below.
 */

includes/configure.php:

<?php
/**
 * @copyright Copyright 2003-2022 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * File Built by Zen Cart Installer on Mon Jul 15 2024 13:31:11
 */

/*************** NOTE: This file is VERY similar to, but DIFFERENT from the "admin" version of configure.php. ***********/
/***************       The 2 files should be kept separate and not used to overwrite each other.              ***********/

/**
 * Enter the domain for your store
 * If you have SSL, enter the correct https address in BOTH the HTTP_SERVER and HTTPS_SERVER settings, instead of just an http address.
 */
define('HTTP_SERVER', 'https://rainforest-pets.com');
define('HTTPS_SERVER', 'https://rainforest-pets.com');

/**
 * If you have https enabled on your website, set this to 'true'
 */
define('ENABLE_SSL', 'true');

/**
 * These DIR_WS_xxxx values refer to the name of any subdirectory in which your store is located.
 * These values get added to the HTTP_CATALOG_SERVER and HTTPS_CATALOG_SERVER values to form the complete URLs to your storefront.
 * They should always start and end with a slash ... ie: '/' or '/foldername/'
 */
define('DIR_WS_CATALOG', '/');
define('DIR_WS_HTTPS_CATALOG', '/');

/**
 * This is the complete physical path to your store's files.  eg: /var/www/vhost/accountname/public_html/store/
 * Should have a closing / on it.
 */
define('DIR_FS_CATALOG', '/home2/boruma/public_html/');

/**
16 Jul 2024, 11:48 AM
#11
cjdarling avatar

cjdarling

New Zenner

Join Date:
Mar 2022
Location:
CJ Darling
Posts:
25
Plugin Contributions:
0

Re: Admin Page Won't Load

I just noticed this extra line toward the bottom of the error page:

Additional *IMPORTANT* Details: includes/configure.php file contents invalid. ie: DIR_FS_CATALOG not valid or not set

What should the proper code be? When I change it back to

define('DIR_FS_CATALOG', '/home2/boruma/public_html/rainforest-pets.com/');

which is what it was originally, the extra error message goes away, but it still says:

This is not your first time using Zen Cart® and you have previously completed the normal installation procedures.
If this is the case for you, then...
Your /includes/configure.php and/or /admin/includes/configure.php files contain invalid path information and/or invalid database-connection information.
If you recently edited your configure.php files for any reason, or perhaps moved your site to a different folder or different server, then you will need to review and update all your settings to the correct values for your server.
Additionally, if the permissions have been changed on your configure.php files, then perhaps they are too low for the files to be read.
Or the configure.php files could be missing altogether.
Or your web hosting provider has recently changed the server's PHP configuration (or upgraded its version) then they may have broken things as well.
See the Online Documentation area on the Zen Cart® website for assistance.

So I must be missing something else.

16 Jul 2024, 1:06 PM
#12
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,086
Plugin Contributions:
56

Re: Admin Page Won't Load

Remember that the storefront /includes/configure.php gets marked as read-only, so changes you thought you'd applied to that file ... might not have been.

16 Jul 2024, 9:11 PM
#13
cjdarling avatar

cjdarling

New Zenner

Join Date:
Mar 2022
Location:
CJ Darling
Posts:
25
Plugin Contributions:
0

Re: Admin Page Won't Load

So I have to change the permissions on the files I uploaded? You know, that's always seemed to be an obviously unnecessary step. If they need to be read/write, they should be made read/write from the beginning. I honestly don't understand why they're not, and we have to go in and manually change them. If anyone would like to take a moment to explain the logic of this, I'd really like to know, because it seems totally illogical to me.

16 Jul 2024, 9:29 PM
#14
lat9 avatar

lat9

Administrator

Join Date:
Sep 2009
Location:
Stuart, FL
Posts:
14,086
Plugin Contributions:
56

Re: Admin Page Won't Load

CJDarling:

So I have to change the permissions on the files I uploaded? You know, that's always seemed to be an obviously unnecessary step. If they need to be read/write, they should be made read/write from the beginning. I honestly don't understand why they're not, and we have to go in and manually change them. If anyone would like to take a moment to explain the logic of this, I'd really like to know, because it seems totally illogical to me.
Not all files, just the storefront /includes/configure.php. FWIW, it's been like that as long as I've been involved with Zen Cart and I'm not sure what the motivation is. I'm guessing that it's an ancient security measure that could *probably *be done away with.

16 Jul 2024, 10:32 PM
#15
cjdarling avatar

cjdarling

New Zenner

Join Date:
Mar 2022
Location:
CJ Darling
Posts:
25
Plugin Contributions:
0

Re: Admin Page Won't Load

Yes, I agree. I've been using Zencart for at least 10 years, and it's always been an annoyance.

Well, I changed the permissions on both configure.php files, but nothing has changed. I'm still seeing the same error page.

16 Jul 2024, 11:22 PM
#16
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,793
Plugin Contributions:
15

Re: Admin Page Won't Load

CJDarling:

Yes, I agree. I've been using Zencart for at least 10 years, and it's always been an annoyance.

Well, I changed the permissions on both configure.php files, but nothing has changed. I'm still seeing the same error page.But did yuo also remove the mistake where your entered your URL when the prompt said .../store/?

It should stop with public_html/ unless your actual store is in some other directory.

17 Jul 2024, 12:55 PM
#17
cjdarling avatar

cjdarling

New Zenner

Join Date:
Mar 2022
Location:
CJ Darling
Posts:
25
Plugin Contributions:
0

Re: Admin Page Won't Load

Yes, I did. And I made sure the file permissions didn't change. Still no change.

17 Jul 2024, 3:47 PM
#18
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,695
Plugin Contributions:
56

Re: Admin Page Won't Load

Put a small php file called "showdir.php" at the root of your site (same level as "includes" and "images"):

<?php echo getcwd(); then in your browser go to <https://YOUR-STORE.com/showdir.php> and post what it says.