Solved

Installing zend framework

Posted on 2009-07-02
11
1,428 Views
Last Modified: 2012-05-07
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
Comment
Question by:hrolsons
  • 5
  • 5
11 Comments
 
LVL 49

Expert Comment

by:Roonaan
Comment Utility
Are you using Zend_Loader::registerAutoload(); ?
0
 

Author Comment

by:hrolsons
Comment Utility
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
 
LVL 49

Expert Comment

by:Roonaan
Comment Utility
You woud have to use:

include 'Zend/Loader.php';
Zend_Loader::registerAutoload();
0
 

Author Comment

by:hrolsons
Comment Utility
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
 
LVL 49

Expert Comment

by:Roonaan
Comment Utility
Can you load other Zend classes like for example:

$test = Zend_Controller_Front::getInstance(); //Autoloading doesn't work if this fails.
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:hrolsons
Comment Utility
Fatal error: Class 'Zend_Controller_Front' not found in ...
0
 
LVL 49

Expert Comment

by:Roonaan
Comment Utility
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
 

Author Comment

by:hrolsons
Comment Utility
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
 
LVL 49

Accepted Solution

by:
Roonaan earned 500 total points
Comment Utility
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
 

Author Closing Comment

by:hrolsons
Comment Utility
Presto, you did it!!!  Thank You!!!
0
 
LVL 108

Expert Comment

by:Ray Paseur
Comment Utility
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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
This article discusses four methods for overlaying images in a container on a web page
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now