DreamHost Web Hosting
Discussion Forum


Forums
   >> General Troubleshooting
*Threaded Mode

Subject streaming problems!  
Posted byMaikelmix (DH Dreamling)
Posted on09/05/06 04:00 AM



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.



Subject Re: streaming problems! new [re: Maikelmix]  
Posted byscjessey (DH Pooh-Bah)
Posted on09/05/06 04:17 AM



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.

--------
Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code SCJESSEY97

Subject Re: streaming problems! new [re: scjessey]  
Posted byMaikelmix (DH Dreamling)
Posted on09/05/06 04:27 AM



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



Subject Re: streaming problems! new [re: Maikelmix]  
Posted bysdayman (DH Smarty Pants)
Posted on09/05/06 05:51 AM



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

-Scott


Subject Re: streaming problems! new [re: Maikelmix]  
Posted byRaz2133 (DH DreamNinja)
Posted on09/05/06 05:57 AM



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

--
Save $50 on DreamHost hosting using promo code SAVEMONEY ( Click for promo code details )


*Threaded Mode
Jump to