Welcome to Geeklog, Anonymous Thursday, March 28 2024 @ 10:38 am EDT

Geeklog Forums

Problem uploading an image


Status: offline

etolocka

Forum User
Chatty
Registered: 07/19/04
Posts: 60
Hi!

I have a strange problem: when I try to upload an image in a story, I got the following message:

Warning: getimagesize(/tmp/phpNWDN03): failed to open stream: No existe el fichero o el directorio in /home/mundomic/public_html/gl/system/classes/upload.class.php on line 386

Warning: getimagesize(/tmp/phpNWDN03): failed to open stream: No existe el fichero o el directorio in /home/mundomic/public_html/gl/system/classes/upload.class.php on line 386

Warning: chmod(): No existe el fichero o el directorio in /home/mundomic/public_html/gl/system/classes/upload.class.php on line 666

(No existe el fichero o el directorio = File or folder does not exists)

I´m confused because this is a new error, I have uploaded stories the past week without any problem...

Any piece of advice, please?

Regards,
Ernesto.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Ask your hosting service if they upgraded PHP recently and if so, to which version. This sounds suspiciously like the problems with PHP 4.4.1 that have been discussed elsewhere in the forum (and can be fixed by upgrading to 4.4.2).

bye, Dirk
 Quote

Status: offline

dkcollier

Forum User
Newbie
Registered: 04/30/04
Posts: 3
I just check with my hosting provider (Ipowerweb) and they only have 4.4.1. I can't upgrade to 4.4.2 unless I pay for a dedicate service in which I would have to maintain PHP upgrades and any problems. Is there a work around script for the issue?

Dan
http://www.valenciatigers.com
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by dkcollier: Is there a work around script for the issue?

If it's really the problem I'm thinking of, then there's no workaround, as the bug in PHP is preventing the upload.

bye, Dirk
 Quote

Dan Collier

Anonymous
I had my site moved to a new server with PHP 5.1. All my chmod are set correctly. Still having the same problem. Tried to load a 2k gif and it gave the following error.

allowed path(s): (/home/valencia:/usr/local/lib/php:/tmp) in /home/valencia/geeklog-system/system/classes/upload.class.php on line 386

Warning: getimagesize(/var/tmp/phpMPVynk): failed to open stream: Operation not permitted in /home/valencia/geeklog-system/system/classes/upload.class.php on line 386

Warning: getimagesize(): open_basedir restriction in effect. File(/var/tmp/phpMPVynk) is not within the allowed path(s): (/home/valencia:/usr/local/lib/php:/tmp) in /home/valencia/geeklog-system/system/classes/upload.class.php on line 386

Warning: getimagesize(/var/tmp/phpMPVynk): failed to open stream: Operation not permitted in /home/valencia/geeklog-system/system/classes/upload.class.php on line 386

Warning: chmod(): No such file or directory in /home/valencia/geeklog-system/system/classes/upload.class.php on line 666

Warning: Cannot modify header information - headers already sent by (output started at /home/valencia/geeklog-system/system/classes/upload.class.php:386) in /home/valencia/public_html/gallery/lib/lang.php on line 356


Upload of b.gif failed.
Chmod of b.gif to 0644 failed
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The problem here is that your hosting service has set up open_basedir restrictions but the upload directory is not in the list of allowed directories. That's either a misconfiguration or an attempt to prevent uploads. In any case, you will have to talk to your hosting service.

bye, Dirk
 Quote

Status: offline

dkcollier

Forum User
Newbie
Registered: 04/30/04
Posts: 3
Since my last post I have purchased my own hosted dedicated server runing PHP 5.0.4-10.5 I still get an upload error in the same upload class php 386. What should I do next?

------------------------------------------ Error-Message ---------------------------------
Warning: getimagesize(): open_basedir restriction in effect. File(/var/tmp/phpRMg20h) is not within the allowed path(s): (/home/valencia:/usr/local/lib/php:/tmp) in /home/valencia/geeklog-system/system/classes/upload.class.php on line 386

Warning: getimagesize(/var/tmp/phpRMg20h): failed to open stream: Operation not permitted in /home/valencia/geeklog-system/system/classes/upload.class.php on line 386

Warning: getimagesize(): open_basedir restriction in effect. File(/var/tmp/phpRMg20h) is not within the allowed path(s): (/home/valencia:/usr/local/lib/php:/tmp) in /home/valencia/geeklog-system/system/classes/upload.class.php on line 386

Warning: getimagesize(/var/tmp/phpRMg20h): failed to open stream: Operation not permitted in /home/valencia/geeklog-system/system/classes/upload.class.php on line 386

Warning: getimagesize(): open_basedir restriction in effect. File(/var/tmp/phpRMg20h) is not within the allowed path(s): (/home/valencia:/usr/local/lib/php:/tmp) in /home/valencia/geeklog-system/system/classes/upload.class.php on line 386

Warning: getimagesize(/var/tmp/phpRMg20h): failed to open stream: Operation not permitted in /home/valencia/geeklog-system/system/classes/upload.class.php on line 386

Warning: getimagesize(): open_basedir restriction in effect. File(/var/tmp/phpRMg20h) is not within the allowed path(s): (/home/valencia:/usr/local/lib/php:/tmp) in /home/valencia/geeklog-system/system/classes/upload.class.php on line 386

Warning: getimagesize(/var/tmp/phpRMg20h): failed to open stream: Operation not permitted in /home/valencia/geeklog-system/system/classes/upload.class.php on line 386

Warning: chmod(): No such file or directory in /home/valencia/geeklog-system/system/classes/upload.class.php on line 666

Warning: Cannot modify header information - headers already sent by (output started at /home/valencia/geeklog-system/system/classes/upload.class.php:386) in /home/valencia/public_html/gallery/lib/lang.php on line 356
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
The problem is still the same as the last time:
Quote by dkcollier: Warning: getimagesize(): open_basedir restriction in effect. File(/var/tmp/phpRMg20h) is not within the allowed path(s): (/home/valencia:/usr/local/lib/php:/tmp) in /home/valencia/geeklog-system/system/classes/upload.class.php on line 386

After the upload, the image resides in /var/tmp. Due to the open_basedir setup, however, the webserver only has access to directories /home/valencia, /usr/local/lib/php, and /tmp.

So either add /var/tmp to the list of allowed directories or switch off open_basedir entirely. The options for both can be found in your php.ini, to which you should have access now.

bye, Dirk
 Quote

Status: offline

samstone

Forum User
Full Member
Registered: 09/29/02
Posts: 820
It looks like you are using CPanel / WHM server and have the open_basedir restriction turned on. You need to change this by loging into your servers WHM.

Sam
 Quote

All times are EDT. The time is now 10:38 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content