controller.php

Permalink Browser Info Environment
this add on is neat, but i had this error generated:


Warning: getimagesize() [function.getimagesize]: URL file-access is disabled in the server configuration in /home/mysite/domains/mysite.com/public_html/packages/cu3er/blocks/cu3er/controller.php on line 148

Warning: getimagesize(http://www.mysite.com/files/9812/7923/4009/ft_seo4.png) [function.getimagesize]: failed to open stream: no suitable wrapper could be found in /home/mysite/domains/mysite.com/public_html/packages/cu3er/blocks/cu3er/controller.php on line 148

Warning: getimagesize() [function.getimagesize]: URL file-access is disabled in the server configuration in /home/mysite/domains/mysite.com/public_html/packages/cu3er/blocks/cu3er/controller.php on line 148

Warning: getimagesize(http://www.mysite.com/files/2812/7923/4206/ft_seo3.png) [function.getimagesize]: failed to open stream: no suitable wrapper could be found in /home/mysite/domains/mysite.com/public_html/packages/cu3er/blocks/cu3er/controll

Please advice.

Type: Discussion
Status: New
astrosurge
View Replies:
mario replied on at Permalink Reply
mario
I think it means exactly what it says. It's not allowed to access the file it needs in that place. Try changing your files permissions on the cu3er folder to either 775 or 777 (it's better not to have it set to 777 if you can help it). Make sure to recurse the permissions into all files and folders under it.
jb1 replied on at Permalink Reply
jb1
Hi,
It sounds like a server configuration. Please take a look at this article:
http://www.learnphponline.com/errors/url-file-access-is-disabled-in...

It could be the use of absolute paths for the individual images that make up the slideshow. I was pretty sure (off the top of my head) the latest version uses relative paths. Also what version are you running? If it's not the latest one, I would suggest downloading that.

JB
pakigreenl replied on at Permalink Reply
pakigreenl
I have a similar problem this is what I get:


Warning: file_get_contents(/developmentpackages/cu3er/blocks/cu3er/buttonTemplate.xml) [function.file-get-contents]: failed to open stream: No such file or directory in /development/packages/cu3er/blocks/cu3er/controller.php on line 379

Warning: file_get_contents(/developmentpackages/cu3er/blocks/cu3er/descriptionTemplate.xml) [function.file-get-contents]: failed to open stream: No such file or directory in /development/packages/cu3er/blocks/cu3er/controller.php on line 381

Warning: file_get_contents(/developmentpackages/cu3er/blocks/cu3er/configTemplate.xml) [function.file-get-contents]: failed to open stream: No such file or directory in /development/packages/cu3er/blocks/cu3er/controller.php on line 383
{"aID":"40","arHandle":"Header Content","cID":"1","error":false,"bID":"42"}

oh and my permission is set to 775
jb1 replied on at Permalink Reply
jb1
Hi,
Thanks for picking that up. I've fixed the problem and updated the add-on in the marketplace. Please download the latest version and that should fix things up for you:
http://www.concrete5.org/marketplace/addons/cu3er-slideshow/...

JB
pakigreenl replied on at Permalink Reply
pakigreenl
Thanks, I 'll check it out today. Thanks for the quick response.
pakigreenl replied on at Permalink Reply
pakigreenl
That got rid of my last error but now i have the same error as the original question of the post. You suggested making them absolute urls, but when you "add image" you aren't given the ability to write the url. You just pick one from the list of images in the image bank. So what is the solution? Could you give me a step by step as to how to correct this. Thanks.
pakigreenl replied on at Permalink Reply 1 Attachment
pakigreenl
Ok, so i went back to the page and the animation is playing and viewable. However, Right above it is displayed the original error. please see the attachment jpg.
jb1 replied on at Permalink Reply
jb1
Hi, the error is caused by a configuration setting on your server. See the first line in your error: it's not allowing "URL file-access".
As a workaround, try modifying the controller.php file on line 146, change:

$this->pathfromfileid($image['fID']);

to:

$this->relpathfromfileid($image['fID']);

This way it will use a relative URL rather than an absolute URL.

Hope this helps.

JB
pakigreenl replied on at Permalink Reply
pakigreenl
That did it! Thanks.
pakigreenl replied on at Permalink Reply
pakigreenl
There is supposed to be a drop shadow right. Do I have to activate it somehow to make it visible? Right now I get the Cubes but no drop shadow.
jb1 replied on at Permalink Reply
jb1
No, the drop shadow can be added manually using CSS. It's not built in using the block.
Just apply a background image to the DIV tag surrounding the cu3er block.

JB
PhilYoung replied on at Permalink Reply
PhilYoung
This got rig of URL file access issue but I still get

Warning: getimagesize(/files/3912/8689/5243/BM025B_G.jpg) [function.getimagesize]: failed to open stream: No such file or directory in /homepages/14/d293036554/htdocs/ConcreteRNZ/packages/cu3er/blocks/cu3er/controller.php on line 148
jb1 replied on at Permalink Reply
jb1
That seems like an unusual absolute path for the image on the server. In actual fact, the code that is causing the problem is not essential - it just helps to force a specific image height/width. If the images in the slideshow are all the same height/width (which is best practice), then you can simply comment out controller.php lines 148 to 160.

Let me know how you go.

JB
PhilYoung replied on at Permalink Reply
PhilYoung
If I comment out148-160 I get this error

Parse error: syntax error, unexpected T_CATCH in /homepages/14/d293036554/htdocs/ConcreteRNZ/packages/cu3er/blocks/cu3er/controller.php on line 161

I experiments with commenting out different lines all gave varying messages. One got rid of errors but killed slide show.
jb1 replied on at Permalink Reply 1 Attachment
jb1
Since it's working fine on all my test, sites I can only do some trial and error with you. Attached is a revised controller.php file. Try replacing that and see how it goes.

JB
PhilYoung replied on at Permalink Reply
PhilYoung
Hi, This new controller gave similar error messages as below. This is using a custom photo set. Oddly if you use the photos from a file set there are no error messages but you cannot change the transition variables. I tried on local 5.4.1 installation and it works fine so I am not sure what the online issue is. I have recked all file permissions etc.

Warning: getimagesize() [function.getimagesize]: URL file-access is disabled in the server configuration in /homepages/14/d293036554/htdocs/ConcreteRNZ/packages/cu3er/blocks/cu3er/controller.php on line 149

Warning: getimagesize(http://www.uniquejewelsnow.com/files/2712/8689/5241/AYE129_G.jpg) [function.getimagesize]: failed to open stream: no suitable wrapper could be found in /homepages/14/d293036554/htdocs/ConcreteRNZ/packages/cu3er/blocks/cu3er/controller.php on line 149
jb1 replied on at Permalink Reply
jb1
Hi Phil,
Yes, that particular error message is due to a security limitation on your hosting server. Unfortunately, they have disabled a specific PHP function used by the block to read an image/file from an absolute path (rather than a relative path). I understand the reasoning behind it, but it does make life difficult for developers (such as myself).

I did put error capturing around that chunk of affected code, but for some strange reason it's not being activated.

Last thing you can try in controller.php is to replace 'fullFilePath' with 'url' between lines 145-149. This will use a relative path for reading the image rather than an absolute path. If that fails, just comment out lines 149-169.

Best of luck.

JB
PhilYoung replied on at Permalink Reply
PhilYoung
Hi JB,
Changing fullfilepath to url still gave the same type of error message. The lines I had to comment out to make it work were actually that whole section 142-163. Works fine now. Just need to make sure I use the same size images ;^) I really appreciate you going the extra mile with the support on this free add-on.
Best
Phil
jb1 replied on at Permalink Reply
jb1
Great to hear Phil. Happy to help :-)
Trivious replied on at Permalink Reply
Trivious
For me actually, I changed things to url from the other file setting and then I ONLY had to comment out line 149 which was indicating the error.

149 //$x=getimagesize($image['url']);

Once I did this, not only did it work, but it also kept and forced the dimensions that I wanted. Great little mod. THANKS!
jb1 replied on at Permalink Reply
jb1
Good tip, thanks Trivious. :-)

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.