Link to home
Start Free TrialLog in
Avatar of Amanda Watson
Amanda WatsonFlag for Australia

asked on

Problem with loading image into shop?

Hi There,
I am trying to work out an error with a shopping cart.
I didn't write this code so I am not sure what the problem is.
It has worked in the past ok, but now it is throwing an error.

When you try to load a new product and try to load an image it throws this error
Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/home/ca/cam/campsaustraliawide.com/public/www/images/Camps_5.jpg) is not within the allowed path(s): (/home/9-web/97/19/campsaustraliawide.com/:/home/ca/cam/campsaustraliawide.com/:/usr/local/lib/php:/tmp/php_upload) in /home/9-web/97/19/campsaustraliawide.com/public/www/admin/edit_product.php on line 194

Warning: imagecreatefromjpeg() [function.imagecreatefromjpeg]: open_basedir restriction in effect. File(/home/ca/cam/campsaustraliawide.com/public/www/images/Camps_5.jpg) is not within the allowed path(s): (/home/9-web/97/19/campsaustraliawide.com/:/home/ca/cam/campsaustraliawide.com/:/usr/local/lib/php:/tmp/php_upload) in /home/9-web/97/19/campsaustraliawide.com/public/www/images/makethumb.txt on line 36

Warning: imagecreatefromjpeg(/home/ca/cam/campsaustraliawide.com/public/www/images/Camps_5.jpg) [function.imagecreatefromjpeg]: failed to open stream: Operation not permitted in /home/9-web/97/19/campsaustraliawide.com/public/www/images/makethumb.txt on line 36

Warning: imagecreatetruecolor() [function.imagecreatetruecolor]: Invalid image dimensions in /home/9-web/97/19/campsaustraliawide.com/public/www/images/makethumb.txt on line 119

Warning: imagejpeg(): supplied argument is not a valid Image resource in /home/9-web/97/19/campsaustraliawide.com/public/www/images/makethumb.txt on line 129

The edit_product.php is attached as well as the makethumb.txt

I hope someone can help me fix this edit-product.txt
makethumb.txt
Avatar of Ryan Smith
Ryan Smith
Flag of United States of America image

you'll have to attach the config.php and settings.php.

looks like your path is wrong...should be

/home/9-web/97/19/campsaustraliawide.com/public/www

or /home/9-web/97/19/campsaustraliawide.com/public/www/
Avatar of Amanda Watson

ASKER

ok sure one sec
These were both in the admin area...hope its what you were after?
config.txt
settings.inc.txt
SOLUTION
Avatar of SuchetaL
SuchetaL

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you, I will check with their host
ASKER CERTIFIED SOLUTION
Avatar of lenamtl
lenamtl
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi there,
That was exactly the problem lenamtl.

The absolute paths were wrong and the file permissions were wrong.

It took the server a while to figure it all out and I gave them this information from this forum and we got there in the end.

Thanks for your help
Thanks for the info
Looks like the issues are still continuing...the host thinks they havn't changed anything now and they want us to upgrade...I am getting quite cranky!!!

Here is an extension of the problem...
https://www.experts-exchange.com/questions/26522951/Errors-on-shopping-cart.html
Just to add now also, that once the folder permissions were fixed, we can no longer add any products to the site.

It says you are successful in adding it, but then it doesn't add it....

???
Do you use filemanager sometimes for uploading file like xplorer or cpanel or Plesk application?

When we upload a file using ftp it's put a user owner to this file (you can see this information on the chmod page) and this is ok.

So if sometimes you use a filemanager to put file on the server it's put the system owner instead of your user owner. When this happend you have to contact the hosting company and change the file owner.

I don't know if this is your case but it's look like  :)

Again you are spot on  lenamtl, and I tried explaining this to the host, but they told me this wasn't the problem.
I have had to use a workaround to solve it...
It was driving me absolutely CRAZY
Glad to know it's help you :)