Solved

Installing zend framework

Posted on 2009-07-02
11
1,434 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
ID: 24770741
Are you using Zend_Loader::registerAutoload(); ?
0
 

Author Comment

by:hrolsons
ID: 24773464
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
ID: 24773957
You woud have to use:

include 'Zend/Loader.php';
Zend_Loader::registerAutoload();
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:hrolsons
ID: 24773991
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
ID: 24774135
Can you load other Zend classes like for example:

$test = Zend_Controller_Front::getInstance(); //Autoloading doesn't work if this fails.
0
 

Author Comment

by:hrolsons
ID: 24774193
Fatal error: Class 'Zend_Controller_Front' not found in ...
0
 
LVL 49

Expert Comment

by:Roonaan
ID: 24774221
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
ID: 24774272
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
ID: 24774283
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
ID: 31599345
Presto, you did it!!!  Thank You!!!
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 24777173
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Deprecated and Headed for the Dustbin By now, you have probably heard that some PHP features, while convenient, can also cause PHP security problems.  This article discusses one of those, called register_globals.  It is a thing you do not want.  …
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

830 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