Zen Cart Logo
Forums / Installing on a Windows Server / Image handler error on local install

Image handler error on local install

Locked

Views: 10,214

Results 1 to 20 of 24
This thread is locked. New replies are disabled.
12 Jan 2008, 19:14
#1
rebekah avatar

rebekah

Zen Follower

Join Date:
Mar 2006
Posts:
183
Plugin Contributions:
0

Image handler error on local install

I'm really trying to get a handle on this local developing before uploading to live stuff.

I'm using WAMP. I am able to install fresh and get into Admin or view the local shop.

But, now I've downloaded my files from my internet (test) shop (not live yet) to my computer and I get this error when trying to login to admin. The page doesn't show the login screen it shows this error:

Warning: require_once(/http://192.168.1.106/shop/includes/extra_configures/bmz_image_handler_conf.php) [function.require-once]: failed to open stream: Invalid argument in C:\wamp\www\shop\admin\includes\extra_configures\bmz_image_handler_conf.php on line 12

Fatal error: require_once() [function.require]: Failed opening required '/http://192.168.1.106/shop/includes/extra_configures/bmz_image_handler_conf.php' (include_path='.;C:\php5\pear') in C:\wamp\www\shop\admin\includes\extra_configures\bmz_image_handler_conf.php on line 12

I cannot figure out what to do now. I'm not sure where else to check. Here's the content of the bmz_image_handler_conf.php file:

<?php /** * bmz_image_handler_conf.php * call to include IH2 configures from catalog * * @author Tim Kroeger <[email protected]> * @copyright Copyright 2005-2006 breakmyzencart.com * @license <http://www.gnu.org/licenses/gpl.txt> GNU General Public License V2.0 * @version $Id: bmz_image_handler_conf.php,v 1.2 2006/04/11 22:00:55 tim Exp $ */ require_once(DIR_FS_CATALOG . DIR_WS_INCLUDES . 'extra_configures/bmz_image_handler_conf.php'); Thanks for any help here. Rebekah
12 Jan 2008, 20:08
#2
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

Re: Image handler error on local install

I am seeing an extra space in this code:

 C:\wamp\www\shop\admin\includes\extra_configures\b  mz_image_handler_conf.php on line 12

between the b mz_image_hadler

Is there a space in the name of the file itself:

b mz_image_handler_conf.php

??

12 Jan 2008, 20:36
#3
rebekah avatar

rebekah

Zen Follower

Join Date:
Mar 2006
Posts:
183
Plugin Contributions:
0

Re: Image handler error on local install

Oooh! That must have been my mistake somehow. I checked it and there is no extra space.

Question...

Is it supposed to have that slash at the beginning of '/http://192.168.1.106/shop/includes/extra_configures/bmz_image_handler_conf.php' ? If not, do you know where I fix it?

And I also notice in that error it says, "(include_path='.;C:\php5\pear')"

I don't have that folder structure. I have this:

C:\wamp\bin\php\php5.2.5\PEAR

Thanks for your help,
Rebekah

12 Jan 2008, 22:24
#4
tophand avatar

tophand

Totally Zenned

Join Date:
Jan 2007
Location:
1.5 miles from Home
Posts:
674
Plugin Contributions:
0

Re: Image handler error on local install

rebekah:

<?php /** * bmz_image_handler_conf.php * call to include IH2 configures from catalog * * @author Tim Kroeger <[email protected]> * @copyright Copyright 2005-2006 breakmyzencart.com * @license <http://www.gnu.org/licenses/gpl.txt> GNU General Public License V2.0 * @version $Id: bmz_image_handler_conf.php,v 1.2 2006/04/11 22:00:55 tim Exp $ */ require_once(DIR_FS_CATALOG . DIR_WS_INCLUDES . 'extra_configures/bmz_image_handler_conf.php'); Thanks for any help here. Rebekah

It is telling you that bmz_image_handler_conf.php is missing or the file is corrupt.

/shop/includes/extra_configures/bmz_image_handler_conf.php

The first line in the warning is the problem file.

M

12 Jan 2008, 22:49
#5
rebekah avatar

rebekah

Zen Follower

Join Date:
Mar 2006
Posts:
183
Plugin Contributions:
0

Re: Image handler error on local install

Well, I now have noticed that when using Filezilla to download the files from the shop/includes/extra_configures/ folder on the internet server it doesn't seem to be downloading properly because the file sized listed are way different. Is there something better to use than Filezilla? Which FTP program is best to use for ZC?

Thanks for trying to help. I'm going to try downloading the files differently and see if that helps.

12 Jan 2008, 22:51
#6
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

Re: Image handler error on local install

And I also notice in that error it says, "(include_path='.;C:\php5\pear')"

I don't have that folder structure. I have this:

C:\wamp\bin\php\php5.2.5\PEAR

Not too sure, but I think this might be in you php.ini file. I would look in that file to make sure that the path is specified correctly. Do a search for "pear", because php.ini is a fairly long file to scan by eye.

This may not solve the image handler problem, but it is obviously an error worth looking into.

The image handler problem may be solved by re-uploading every file making sure the file structer is matching exactly. I had something like the same error and found that it was because I misplaced one of the many files during the upload process.

12 Jan 2008, 22:54
#7
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

Re: Image handler error on local install

I found the most recent version of FileZilla to have more bugs than a previous version, so I went back to version 2.2.28 which works pretty damn good, I really like it. From what I've heard most FTP programs aren't exactly foolproof and occasionally produce an error here or there, but for the most part they work pretty great. I used to use WS_FTP and that seemed to work well, but that was way back in the day.

12 Jan 2008, 23:08
#8
rebekah avatar

rebekah

Zen Follower

Join Date:
Mar 2006
Posts:
183
Plugin Contributions:
0

Re: Image handler error on local install

Thanks Rainthebat. I've got Filezilla 2.2.32. I tried the latest ver. too and didn't like it so I went back. Maybe I need to go back just a bit further. Guess I'll try to find 2.2.28.

I think I'll just try redownloading the whole enchilada (from the internet) again and start from there again. Maybe it's just file corruption from using Filezilla. Thanks for your replies.

13 Jan 2008, 01:11
#9
rebekah avatar

rebekah

Zen Follower

Join Date:
Mar 2006
Posts:
183
Plugin Contributions:
0

Re: Image handler error on local install

Well, this is a bit on the frustrating side. :/

I installed Filezilla ver. 2.2.28. (Uninstalled the other version first)

I redownloaded all the "shop" folder from my internet server

I reconfigured the two config files in includes/ and admin/includes (hopefully pointing them to the correct location. I'm using WAMP and since I want my husband to see the cart from his laptop on our home network so I'm using my computer's IP address 192.168.1.106.)

I try to login to my newly configured shop and get...the SAME error as before:

Warning: require_once(/C:/wamp/www/shop/includes/extra_configures/bmz_image_handler_conf.php) [function.require-once]: failed to open stream: Invalid argument in C:\wamp\www\shop\admin\includes\extra_configures\bmz_image_handler_conf.php on line 12

Fatal error: require_once() [function.require]: Failed opening required '/C:/wamp/www/shop/includes/extra_configures/bmz_image_handler_conf.php' (include_path='.;C:\php5\pear') in C:\wamp\www\shop\admin\includes\extra_configures\bmz_image_handler_conf.php on line 12

If I open bmz_image_handler_conf.php in Crimson Editor there was an extra line (13) with nothing in it. I backspaced once to remove that line. Didn't help.

I notice there's nothing on line 11 at all. I backspace that line so line 12 is now line 11. It just gave me the same error but said "line 11" instead of "line 12." So I put the extra line back in there like it was originally. Back to square one with the error again.

In Crimson Editor if I highlight line 12 and click on Tools | Evaluate Line is puts a message on line 13 that says: "error(3): function not defined" Not sure if that means anything. (I deleted that line 13 error message back off of there.)

Sorry to be so long-posted. One more thing, this sounds stupid but I can't locate a file called php.ini. Is it actually called something else? (I did use the Windows search.)

Thanks again. Not sure what to do next.

13 Jan 2008, 03:04
#10
rebekah avatar

rebekah

Zen Follower

Join Date:
Mar 2006
Posts:
183
Plugin Contributions:
0

Re: Image handler error on local install

Partial success! You notice where it has an extra slash at the beginning of (/C:/wamp/www/shop/includes/extra_configures/bmz_image_handler_conf.php)

Well, I found in the two configure.php files that the "COMPLETE path to your Zen Cart files" had a slash before the C:/etc. so I took a chance and removed that from both files. Yea. That did something. I then got to a page that said the database wasn't connected (0 DB_ERROR_NOT_CONNECTED) so then I did notice that the db username on my local install was different from the online install. I went and changed the username in the config files. Yea again.

Now I see the admin login screen BUT I can't login. Phooey. Is there somewhere in the config files that tells my admin username and password?

Thanks again. I know this is supposed to be a lot easier than this, right?

: )

13 Jan 2008, 03:10
#11
rebekah avatar

rebekah

Zen Follower

Join Date:
Mar 2006
Posts:
183
Plugin Contributions:
0

Re: Image handler error on local install

Ooooh! Now I noticed that I can't see my local shop either. I'm going to http://192.168.1.106/shop/

http://192.168.1.106/shop/admin is where I do see the login screen but can't login so far. Keeps telling me wrong username or password.

13 Jan 2008, 03:48
#12
rebekah avatar

rebekah

Zen Follower

Join Date:
Mar 2006
Posts:
183
Plugin Contributions:
0

Re: Image handler error on local install

Well, I saved my two configure files and then pasted the backup copy of the shop folder over the first one, replaced the config files and now I was able to login to the Admin. But I stll can't see the shop.

From the Admin I click on the "Online Catalog" button in the upper right corner and it takes me here: http://192.168.1.106/shop/index.php?main_page= but no shop.

I imagine it's something in the config files so I'll probably poke around there next.

13 Jan 2008, 05:53
#13
rebekah avatar

rebekah

Zen Follower

Join Date:
Mar 2006
Posts:
183
Plugin Contributions:
0

Re: Image handler error on local install

Well, I've been messing with this for hours. I feel so close! I can login to Admin but I still can't get the shop to show. I hope it's okay to post my config files (without username and password, of course). Maybe someone can see where I'm making a mistake. I hope!


C:\wamp\www\shop\includes\configure.php

<?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 "admin" version of configure.php. ***********/ /*************** The 2 files should be kept separate and not used to overwrite each other. ***********/ // 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://192.168.1.106'); define('HTTPS_SERVER', 'http://localhost'); // Use secure webserver for checkout procedure? define('ENABLE_SSL', 'true'); // 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', '/shop/'); define('DIR_WS_HTTPS_CATALOG', '/shop/'); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_INCLUDES', 'includes/'); 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_DOWNLOAD_PUBLIC', DIR_WS_CATALOG . 'pub/'); define('DIR_WS_TEMPLATES', DIR_WS_INCLUDES . 'templates/'); define('DIR_WS_PHPBB', '/'); // * 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', 'c:/wamp/www/shop/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); define('DIR_WS_UPLOADS', DIR_WS_IMAGES . 'uploads/'); define('DIR_FS_UPLOADS', DIR_FS_CATALOG . DIR_WS_UPLOADS); define('DIR_FS_EMAIL_TEMPLATES', DIR_FS_CATALOG . 'email/'); // define our database connection define('DB_TYPE', 'mysql'); define('DB_PREFIX', ''); define('DB_SERVER', 'localhost'); define('DB_SERVER_USERNAME', 'username'); define('DB_SERVER_PASSWORD', 'password'); define('DB_DATABASE', 'database_name'); 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', '/C:/wamp/www/shop/cache'); ?>

C:\wamp\www\shop\admin\includes\configure.php

<?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://192.168.1.106'); define('HTTPS_SERVER', 'https://localhost'); define('HTTP_CATALOG_SERVER', 'http://192.168.1.106'); define('HTTPS_CATALOG_SERVER', 'https://localhost'); // 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', '/shop/admin/'); define('DIR_WS_CATALOG', '/shop/'); define('DIR_WS_HTTPS_ADMIN', '/shop/admin/'); define('DIR_WS_HTTPS_CATALOG', '/shop/'); 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', 'C:/wamp/www/shop/admin/'); define('DIR_FS_CATALOG', 'C:/wamp/www/shop/'); 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', 'localhost'); define('DB_SERVER_USERNAME', 'username'); define('DB_SERVER_PASSWORD', 'password'); define('DB_DATABASE', 'database_name'); 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', '/C:/wamp/www/shop/cache'); ?>

Anybody see what's wrong here?

Thank you for any help,
Rebekah

13 Jan 2008, 07:00
#14
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Image handler error on local install

If you don't have SSL cert installed on localhost, first configure.php file should read

define('HTTP_SERVER', 'http://localhost');
  define('HTTPS_SERVER', 'https://localhost');
  // Use secure webserver for checkout procedure?
  define('ENABLE_SSL', 'false');

am also assuming, for security reasons, you have
not entered here on forums, correct settings for both files at

define('DB_SERVER_USERNAME', 'username');
define('DB_SERVER_PASSWORD', 'password');
define('DB_DATABASE', 'database_name');
13 Jan 2008, 07:35
#15
rebekah avatar

rebekah

Zen Follower

Join Date:
Mar 2006
Posts:
183
Plugin Contributions:
0

Re: Image handler error on local install

I did notice one ENABLE_SSL said "false" and one said "true". I just downloaded it from the internet server like that.

I'll change the one to false and see what happens. Would that make the shop not show? Hmm.

Yes, I took out my username, password, and database name on purpose for security. You're correct.

Thanks for your reply,
Rebekah

13 Jan 2008, 07:38
#16
rebekah avatar

rebekah

Zen Follower

Join Date:
Mar 2006
Posts:
183
Plugin Contributions:
0

Re: Image handler error on local install

Well, changed it to "false" and that didn't help. Still no shop.

Thanks again anyway. Anybody else see anything I can try?

Rebekah

13 Jan 2008, 07:42
#17
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Image handler error on local install

define('HTTP_SERVER', 'http://192.168.1.106');
define('HTTPS_SERVER', 'http://localhost');
Not correct
define('HTTP_SERVER', 'http://localhost');
define('HTTPS_SERVER', 'https://localhost');
is CORRECT

13 Jan 2008, 14:48
#18
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Re: Image handler error on local install

Look at the php requirements for IH2 as I suspect that the WAMP does not have these installed or enabled - the image stuff libraries

13 Jan 2008, 17:38
#19
rebekah avatar

rebekah

Zen Follower

Join Date:
Mar 2006
Posts:
183
Plugin Contributions:
0

Re: Image handler error on local install

Thanks for the reply, Misty. I was using my own computer's IP in hopes that my husband can see the catalog from his laptop. I am able to login to the Admin area from a different computer on our home network using: http://192.168.1.106/shop/admin/ but http://192.168.1.106/shop/ just brings up "page cannot be displayed".

Kobra,

I'll look into this but I'm not sure where to start. Would that make the catalog not display the page at all? I'm not having the ImageHandler error anymore. I can see the admin login page and login fine now.

Thanks,
Rebekah

13 Jan 2008, 17:43
#20
rainthebat avatar

rainthebat

Zen Follower

Join Date:
Feb 2007
Posts:
314
Plugin Contributions:
0

Re: Image handler error on local install

Sorry to be so long-posted. One more thing, this sounds stupid but I can't locate a file called php.ini. Is it actually called something else? (I did use the Windows search.)

I personally don't use wamp, I've got Php, mysql and apache installed to view my page locally, so I don't know how it installs PHP. If it installs PHP as a seperate program, php.ini will be located in the php folder - probably under c:/program files/php or php5 or something like that.

Wamp may have some sort of link to php.ini, if their help file has a search, you might look for the word php or something.