Hi i'm new with Apigility. Im trying to configure doctrine-orm-module. When i tried to run the command below and getting this error
$ cd /var/www/apigility/zf-apigility-skeleton/vendor/doctrine/doctrine-module/bin
$ php doctrine-module.php
Error is:
PHP Fatal error: Uncaught exception 'Zend\ServiceManager\Exception\ServiceNotFoundException' with message 'Zend\ServiceManager\ServiceManager::get was unable to fetch or create an instance for doctrine.cli' in /var/www/apigility/zf-apigility-skeleton/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php:529
Stack trace:
#0 /var/www/apigility/zf-apigility-skeleton/vendor/doctrine/doctrine-module/bin/doctrine-module.php(51): Zend\ServiceManager\ServiceManager->get('doctrine.cli')
#1 {main} thrown in /var/www/apigility/zf-apigility-skeleton/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php on line 529
Fatal error: Uncaught exception 'Zend\ServiceManager\Exception\ServiceNotFoundException' with message 'Zend\ServiceManager\ServiceManager::get was unable to fetch or create an instance for doctrine.cli' in /var/www/apigility/zf-apigility-skeleton/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php:529
Stack trace:
#0 /var/www/apigility/zf-apigility-skeleton/vendor/doctrine/doctrine-module/bin/doctrine-module.php(51): Zend\ServiceManager\ServiceManager->get('doctrine.cli')
#1 {main} thrown in /var/www/apigility/zf-apigility-skeleton/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php on line 529
I followed the installation guide on DoctrineORMModule's readme.md
You don't need to run doctrine-module cli directly inside the bin folder. DoctrineModule already binds related console routes to the application if it's configured correctly.
Try this:
$ cd /var/www/apigility/zf-apigility-skeleton
$ php public/index.php orm:info
Hope it helps.
Related
I am using Laravel and trying to start a PHP artisan server but I get the following error:
PHP Fatal error: Uncaught Error: Class 'Illuminate\Foundation\Application' not found in C:\Users\Admin\Budget\bootstrap\app.php:14
Stack trace:
#0 C:\Users\Admin\Budget\artisan(20): require_once()
#1 {main}
thrown in C:\Users\Admin\Budget\bootstrap\app.php on line 14
How can I fix this?
I am trying to install Mangopay https://github.com/Mangopay/mangopay2-php-sdk, but the recommended solution of installing it without composer doesn't work. I used this line:
require_once "mango/mangopay2-php-sdk-2.11.0/MangoPay/Autoloader.php";
$api = new MangoPay\MangoPayApi();
The file get's loaded, but I get the following error:
Fatal error: Uncaught Error: Class 'Psr\Log\NullLogger' not found in
/usr/local/apache2/htdocs/MangoPay/MangoPayApi.php:223 Stack trace:
#0 /usr/local/apache2/htdocs/pay.php(5): MangoPay\MangoPayApi-
>__construct() #1 {main} thrown in
/usr/local/apache2/htdocs/MangoPay/MangoPayApi.php on line 223
The issue is with the logger, which I manually downloaded and copied into the directory but it still doesn't work. I am only asking here because I am not getting any response from the developers.
Any help with manually installing the logger and getting the namespace to work with mangopay is welcome.
I have unzipped the installation folder. When going to the install.php to start the installer I get an Fatal error: Uncaught RuntimeException.
I use XAMPP with PHP 7.2 and I go to:
http://localhost/typo3/install.php
I get following message:
Fatal error: Uncaught RuntimeException: Could not create directory "/Applications/XAMPP/xamppfiles/htdocs/typo3temp/var/log/"! in /Applications/XAMPP/xamppfiles/htdocs/typo3_src/typo3/sysext/core/Classes/Utility/GeneralUtility.php:2172 Stack trace: #0 /Applications/XAMPP/xamppfiles/htdocs/typo3_src/typo3/sysext/core/Classes/Utility/GeneralUtility.php(2140): TYPO3\CMS\Core\Utility\GeneralUtility::createDirectoryPath('/Applications/X...') #1 /Applications/XAMPP/xamppfiles/htdocs/typo3_src/typo3/sysext/core/Classes/Log/Writer/FileWriter.php(222): TYPO3\CMS\Core\Utility\GeneralUtility::mkdir_deep('/Applications/X...') #2 /Applications/XAMPP/xamppfiles/htdocs/typo3_src/typo3/sysext/core/Classes/Log/Writer/FileWriter.php(193): TYPO3\CMS\Core\Log\Writer\FileWriter->createLogFile() #3 /Applications/XAMPP/xamppfiles/htdocs/typo3_src/typo3/sysext/core/Classes/Log/Writer/FileWriter.php(123): TYPO3\CMS\Core\Log\Writer\FileWriter->openLogFile() #4 /Applications/XAMPP/xamppfiles/htdocs/typo3_src/typo3/sysext/core/Classes/Log/Writer/Fil in /Applications/XAMPP/xamppfiles/htdocs/typo3_src/typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 2172
Stacktrace in log file:
Stack trace:
#0 /Applications/XAMPP/xamppfiles/htdocs/typo3_src/typo3/sysext/core/Classes/Utility/GeneralUtility.php(2140): TYPO3\CMS\Core\Utility\GeneralUtility::createDirectoryPath('/Applications/X...')
#1 /Applications/XAMPP/xamppfiles/htdocs/typo3_src/typo3/sysext/core/Classes/Log/Writer/FileWriter.php(222): TYPO3\CMS\Core\Utility\GeneralUtility::mkdir_deep('/Applications/X...')
#2 /Applications/XAMPP/xamppfiles/htdocs/typo3_src/typo3/sysext/core/Classes/Log/Writer/FileWriter.php(193): TYPO3\CMS\Core\Log\Writer\FileWriter->createLogFile()
#3 /Applications/XAMPP/xamppfiles/htdocs/typo3_src/typo3/sysext/core/Classes/Log/Writer/FileWriter.php(123): TYPO3\CMS\Core\Log\Writer\FileWriter->openLogFile()
#4 /Applications/XAMPP/xamppfiles/htdocs/typo3_src/typo3/sysext/core/Classes/Log/Writer/Fil in /Applications/XAMPP/xamppfiles/htdocs/typo3_src/typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 2172
:
No more error logs available..
The error means that php cannot write to your xampp htdocs directory, because of security restrictions of the Applications dir.
You should change your xampp configuration like in this tutorial https://pureinfotech.com/install-xampp-windows-10/
I am trying to go trough tutorial of doctrine here is official website. And I got an error in Starting with the Product Entity part.
This is what I write to terminal: $ php create_product.php ORM
PHP Fatal error: Uncaught Error: Class 'product' not found in /home/vaclav/Server/vssk/VSSK/project/create_product.php:8
Stack trace: #0 {main}
thrown in /home/vaclav/Server/vssk/VSSK/project/create_product.php on line 8
Solved with adding:
require_once 'patch_to_your_class/Product.php';
to create_product.php.
I'm having trouble while deploying my symfony web app on heroku, when previously it worked just fine. What could be wrong?
This is the build log: http://pastebin.com/DXZH110S
Here is the relevant part of the log:
Generating optimized autoload files
Incenteev\ParameterHandler\ScriptHandler::buildParameters
Creating the "app/config/parameters.yml" file
Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::buildBootstrap
Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache
PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "SensioGeneratorBundle" from namespace "Sensio\Bundle\GeneratorBundle".
Did you forget a "use" statement for another namespace? in /tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/app/AppKernel.php:25
Stack trace:
#0 /tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(403): AppKernel->registerBundles()
#1 /tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(113): Symfony\Component\HttpKernel\Kernel->initializeBundles()
#2 /tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php(68): Symfony\Component\HttpKernel\Kernel->boot()
#3 /tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/vendor/symfony/symfony/src/Symfony/Component/Console/Appli in /tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/app/AppKernel.php on line 25
Script Sensio\Bundle\DistributionBundle\Composer\ScriptHandler::clearCache handling the symfony-scripts event terminated with an exception
[RuntimeException]
An error occurred when executing the "'cache:clear --no-warmup'" command:
PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "SensioGeneratorBundle" from namespace "Sensio\Bundle\GeneratorBundle".
Did you forget a "use" statement for another namespace? in /tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/app/AppKernel.php:25
Stack trace:
#0 /tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(403): AppKernel->registerBundles()
#1 /tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php(113): Symfony\Component\HttpKernel\Kernel->initializeBundles()
#2 /tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php(68): Symfony\Component\HttpKernel\Kernel->boot()
#3 /tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/vendor/symfony/symfony/src/Symfony/Component/Console/Appli in /tmp/build_d39105bc4146e68631d1261a1ca2a632/izio7-YourTeam-15b2d72/app/AppKernel.php on line 25
Finally I solved, the problem was the system variable SYMFONY_ENV=prod not set.
https://devcenter.heroku.com/articles/getting-started-with-symfony#configuring-symfony-to-run-in-the-prod-environment