Zen Cart Logo
Forums / Installing on a Linux/Unix Server / warning after moding the admin directory

warning after moding the admin directory

Locked

Views: 3,031

Results 1 to 12 of 12
This thread is locked. New replies are disabled.
3 Feb 2007, 6:06 AM
#1
webdraon777 avatar

webdraon777

New Zenner

Join Date:
Jan 2007
Posts:
24
Plugin Contributions:
0

warning after moding the admin directory

Hi,

looked through the threads and couldn't find anything related to this situation.

So I followed to the letter the admin directory security provided in the install (5.renaming_the_admin_directory.htm) saved all original filed first on my machine through FTP. uploaded mod files to there proper directory. Explanations are pretty straight foward (Thanks:yes: ) But when I went to see the store (I also went to the proper new address)

The file is there html_header.php
I got this message:

Warning: require(DIR_WS_TEMPLATEStemplate_default/common/html_header.php) [function.require]: failed to open stream: No such file or directory in //***/gefo.ca/public_html/GeFo_Store/index.php on line 43

Warning: require(DIR_WS_TEMPLATEStemplate_default/common/html_header.php) [function.require]: failed to open stream: No such file or directory in //***/gefo.ca/public_html/GeFo_Store/index.php on line 43

Fatal error: require() [function.require]: Failed opening required 'DIR_WS_TEMPLATEStemplate_default/common/html_header.php' (include_path='.:/usr/local/php/lib/php') in //***/gefo.ca/public_html/GeFo_Store/index.php on line 43

I have removed some info that I think is not needed to solve this.

I checked the files again and can't figure out what went wrong.
Even changed back to original files in their proper directory and I get the same error message.

The admin section works fine.
I guess i'm overseeing something here and help would be greatly appreciated.

P.S.: worked fine before the mods

Thank you in advance!
Perplexed...but happy!:lol:
Thank for providing such wonderfull software...

3 Feb 2007, 6:31 AM
#2
samad64 avatar

samad64

Totally Zenned

Join Date:
May 2006
Location:
Texas
Posts:
554
Plugin Contributions:
2

Re: warning after moding the admin directory

looks like you're missing a / somewhere in your configure file

could you post your includes/configure.php file, without the username/password?

4 Feb 2007, 1:24 AM
#3
webdraon777 avatar

webdraon777

New Zenner

Join Date:
Jan 2007
Posts:
24
Plugin Contributions:
0

Re: warning after moding the admin directory

samad64:

looks like you're missing a / somewhere in your configure file

could you post your includes/configure.php file, without the username/password?

Hi,

Thanks for looking this over, I will also look it over to see if I can't find that missing (/)
Here is my file:

<?php // /** * * @package Configuration Settings * @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 */ /*************** NOTE: This file is similar, but DIFFERENT from the "store" version of configure.php. ***********/ /*************** The 2 files should be kept separate and not used to overwrite each other. ***********/ // Define the webserver and path parameters // Main webserver: eg, <http://localhost> - should not be empty for productive servers // HTTP_SERVER is your Main webserver: eg, <http://www.yourdomain.com> // HTTPS_SERVER is your Secure webserver: eg, <https://www.yourdomain.com> // HTTP_CATALOG_SERVER is your Main webserver: eg, <http://www.yourdomain.com> // HTTPS_CATALOG_SERVER is your Secure webserver: eg, <https://www.yourdomain.com> /* * URLs for your site will be built via: * HTTP_SERVER plus DIR_WS_ADMIN or * HTTPS_SERVER plus DIR_WS_HTTPS_ADMIN or * HTTP_SERVER plus DIR_WS_CATALOG or * HTTPS_SERVER plus DIR_WS_HTTPS_CATALOG * ...depending on your system configuration settings */ define('HTTP_SERVER', 'http://www.gefo.ca'); define('HTTPS_SERVER', 'https://www.gefo.ca'); define('HTTP_CATALOG_SERVER', 'http://www.gefo.ca'); define('HTTPS_CATALOG_SERVER', 'https://www.gefo.ca'); // Use secure webserver for catalog module and/or admin areas? define('ENABLE_SSL_CATALOG', 'false'); define('ENABLE_SSL_ADMIN', '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_ADMIN', '/GeFo_Store/admin/'); define('DIR_WS_CATALOG', '/GeFo_Store/'); define('DIR_WS_HTTPS_ADMIN', '/GeFo_Store/admin/'); define('DIR_WS_HTTPS_CATALOG', '/GeFo_Store/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_CATALOG_IMAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'images/'); define('DIR_WS_CATALOG_TEMPLATE', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/templates/'); define('DIR_WS_INCLUDES', 'includes/'); define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/'); define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/'); define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/'); define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/'); define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/'); define('DIR_WS_CATALOG_LANGUAGES', HTTP_CATALOG_SERVER . DIR_WS_CATALOG . 'includes/languages/'); // * 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_ADMIN', '/****/******/www.gefo.ca/public_html/GeFo_Store/admin/'); define('DIR_FS_CATALOG', '/www.gefo.ca/public_html/GeFo_Store/'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_CATALOG_TEMPLATES', DIR_FS_CATALOG . 'includes/templates/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); // define our database connection define('DB_TYPE', 'mysql'); define('DB_PREFIX', ''); define('DB_SERVER', ''); define('DB_SERVER_USERNAME', ''); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', ''); 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', 'none'); define('DIR_FS_SQL_CACHE', '/****/*******/www.gefo.ca/public_html/GeFo_Store/cache'); ?>
4 Feb 2007, 3:16 AM
#4
samad64 avatar

