[fw-general] Re: Problems autoloading modules on shared hosting

2010-04-24 Thread shaunsandlin

I checked out your Rob's link again (his help has been invaluable in the
past), but still come up empty.  I did a little modification since I'm using
a modules directory instead of putting the ZF standard directories under my
application dir.  Each module has a standard set of folders under them as
recommended in the Reference guide for using modules.  Here is my updated
bootstrap function for autoloading (I've tried the membership namespace with
and without the underscore):

protected function _initAutoload()
{
$loader = new Zend_Application_Module_Autoloader(
   array(
'namespace' => '',
'basePath' => APPLICATION_PATH . '/modules/default'),
   array(
'namespace' => 'Membership_',
'basePath' => APPLICATION_PATH . '/modules/membership'));   

return $loader;
}

I also think that since the code itself is proven to work locally, that it
should also work remotely.  The things that would cause it to work locally
but not remotely include: case sensitivity and environment setup.  My
.htaccess file is in the web-root, and looks like this:

RewriteEngine On
 
RewriteRule ^\.htaccess$ - [F]
  
RewriteCond %{REQUEST_URI} =""
RewriteRule ^.*$ /public/index.php [NC,L]
  
RewriteCond %{REQUEST_URI} !^/public/.*$
RewriteRule ^(.*)$ /public/$1
  
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^.*$ - [NC,L]
  
RewriteRule ^public/.*$ /public/index.php [NC,L]

The same rewrite rules are working locally with my application.  Using the
base domain name will take me to the default index remotely, so I take that
to indicate that my include paths and routing through /public/index.php are
working properly.
-- 
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/Problems-autoloading-modules-on-shared-hosting-tp2063729p2063957.html
Sent from the Zend Framework mailing list archive at Nabble.com.


Re: [fw-general] Problems autoloading modules on shared hosting

2010-04-24 Thread Danilo Moncastro Sabbagh
i quote

"If you need generic autoloading ability, for instance because your models 
directory is on your include path and you don't namespace your model classes, 
then add this:
$loader->setFallbackAutoloader(true);"


the full thing in here

http://akrabat.com/zend-framework/zend_loaders-autoloader_deprecated-in-zend-framework-18/


Danilo Moncastro Sabbagh
cel: +55 31 88613128
gtalk: torea...@gmail.com


Em 24/04/2010, às 15:40, shaunsandlin escreveu:

> 
> Hi all,
> 
> This is working locally on an OSX machine in Eclipse.  Does not work when
> loaded to a Godaddy hosted site.
> The error I am getting is: 
> "Fatal error: Class 'Membership_Form_Login' not found in
> /home/content/s/h/a/shamik/html/application/modules/membership/views/helpers/UserDoorway.php
> on line 27
> 
> I'm having a problem autoloading classes located under the modules
> directory.  My directory structure is 
> root
> -application
> --modules
> ---default
> ---membership
> forms
> -Login
> 
> all directories are lowercase as indicated.  My config file has the
> following entries:
> 
> resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
> resources.frontController.defaultControllerName = "index"
> resources.frontController.defaultAction = "index"
> resources.frontController.defaultModule = "default"
> resources.frontController.baseUrl = "/public"
> resources.modules[] =
> 
> My only bootstrap file is under the application directory.  It has an init
> function as follows:
> 
> protected function _initAutoload()
>{
>   $loader = new Zend_Application_Module_Autoloader(array(
>   'namespace' => '',
>   'basePath' => APPLICATION_PATH));
> 
>   return $loader;
>}
> 
> The class that is trying to load is Membership_Form_Login.  I tested
> creating a dummy class under the default module called Form_Login, and have
> a new instance create early in the default index/index controller/action.  I
> receive the same error as when trying to load the same class under the
> membership module:
> 
> "Fatal error: Class 'Form_Test' not found in
> /home/content/s/h/a/shamik/html/application/modules/default/controllers/IndexController.php
> on line 16"
> 
> The application is correctly loading view helpers within the membership
> module as indicated in the following bootstrap line:
> 
> $view->addHelperPath(APPLICATION_PATH . '/modules/membership/views/helpers',
> 'Membership_View_Helper');
> 
> The same code is working locally, so I do not think this is a setup issue. 
> I have checked the path that the autoloader looks for the class in, and
> aside from the server root it matches my path correctly.  I do not see any
> case sensitivity issues as I have with other errors I got earlier in testing
> on Godaddy.
> 
> Thank you,
> shaun sandlin
> -- 
> View this message in context: 
> http://zend-framework-community.634137.n4.nabble.com/Problems-autoloading-modules-on-shared-hosting-tp2063729p2063729.html
> Sent from the Zend Framework mailing list archive at Nabble.com.



