I'm trying to install mongodb since 3 days but each time, I had a different error message until I fix some of them and I could install mongodb for my Symfony 2.1.4 installation. So now I have this error message:
"Fatal error: Class 'Doctrine\Bundle\MongoDBBundle\DoctrineMongoDBBundle' not found"
I couldn't find any solution to solve it.
For information in my composer.json I added these lines:
"doctrine/mongodb-odm": "*",
"doctrine/mongodb-odm-bundle": "v2.0.1"
and it creates 3 folders in the Doctrine namespace:
doctrine/mongodb
doctrine/mongodb-odm
doctrine/mongodb-odm-bundle
Why is this occurring?
For Symfony 2.1, you'll need to use version 3.0 of the Doctrine ODM MongoDB Bundle.
"doctrine/mongodb-odm": "1.0.*#dev",
"doctrine/mongodb-odm-bundle": "3.0.*#dev"
The reason the bundle you installed could not be found was because it was under a different namespace, being Symfony\Bundle\DoctrineMongoDBBundle\DoctrineMongoDBBundle for Symfony 2.0
Related
In zf3 while trying to use JsonModel I get error
Fatal error: Uncaught Error: Class 'Zend\Json\Json' not found in
\vendor\zendframework\zend-view\src\Model\JsonModel.php:
You probably didn't include zendframework/zend-json. You can do this by running this in your terminal:
$ composer require zendframework/zend-json
zend-json, as many other components, is a suggested package when zend-view is installed. But since there are many more suggested packages you might have missed that message.
I am getting fatal error random_bytes() in laravel 5 after installing the
"paypal/adaptivepayments-sdk-php":"v3.6.106" in composer.json
"require": {
"laravel/framework": "5.0.*",
"jacopo/laravel-authentication-acl": "1.3.*",
"webpatser/laravel-countries": "dev-master",
"yajra/laravel-datatables-oracle": "~5.0",
"illuminate/html": "5.0.*#dev",
"paypal/adaptivepayments-sdk-php":"v3.6.106"
},
using composer. please share me any solution . i am stuck for last 3 hrs to solve this error.
i tried to comment the nextBytes() in secureRandom.php file but i think it is not a good idea.
random_bytes is a PHP function in PHP v7.0. You can install the missing package on PHP v5.x using composer.
Run composer require paragonie/random_compat and then try adding the affected library.
Source: https://github.com/paragonie/random_compat
I work with symfony 1.4, and I want to use the plugin sf sfTCPDFPlugin.
I followed step by step all the instructions, I read the question “How to generate PDF using sfTCPDFPlugin in symfony 1.4?” and answers, but when I try to generate a PDF file, I get the following error:
The server returned a "500 Internal Server Error".
In detail, I have done the following:
I installed PEAR - PHP Extension, and run OK.
I installed
successfully the plugin sfTCPDFPlugin
I downloaded and installed
the "TCPDF library"
$ symfony plugin:publish-assets
$ symfony cc
Copy the /plugins/sfTCPDFPlugin/config/pdf_configs.yml into the config folder of your application
Now I try to test the plugin, but when I want to run the function "test" that is included in the plugin, I get the following error:
The server returned a "500 Internal Server Error":
PHP Fatal error: Class 'TCPDF' not found in D:\proyectos\conflictosnew\plugins\sfTCPDFPlugin\lib\sfTCPDF.class.php on line 14
I use Wampsever under Windows XP
Any idea what could be happening?
I have found an error! The link contained in: "Download the TCPDF library" at: http://www.symfony-project.org/plugins/sfTCPDFPlugin, is incorrect, because download fonts only, not the complete library
In the following link you can find the complete library TCPDF:
http://sourceforge.net/projects/tcpdf/files/
I have installed sfTCPDFPlugin in my project, but when I try to test if the installation is alright (with the source found on the official site) I get the error:
Fatal error: Class 'TCPDF' not found in C:\wamp\www\mairie\plugins\sfTCPDFPlugin\lib\sfTCPDF.class.php on line 12
How can I fix it?
Read the readme tab here : http://www.symfony-project.org/plugins/sfTCPDFPlugin
It says you have to download the tcpdf library, not only the sfTCPDFPlugin.
i faced with same problem, and i did the following task it will also help you.
first of all run: symfony plugin:uninstall sfTCPDFPlugin then remove the sfTCPDFPlugin directory form your plugin folder.
mow do the following setps:
1. cd your project path/symfony
2. symfony plugin:install sfTCPDFPlugin
3. download the tcpdf library unzip it and past into your sfTCPDFPlugin/lib now your directory looks like your project path/symfony/plugins/sfTCPDFPlugin/lib/tcpdf
now change your ProjectConfiguration.class.php to add $this->enablePlugins( array('sfTCPDFPlugin') ); now run the symfony plugin:publish-asstes and finally clear the cache symfony cc.
I am trying to generate a migration script using Doctrine with Zend Framework. I am getting the following:
$ php doctrine.php generate-migrations-diff
$ PHP Fatal error: Cannot redeclare class Avo_Model_AccessType in
$ tmp/fromprfx_doctrine_tmp_dirs/AccessType.php on line 16
I can successfully build the models form the yaml file. I am using Zend Framework 1.10.5 and Doctrine 1.2.2 I think the issue might be with the autoloader and the fact that Zend Autoloads the classes that doctrine is trying to re-create.
I've got the same error today. The problem was that in bootstrap I preloaded all models with
Doctrine_Core::loadModels($options['models_path']);
So, I just removed that line and it helped.