Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Installing zend framework

Posted on 2009-07-02
11
Medium Priority
?
1,444 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

 

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 2000 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 111

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

WordPress Tutorial 4: Recommended Plugins

Now that you have WordPress installed, understand the interface, and know how to install new parts, let’s take a look at our recommended plugins.

Question has a verified solution.

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

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
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 dynamically set the form action using jQuery.
Suggested Courses

730 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