i have a problem since upgrading to laravel 8.0 with vonage/Nexmo. The website still works but CronJobs doesn't work (because of the Warning probably?).
Here is the Warning that appears in the Apache Error log:
Got error 'PHP message: PHP Warning: file_exists(): open_basedir restriction in effect. File(/autoload.php) is not within the allowed path(s): (/home/webapps/preprod/:/var/lib/php/session:/tmp) in /home/webapps/preprod/vendor/vonage/nexmo-bridge/src/Autoloader.php on line 69
My composer.json:
"require": {
"php": "^7.3|^8.0",
"guzzlehttp/guzzle": "^6.3.1|^7.0.1",
"nexmo/laravel": "^2.4.1",
"vonage/nexmo-bridge": "^0.1.0" (this one was added after upgrading but the problem is still there)
I have tried to add the folder to the open_dir directory, but the warning is still there.
Can anyone point me in the right direction? Or is it possible to make Cronjob ignore the Warnings?
Thank you
After removing line 69 everything works.
I had wrong php version on server too (so i had to update that too).
I will retry later if the error is still there with the good php version.
The issue has been fixed with the latest update of vonage-php-nexmo-bridge. Just upgrade to version 0.1.2.
Related
I have recently installed laravel through softaculous in CPanel. After the installation, when I tried to open the website, it shows 500 Internal Server Error. Actually, I am a beginner in Laravel. The following errors I got from error_log.
[08-Aug-2020 12:56:03 UTC] PHP Fatal error: Declaration of Carbon\Translator::setLocale($locale) must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::setLocale(string $locale) in /home/hugar/public_html/jityo.com/vendor/nesbot/carbon/src/Carbon/Translator.php on line 18
[08-Aug-2020 12:56:03 UTC] PHP Fatal error: Uncaught ErrorException: Declaration of Illuminate\Http\Response::setContent($content) should be compatible with Symfony\Component\HttpFoundation\Response::setContent(?string $content) in /home/hugar/public_html/jityo.com/vendor/laravel/framework/src/Illuminate/Http/Response.php:14
Every assistance will be appreciated!.
Check the server php version and the php version in composer.json file of laravel framework, if it's not a match then you have to change the server php version and it will work like a charm. this happened with me as well.
The php version(7.1) on the server was lesser than php version in composer.json(7.2).
The problem fixed by upgrading the php version(7.4) on the server.
I have been using laravel for multiple projects already, however for some reason my new laravel project does not have the server.php file.
Reinstalling composer and / or recreating the project does not work. I also can't put a file by the name of server.php into the project in any way.
[Fri May 11 02:26:55 2018] PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0
[Fri May 11 02:26:55 2018] PHP Fatal error: Unknown: Failed opening required 'C:\Users\Luke Derkzen\Documents\GitHub\Website\server.php' (include_path='C:\xampp\php\PEAR') in Unknown on line 0
I get this error when I try to start the server, as far as I can see it's expecting me to have something running on XAMPP, however on my other projects there is a server.php file, and it doesn't give above error.
The project was created with following command:
composer create-project --prefer-dist laravel/laravel
If i use the php artisan serve command afterwards to start the server and reload the page. above error appears in the artisan console.
How can I fix this?
Server.php make a Exception and your Anti-Virus like Avast delete it Automatically. Make turn off your Anti-VIrus Software.
The problem occured, as rightly predicted by some, due to corrupt windows permissions. I talked about it with microsoft support, however they could offer no solution (without paying $50 / $150) so I did a clean install of windows.
While I'm sure this isn't a solution people hope to find, it was the only way for me.
I am new to this but I am trying to view a repository through localhost and I am receiving this php error in the mamp log:
PHP Warning: require ..... failed to open stream: No such file or directory in .......autoload_real.php on line 58
PHP Fatal error: require(): Failed opening required
....autoload_real.php on line 58
On Line 58 is the following:
function composerRequireec02cd7cea0c14cd8638fe929f5e7e81($file)
{
require $file;
}
I think it might have something to do with the laravel version but i'm not sure. The other thing is that when I try to see errors in the laravel log there is no log in app/storage
First give the read permission to storage and bootstrap directory in your laravel project and then reload your laravel project in browser.
It seems to work now after doing composer-dump autoload then a composer update, although I was looking for more of a global answer as to why this might be happening (i.e. outdated laravel version etc.). But thanks everyone!
I checked out the PhpWebSockets project from here:
https://code.google.com/p/phpwebsocket/
It's in its own project on my localhost (Windows 7 64-bit) box, inside of a WAMP server. I issue the following command in Windows Command Line to run the server.php file:
C:\wamp\bin\php\php5.4.12\php.exe C:\wamp\www\phpwebsocket\server.php
But it results in the following error message:
PHP Fatal error: Call to undefined function socket_create() in C:\wamp\www\phpwebsocket\server.php on line 58
My WAMP instance DOES have the php_sockets extension enabled (since I saw this similar question who had that problem).
Anyone know what I could possibly be doing wrong?
Found the answer in another thread:
Error with PHP Websocket and Wamp Server
Turns out running the file on the command line means it uses a different php.ini file than the WAMP server does. Seems stupid, but turned out php_sockets wasn't uncommented in that php.ini file, and removing it removed the error with it.
I'm getting an error when i work with FOSRestBundle.
Fatal error: Class 'JMS\Serializer\SerializationContext' not found in
/home/a15net/public_html/kavuklar/vendor/friendsofsymfony/rest-bundle/FOS/RestBundle/View/ViewHandler.php
on line 209
It was working before composer.phar update.
Do you any have idea about this why i'm getting this error?
I had the same problem.
I solved it reading the FOSRestBundle upgrade file, and then updating my composer.json. You should try to put in require section this next lines:
"friendsofsymfony/rest-bundle": "0.11.*",
"jms/serializer-bundle": "0.12.x-dev"
and then
composer.phar update
It works for me.
Try and comment.