Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1449
  • Last Modified:

Installing zend framework

I'm having trouble getting zend to work.  I have the zend framework on my server and I changed the include in my php.ini to include that directory, but when I run a simple statement it says:
Fatal error: Class 'Zend_Mail_Storage_Pop3' not found in ...

Open in new window

0
hrolsons
Asked:
hrolsons
  • 5
  • 5
1 Solution
 
RoonaanCommented:
Are you using Zend_Loader::registerAutoload(); ?
0
 
hrolsonsAuthor Commented:
I tried that, and got:

Fatal error: Class 'Zend_Loader' not found in ...

While looking at my phpinfo.php I see "include_path"  /xyz.com/html/zend/library/
0
 
RoonaanCommented:
You woud have to use:

include 'Zend/Loader.php';
Zend_Loader::registerAutoload();
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
hrolsonsAuthor Commented:
That got me one step closer, now the following fails:

$mail = new Zend_Mail_Storage_Pop3(array('host'     => '{localhost:143/notls}',
                                         'user'     => 'xxxxk@xxxx.com',
                                         'password' => 'xxxx'));

Fatal error: Class 'Zend_Mail_Storage_Pop3' not found in
0
 
RoonaanCommented:
Can you load other Zend classes like for example:

$test = Zend_Controller_Front::getInstance(); //Autoloading doesn't work if this fails.
0
 
hrolsonsAuthor Commented:
Fatal error: Class 'Zend_Controller_Front' not found in ...
0
 
RoonaanCommented:
Hi, I have no clue what is going wrong,

If the following code gives a fatal then there is something realy strange going on:


require 'Zend/Loader.php';
Zend_Loader::registerAutoload();
$test = Zend_Controller_Front::getInstance();

I see no reason why the third line should fail if the first two don't, and cannot think of one as well. Their eventualy might be a fairly probable cause, but none I can think of at the moment, I'm sorry.
0
 
hrolsonsAuthor Commented:
Actually, that block of code gives:

Notice: Zend_Loader::Zend_Loader::registerAutoload is deprecated as of 1.8.0 and will be removed with 2.0.0; use Zend_Loader_Autoloader instead in

And when I change it to:

require 'Zend/Loader.php';
Zend_Loader_Autoloader;
$test = Zend_Controller_Front::getInstance();

I get:

Fatal error: Class 'Zend_Controller_Front' not found in ...
0
 
RoonaanCommented:
Ah sorry, I am still in 1.7.2 mode.

Following the discussion on http://www.stoimen.com/blog/2009/05/10/switch-from-zend_loader-to-zend_loader_autoloader/ you can use:

require_once Zend/Loader/Autoloader.php;
$autoloader = Zend_Loader_Autoloader::getInstance();
$autoloader->setFallbackAutoloader(true);
$test = Zend_Controller_Front::getInstance();
0
 
hrolsonsAuthor Commented:
Presto, you did it!!!  Thank You!!!
0
 
Ray PaseurCommented:
Just a lurker comment here... Whenever you are debugging, set error_reporting(E_ALL) - this will give you a visual representation of all the "notice" messages.  Sometimes that is quite helpful.  

Glad to see Roonaan was able to help you.  

Cheers, ~Ray
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now