Buenos dias
Tengo los siguientes warning y errores:
Warning: include .application\config/production.config.php [function.include]: failed to open stream:
Warning: array_merge_recursive() [function.array-merge-recursive]: Argument #2 is not an array.
Zend_Application_Exception: Invalid configuration file provided;
He cambiado la estructura de mi aplicacion es la siguiente.
application:
-config.php
tengo.
Código PHP:
<?php
return array_merge_recursive(array(
'includePaths' => array(
'library' => APPLICATION_PATH . '/library'
),
'bootstrap' => array(
'path' => APPLICATION_PATH . '/Bootstrap.php',
'class' => 'Bootstrap'
),
'autoloaderNamespaces' => array(
'App_'
),
'resources' => array(
'frontController' => array(
'moduleDirectory' => APPLICATION_PATH . '/modules'
),
'modules' => array(),
'router' => array(
'routes' => include dirname(__FILE__) . '/routes.config.php'
),
)
), include dirname(__FILE__) . '/' . APPLICATION_ENV . '.config.php');
-development.config.php
-production.config.php
-routes.config
modules
-default
Bootstrap.php
Hay los siguiente.
Código PHP:
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
protected function _initTimezone()
{
date_default_timezone_set('Europe/Madrid');
}
protected function _initDefaultResourceLoader()
{
$resourceLoader = new Zend_Application_Module_Autoloader(array(
'namespace' => 'Default',
'basePath' => dirname(__FILE__) . '/modules/default',
));
}
}
-public
-index.php
esta.
Código PHP:
<?php
// Define the application path
define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));
// Define the application environment
if (isset($_SERVER['environment']) && $_SERVER['environment'] === 'development') {
define('APPLICATION_ENV', 'development');
} else {
define('APPLICATION_ENV', 'production');
}
// Set include path to ZF library
set_include_path(implode(PATH_SEPARATOR, array(
dirname(APPLICATION_PATH) . '/library',
get_include_path()
)));
// Initiate Zend_Application
require_once 'Zend/Application.php';
$application = new Zend_Application(
APPLICATION_ENV,
APPLICATION_PATH . '/config/config.php'
);
$application->bootstrap()
->run();
-.htaccess
es:
Código PHP:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
He probado de varias maneras pero no consigo dar con la configuracion correcta,
Alguna ayuda, un saludo