Inso-61 / CRUD-example-in-Zend-Framework-3

Exemple de création d'un CRUD sous la nouvelle version de Zend Framework
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link

example not working #1

Open flik opened 8 years ago

flik commented 8 years ago

I started the server with: php -S localhost:8080 -t public/ and these errors are coming

PHP 5.6.23-1+deprecated+dontuse+deb.sury.org~trusty+1 Development Server started at Tue Aug 23 16:10:37 2016 Listening on http://localhost:8080 Document root is /var/www/html/CRUD-example-in-Zend-Framework-3/public Press Ctrl-C to quit. [Tue Aug 23 16:10:40 2016] PHP Warning: include(D:\Htdocs\www\zf2\module\Application\config/../view/application/index/index.phtml): failed to open stream: No such file or directory in /var/www/html/CRUD-example-in-Zend-Framework-3/vendor/zendframework/zend-view/src/Renderer/PhpRenderer.php on line 502 [Tue Aug 23 16:10:40 2016] PHP Warning: include(): Failed opening 'D:\Htdocs\www\zf2\module\Application\config/../view/application/index/index.phtml' for inclusion (include_path='.:/usr/share/php:/usr/share/pear:') in /var/www/html/CRUD-example-in-Zend-Framework-3/vendor/zendframework/zend-view/src/Renderer/PhpRenderer.php on line 502 [Tue Aug 23 16:10:40 2016] PHP Warning: include(D:\Htdocs\www\zf2\module\Application\config/../view/error/index.phtml): failed to open stream: No such file or directory in /var/www/html/CRUD-example-in-Zend-Framework-3/vendor/zendframework/zend-view/src/Renderer/PhpRenderer.php on line 502 [Tue Aug 23 16:10:40 2016] PHP Warning: include(): Failed opening 'D:\Htdocs\www\zf2\module\Application\config/../view/error/index.phtml' for inclusion (include_path='.:/usr/share/php:/usr/share/pear:') in /var/www/html/CRUD-example-in-Zend-Framework-3/vendor/zendframework/zend-view/src/Renderer/PhpRenderer.php on line 502 [Tue Aug 23 16:10:40 2016] PHP Fatal error: Uncaught exception 'Zend\View\Exception\UnexpectedValueException' with message 'Zend\View\Renderer\PhpRenderer::render: Unable to render template "D:\Htdocs\www\zf2\module\Application\config/../view/error/index.phtml"; file include failed' in /var/www/html/CRUD-example-in-Zend-Framework-3/vendor/zendframework/zend-view/src/Renderer/PhpRenderer.php:509 Stack trace:

0 /var/www/html/CRUD-example-in-Zend-Framework-3/vendor/zendframework/zend-view/src/View.php(207): Zend\View\Renderer\PhpRenderer->render(Object(Zend\View\Model\ViewModel))

1 /var/www/html/CRUD-example-in-Zend-Framework-3/vendor/zendframework/zend-view/src/View.php(236): Zend\View\View->render(Object(Zend\View\Model\ViewModel))

2 /var/www/html/CRUD-example-in-Zend-Framework-3/vendor/zendframework/zend-view/src/View.php(200): Zend\View\View->renderChildren(Object(Zend\View\Model\ViewModel))

