CurlExeception with Guzzle using KeenIO - laravel-5

I am building a Laravel (5.1) site which uses KeenIO to do some event tracking. Everything went fine locally (on a mac), so I pushed everything up to my digital ocean droplet through forge to start testing on the server. I delegated the keen events to the Laravel queue service for performance reasons. When I ran the queue:listen command I got this strange error.
[Guzzle\Http\Exception\CurlException]
[curl] 77: error setting certificate verify locations:
CAfile: {my_local_file_path}/vendor/guzzle/guzzle/src/Guzzle/Http/Resources/cacert.pem
CApath: /etc/ssl/certs [url] https://api.keen.io/3.0/projects/{project_id}/events/users
I checked the guzzle source code and it looks like this line is where this path is being set inside of Client.php on line 139.
$opts[CURLOPT_CAINFO] = __DIR__ . '/Resources/cacert.pem';
DIR should be referencing the file path of the server though...so why is it still pointing to my local file path on my mac?????
I tried clearing all the Laravel caches and using every other command I could find. This one has me really stumped, guys. Am I missing something super obvious?

I don't know if this is an actual solution...but after running composer update on my local machine a few times and pushing back up to the droplet, everything seems to be working...If anyone could shed light on why this fixed things I'd appreciate it, haha.

Related

cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)

GuzzleHttp\Exception\RequestException
cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html)
how to solve this error i am trying everything available on the google including
the below description several times
Download this file: http://curl.haxx.se/ca/cacert.pem
Place this file in the C:\wamp64\bin\php\php7.1.9 folder
Open php.iniand find this line:
;curl.cainfo
Change it to:
curl.cainfo = "C:\wamp64\bin\php\php7.1.9\cacert.pem"
But still it didn't work for me
please help me i am so frustrated right now...
You need to put .pem file inside of C:\wamp64\bin\php\php7.1.9\extras\ssl instead of C:\wamp64\bin\php\php7.1.9
Make sure the file mod_ssl.so is inside of C:\wamp64\bin\apache\apache(version)\modules
Enable mod_ssl in httpd.conf inside of Apache directory C:\wamp64\bin\apache\apache2.4.27\conf
Enable php_openssl.dll in php.ini.
In wamp there are two php.ini files and You need to do this in both of them.
First one can be located inside of your WAMP taskbar icon
and the other one is located in C:\wamp64\bin\php\php(Version)
find the location for both of the php.ini files and find the line curl.cainfo = and give it a path like this
curl.cainfo = "C:\wamp64\bin\php\php7.1.9\extras\ssl\cacert.pem"
Now save the files and restart your server
In my case this error also happened when using Laravel's development server.
In order to fix it, just shifted stopped that server and ran Apache through XAMPP and that was enough to solve the problem.
If you're having troubles with this approach, please read the answers to this question for more details.

Illegal instruction: 4 when executing php artisan migrate

I am new with Laravel and working on a project to practice myself. I have set up and connected my database and when I try to execute the migrate command on the VS Code terminal, I get the error: Illegal Instruction: 4
I have seen different discussions but was not able to find one with good instructions to solve this.
Most of them were for other programs and not Laravel/VS Code.(also I am a Mac user)
Any ideas on this and how to solve it?
enter image description here
This error seems to occur if you have SSL issues or config issues in the options section.
It may be how the composer runs from a root directory and it cannot find the real path of a SSL certificate.
We experienced this due to an incorrect configuration on Symfony[*] where the the mysql port was set to 33060 instead of 3306.
I think you can get this error if your mysql configuration is pointing to the wrong host/port combination, possibly combined with SSL enabled.
The issue is in the php mysql layer so which framework is in use is not so important.
You are trying outside the project folder you should go inside your project folder
cd YOUR_FOLDER_NAME
then
php artisan migrate

How to fix this error "Impossible to connect, please check your Algolia Application Id"?

I have everything correct, as written at laravel/algolia websites.
I tried to read lot of documentations and tutorials about Laravel Scout installation, but still can't find solution.
I have everything correct in my settings and also APIs are correct but still getting this error:
Impossible to connect, please check your Algolia Application Id.
I had the same issue (with Windows 10) and found this exception in the stack trace:
cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)
I found the solution for the error above in another StackOverflow post:
1) Download the latest cacert.pem from
https://curl.haxx.se/ca/cacert.pem
2) Add the following line to php.ini (if this is shared hosting and
you don't have access to php.ini then you could add this to .user.ini
in public_html)
curl.cainfo="/path/to/downloaded/cacert.pem"
Make sure you enclose the path within double quotation marks!!!
It solved my problem, Laravel Scout is working fine after that. Hope this will help someone.
Apparently on the issue came from on wrong credentials, this can occurs providing the wrong Application ID or Admin API Key. Also the correct way to provide the credential on scout.php is :
'algolia' => [
'id' => env('ALGOLIA_APP_ID', ''),
'secret' => env('ALGOLIA_SECRET', '')
],
And then fill your credentials in your .env file.
I'd recommend you to run php artisan config:clear in case you have cached your configuration (which you shouldn't do in dev env).
Let us know if it solve your issue.
I had the same issue and solved it like this
php artisan cache:clear
php artisan route:clear
php artisan config:clear or config:cache
My assumption is, because Laravel always creates a cache in the config, every time we change some config, there must be another config that is broken or an error due to the cache that was created earlier.
But I don't know for sure.
I share with you my experience.
System was Vagrant Homestead with VirtualBox in Windows 10.
command used in CMD:
php artisan scout:import "App\Post"
command failed with:
Impossible to connect, please check your Algolia Application Id.
Logged into virtual box with vagrant ssh and gave it another try.
That solved my problem.

Using NGINX server to deploy a Meteor App from Amazon Linux AMI 2013.09.2 instance receive Module Error

I am attempting to deploy my first web application (a version of Telescope from the MeteorJS framework) via Heroku to a custom subdomain from a Amazon Linux AMI 2013.09.2 instance. I am following along with this tutorial - http://satishgandham.com/2013/12/a-complete-guide-to-install-production-ready-telescope-on-your-own-server/ - but once I attempt to run Telescope using PORT=3000 MONGO_URL=mongodb://localhost:3000/Telescope ROOT_URL=http://ec2-54-193-42-229.us-west-1.compute.amazonaws.com node client/main.js, I receive this error message: Error: Cannot find module '/home/ec2-user/bundle/programs/server/node_modules/fibers/client/main.js'
What I have attempted to do to solve this problem is performed cp || mv on the file main.js which is originally located in the ~/Telescope/client directory over to /home/ec2-user/bundle/programs/server directory and even '/home/ec2-user/bundle/programs/server/node_modules/fibers but I cannot seem to separate main.js from the /client directory. I am not sure if that is the issue or if there is some other underlying problem but I want to find a work around to using a proxy server at this point. I thought that moving the main.js file out of the /client directory was sufficient but apparently not. I am not sure it is imperative for my purposes to continue attempting to use a proxy but if there is a fix, I would not mind learning about it.
Or if any one could direct me on how this - https://github.com/aldeed/deploymeteor/ - could be a potential work-around to using an NGINX server proxy your help would be much appreciated.
You are getting the error because you are not running the command from your home folder.
You were at bundle/programs/server/node_modules/fibers.
Either use absolute path for client/main.js, or cd to ~
MONGO_URL=mongodb://localhost:3000/Telescope ROOT_URL=http://ec2-54-193-42-229.us-west-1.compute.amazonaws.com node client/main.js
PS: It will be helpful for others if you asked the question on the post itself, instead of here

BlogEngine.Net - "Unable to generate a temporary class" error

I just uploaded a new instance of blogengine.net to a subdomain on my host and I am getting the following error:
Unable to generate a temporary class
(result=1). error CS2001: Source file
'C:\WINDOWS\TEMP\jn5ced1y.0.cs' could
not be found error CS2008: No inputs
specified
I do have VPS plan on my host, do I need to ask for specific permissions?
On previous installs (older versions) of BE I never had this problem - did I do something wrong?
Thank you.
Sounds like a permissions issue on the TEMP directory. I've had the same issue locally on my development machine and took the naughty EVERYONE/ALL route to resolve.

Resources