streaming problems!

streaming problems!

Posted by: Maikelmix
Posted on: 2006-09-05 04:00:00

I use imagecreatefromjpeg() php function and it return me:

Warning: imagecreatefromjpeg(): URL file-access is disabled in the server configuration in /home/.french/mywebsite/mywebsite/upload_imagenes2.php on line 4

Warning: imagecreatefromjpeg(http://www.test.test/test.jpg): failed to open stream: no suitable wrapper could be found in /home/.french/mywebsite/mywebsite/upload_imagenes2.php on line 4

I need to activate something? or what happens!?

please help me!
thanks.

Re: streaming problems!

Posted by: scjessey
Posted on: 2006-09-05 04:17:00

In reply to:

URL file-access is disabled


That explains everything. You cannot create the JPG with an "http://blah.com/whatever.jpg" address. Use a relative path.

Re: streaming problems!

Posted by: Maikelmix
Posted on: 2006-09-05 04:27:00

i have "same" script using a relative path to upload files from my pc to server and works fine. when i try it using URL not work :(

But my server return me:

"URL file-access is disabled in the server configuration"

Wht say "is disabled"? Can I activate an option so that it works??

Re: streaming problems!

Posted by: sdayman
Posted on: 2006-09-05 05:51:00

You can only enable it by building and installing your own PHP.

-Scott

Re: streaming problems!

Posted by: Raz2133
Posted on: 2006-09-05 05:57:00

In reply to:

Wht say "is disabled"? Can I activate an option so that it works??


I believe your problem stems from the fact that, for security reasons, DreamHost has disabled allow_url_fopen in their default PHP install.

You have a number of options to overcome this limitation. Firstly, you can rewrite your script to use CURL instead of fopen.

http://www.wiki.dreamhost.com/index.php/CURL

Or, if you are feeling adventureous, you can compile and install your own local copy of PHP and change the options to suit.

http://www.wiki.dreamhost.com/index.php/Installing_PHP5

A third option is to simply copy the existing PHP executable and ini file from the DreamHost install to a local directory and make any changes needed.

http://www.wiki.dreamhost.com/index.php/PHP.ini

Mark

Tags: mywebsitephp functionuploadfile accesshttpserver configurationopen streamjpgwww testurlhelp