Jump to content

[SOLVED] zend framework bootstrap on windows dodgy


nadeemshafi9

Recommended Posts

my bootsrapping zend server is not workign because of /\ issues, any help ? i have tried making them all same and geting rid of the /../ here is the code:

 

define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application/'));
set_include_path(APPLICATION_PATH . '/../library' . PATH_SEPARATOR . get_include_path());

require_once "Zend/Loader.php";
Zend_Loader::registerAutoload();

 

error

Warning: require_once(Zend/Loader.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\public\index.php on line 16

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='C:\xampp\htdocs\application/../library;.;C:\xampp\php\pear\') in C:\xampp\htdocs\public\index.php on line 16

 

thanks

still error

 

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='C:\xampp\htdocs\application/../library/;.;C:\xampp\php\pear\') in C:\xampp\htdocs\public\index.php on line 16

Change this

define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application/'));
set_include_path(APPLICATION_PATH . '/../library' . PATH_SEPARATOR . get_include_path());[

to

define('BASE' , realpath(dirname(__FILE__).'/../'));
define('APPLICATION_PATH', BASE . '/application'));
set_include_path(BASE. '/library' . PATH_SEPARATOR . get_include_path());

Change this

define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application/'));
set_include_path(APPLICATION_PATH . '/../library' . PATH_SEPARATOR . get_include_path());[

to

define('BASE' , realpath(dirname(__FILE__).'/../'));
define('APPLICATION_PATH', BASE . '/application'));
set_include_path(BASE. '/library' . PATH_SEPARATOR . get_include_path());

 

this is teh error for yours

 

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='C:\xampp\htdocs/library;.;C:\xampp\php\pear\') in C:\xampp\htdocs\public\index.php on line 17

I doubt .. is valid in the PATH setting.

 

 

Try something like:

 

set_include_path(realpath(APPLICATION_PATH . '/../library/') . PATH_SEPARATOR . get_include_path());

 

 

 

(You might just need the trailing / on library.)

 

this time i used exactly ypour line looks better but still error

 

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='C:\xampp\htdocs\library;.;C:\xampp\php\pear\') in C:\xampp\htdocs\public\index.php on line 16

i can get pear perfectly fine with require_once('Mail.php');

 

Strict Standards: Assigning the return value of new by reference is deprecated in C:\xampp\php\PEAR\Mail.php on line 154

 

Warning: require_once(Zend/Loader.php) [function.require-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\public\index.php on line 17

 

Fatal error: require_once() [function.require]: Failed opening required 'Zend/Loader.php' (include_path='C:\xampp\htdocs\library;.;C:\xampp\php\pear\') in C:\xampp\htdocs\public\index.php on line 17

it worked exactly as they demoed it

 

// APPLICATION_PATH is a constant pointing to our application/ subdirectory.

// We use this to add our "library" directory to the include_path, so that

// PHP can find our Zend Framework classes.

define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application/'));

set_include_path(APPLICATION_PATH . '/../library' . PATH_SEPARATOR . get_include_path());

 

// AUTOLOADER - Set up autoloading.

// This is a nifty trick that allows ZF to load classes automatically so

// that you don't have to litter your code with 'include' or 'require'

// statements.

require_once "Zend/Loader.php";

Zend_Loader::registerAutoload();

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.