Can't set APPLICATION_ENV

General discussion forum for the Zend Server
Post Reply
urkman
Posts: 34
Joined: Thu Jan 15, 2009 9:15 am

Can't set APPLICATION_ENV

Post by urkman » Tue Feb 23, 2010 2:01 pm

Hallo,

on my ZendServer CE 4.0.6 I can't set APPLICATION_ENV. It is allways set to "development"...

Why it is not possible to change this?

Thanks and Greetings,
Urkman

massimilianoc
Posts: 699
Joined: Thu Mar 12, 2009 11:58 am

Re: Can't set APPLICATION_ENV

Post by massimilianoc » Wed Feb 24, 2010 12:53 pm

Could you please specify more about the environment on which Zend Server is installed (OS, architecture, etc...)?
Could you please specify how you are trying to set APPLICATION_ENV (.htaccess, configuration file, environment variable, etc...)?

Thanks in advance.
Best regards,
Massi.

urkman
Posts: 34
Joined: Thu Jan 15, 2009 9:15 am

Re: Can't set APPLICATION_ENV

Post by urkman » Wed Feb 24, 2010 2:29 pm

Hello Massi,

I'm currently working on a WindowsXP Maschine.
I think it happens on MacOSX too. I will test it later today...

I I set it in a configuration File:

Code: Select all

<VirtualHost test.local.de:80>
	ServerName test.local.de
	
	DocumentRoot "C:/web/htdocs/sites/test/web"
	<Directory "C:/web/htdocs/sites/test/web">
		Options Indexes FollowSymLinks
	    AllowOverride All
        Order allow,deny
	    Allow from all
	</Directory>
	
	SetEnv APPLICATION_ENV production
</VirtualHost>
Hope thsi helps,

Greetings,
Urkman

urkman
Posts: 34
Joined: Thu Jan 15, 2009 9:15 am

Re: Can't set APPLICATION_ENV

Post by urkman » Thu Feb 25, 2010 9:40 pm

Hello,

I testet it on my MacBook using OSX 10.6 and ZendServer 4.0.6 with the same result.
I can't set APPLICATION_ENV.

Even if I don't set it, the value is development.

Hope this can be fixed.

Greetings,
Urkman

circumerro
Posts: 19
Joined: Fri May 01, 2009 9:09 pm

Re: Can't set APPLICATION_ENV

Post by circumerro » Mon Mar 01, 2010 9:57 pm

Works fine for me on ubuntu karmic and osx 10.6 with zend server ce 5 and whatever was the last version 4. I would check your application code and make sure your virtual host is pointing to where you expect it to.

massimilianoc
Posts: 699
Joined: Thu Mar 12, 2009 11:58 am

Re: Can't set APPLICATION_ENV

Post by massimilianoc » Tue Mar 02, 2010 12:18 pm

On Windows, since PHP runs with the FastCGI architecture, it cannot read Apache's environment variable as it does when working as module.

To setup such variables in the PHP context, you must do it through the PHP FCGI configuration file 'C:\Program Files\Zend\ZendServer\etc\ZendEnablerConf.xml'.
As you can see, it holds already few environment variables, just add the ones you need for your app/s in the same XML node in the same format.

As per the MAC operations, could you specify how the VHost directives are picked up (inclusion of a specific file, a simple file dropped in '/usr/local/zend/apache2/conf.d/', etc...)?
Best regards,
Massi.

Post Reply