samad64

Totally Zenned

Join Date:
May 2006
Location:
Texas
Posts:
554
Plugin Contributions:
2

Re: warning after moding the admin directory

hm.. nothing stands out to me. what version of zencart is this? reason i ask is because my configure.php file looks very different than this one.. im running 1.3.7

4 Feb 2007, 3:34 AM
#5
webdraon777 avatar

webdraon777

New Zenner

Join Date:
Jan 2007
Posts:
24
Plugin Contributions:
0

Re: warning after moding the admin directory

1.3.7 me too...
I know I looked at it too and can't figure it out myself...
That file was an original from the download before the mods where applied but I used windows Grep2.3 and not much but the mods I did in there was different.
I perticularly look for any inconsistence and could not find any.

See, what I can't quite figure out is that it works fine in the admin area. Just not the store...

Oh well, will look deeper I guess. Gives me a chance to explore even deeper in the backbone of the Zen-Cart...php is new to me...fascinating language!
Thanks for your help and if you can think of something else would be very appreciated. (will monitor this thread closely)

4 Feb 2007, 4:37 AM
#6
webdraon777 avatar

webdraon777

New Zenner

Join Date:
Jan 2007
Posts:
24
Plugin Contributions:
0

Re: warning after moding the admin directory

here is also my index.php file in case someone sees something wrong.

