0
votes

I am trying to play with ZF2 but I have a problem and I don't know if it's because it is a beta or a configuration problem.

I have taken the zf skeleton from Rob Allen's Blog and following the tutorials: http://akrabat.com/getting-started-with-zend-framework-2/

When I run my app I have problems in my index:

$moduleLoader = new Zend\Loader\ModuleAutoloader($appConfig['module_paths']);

I have debugged it and $appConfig['module_paths'] return a bool(0) value which causes this error:

Fatal error: Uncaught exception 'InvalidArgumentException' with message 'Invalid path provided; must be a string, received boolean' in C:\wamp\www\test\library\Zend\Loader\ModuleAutoloader.php on line 237

My configuration is : Windows 7 32bit + wamp (Apache 2.2.21, PHP 5.3.8)

1
Download the updated application. - Gabriel Santos

1 Answers

0
votes

Looking at the guide, modules_path is wrapped in a realpath() which will return false if the folder doesn't exist. Seems like this is you're problem.

http://php.net/manual/en/function.realpath.php#refsect1-function.realpath-returnvalues