Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Unable to create 'images/image.jpg'.


Marion

Recommended Posts

Hi guys, I realise this has been asked and answered before but I still cannot figure it out: I cannot upload images!

 

All my permissions are rwxrwxrwx.

 

This is the error message that I get:

 

Warning: Unable to create 'images/10369s.jpg': Permission denied in E:\Clients\ev-familien-bildungsstaette.de\www\friedberg\shop\admin\includes\classes\upload.php on line 94

 

Warning: Unable to move 'e:\temp\php7068.tmp' to 'images/10369s.jpg' in E:\Clients\ev-familien-bildungsstaette.de\www\friedberg\shop\admin\includes\classes\upload.php on line 94

Error: File upload not saved.

 

Thanks a lot!

 

Marin

Link to comment
Share on other sites

Thanks Matti!

 

Did you see that in my admin --> server info? I saw there that file_uploads is set to 1.

I assumed 0 = off and 1 = on. What should it be to be on?

 

Is this something that I can change somewhere through osCommerce or do I need to ask the hosting company to switch that on?

 

Thanks for helping!

Marion

Link to comment
Share on other sites

1 is correct. I suspect that your problem is that your host has the images directory set such that you can't write to it. Ask them to change the permissions for the IUSR for your site so that it can write to the images file. Given your file system path, I take it that you are on MS Windows, which doesn't have chmod permissions.

 

Hth,

Matt

Link to comment
Share on other sites

Hi again, Matti and whoever is kind enough to read this, still no luck with image upload :-(

What happened in the meantime:

I have access to a configuration panel at my hosting company. There, I set write priviledges for a bunch of folders (shop/images and also admin/includes/classes).

But I still get the same error message as in my original post. I have sent an email to my hosting company on the 29th, but have received no answer. I am totally stuck.

 

BTW, here are lines 94 and 95 of the file "upload.php" mentioned in the error message:

      if (move_uploaded_file($this->file['tmp_name'], $this->destination . $this->filename)) {

        chmod($this->destination . $this->filename, $this->permissions);

 

Does anyone have any more ideas/suggestions? PLEASE?

 

Thanks

Marion

Link to comment
Share on other sites

Is your host virtual or dedicated? If virtual it looks like a path is wrong doesn't it?

 

Warning: Unable to create 'images/10369s.jpg': Permission denied in E:\Clients\ev-familien-bildungsstaette.de\www\friedberg\shop\admin\includes\classes\upload.php on line 94

 

Shouldnt this look more like this

 

Warning: Unable to create 'images/10369s.jpg': Permission denied in www\friedberg\shop\admin\includes\classes\upload.php on line 94

 

Or is thats just cause its the actual full server error.

 

Not really sure just thought I would jump in...by the way my images folder is chmod to 644 thats all that worked right for me.

The Wiki Docs: Read them, live them and be thankful for them!

Link to comment
Share on other sites

Hi Frank, and thanks for having a look!

 

My host ist virtual. I think the path is correct. The "E:\Clients\ev-familien-bildungsstaette.de\"-part must have been added by the server. When I ftp to the site, I see everything from the www folder in my root directory...

 

sigh ... I wrote another email to my provider but if they cannot help and nobody here has any idea what the solution could be, I'll just have to abandon OScommerce, although I was so impressed with it and with this whole idea of open source software. OScommerce looks so professional and has so many great features! And that's because many people all around the world help write it and improve it, which is a wonderful philosophy. But I cannot get past this point .. and I am not a complete newbie, I wrote sites in Cold Fusion before, but of course they weren't that complex...

 

Anyhow ... thanks for "jumping in", Frank!

Cheers

Marion

Link to comment
Share on other sites

Marion,

 

I forgot to ask you was this script preinstalled by your host? I had a problem with mine that was part of the hosting package. The problem for me was... 1) they had the preview release 2.1 version installed and it had many errors. 2) My host's presintalled script was consider "system" files by my host so I could not change permissions and stuff. I could not even see them properly in ftp.

 

Post your configure.php from catalog/includes. Make sure Not to post any password/user names in the file.

 