3 /var/www/html/CRUD-example-in-Zend-Framework-3/vendor/zendframework/zend-mvc/src/View/Http/DefaultRenderingStrategy.php(105): Zend\View\View->render(Object( in /var/www/html/CRUD-example-in-Zend-Framework-3/vendor/zendframework/zend-view/src/Renderer/PhpRenderer.php on line 509

[Tue Aug 23 16:10:40 2016] 127.0.0.1:43332 [500]: / - Uncaught exception 'Zend\View\Exception\UnexpectedValueException' with message 'Zend\View\Renderer\PhpRenderer::render: Unable to render template "D:\Htdocs\www\zf2\module\Application\config/../view/error/index.phtml"; file include failed' in /var/www/html/CRUD-example-in-Zend-Framework-3/vendor/zendframework/zend-view/src/Renderer/PhpRenderer.php:509 Stack trace:

0 /var/www/html/CRUD-example-in-Zend-Framework-3/vendor/zendframework/zend-view/src/View.php(207): Zend\View\Renderer\PhpRenderer->render(Object(Zend\View\Model\ViewModel))

1 /var/www/html/CRUD-example-in-Zend-Framework-3/vendor/zendframework/zend-view/src/View.php(236): Zend\View\View->render(Object(Zend\View\Model\ViewModel))

2 /var/www/html/CRUD-example-in-Zend-Framework-3/vendor/zendframework/zend-view/src/View.php(200): Zend\View\View->renderChildren(Object(Zend\View\Model\ViewModel))

3 /var/www/html/CRUD-example-in-Zend-Framework-3/vendor/zendframework/zend-mvc/src/View/Http/DefaultRenderingStrategy.php(105): Zend\View\View->render(Object( in /var/www/html/CRUD-example-in-Zend-Framework-3/vendor/zendframework/zend-view/src/Renderer/PhpRenderer.php on line 509

Inso-61 commented 8 years ago

hello thanks you for contribution. for fix the bug : clear the cache file in "data/cache" with "rm data/cache/*" and restart your server.

flik commented 8 years ago

I cleared cache and Now this error is coming:

[Wed Aug 24 12:09:16 2016] PHP Parse error: syntax error, unexpected '(' in /var/www/html/temp/CRUD-example-in-Zend-Framework-3/config/autoload/zend-db.global.php on line 9 [Wed Aug 24 12:09:16 2016] 127.0.0.1:50889 [500]: /notifications/getnotificationscounter?format=html - syntax error, unexpected '(' in /var/www/html/temp/CRUD-example-in-Zend-Framework-3/config/autoload/zend-db.global.php on line 9

Inso-61 commented 8 years ago

strange, try to remove zend-db.global.php , i don't have other ideas for the moment, i do not have this error.

mbelatar commented 7 years ago

Warning: file_put_contents(data/cache/module-config-cache.application.config.cache.php): failed to open stream: No such file or directory in C:\server\www\ZF2\CRUD-example-in-Zend-Framework-3-master\vendor\zendframework\zend-modulemanager\src\Listener\AbstractListener.php on line 65

mbelatar commented 7 years ago

Warning: file_put_contents(data/cache/module-classmap-cache.application.module.cache.php): failed to open stream: No such file or directory in C:\server\www\ZF2\CRUD-example-in-Zend-Framework-3-master\vendor\zendframework\zend-modulemanager\src\Listener\AbstractListener.php on line 65

mbelatar commented 7 years ago

Fatal error: Uncaught TypeError: Argument 1 passed to Zend\ModuleManager\Listener\ConfigListener::setMergedConfig() must be of the type array, integer given, called in C:\server\www\ZF2\CRUD-example-in-Zend-Framework-3-master\vendor\zendframework\zend-modulemanager\src\Listener\ConfigListener.php on line 70 and defined in C:\server\www\ZF2\CRUD-example-in-Zend-Framework-3-master\vendor\zendframework\zend-modulemanager\src\Listener\ConfigListener.php on line 208

mbelatar commented 7 years ago

TypeError: Argument 1 passed to Zend\ModuleManager\Listener\ConfigListener::setMergedConfig() must be of the type array, integer given, called in C:\server\www\ZF2\CRUD-example-in-Zend-Framework-3-master\vendor\zendframework\zend-modulemanager\src\Listener\ConfigListener.php on line 70 in C:\server\www\ZF2\CRUD-example-in-Zend-Framework-3-master\vendor\zendframework\zend-modulemanager\src\Listener\ConfigListener.php on line 208

miqueiasrafael commented 7 years ago

It is simple folks, just create in the root of the project some folders in that order one inside other data-> cache, because zend will create files for the cache, you see?

vishalmati-sharma commented 7 years ago

i am also getting same error :+1: Fatal error: Uncaught TypeError: Argument 1 passed to Zend\ModuleManager\Listener\ConfigListener::setMergedConfig() must be of the type array, integer given, called in /var/www/html/hello/vendor/zendframework/zend-modulemanager/src/Listener/ConfigListener.php on line 70 and defined in /var/www/html/hello/vendor/zendframework/zend-modulemanager/src/Listener/ConfigListener.php on line 208

TypeError: Argument 1 passed to Zend\ModuleManager\Listener\ConfigListener::setMergedConfig() must be of the type array, integer given, called in /var/www/html/hello/vendor/zendframework/zend-modulemanager/src/Listener/ConfigListener.php on line 70 in /var/www/html/hello/vendor/zendframework/zend-modulemanager/src/Listener/ConfigListener.php on line 208

For time temporarily i had disable cache from application.config.php by comment these line // Whether or not to enable a configuration cache. // If enabled, the merged configuration will be cached and used in // subsequent requests. // 'config_cache_enabled' => true,

    // The key used to create the configuration cache file name.
    //'config_cache_key' => 'application.config.cache',

    // Whether or not to enable a module class map cache.

//    'module_map_cache_enabled' => true,

    // The key used to create the class map cache file name.
    //'module_map_cache_key' => 'application.module.cache',

    // The path in which to cache merged configuration.
 //  'cache_dir' => 'data/cache/',

   //  'check_dependencies' => true, 

After disable my error omitted, If i want to use cache , than what is solution ???