Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1456
  • 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
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

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