Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Error in .htaccess under assets directory in v2.3.2 RC2


Reply


3 Posts   1702 Views

Avatar
gakenny

Community Member, 153 Posts

1 June 2009 at 5:48pm

Hello,

I have been trying out the latest release candidate and I receive the following error in the Apache log files when accessing an image in the assets directory:
Invalid command 'php_flag', perhaps mis-spelled or defined by a module not included in the server configuration, referer: http://www.domain.com/silverstripe/gallery/

The code in the .htaccess file reads:
php_flag engine off

To overcome this issue, I renamed the .htaccess file. Has anyone else experienced this issue?

Cheers,

Gary

Avatar
gakenny

Community Member, 153 Posts

1 June 2009 at 5:51pm

Hello,

I believe that our hosting environment uses phpsuexec and this does not allow this override in the .htaccess file and it must occur in php.ini.

Cheers,

Gary

Avatar
rbquirke

Community Member, 70 Posts

1 June 2009 at 8:15pm

It would be ok to comment out this line from the .htaccess

It is there to prevent php code from being run in the assets folder.

If your host allows you to set php.ini configs on a per directory basis, then you could create a php.ini for the assets folder, otherwise I would just leave it.