Dont give up! Osc rocks!

The Wiki Docs: Read them, live them and be thankful for them!

Link to comment
Share on other sites

Hey again,

 

I installed the script myself. I installed version 2.2ms2. My host was and is very helpful, but they don't know OScommerce. They just wrote back that they have now set the write permissions on the images folder manually, because their web-interface could not deal with my setup (my FTP root directory is one level higher than usually). But nevertheless, the image upload does not work. Perhaps it is not the write permissions in the images directory but something to do with that file called "upload.php" ?? Should I perhaps ask them to also set write permissions on the directory in which that file is located?

 

And here is my catalog/include/configure.php file without the database connection info. "Shop" is the directory that is usually called "catalog". I renamed it for some reason that is now completely oblivious to me, but it made sense to me at the time...

 

 

<?php

/*

  $Id: configure.php,v 1.14 2003/07/09 01:15:48 hpdl Exp $

 

  osCommerce, Open Source E-Commerce Solutions

  http://www.oscommerce.com

 

  Copyright © 2003 osCommerce

 

  Released under the GNU General Public License

*/

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

  define('HTTP_SERVER', 'http://www.ev-familien-bildungsstaette.de/friedberg/shop/'); // eg, http://localhost - should not be empty for productive servers

  define('HTTPS_SERVER', 'https://www.ev-familien-bildungsstaette.de/friedberg/shop/'); // eg, https://localhost - should not be empty for productive servers

  define('ENABLE_SSL', false); // secure webserver for checkout procedure?

  define('HTTP_COOKIE_DOMAIN', '');

  define('HTTPS_COOKIE_DOMAIN', '');

  define('HTTP_COOKIE_PATH', '');

  define('HTTPS_COOKIE_PATH', '');

  define('DIR_WS_HTTP_CATALOG', '');

  define('DIR_WS_HTTPS_CATALOG', '');

  define('DIR_WS_IMAGES', 'images/');

  define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

  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_DOWNLOAD_PUBLIC', 'pub/');

  define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));

  define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

  define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

Link to comment
Share on other sites

I think that may be some problems. The domain name is yours correct? Here is my configure.php look at the difference. Note..mine is shared ssl and osc is installed in the default catalog/ on my domain. You have no http_catalog path or cookie path etc... and your http server and https are wrong but I think they may still work that way I forget...Matt you know that answer?

 

<?php

/*

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright © 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://www.trendyfashionsale.com'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://st01.startlogic.com/~trendyfa'); // eg, https://st01.startlogic/~trendyfa - should not be empty for productive servers

define('ENABLE_SSL', true); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'www.trendyfashionsale.com');

define('HTTPS_COOKIE_DOMAIN', 'st01.startlogic.com/~trendyfa');

define('HTTP_COOKIE_PATH', '/catalog/');

define('HTTPS_COOKIE_PATH', '/catalog/');

define('DIR_WS_HTTP_CATALOG', '/catalog/');

define('DIR_WS_HTTPS_CATALOG', '/catalog/');

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

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_DOWNLOAD_PUBLIC', 'pub/');

define('DIR_FS_CATALOG', '/home/trendyfa/public_html/catalog/');

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

The Wiki Docs: Read them, live them and be thankful for them!

Link to comment
Share on other sites

Hi again,

hm. You think the paths are wrong, ey? Maybe, but I did a lot of trial-and-error and this is what worked. OSC is not im my root directory, but quite far down, therefore, I had to define the path that way. Just the root didn't work, I got a CGI error then. Things work so far, just not the image uplodad. My original script also was like yours:

define('DIR_WS_HTTP_CATALOG', '/catalog/');

but then, I got a CGI error when I clicked on a category in the public catalog area of osc... I think that I do have a catalog path, it is just that it is empty because it is the same path as the htttp server. ...

I dunno if that makes sense, I am so glad I got someone's attention but not sure how much sense I make right now, given my intake of alcoholic beverages... I'll digest your configure.php file some more sooon!

Thanks so much, cheers

Marion

Link to comment
Share on other sites

Yeah I think yor config is way off. Please remember I am no guru at php or osc...just started a few weeks ago. I take it your in germany...ahhh drinking the good beer and spirts! I have family over there.

 

So your store is in friedberg/shop/ folder right? I think it should be like this then...

 

<?php

/*

$Id: configure.php,v 1.14 2003/07/09 01:15:48 hpdl Exp $

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

 

Copyright ? 2003 osCommerce

 

Released under the GNU General Public License

*/

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

