coppermine-gallery.com/forum

Support => Older/other versions => cpg1.3.x Support => Topic started by: zoombago on June 20, 2005, 08:14:25 PM

Title: Problem with batch and URI/URL uploads
Post by: zoombago on June 20, 2005, 08:14:25 PM
For some reason I can't get any sort of folder selection to come up for the batch upload.  ???

When I try URL/URI I get:

Warning: fopen(): URL file-access is disabled in the server configuration in yadayada/pics/upload.php on line 1628

Warning: fopen(http://www.blahblah.net/PICT4810.JPG): failed to open stream: no suitable wrapper could be found in yadayada/pics/upload.php on line 1628

(I have changed a couple paths, just for my privacy.  ;))

Anyways, I was wondering if there's anything I can do to fix this. I need one or the other as doing it through the interface otherwise is too clumsy.

My host is Dreamhost if it makes a difference.
Title: Re: Problem with batch and URI/URL uploads
Post by: kegobeer on June 20, 2005, 08:59:32 PM
http://www.webmasterworld.com/forum88/6253.htm

You should talk to your host about that error message.
Title: Re: Problem with batch and URI/URL uploads
Post by: zoombago on June 20, 2005, 09:14:43 PM
Looks like they have it disabled, and likely won't enable it.

http://wiki.dreamhost.com/index.php/Allow_url_fopen

Is there a workaround for it? Could this be affecting my batch upload that's also not working?
Title: Re: Problem with batch and URI/URL uploads
Post by: zoombago on June 20, 2005, 09:33:59 PM
Okay, they got back to me, said I have to use Curl. How can I use it? I've really got no idea.  :-\\
Title: Re: Problem with batch and URI/URL uploads
Post by: kegobeer on June 20, 2005, 09:43:55 PM
I guess you'd have to wrap the fopen inside curl_init, something like this:

$ch = curl_init("http://www.example.com/");
$fp = fopen("example_homepage.txt", "w");

curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);

curl_exec($ch);
curl_close($ch);
fclose($fp);


That code is right from the php website.  I've never used curl so I don't know exactly what changes would be needed.  Perhaps one of the other devs has experience with curl.  If not, you may have to find another script that doesn't use fopen, or you'll have to find another host more Coppermine friendly.
Title: Re: Problem with batch and URI/URL uploads
Post by: zoombago on June 20, 2005, 09:59:46 PM
Alrightty, think I'll wait for someone to confirm what I should do.

In the meantime, I was uploading a 10mb video clip to my site and it timed out right away (didn't even transfer after the first 0.5mb). I don't think it's my connection as a 3mb file uploaded just fine.

Maybe some sort of setting?
Title: Re: Problem with batch and URI/URL uploads
Post by: Nibbler on June 20, 2005, 10:05:32 PM
Here's a version specially modified to use curl, see if it works.
Title: Re: Problem with batch and URI/URL uploads
Post by: zoombago on June 20, 2005, 10:54:27 PM
Yes! There we go.  ;D
Title: Re: Problem with batch and URI/URL uploads
Post by: markmaior on June 30, 2005, 08:07:28 PM
Quote from: Nibbler on June 20, 2005, 10:05:32 PM
Here's a version specially modified to use curl, see if it works.

Hi..I've just downloaded the file and I've uploaded it on my server but when I try to upload a picture I receive this message:

Fatal error: Call to undefined function: curl_init() in /cpg133/upload.php on line 1631

What does it mean???
Title: Re: Problem with batch and URI/URL uploads
Post by: Nibbler on June 30, 2005, 08:08:27 PM
It means the server doesn't support curl.
Title: Re: Problem with batch and URI/URL uploads
Post by: markmaior on June 30, 2005, 08:17:27 PM
Ok...thanks for your quick answer. There is another way to fix this error??
Title: Re: Problem with batch and URI/URL uploads
Post by: Nibbler on June 30, 2005, 08:28:11 PM
Get a better webhost.
Title: Re: Problem with batch and URI/URL uploads
Post by: markmaior on June 30, 2005, 08:30:49 PM
yeah...it's just what I'm thinking about eheh...  :)