Jump to content

Image Upload Error


Guest

Recommended Posts

When I try to add an image to a product it gives me this error after I select the image to upload:

Upload Image

Fatal error: Call to undefined function: imagecreatefromjpeg() in /home/express/public_html/classes/gd.inc.php on line 47

Anyone know what is causing this?

Thanks

? :rolleyes:

Link to comment
Share on other sites

Guest chantesse

This may or not be relevant as your symptoms are different. But the file in the error message is the same and I assume this erroro has suddenly 'appeared' with you making no changes to your Cubecart code.

I was getting:

Warning: imagejpeg(): open_basedir restriction in effect. File(/home/httpd/vhosts/chantesse.co.uk/httpdocs/wholesale-online-shop/images/uploads/thumbs/thumb_Chao-royalblue.jpg) is not within the allowed path(s): (/customersites/5/home/httpd/vhosts/chantesse.co.uk/httpdocs:/tmp) in /customersites/5/home/httpd/vhosts/chantesse.co.uk/httpdocs/wholesale-online-shop/classes/gd.inc.php on line 155

Warning: imagejpeg(): Invalid filename in /customersites/5/home/httpd/vhosts/chantesse.co.uk/httpdocs/wholesale-online-shop/classes/gd.inc.php on line 155

And it was fixed by the advice below - it's a quick mattter to test this by modding your includes/global.inc.php file.

This issue is due to open_basedir restriction

(which is generally in effect on all Easily servers for security reasons).

This may have not been disabled on your current server initially.

Inorder to correct this issue you need to reference your coding to the absolute

path specified by the error message:

/customersites/5/home/httpd/vhosts/yourdomainname/httpdocs/ (this is

generally the allowed path on the server).

instead of:

/home/httpd/vhosts/yourdomainname/httpdocs

Link to comment
Share on other sites

When I try to add an image to a product it gives me this error after I select the image to upload:

Upload Image

Fatal error: Call to undefined function: imagecreatefromjpeg() in /home/express/public_html/classes/gd.inc.php on line 47

Anyone know what is causing this?

Thanks

Im getting the samex exact error message when trying to upload some but not all photos. Did you get your issue resolved? If so what did you do?

When I try to add an image to a product it gives me this error after I select the image to upload:

Upload Image

Fatal error: Call to undefined function: imagecreatefromjpeg() in /home/express/public_html/classes/gd.inc.php on line 47

Anyone know what is causing this?

Thanks

Im getting the samex exact error message when trying to upload some but not all photos. Did you get your issue resolved? If so what did you do?

I guess I will answer my own question. In the global settings under GD Settings I set the GD at N/A and now my photos upload

Link to comment
Share on other sites

Warning: imagejpeg(): open_basedir restriction in effect. File(/home/httpd/vhosts/chantesse.co.uk/httpdocs/wholesale-online-shop/images/uploads/thumbs/thumb_Chao-royalblue.jpg) is not within the allowed path(s): (/customersites/5/home/httpd/vhosts/chantesse.co.uk/httpdocs:/tmp) in /customersites/5/home/httpd/vhosts/chantesse.co.uk/httpdocs/wholesale-online-shop/classes/gd.inc.php on line 155

Warning: imagejpeg(): Invalid filename in /customersites/5/home/httpd/vhosts/chantesse.co.uk/httpdocs/wholesale-online-shop/classes/gd.inc.php on line 155

The attached file will fix this. Upload it over /classes/gd.inc.php

gd.inc.php

Link to comment
Share on other sites

Guest chantesse

The attached file will fix this. Upload it over /classes/gd.inc.php

Thanks Brooky.

In fact my Hosting Co resolved this by telling me to put:

/customersites/5/home/httpd/vhosts/yourdomainname/httpdocs/

instead of:

/home/httpd/vhosts/yourdomainname/httpdocs

in global.inc.php - this did resolve it.

Presumably, your fix would allow me to go back to relative paths instead of having an absolute one for $glob['rootDir'] ?

Link to comment
Share on other sites

Guest russkin

When I try to add an image to a product it gives me this error after I select the image to upload:

Upload Image

Fatal error: Call to undefined function: imagecreatefromjpeg() in /home/express/public_html/classes/gd.inc.php on line 47