define('HTTP_SERVER', 'http://www.ev-familien-bildungsstaette.de'); // eg, http://localhost - should not be empty for productive servers

define('HTTPS_SERVER', 'https://www.ev-familien-bildungsstaette.de'); // eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL', false); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', 'www.ev-familien-bildungsstaette.de');

define('HTTPS_COOKIE_DOMAIN', 'www.ev-familien-bildungsstaette.de');

define('HTTP_COOKIE_PATH', '/friedberg/shop/');

define('HTTPS_COOKIE_PATH', '/friedberg/shop/');

define('DIR_WS_HTTP_CATALOG', '/friedberg/shop/');

define('DIR_WS_HTTPS_CATALOG', '/friedberg/shop');

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

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_DOWNLOAD_PUBLIC', 'pub/');

define('DIR_FS_CATALOG', '/????/????/www????/friedburg/shop/'); <!--NOT sure why you had that old line CONFIG TO YOUR SERVER SETUP --->

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

 

I think that is right except the DIR_FS_CATALOG..I dont know your server setup.

The Wiki Docs: Read them, live them and be thankful for them!

Link to comment
Share on other sites

Hello again, Frank, and thanks for the modified config file. It certainly looks better and works, as far as I can tell.

However, the image upload still doesn't work, but for that, the admin/includes/configure.php file is responsible and that is still wonky. The way I have it is the only way the admin area works at all for me (apart from the image upload and probably some other things which I haven't discovered yet). If I take "friedberg/shop" out of the HTTP_SERVER definition and place it further down in DIR_WS_CATALOG, I get a CGI error when I click on any link in the admin panel (something about misbehaving cgi application) ... the path is just wrong somewhere. If I call a page directly, skipping the admin index.php file and I go to modify an item in the catalog, I get error messages like "destination does not exist" and "Catalog images directory does not exist: /friedberg/shop/images/". The configure.php file you see below is the one that works the furthest... I can do lots of things in the shop, but not upload images.

 

I also tried modifying the definition for DIR_FS_DOCUMENT_ROOT ... but I probably put something wrong in there, because it didn't make a difference.

 

I'd appreciate if you had a look at the configure file below and tell me what you would change. Perhaps, hopefully, there is something I am missing.

 

Yes, I am in Germany and the beer is great, but at the moment, we drink mostly mulled wine. Whereabouts is your family located?

 

Cheers

Marion

 

// define our webserver variables

// FS = Filesystem (physical)

// WS = Webserver (virtual)

  define('HTTP_SERVER', 'http://www.ev-familien-bildungsstaette.de/friedberg/shop'); // eg, http://localhost or - https://localhost should not be NULL for productive servers

  define('HTTP_CATALOG_SERVER', 'http://www.ev-familien-bildungsstaette.de');

  define('HTTPS_CATALOG_SERVER', 'https://www.ev-familien-bildungsstaette.de');

  define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module

  define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)

  define('DIR_WS_ADMIN', '/admin/');

  define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN);

  define('DIR_WS_CATALOG', '');

  define('DIR_FS_CATALOG', '');

  define('DIR_WS_IMAGES', 'images/');

  define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

  define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');

  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', DIR_WS_CATALOG . 'includes/languages/');

  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_BACKUP', DIR_FS_ADMIN . 'backups/');

Link to comment
Share on other sites

Hello everyone,

 

just an update on my upload image situation:

 

I never did find a solution. I think it was my complicated setup perhaps paired with the fact that I was on a windows system.

 

I changed hosts and looked for one with an apache server. Here, everything worked like a charm and right away. I am so happy, I just thought I'd share it with anyone who has the same problem and cannot find a solution.

 

Cheers

Marion

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...