Re: [fw-general] problem wiht "php scripts/load.sqlite.php "

2010-04-24 Thread Daniel Latter

Hi,

If you look at the paths in the error you will see that it is looking  
for the config file @ /configs/application.ini, looking at where your  
running the command from it looks like it should be c:/wamp/www/ 
quickstart/configs/application.ini,


So it looks like a path problem,

Hth.

On 24 Apr 2010, at 13:37, something  wrote:



Hi Every one,

I am new to ZENDFRAME WORK.

when i am running this
php scripts/load.sqlite.php --withdata
command in CMD i am getting the following out out


C:\wamp\www\quickstart\data>php scripts/load.sqlite.php --withdata


Fatal error: Uncaught exception 'Zend_Config_Exception' with message
'parse_ini_
file(/configs/application.ini): failed to open stream: No such file or
directory
' in C:\ZendFramework\library\Zend\Config\Ini.php:181
Stack trace:

#0 C:\ZendFramework\library\Zend\Config\Ini.php(201):
Zend_Config_Ini->_parseIni
File('/configs/applic...')

#1 C:\ZendFramework\library\Zend\Config\Ini.php(125):
Zend_Config_Ini->_loadIniF
ile('/configs/applic...')

#2 C:\ZendFramework\library\Zend\Application.php(383):
Zend_Config_Ini->__constr
uct('/configs/applic...', 'development')

#3 C:\ZendFramework\library\Zend\Application.php(85):
Zend_Application->_loadCon
fig('/configs/applic...')

#4 C:\wamp\www\quickstart\data\scripts\load.sqlite.php(41):
Zend_Application->__
construct('development', '/configs/applic...')

#5 {main}
 thrown in C:\ZendFramework\library\Zend\Config\Ini.php on line 181


what is the problem i am not able to understand.
i googled out and also did not find any solution
if any one can help me send the solution ASAP..



-
something
--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/problem-wiht-php-scripts-load-sqlite-php-tp2063411p2063411.html
Sent from the Zend Framework mailing list archive at Nabble.com.


[fw-general] Problems autoloading modules on shared hosting

2010-04-24 Thread shaunsandlin

Hi all,

This is working locally on an OSX machine in Eclipse.  Does not work when
loaded to a Godaddy hosted site.
The error I am getting is: 
"Fatal error: Class 'Membership_Form_Login' not found in
/home/content/s/h/a/shamik/html/application/modules/membership/views/helpers/UserDoorway.php
on line 27

I'm having a problem autoloading classes located under the modules
directory.  My directory structure is 
root
-application
--modules
---default
---membership
forms
-Login

all directories are lowercase as indicated.  My config file has the
following entries:

resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.frontController.defaultControllerName = "index"
resources.frontController.defaultAction = "index"
resources.frontController.defaultModule = "default"
resources.frontController.baseUrl = "/public"
resources.modules[] =

My only bootstrap file is under the application directory.  It has an init
function as follows:

protected function _initAutoload()
{
$loader = new Zend_Application_Module_Autoloader(array(
'namespace' => '',
'basePath' => APPLICATION_PATH));

return $loader;
}

The class that is trying to load is Membership_Form_Login.  I tested
creating a dummy class under the default module called Form_Login, and have
a new instance create early in the default index/index controller/action.  I
receive the same error as when trying to load the same class under the
membership module:

"Fatal error: Class 'Form_Test' not found in
/home/content/s/h/a/shamik/html/application/modules/default/controllers/IndexController.php
on line 16"

The application is correctly loading view helpers within the membership
module as indicated in the following bootstrap line:

$view->addHelperPath(APPLICATION_PATH . '/modules/membership/views/helpers',
'Membership_View_Helper');

The same code is working locally, so I do not think this is a setup issue. 
I have checked the path that the autoloader looks for the class in, and
aside from the server root it matches my path correctly.  I do not see any
case sensitivity issues as I have with other errors I got earlier in testing
on Godaddy.

