HYbridauth for facebook login doesn't work - hybridauth

I was trying to configure the hybridauth library so that I can use the the google + and the facebook sign in. But it keeps me giving a fatal error:
Fatal error: require(): Failed opening required 'Facebook\Facebook.php' (include_path='.:/var/www/magilla/lib:/var/www/magilla/models') in /var/www/magilla/lib/RPC/Util.php on line 168
I followed each and every step of their documentation. I have used the
composer to install the library. The library version is 2.9 and the
facebook graph sdk, the most recent version of github

READ EDIT*2 for a proper solution instead
I am encountering the same issue and I suppose you install hybridauth the same way as I did, which is running composer require hybridauth/hybridauth on your project root folder.
I solved this by running composer install within the hybridauth
directory where its composer.json exist, that will install facebook
sdk within the hybridauth directory where the autoload.php is being
load by the script (I personally feel like it is more like a hack than
a proper solution... but I have a feeling that the hybridauth
developer expect you to clone then run the composer install instead of
composer requiring it...I maybe wrong as I just start using composer
as well)
*EDIT check out the issue on their github, there is a bug where the vendor path is being replaced by one in their code, it also mention it is being fixed in later commit. I am new to composer as well so I don't know how to specific the commit for it to update to... if you know how to do it let me know as well
*EDIT*2 alright, I updated to 2.9.3-dev and it seems to solve the issue without generating any new one, I also use that for google and twitter and those are fine too. To update, edit your composer.json to this
"require": {
"hybridauth/hybridauth": "^2.9-dev"
}
then run composer update on your command prompt, things should work as long as you require the composer autoload.php for your script

Related

Custom Craft CMS plug-in template changes issue

Somebody has developed a custom plug-in for a project of mine.
I now want to change some templates from this plug-in and no matter what changes I make to these templates, nothing changes! I don’t understand why. I’ve cleaned caches several times and the cache tag is not used. It’s my third craft cms project but I’ve never had much experience with custom plug-ins.
What might be happening?
Have you tried composer commands for the same?
composer update
For updating the composer
If it doesn't work try uninstalling the plugin then install it again with the following commands
composer remove vendor/plugin-handle
For uninstalling the Plugin
composer require vendor/plugin-handle
Install the plugin again then activate the same through CP
Hope this helps you in the same.

Apigility Admin UI Not Opening

so my apigility admin area was working just fine before they updated it to ZF3.
No after composer update, I am getting this when I try to open /apigility/ui
Does anyone know what might be the problem and how can we resolve this issue ?
The Issue is:
In the error logs you'll find that css and js data is not loaded. As the rwoverdijk/assetmanager is removed since apigility Admin 1.5 some files are not loaded anymore.
Solution:
Follow part 2. of the Upgrade from https://github.com/zfcampus/zf-apigility-admin#initial-upgrade-to-15
I also tried part 1 what was also working because now the rwoverdijk/assetmanager is now on 1.7.1 (but i do not know if the incompatibility is solved with this version so i did it with the zfcampus/zf-asset-manager). I'm still on ZF2 but the issue is the same.
Install zf-asset-manager. This is a Composer plugin, and operates when installing or uninstalling a package. If you add this, you will need to follow these steps:
composer require --dev zfcampus/zf-asset-manager
rm -Rf ./vendor
composer install
The additional steps are necessary in order for the plugin to pick up on the assets from the other components and copy them to the public folder. After installation you ll find a folder apigility-ui in you
Something similar happened to me when I reused the same code for a new repository on my local development environment having set the base_path value on
./module/Application/config/module.config.php.
'view_manager' => [
'base_path' => 'https://subdomain1.example.com',..]
I solved it by deleting the base_path config value.
The view cannot be rendered fully as the wrong html base is injected to the rendered view. In my case the html base looked like
<base href="http://subdomain2.example.com.devhttps://subdomain1.example.com/">
Instead of
<base href="http://subdomain2.example.com.dev">

Add GData to Zend Framework2

Okay, so this has proven to be more difficult than I expected and think it should be.
All I want to do is utilize the GData library for some youtube functionality in my site. However, I can't seem to figure out how to add everything in so Zend recognizes the classes.
I've downloaded the latest ZendGdata archive, and added the contents of \library into \vendor\Zend. Next step is to autoload all that into my application right? I've tried searching for how to do it, but nothing has helped. Now I look to you, stackoverflow. Please help me figure this madness out.
How about ditching manually installing vendors and using composer which will manage all the autoloading stuff for you?
Download composer.phar into your project's root directory and run init to create a basic configuration:
curl -s https://getcomposer.org/installer | php
php composer.phar init
Follow the prompts, when it comes to searching for required packages, select zendframework/zendgdata and use the version dev-master. (If you decided to use composer for all your dependencies which I recommend, you could also at this point add zendframework/zendframework: 2.*).
Once you've done that a composer.json file will have been created. Next install your dependencies:
php composer.phar install
Once that's all done, there should be a vendor/autoload.php file that you require from your entrypoint to have autoloading of your composer dependencies working.

ZEND2 project not working after cloned to separate machine

I have cloned my office colleague's zend2 project from our server. He used zfcuser, zfcbase, and zfcadmin. But when I tried to run the project in my local machine its giving
<b>Fatal error</b>: Uncaught exception 'Zend\ModuleManager\Exception\RuntimeException'
with message 'Module (ZfcBase) could not be initialized.' in C:\xampp\htdocs\coolshop
\vendor\ZF2\library\Zend\ModuleManager\ModuleManager.php:140
Everything is fine to me as the same project 100% working in my colleague's machine. I tried the composer as well. But no luck
This is a result of loading the ZfcBase module as a git submodule. If you fix this module you'll receive the same error for other modules or dependencies you're using in that manner. I've encountered this problem when someone tries to clone the project on a new machine or you delete the project locally and try to re-clone it.
The simple answer here is to use composer as your dependency manager, you'll have a better day. Head over to ZfcBase on Packagist and copy the require statement into your composer.json file (You'll need to run the composer script after saving your .json file). Most modules should have instructions on using composer to grab them in the README.
I should note that if you're using other modules that depend on ZfcBase, you'll likely just need to have a require statement for those, and not their dependencies (like ZfcBase).
Someone had a similar question regarding the ZfcUser module. Using composer solved his issue.

symfony plugin installation failing [bhLDAPAuthPlugin]

I'm working on a symfony project and I need a user access conected to an LDAP server. So I searched for something already done to add to my app and found this plugin that has all I wanted.
So I tried to install with the command $ php symfony plugin:install bhLDAPAuthPlugin
for some reason it throws me this error:
No release avaiable for plugin "bhLDAPAuthPlugin"
I don't really understand what that message means. I've checked the spell of the command (also copied the command given in the page of the plugin) and same error appears. If I had no all requeriments for instalation, other errors would be thrown, right?
PS: If you know some easy way to implement by myself the comunication with LDAP (Microsoft Active Directory) will also be appreciated.
No exactly sure how to solve the error message, perhaps it helps is specifically specify which version you wish to install.
Otherwise there's an easy workaround:
Just download the tgz file from here:
http://www.symfony-project.org/plugins/bhLDAPAuthPlugin/6_0_0
and do
php symfony plugin:install bhLDAPAuthPlugin-etc-etc.tgz

Resources