使用未定义的常量APPLICATION_ENV

A friend asked me to migrate his site developed with Zend Framework to another server. I copied all the files and imported the database locally, in testing, the following messages are displayed in the browser:

Notice: Use of undefined constant APPLICATION_ENV - assumed 'APPLICATION_ENV' in C: \ wamp \ www \ zend ew \ public_html \ index.php on line 5

Warning: require_once (Zend / Application.php): failed to open stream: No such file or directory in C: \ wamp \ www \ zend ew \ public_html \ index.php on line 10

Fatal error: require_once (): Failed opening required 'Zend / Application.php' (include_path = 'C: \ php. \ Pear') in C: \ wamp \ www \ zend ew \ public_html \ index.php on line 10

The code seems very confusing, I cannot find the problem being that nothing has changed.

I do not know Zend, and need a hand.

As documented in http://framework.zend.com/manual/1.12/en/zend.application.quick-start.html:

You may note that the application environment constant value looks for an environment variable "APPLICATION_ENV". We recommend setting this in your web server environment. In Apache, you can set this either in your vhost definition, or in your .htaccess file. We recommend the following contents for your public/.htaccess file:

I'd suggest looking at the vhost/apache/nginx/etc config for the old server and looking for something like SetEnv APPLICATION_ENV.

If you are using zf1 in your public/index.php put this:

// Define application environment
defined('APPLICATION_ENV')
|| define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'development'));

or you can also edit your virtual host configuration adding this line:

SetEnv APPLICATION_ENV "development"