LdapBundle error with symfony 2 version - php

I'm using this LdapBundle.
I have already installed it, but I catch an error:
Fatal error: Call to undefined method Symfony\Bundle\SecurityBundle\DependencyInjection\SecurityExtension::addSecurityListenerFactory() in C:\wamp\www\trainingboard\src\IMAG\LdapBundle\IMAGLdapBundle.php on line 41
I know that I have to change my Symfony version to 2.1. I tried to change folder Symfony in vendors, but after that I caught another error. So, I can't so simple change Symfony. Can you give me advice what to do?
P.S. Now I'm using the 2.0.9 version of Symfony

IMAGLdapBundle only works with Symfony 2.0.x
Instead you can try FR3DLdapBundle 1.6.x

Related

A trouble with orchestral imagine for laravel

I have a problem with orchestral imagine for laravel (https://github.com/orchestral/imagine). It's a wripper for imagine component, so I had been caught an error:
Class 'Orchestra\Imagine\ImagineServiceProvider' not found
what I doing wrong?!
I had been added nesseccary lines to config/app.php including this line.
So, solution is a right version of the extension. For Laravel 5.2 It's 3.2

Class 'MongoDB' not found in fatfree (f3)

Iv recently been trying to upload my php application from xampp which i have installed on my home machine to a server. Now the code works perfectly on xampp at home and the mongodb driver works as expected, however after migrating it to the LAMP server, the f3 framework throws this error :
Fatal error: Class 'MongoDB' not found in /nfs/fs0/home/dhu/www/fatfree/lib/db/mongo.php on line 107
Internal Server Error
Fatal error: Class 'MongoDB' not found
In reference i looked up the line it is complaining about and its this one :
$this->db=new \MongoDB(new $class($dsn,$options?:array()),$dbname);
And after looking up solutions on stack and other websites they said to check the version of mongo etc installed so i look it up on the php side to see what was enabled and it returns :
PHP INFO ()
PHP Version 5.6.24-0+deb8u1
mongodb
mongodb support enabled
mongodb version 1.1.8
mongodb stability stable
libmongoc version 1.3.5
libbson version 1.3.5
So since mongo is both installed and enabled on the php server im unsure what exactly the issue is with line 107 in the fatfree framework, does anyone have any idea's? Any help would be appreciated.
So after no real solutions been found here im gonna update to see if i can get more help.
Update
Note the server settings can be found here:
http://lamp0.cs.stir.ac.uk/
and the error here:
http://lamp0.cs.stir.ac.uk/~dhu/
The line its referring too is:
$this->db=new \MongoDB(new $class($dsn,$options?:array()),$dbname);
Within the MONGODB library, mongo.php. After looking at various ways to set the DB up and trying to rewrite the setup code nothing seems to work....
Update 2
$manager = new MongoDB\Driver\Manager("mongodb://mydetails:27017");
If i removed the fatfree framework this line does not throw an error during setup which is surprising as i expected it to be unable to find MongoDB\Driver however it had no problem, its main problem seems simply to be that one line in the fatfree framework and im unsure why...
You need to add MongoDB as dependency in the composer.json file of your Fat-Free Framework.
Just add MongoDB to the require dependency list, if it is not there create one like below.
"require": {
"mongodb/mongodb": "^1.0"
},
Then run composer install again. Now you can reference MongoDB classes inside your code.
First install autoload class for mongodb in your project.Then try with below code
$client = new MongoDB\Client("mongodb://localhost:27017");

Laravel 5.0.34 database seeding error with tinker

I am following this laracast tutorial and as I key in this command in tinker:
factory('App\Flyer')->make();
I get this error:
PHP Fatal error: Call to undefined function factory() in eval()'d cod1
My php version locally installed is 5.4.38
So how do I get rid of this error?
PS: I want to avoid upgrading laravel at this stage as it would require me to update my php as well. So looking for some other workaround.
Model factories were added in Laravel 5.1 so it's obvious it won't work in Laravel 5.0.*
Reference: https://laravel.com/docs/5.2/releases#laravel-5.1

Class CamelCaseToSeparator not found when running zf show version

I'm trying to set up my Zend installation but when I run zf show version in the CLI I get this error message:
Fatal error: Class 'Zend\Filter\Word\CamelCaseToSeparator' not found in C:\Progr
am Files (x86)\EasyPHP-12.1\php\php546x120828095553\ZendFramework-2.0.3\library\
Zend\Filter\Word\CamelCaseToDash.php on line 18
I haven't changed anything in the files and they're in the right place with the correct names and everything.
Does anyone of you know what the error could be?
I had the same problem when I had 2 zend framework libaries includes in php.ini file for zend framework 1 and 2 versions, when I left only one, this error disapeared.

Configuring MongoDB + doctrine in Symfony

I was trying to install MongoDB doctrine bundle as written in here
But when I ran the command
$ php bin/vendors install
It throws up the following error:
Fatal error: Call to undefined method
Doctrine\ODM\MongoDB\Configuration::setLoggerCallable()in
C:\wamp\www\Symfony\app\cache\dev\appDevDebugProjectContainer.php on line 245
I have followed the installation instructions to the word (which has not been much anyways...) and i have also double checked my installation... Is there something I am missing here?
Update : A similar problem is mentioned here, but even after following the answer there, i could not successfully configure DoctrineMongoDBBundle.
The latest changes in the Doctrine MongoDB repo have introduces this problem. To stick to a version before this happened, add this line to deps.lock:
doctrine-mongodb 5ccb18231218ce92c9d72295f69bebfe172ef5fb
Well, finally I managed to solve it by adding this to the deps file:
[DoctrineMongoDBBundle]
git=http://github.com/symfony/DoctrineMongoDBBundle.git
target=/bundles/Symfony/Bundle/DoctrineMongoDBBundle
version=origin/2.0
** note the
version=**origin**/2.0
which is different from the previously suggested simple
version=2.0.0 or something similar...
I have a hunch that this problem occurs only on Windows, I hope someone could kindly confirm this.

Categories