<?php /** * index.php represents the hub of the Zen Cart MVC system * * Overview of flow * <ul> * <li>Load application_top.php - see [{@tutorial](mailto:"{@tutorial") initsystem}</li> * <li>Set main language directory based on $_SESSION['language']</li> * <li>Load all *header_php.php files from includes/modules/pages/PAGE_NAME/</li> * <li>Load html_header.php (this is a common template file)</li> * <li>Load main_template_vars.php (this is a common template file)</li> * <li>Load on_load scripts (page based and site wide)</li> * <li>Load tpl_main_page.php (this is a common template file)</li> * <li>Load application_bottom.php</li> * </ul> * * @package general * @copyright Copyright 2003-2005 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: index.php 2942 2006-02-02 04:41:23Z drbyte $ */ /** * Load common library stuff */ require('includes/application_top.php'); $language_page_directory = DIR_WS_LANGUAGES . $_SESSION['language'] . '/'; $directory_array = $template->get_template_part($code_page_directory, '/^header_php/'); foreach ($directory_array as $value) { /** * We now load header code for a given page. * Page code is stored in includes/modules/pages/PAGE_NAME/directory * 'header_php.php' files in that directory are loaded now. */ require($code_page_directory . '/' . $value); } /** * We now load the html_header.php file. This file contains code that would appear within the HTML <head></head> code * it is overridable on a template and page basis. * In that a custom template can define its own common/html_header.php file */ require($template->get_template_dir('html_header.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/html_header.php'); /** * Define Template Variables picked up from includes/main_template_vars.php unless a file exists in the * includes/pages/{page_name}/directory to overide. Allowing different pages to have different overall * templates. */ require($template->get_template_dir('main_template_vars.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/main_template_vars.php'); /** * Read the "on_load" scripts for the individual page, and from the site-wide template settings * NOTE: on_load_*.js files must contain just the raw code to be inserted in the <body> tag in the on_load="" parameter. * Looking in "/includes/modules/pages" for files named "on_load_*.js" */ $directory_array = $template->get_template_part(DIR_WS_MODULES . 'pages/' . $current_page_base, '/^on_load_/', '.js'); foreach ($directory_array as $value) { $onload_file = DIR_WS_MODULES . 'pages/' . $current_page_base . '/' . $value; $read_contents=''; $lines = @file($onload_file); foreach($lines as $line) { $read_contents .= $line; } $za_onload_array[] = $read_contents; } /** * now read "includes/templates/TEMPLATE/jscript/on_load/on_load_*.js", which would be site-wide settings */ $directory_array=array(); $tpl_dir=$template->get_template_dir('.js', DIR_WS_TEMPLATE, 'jscript/on_load', 'jscript/on_load_'); $directory_array = $template->get_template_part($tpl_dir ,'/^on_load_/', '.js'); foreach ($directory_array as $value) { $onload_file = $tpl_dir . '/' . $value; $read_contents=''; $lines = @file($onload_file); foreach($lines as $line) { $read_contents .= $line; } $za_onload_array[] = $read_contents; } // set $zc_first_field for backwards compatibility with previous version usage of this var if (isset($zc_first_field) && $zc_first_field !='') $za_onload_array[] = $zc_first_field; $zv_onload = ""; if (isset($za_onload_array) && count($za_onload_array)>0) $zv_onload=implode(';',$za_onload_array); //ensure we have just one ';' between each, and at the end $zv_onload = str_replace(';;',';',$zv_onload.';'); // ensure that a blank list is truly blank and thus ignored. if (trim($zv_onload) == ';') $zv_onload=''; /** * Define the template that will govern the overall page layout, can be done on a page by page basis * or using a default template. The default template installed will be a standard 3 column layout. This * template also loads the page body code based on the variable $body_code. */ require($template->get_template_dir('tpl_main_page.php',DIR_WS_TEMPLATE, $current_page_base,'common'). '/tpl_main_page.php'); ?> </html> <?php /** * Load general code run before page closes */ ?> <?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

any help welcomed!

I have tried reloading this index.php, compared it to the one in my store and I can't figure out the difference. Both looks the same.

4 Feb 2007, 4:56 AM
#7
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: warning after moding the admin directory

Are you missing this from your file:
/includes/configure.php

define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/');
4 Feb 2007, 5:12 AM
#8
webdraon777 avatar

webdraon777

New Zenner

Join Date:
Jan 2007
Posts:
24
Plugin Contributions:
0

Re: warning after moding the admin directory

Well look at this, not there!!!
Where can I paste this exactly? or does it matter?

4 Feb 2007, 5:17 AM
#9
webdraon777 avatar

webdraon777

New Zenner

Join Date:
Jan 2007
Posts:
24
Plugin Contributions:
0

Re: warning after moding the admin directory

Just pasted it in my configure.php and it works great.

Thanks a million Ajeh!

Wonder where that part went when I did the secuity changes!!!

4 Feb 2007, 5:26 AM
#10
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: warning after moding the admin directory

Check that you have the right configure.php in the catalog and admin as they are different files ...

You can compare to the
/includes/dist-configure.php
/admin/includes/dist-configure.php

That comes with a clean download of Zen Cart ...

4 Feb 2007, 5:39 AM
#11
webdraon777 avatar

webdraon777

New Zenner

Join Date:
Jan 2007
Posts:
24
Plugin Contributions:
0

Re: warning after moding the admin directory

Thanks again,
Yep! there was mistakes there too.
Made the changes and all looks good.

Very Happy Zenner!

4 Feb 2007, 5:42 AM
#12
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: warning after moding the admin directory

Thanks for the update ... and glad you have your files sorted out correctly ... :smile: