LinkedIN - PHP Sample Code - linkedin

I am trying to implement the LinkeIN API with PECL oAuth Module, I have managed to import my contacts and the scrip works well on my Development envoirnment
But on my Live Server it raises an exception when I get redirected to my website after authentication(From Linked In Website)
I have confirmed the following:
1. The TimeZone is proper and My Server DateTime is set correct.
2. The CallBack URL is proper
Exception :
Exception caught! Response: 400 1302008612531 0 Unsupported POST target {/v1/people/~:(id,first-name,last-name,headline,location,industry,distance,relation-to-viewer,current-status,current-status-timestamp,connections,summary,specialties,proposal-comments,honors,positions,educations,member-url-resources,picture-url,site-standard-profile-request,api-standard-profile-request)}
Fatal error: Uncaught exception 'OAuthException' with message 'Invalid auth/bad request (got a 400, expected HTTP/1.1 20X or a redirect)' in /var/www/html/contaxz/app/webroot/linkedIn/linkedin/Request.php:217 Stack trace: #0 /var/www/html/contaxz/app/webroot/linkedIn/linkedin/Request.php(217): OAuth->fetch('https://api.lin...') #1 /var/www/html/contaxz/app/webroot/linkedIn/example/index.php(23): LinkedIn_Request->pullConnections() #2 {main} thrown in /var/www/html/contaxz/app/webroot/linkedIn/linkedin/Request.php on line 217
Please suggest
Thanks
Ravi

I had been breaking my head with the code, server configuration, oAuth installation, php and apache version, TimeZone and what not.... but had No Luckā€¦.
Finally, I found my way and thought of posting it here as it could help someone:
Stop Apache
Hunted for the PHP OAuth Module in the PHP lib directory in my case I found this at /usr/lib/php/modules/oauth.so
Copied PHP OAuth Module from my DEV server and uploaded it on LIVE server
Restarted apache and it worked!
Thanks
Ravi

Related

Corda : Exception during node startup: Certificate is not valid at instant now

I try to run the example CorDapp following this url https://docs.corda.net/tutorial-cordapp.html
But there is error while building Nodes as below error
[ERROR] 15:40:44+0700 [main] internal.NodeStartupLogging.invoke - Exception during node startup: Certificate is not valid at instant now [errorCode=18292z7, moreInformationAt=https://errors.corda.net/OS/4.0/18292z7]
So I understand that if I set devMode=true, the certificate for each nodes won't required but after I configured devMode=true, still does not work.
Update 1:
I installed Windows into VM and do the tutorial. Nodes built successfully on VM. Still looking for the solution.
Finally, I figured it out. After I checked X509Utilities.kt which this error came from.
There is some Date validation. So I changed Format and Date format in Windows Region menu as below image. It works!!
Date format image

How to fix 'Uncaught PHP Exception Twig_Error_Loader: Unable to find template' on Symfony 3.4?

I deployed a symfony 3.4 project from my local machine (Windows 10) to a cloud server (Digital Ocean) based on Ubuntu.
I spent 2 days trying to resolve this (i think) routing problem:
"request.CRITICAL: Uncaught PHP Exception Twig_Error_Loader..."
Locally, on localhost with XAMPP, it works perfect.
The project runs ok on the login (is like a backend user app), with the register ok But when it tries to pass the login, it needs to load the initial dashboard with some includes (like nav_side.html.twig) and the server response is error 500.
How can i fix it?
Thanks a lot for your response...i'm a little bit desperate. :)
I made composer update, i deleted the cache folder, but the error is still there.
request.CRITICAL: Uncaught PHP Exception Twig_Error_Loader: "Unable to
find template "Backe ndBundle:includes:nav_side.html.twig"
(looked into: /var/www/onecup/app/Resources/views,
/var/www/onecup/vendor/s
ymfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form) in
"BackendBundle:Dashboard:index.html.twig" at line 7." at
/var/www/onecup/vendor/twig/twig/lib/Twig/Loader/Filesystem.php line
234 {"exception":"[object] (Twig_Err or_Loader(code: 0):
Unable to find template \"BackendBundle:includes:nav_side.html.twig\"
(looked into: /var/www/ onecup/app/Resources/views,
/var/www/onecup/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form)
in \"BackendBundle:Dashboard:index.html.twig\" at line 7. at
/var/www/onecup/vendor/twig/twig/lib/Twig/Loader/Fil
esystem.php:234)"} []
#Flying was right: examine your code and try to find possible case inconsistences in directory / filenames. e.g. "file" and "File". Windows filesystem is case-insensitive, but Ubuntu filesystem is case-sensitive.
So, i changed the Includes to includes and that's all.
Thanks a lot!! :)

Fatal error when copying wordpress site from server to localhost

I've been trying to create a local copy of this wordpress site - click4taps.co.uk. But even though everything seems to run pretty much fine on the server, on localhost I am getting these code errors, I would have maybe expected a database error if I had forgot something in the setup. I'm not super good at php but I can't see anything that out of place in the code the error specifies.
Here is the error message I receive when trying to launch the site in localhost:
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'woocommerce_layered_nav_init' not found or invalid function name in C:\Program Files (x86)\Ampps\www\click4taps\wp-includes\plugin.php on line 406
Fatal error: Call to undefined function is_product() in C:\Program Files (x86)\Ampps\www\click4taps\wp-content\themes\bazar\theme\plugins\woocommerce-ajax-layered-nav\init.php on line 59
Any feedback on this would be very helpful thanks
Activate your woocommerce plugin

WordPress Site Error failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found

I am trying to open a WordPress site on an external server for which I do not have a domain yet using its ip address and an adjusted HOST file on my Mac to check it on the server. When I access the site I get errors like:
Warning: file_get_contents(http://domain/folder/wp-content/themes/theme-name/img/phonehead.svg) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/user/domains/domain.com/public_html/folder/wp-content/themes/theme-name/inc/control/file.php on line 16
I did find some articles on the same issues like this one. The issues is not that the path is wrong or the file is not there. It seems that it has something to do with either my router or the way I use the hosts file to resolve the domain to the new ip address.
The hosts file line I added should be fine, so perhaps there is an issue with my D-Link DVG-N5412SP router is handling the request. But nowhere did I find how I can fix the issue. What do I need to adjust?
Update
From another location I got
Warning: file_get_contents() [function.file-get-contents]: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /home/user/domains/domain.com/public_html/folder/wp-content/themes/theme/inc/control/THeaderControl.php on line 16
This might point me to the right direction. Working on it.
To make the path request local and not over the network I had to use the WordPress template tag get_template_directory() instead of get_bloginfo('stylesheet_directory') .

[an error occurred while processing this directive]

Hey guys I'm in the middle of migrating a wordpress site from one host to another (BlueHost to LunarPages). I backed up everything on the old server, did a fresh WP install on the new server, imported the old files over, did the wp-config/database changes and got the site to show up.
http://www.albertineco.com
But if you navigate to any page it gives you [an error occurred while processing this directive]. I've tried deactivating my plugins and switching themes to see if that caused it with no luck. LunarPages didn't have a real idea of the cause of the problem either.
This was in the Cpanel error log:
[Fri Mar 22 10:57:32 2013] [error] [client 69.178.136.2] invalid CGI ref "/cgi-sys/fourohfour.cgi" in /home/alber27/public_html/404.shtml, referer: http://albertineco.com/
Any thoughts guys?
I had the same problem. This is how I solved:
I asked the hosting company to provide me the FTP credentials
I logged in to FTP and right clicked .htaccess file
I changed the cmod for .htaccess file to 777
I went back to my dashboard and re-did the permalink and saved.
Now, it works.

Resources