laminas-api-tools / api-tools

Laminas API Tools module for Laminas
https://api-tools.getlaminas.org/documentation
BSD 3-Clause "New" or "Revised" License
37 stars 19 forks source link

development mode enable throws fatal error #35

Open michalbundyra opened 4 years ago

michalbundyra commented 4 years ago

Running the latest version of Apigility (1.3.2), if I disable development mode, the server just returns 500 errors for both the admin panel and any http reqeusts to the API. When trying to re-enable development mode, php throws a fatal error and the API still won't respond.

It seems like a path was hardcoded in:

$ php public/index.php development enable 
PHP Warning:  require_once(/home/matthew/sandbox/zf-apigility-skeleton-1.3.2/module/Application/Module.php): failed to open stream: No such file or directory in [...]/vendor/zendframework/zend-loader/src/ModuleAutoloader.php on line 147
PHP Fatal error:  require_once(): Failed opening required '/home/matthew/sandbox/zf-apigility-skeleton-1.3.2/module/Application/Module.php' (include_path='.:/usr/local/share/pear') in [...]/vendor/zendframework/zend-loader/src/ModuleAutoloader.php on line 147

Originally posted by @NickClaywell at https://github.com/zfcampus/zf-apigility/issues/154

michalbundyra commented 4 years ago

I'm in the same situation, follow exactly what was in the tutorial in https://apigility.org/documentation/modules/zf-development-mode site

UPDATE I had the same problem, this is the cache on the date folder, it is seeking a path that does not exist, just delete the folder cache date that will work /home/matthew/sandbox/zf-apigility-skeleton-1.3.2/module/Application/Module.php'


Originally posted by @jerfeson at https://github.com/zfcampus/zf-apigility/issues/154#issuecomment-184211713

michalbundyra commented 4 years ago

Also you can rename manual development.config.php.dist to development.config.php from config folder and development mode will be enabled.


Originally posted by @zbintiosul at https://github.com/zfcampus/zf-apigility/issues/154#issuecomment-185642575

michalbundyra commented 4 years ago

This disable maintenance mode, but it does not solve the problem he reported.


Originally posted by @jerfeson at https://github.com/zfcampus/zf-apigility/issues/154#issuecomment-185658678

michalbundyra commented 4 years ago

To solve clean the files in data/cache


Originally posted by @lucianoreis at https://github.com/zfcampus/zf-apigility/issues/154#issuecomment-187836121

michalbundyra commented 4 years ago

in config/development.config.php comment this line

//'ZF\Apigility\Welcome',


Originally posted by @ghost at https://github.com/zfcampus/zf-apigility/issues/154#issuecomment-188399789