Forum Index > FlashYourWeb OS Support > MediaBlock New Topic Post Reply
 ¿failed to open stream?
 |  Printable Version
Anonymous: makero
 July 29 2010 02:29 AM (Read 1349 times)  


Hy

I'm using Apache running in a Mac OS X 10.6 Server.

If copy and paste the URL in my browser everything works fine

http://www.suimpal.com/gallery2/mediaBlock.php?g2_itemId=15&mode=dynamic&g2_view=dynamicalbum.RandomAlbum&limit=11&useThumb=1&column=4&useMicro=40

But if I insert the code in my web page . . .

PHP Formatted Code


<?php
        @readfile('http://www.suimpal.com/gallery2/mediaBlock.php?g2_itemId=15&mode=dynamic&g2_view=dynamicalbum.RandomAlbum&limit=11&useThumb=1&column=4&useMicro=40');
?>

 


It takes a very long time to display the page (abbot 5 minutes) and then i get this error in the apache log

[Thu Jul 29 11:22:25 2010] [error] [client 84.120.136.151] PHP Warning: readfile(http://www.suimpal.com/gallery2/mediaBlock.php?g2_itemId=15&mode=dynamic&g2_view=dynamicalbum.RandomAlbum&limit=11&useThumb=1&column=4&useMicro=40): failed to open stream: Operation timed out in /Library/WebServer/Documents/index.php on line 110

Whitout using "@readfile" and using "readfile" y get this error

[Thu Jul 29 10:59:20 2010] [error] [client 84.120.136.151] PHP Notice: Undefined index: imageblock in /Library/WebServer/Documents/gallery2/mediaBlock.php on line 645

¿Any ideas?

Thanks

makero@14g.org


 
Quote
suprsidr
 July 29 2010 04:46 AM  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

you must have allow_url_fopen set to true in php.ini

-s


There will always be...
 
Profile Email Website
Quote
Anonymous: makero
 July 29 2010 10:02 AM  


Hy

Thanks fot the answer, but "allow_url_fopen = On" all ready in my php.ini

¿Any other idea?

Thanks

makero@14g.org


 
Quote
suprsidr
 July 29 2010 10:54 AM  
Forum Admin
Admin

Status: offline

Registered: 12/20/06
Posts: 1221

Works for me.
Your php is missing something else, but it escapes me right now. I know we had this discussion in these and/or gallery forums before. Some users resorted to using cURL and I also have a mediaBlockIncludes, and a jQueryMediaBlock (which may be too much).

Further reading:
http://www.php.net/manual/en/features.remote-files.php

-s

BTW, the warning about imageblock... make sure the imageblock module is installed in gallery.


There will always be...
 
Profile Email Website
Quote
Content generated in: 0.15 seconds
New Topic Post Reply



 All times are PDT. The time is now 08:38 PM.
Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
HTML Allowed 
Censored Content