Thank you,
shaun sandlin
-- 
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/Problems-autoloading-modules-on-shared-hosting-tp2063729p2063729.html
Sent from the Zend Framework mailing list archive at Nabble.com.


[fw-general] Zend_Form not rendering - Plugin Loader not configured??

2010-04-24 Thread Josh Team

In summary, I have a basic ZF stack with a shell of Zend_Form:

class Form extends Zend_Form { }

when I try to echo/render the Form I get this error:

Zend_Loader_PluginLoader_Exception: Plugin by name 'FormElements' was not
found in the registry; used paths: in
.../library/Zend/Loader/PluginLoader.php on line 412

I ensured it wasn't an include's issue by examining the include path from
inside the view as well as requiring the Decorator inside the view - which
works just fine:


I posted an issue into JIRA - but Christian told me "Please ask for help on
the mailing list or at irc.freenode.net #zftalk you are missing some setup
for the Plugin Loader." -- so that's what I am doing.

I looked online for any docs about configuring the Plugin Loader - but can't
seem to find anything.

My full issue is - http://zendframework.com/issues/browse/ZF-9739
-- 
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/Zend-Form-not-rendering-Plugin-Loader-not-configured-tp2063703p2063703.html
Sent from the Zend Framework mailing list archive at Nabble.com.


[fw-general] problem wiht "php scripts/load.sqlite.php "

2010-04-24 Thread something

Hi Every one,

I am new to ZENDFRAME WORK.

when i am running this 
php scripts/load.sqlite.php --withdata
 command in CMD i am getting the following out out 


C:\wamp\www\quickstart\data>php scripts/load.sqlite.php --withdata


Fatal error: Uncaught exception 'Zend_Config_Exception' with message
'parse_ini_
file(/configs/application.ini): failed to open stream: No such file or
directory
' in C:\ZendFramework\library\Zend\Config\Ini.php:181
Stack trace:

#0 C:\ZendFramework\library\Zend\Config\Ini.php(201):
Zend_Config_Ini->_parseIni
File('/configs/applic...')

#1 C:\ZendFramework\library\Zend\Config\Ini.php(125):
Zend_Config_Ini->_loadIniF
ile('/configs/applic...')

#2 C:\ZendFramework\library\Zend\Application.php(383):
Zend_Config_Ini->__constr
uct('/configs/applic...', 'development')

#3 C:\ZendFramework\library\Zend\Application.php(85):
Zend_Application->_loadCon
fig('/configs/applic...')

#4 C:\wamp\www\quickstart\data\scripts\load.sqlite.php(41):
Zend_Application->__
construct('development', '/configs/applic...')

#5 {main}
  thrown in C:\ZendFramework\library\Zend\Config\Ini.php on line 181


what is the problem i am not able to understand.
i googled out and also did not find any solution 
if any one can help me send the solution ASAP..



-
something
-- 
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/problem-wiht-php-scripts-load-sqlite-php-tp2063411p2063411.html
Sent from the Zend Framework mailing list archive at Nabble.com.


Re: [fw-general] How to load module specific configuration

2010-04-24 Thread Саша Стаменковић
Look here
http://weierophinney.net/matthew/archives/234-Module-Bootstraps-in-Zend-Framework-Dos-and-Donts.html,
I solved it something like this
http://binarykitten.me.uk/dev/zend-framework/177-active-module-based-config-with-zend-framework.html
.

Regards,
Saša Stamenković


On Sat, Apr 24, 2010 at 11:05 AM, Ralf Eggert  wrote:

> Hi,
>
> I have my /configs/application.ini with some routes defined for the
> router application resource. Now I want to add some more routes which
> are defined in a module specific config file. These module specific
> routes should be added to a /modules/whatever/configs/application.ini
> file. But unfortunately this file is not read automatically.
>
> Is Zend_Application not able to load module specific configuration out
> of the box? And if it is able to do it automatically, how can I manage
> this?
>
> Thanks and best regards,
>
> Ralf
>
>


[fw-general] How to load module specific configuration

2010-04-24 Thread Ralf Eggert
Hi,

I have my /configs/application.ini with some routes defined for the
router application resource. Now I want to add some more routes which
are defined in a module specific config file. These module specific
routes should be added to a /modules/whatever/configs/application.ini
file. But unfortunately this file is not read automatically.

Is Zend_Application not able to load module specific configuration out
of the box? And if it is able to do it automatically, how can I manage this?

Thanks and best regards,

Ralf