Welcome, Guest. Register Now!
   
Mark Forums Read Mark Forums Read Mark Forums Read


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-18-2008, 02:05 PM
bpat1434's Avatar
Member
 
Join Date: Jul 2008
Posts: 33
Question Helper Not Found

I've created a helper module (Navigation.php) that will read some data from a database and return it. So I created the helper, and placed it in its proper place in my directory structure:
Code:
+ /application
   + controllers
   + layouts
   + models
   + views
+ /httpdocs
+ /library
   + EHS
      + Navigation.php
So in my bootstrap.php file I've tried to add the path to my project like so:
PHP Code:
Zend_Controller_Action_HelperBroker::addPath('EHS/Helpers''EHS_Helpers'); 
Then, inside my controllers I try to get the helper like so:
PHP Code:
$this->navHelper $this->getHelper('Navigation'); 
Needless to say, there's an issue somewhere. When I visit my site, it claims that it can't find "Navigation" as a helper. I've tried almost every possible variation of the getHelper() I can including:
Navigation
Navigation.php
EHS/Helpers/Navigation

I've also tried changing the directory structure to be Ehs/Helpers and that didn't help.

Is there something I'm missing? I've got this set up the exact same way in another project (running off the same server) and yet one works and this one doesn't. Anyone have any ideas?

Last edited by bpat1434 : 07-18-2008 at 03:20 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 07-18-2008, 07:22 PM
bpat1434's Avatar
Member
 
Join Date: Jul 2008
Posts: 33
Default

Okay, so I traced this down a bit. For whatever reason, Zend_Loader::isReadable() uses the fopen() call which looks in the include_path; however, not all of the directories are searched in. I have my include path set properly as:
Code:
/var/www/vhosts/<domain>/subdomains/somedir/library:
/var/www/vhosts/<domain>/subdomains/somedir/application/models:
/var/www/vhosts/<domain>/subdomains/somedir/application/views/scripts:
.:
/usr/share/pear:/usr/share/php/frameworks
Yet if I remove the "@" from the fopen() file, I only see two real errors. It's looking in the directory I ask for "EHS/Helpers/Navigation.php", and in the Zend/Controllers/Action dir for Navigation.php

So now I have to figure out why my include_path seems to not be searched.....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 07-18-2008, 09:20 PM
bpat1434's Avatar
Member
 
Join Date: Jul 2008
Posts: 33
Default

Turns out it was an open_basedir restriction that was hidden.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 03:31 PM.