I installed Zend on my ubuntu homeserver. In my .htaccess file i have the following code:
SetEnv APPLICATION_ENV development
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-s
RewriteCond %{REQUEST_FILENAME} !-l
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^.*$ index.php [NC,L]
When i echo APPLICATION_ENV in my index.php in the public folder, APPLICATION_ENV is not set.
What am i doing wrong?
Mod rewrite is enabled in apache.
In order to use SetEnv within a .htaccess file, I believe you need to set...
AllowOverride FileInfo
...within the relevant virtualhost directory block. (And then restart the httpd service as per usual.)
Additionally, depending on how you're running PHP, it's possible that such information is being stripped out. (e.g.: suexec will effectively remove all non-HTTP* environment vars.)