Anyone know what is causing this?

Thanks

I am new at this php thing but reading on the net I found that if you put @ infront ot the line

to make it liike this @$this->img["src"] = ImageCreateFromGIF ($imgfile); it worked for me.

I don't know what the @ sign does, but it worked!!

Link to comment
Share on other sites

  • 2 months later...
Guest AlaskanWeb

The attached file will fix this. Upload it over /classes/gd.inc.php

I uploaded the file and I'm still getting this error.

Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/home2/emeraldm/public_html/shop/images/uploads/0001.jpg) is not within the allowed path(s): (/home2/emeraldm/:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/emeraldm/public_html/shop/admin/filemanager/upload.php on line 104

Does anybody have idea? I'm lost.

Link to comment
Share on other sites

Guest Enterprize

I uploaded file and now can upload images BUT I now get

Warning: fopen() expects parameter 1 to be string, resource given in /home/healthweluk/public_html/classes/gd.inc.php on line 166

Warning: fclose(): supplied argument is not a valid stream resource in /home/healthweluk/public_html/classes/gd.inc.php on line 167

Warning: imagegif(): Unable to open '/home/healthweluk/public_html/images/uploads/thumbs/thumb_0125GB.gif' for writing in /home/healthweluk/public_html/classes/gd.inc.php on line 184

Link to comment
Share on other sites

  • 1 month later...
Guest nhocpleiku

I can't upload image

Error is :

Notice: Undefined index: host in d:\easyphp1-7\www\cubecart_3[1].0.12\upload\classes\db.inc.php on line 49

Notice: Undefined index: HTTPS in d:\easyphp1-7\www\cubecart_3[1].0.12\upload\includes\functions.inc.php on line 50

Notice: Undefined index: HTTPS in d:\easyphp1-7\www\cubecart_3[1].0.12\upload\includes\functions.inc.php on line 54

Notice: Undefined index: HTTPS in d:\easyphp1-7\www\cubecart_3[1].0.12\upload\includes\functions.inc.php on line 50

Anyone know how to fix -------> plz, help me. Thanks

Link to comment
Share on other sites

  • 2 months later...

Fatal error: Call to undefined function: imagecreatefromjpeg() in /home/inge4484/public_html/pop/classes/gd.inc.php on line 47

Anyone know how to fix -------> plz, help me. Thanks */**/*:(

Subir Imagen

Fatal error: Call to undefined function: imagecreatefromgif() in /home/inge4484/public_html/pop/classes/gd.inc.php on line 56

:)

Link to comment
Share on other sites

Guest saint_bl

Please help me>_<

Warning: move_uploaded_file(/home/hosting/s/saintblshop/public_html/shop/images/uploads/yoru.gif): failed to open stream: Permission denied in /home/hosting/s/saintblshop/public_html/shop/admin/filemanager/upload.php on line 104

Warning: move_uploaded_file(): Unable to move '/tmp/phpXhNSYk' to '/home/hosting/s/saintblshop/public_html/shop/images/uploads/yoru.gif' in /home/hosting/s/saintblshop/public_html/shop/admin/filemanager/upload.php on line 104

Link to comment
Share on other sites

  • 3 weeks later...

CCv.3

Got same error...

"Fatal error: Call to undefined function: imagecreatefromjpeg() in /home/deals2yo/public_html/home/classes/gd.inc.php on line 47"

You guys not going to fix this? I'm certainly not going to buy it if it isnt fixed... Whats the point when you cant upload products?

Link to comment
Share on other sites

  • 1 month later...
Guest Just Parts

Hey guys,

This problem happens for me, but only happens when I want to upload a .GIF file.

Gets annoying when you have over 40 gif files :(

Link to comment
Share on other sites

Guest Just Parts

Okay,

For the people interested, I resolved this issue by changing the GD setting to "N/A", the only downside is the fact that you wont get any updated thumbnails on products until the server has been modified to support GD.

Link to comment
Share on other sites

  • 2 weeks later...
Guest kau

Please help me>_<

Warning: move_uploaded_file(/home/hosting/s/saintblshop/public_html/shop/images/uploads/yoru.gif): failed to open stream: Permission denied in /home/hosting/s/saintblshop/public_html/shop/admin/filemanager/upload.php on line 104

Warning: move_uploaded_file(): Unable to move '/tmp/phpXhNSYk' to '/home/hosting/s/saintblshop/public_html/shop/images/uploads/yoru.gif' in /home/hosting/s/saintblshop/public_html/shop/admin/filemanager/upload.php on line 104

I am also haveing the same problem do any one have idea to resolve the problem.

plz. reply

Link to comment
Share on other sites

  • 2 months later...

Please help me>_<

Warning: move_uploaded_file(/home/hosting/s/saintblshop/public_html/shop/images/uploads/yoru.gif): failed to open stream: Permission denied in /home/hosting/s/saintblshop/public_html/shop/admin/filemanager/upload.php on line 104

Warning: move_uploaded_file(): Unable to move '/tmp/phpXhNSYk' to '/home/hosting/s/saintblshop/public_html/shop/images/uploads/yoru.gif' in /home/hosting/s/saintblshop/public_html/shop/admin/filemanager/upload.php on line 104

I am also haveing the same problem do any one have idea to resolve the problem.

plz. reply

My client has emailed me to say that she can no longer upload images to her site which is running v 3.0.15.

She is getting the same message as above.

Warning: move_uploaded_file(/home/druryl/public_html/images/uploads/2007_0727Image0001.JPG) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/druryl/public_html/admin/filemanager/upload.php on line 104

Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpT0Nyup' to '/home/druryl/public_html/images/uploads/2007_0727Image0001.JPG' in /home/druryl/public_html/admin/filemanager/upload.php on line 104

Has anyone come up with a solution for this yet please ?

Link to comment
Share on other sites

This error message is related to directory permissions on the server.

/images/uploads and /images/uploads/thumbs should be writeable - so set them to 777, which will allow PHP to create/write files.

Jason

Link to comment
Share on other sites

This error message is related to directory permissions on the server.

/images/uploads and /images/uploads/thumbs should be writeable - so set them to 777, which will allow PHP to create/write files.

Jason

Thanks

Link to comment
Share on other sites

  • 6 months later...
Guest boudoirbazaar

This error message is related to directory permissions on the server.

/images/uploads and /images/uploads/thumbs should be writeable - so set them to 777, which will allow PHP to create/write files.

Jason

Thanks

Hi there

I have tried all of the options listed above and am getting the same error

Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/hsphere/local/home/boudoirb/boudoirbazaar.com/index/images/uploads/mattresstopper.jpg) is not within the allowed path(s): (/hsphere/local/home/boudoirb:/usr/local/lib/php:/hsphere/shared/apache/libexec:/tmp:/var/tmp) in /var/hsphere/local/home/boudoirb/boudoirbazaar.com/index/admin/filemanager/upload.php on line 104

I have manually uploaded the images and cannot find them still to import into the product pages. Any ideas?? I have also contacted my host and they don't seem to think that the issue is with them. I really want to use cubecart as I ditched OsCommerce for it but surely there must be a patch or something somewhere?????

Link to comment
Share on other sites

  • 3 weeks later...

Was this resolved?

To start, "open_basedir restriction in effect." Your host has set a security measure in place. If not done correctly, it will cause problems.

The partial path:

/hsphere/local/home/boudoirb/boudoirbazaar.com/

is probably what you have specified in your global.inc.php file.

Yet, the location of the file causing the error message returned is something a bit different:

/var/hsphere/local/home/boudoirb/boudoirbazaar.com/

The open_basedir parameters are:

/hsphere/local/home/boudoirb:/usr/local/lib/php:/hsphere/shared/apache/libexec:/tmp:/var/tmp

I am seeing "/var/hsphere/" and "/hsphere/" as both being declared from root. This might be the problem.

In your Server Info page of the Store's Admin, find _SERVER["APPL_PHYSICAL_PATH"] in the PHP variables section. Compare that with the paths above.

Link to comment
Share on other sites

  • 2 weeks later...
Guest boudoirbazaar

Yes thanks - sorry have been a little busy here but the issue was resolved by going back to my host company. It seems something needed to be enabled which was duly done so all happy now.

Cheers

Nicola

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...