Streaming problems!


#1

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.


#2

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


Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#3

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 :frowning:

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??


#4

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

-Scott


#5

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


Save [color=#CC0000]$50[/color] on DreamHost hosting using promo code [color=#CC0000]SAVEMONEY[/color] ( Click for promo code details )