Extension, Plugin

Archived
Forum
(read-only)

Minimee

ExpressionEngine 2

Back to this add-on's main page
View Other Add-ons From John D. Wells

     

Error when using cURL to get stylesheet variable

Bug Report

deepsurface
deepsurface

Hi John,

Minimee is working well except when I attempt to use {stylesheet=group/template} instead of flat files outside of the EE template system. The path works when tested outside of the minimee selectors, but inside it returns this error:

A PHP Error was encountered
Severity: Notice

Message: Undefined index: data

Filename: libraries/EpiCurl.php

Line Number: 158

I have the cURL addon installed, but it’s just a single plugin file and I can’t seem to find the library file this error refers to. Any ideas about how I can fix this?

Thanks,
Sean

 

John D Wells
# 1
Developer
John D Wells

Hi Sean,

Which version of Minimee & EE are you running?  And which host are you with?

Minimee comes with its own cURL library, so any cURL plugin you have in the filesystem shouldn’t be part of the problem.

Could you try changing Minimee’s settings to use file_get_contents() instead of cURL?  On occasion, a particular hosting environment prevents the ability to cURL “itself” - i.e. trying to fetch a URL that’s the same as the calling URL.

Cheers,
John

deepsurface
# 2
deepsurface

John, I tried a few things and I’m still getting the same error.

I’m running EE 2.5.1 with Minimee 1.1.6 on an EngineHosting shared account.

First disabled the cURL plugin in case there was any conflict. Then tried changing the settings to file_get_contents(). Neither change worked so I switched Minimee to the “auto” remote file mode and that didn’t help either.

I don’t think I have access to php.ini on EngineHosting. Should ask them to turn on support for open wrappers?

Thanks for responding so quickly.
Sean

John D Wells
# 3
Developer
John D Wells

Hi Sean,

If you’re willing to, I’d recommend asking EngineHosting for help - to my recollection EH’s setup is problematic - well that’s not a fair thing to say, it’s presumably a security thing…

Do you have index.php as part of your site URL, or do you use htaccess to rewrite?  If you use htaccess, out of curiosity could you possibly try manually writing the template URLs like so:

http://yoursite.com/index.php/template_group/css_filename 

It’s a total shot in the dark, but I’m trying to recall if that might help cURL and/or fgc work around this issue…

Is there a requirement to have the CSS be served as a template?  The quickest workaround of course is to make it a flat file.  I realise that’s not an ideal solution. :/

Cheers,
John

 

deepsurface
# 4
deepsurface

Hi John,

EngineHosting confirmed file_get_contents() is initially open on every account, so it looks like using the stylesheet global variable with Minimee won’t work with EH. Manually writing the template URL doesn’t seem to work for some reason. I don’t really need it to sync with the database, just thought it would be nice. At least now I know there isn’t a simple fix.

Thanks again,
Sean

John D Wells
# 5
Developer
John D Wells

Hi Sean,

Sorry there isn’t a simple fix for this. Did EH give any indication of a workaround, is there no way for a site to ping “itself”?  I’m going to contact their support myself, but I’m not expecting much of a reply since I’m not a customer. :)

Cheers,
John

deepsurface
# 6
deepsurface

Hi John,

EH didn’t offer any suggestions for a workaround. Perhaps you’ll have some luck interacting with them directly. Generally they provide exceptional service even for my lowly shared server account.

Sean