Hi all,
First of all- I'm new to Zend, my problem is below
I have an old site in Zend framework. I have downloaded all the files from the server (Linux server). I want to modify the site. So I need to set up this project in my local system.
I'm using wamp sever for the development, so I have created a folder named "water" within my "C:/wamp/www". But I got an error message when I run the project (http://localhost/water/html). See the error message
Warning: require_once(Zend/Config/Xml.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\water\html\index.php on line 6
Fatal error: require_once() [function.require]: Failed opening required 'Zend/Config/Xml.php' (include_path='.;C:\php\pear:/usr/share/php5/library') in C:\wamp\www\water\html\index.php on line 6
Thanks in advance
Kuriakose
Below is the content of my index.php
======================
<?php
$start = microtime();
date_default_timezone_set('Australia/Sydney');
//set_include_path(get_include_path() . ':/usr/share/php5/library');
set_include_path(get_include_path() . ';C:\wamp\www\zend-server-config\library; C:\wamp\www\zend-server-config'); // newly added by me to include PEAR and ZEND folder.If I enable this line of code blank page comes up in browser
require_once 'Zend/Config/Xml.php';
define ('SITE', getenv('USE_CONFIG'));
$config = new Zend_Config_Xml('../application/includes/config.xml', SITE);
error_reporting(E_ALL | E_STRICT);
$debug = $config->debug;
if ($debug == 0) {
define ('DEBUG', 0);
ini_set('display_startup_errors', 0);
ini_set('display_errors', 0);
} else {
define ('DEBUG', 1);
ini_set ('display_startup_errors', 1);
ini_set ('display_errors', 1);
}
function debug ($data)
{
if (DEBUG === 1) {
echo '<pre>';
print_r($data);
echo '</pre>';
}
}
define ('BASE', realpath('../') . DIRECTORY_SEPARATOR);
define ('APP', BASE . 'application/');
define ('WEBROOT', BASE . 'html/');
define ('MODELS', APP . 'models/');
define ('INC', APP . 'includes/');
define ('CONTROLLERS', APP . 'controllers/');
define ('MODULES', APP . 'modules/');
define ('ADMIN', MODULES . 'admin/');
define ('VIEWS', APP . 'views/');
define ('DS', DIRECTORY_SEPARATOR);
define ('NL', "\n"
;
define ('SALT', '$1$rtymusle$');
set_include_path(get_include_path() . ':' . VIEWS . 'helpers');
require_once 'Helpers.php';
require INC . 'String.php';
//require_once 'Zend/Db/Adapter/Pdo/Mysql.php';
require_once 'Zend/Controller/Front.php';
require_once INC . 'PublicController.php';
require_once 'Zend/Db/Table.php';
require_once 'Zend/Registry.php';
require 'Zend/Layout.php';
$options = array(
'layout' => 'default',
'layoutPath' => APP . 'layouts',
'contentKey' => 'content', // ignored when MVC not used
);
Zend_Layout::startMvc($options);
$front = Zend_Controller_Front::getInstance();
$front->setControllerDirectory(array(
'default' => CONTROLLERS,
'admin' => ADMIN));
//Dispatch the Front Controller
$front->dispatch();
$time = microtime() - $start;
if (DEBUG == 1) {
// echo '<!-- Page Render Time: ' . round($time, 4) . ' sec -->';
}