Error 0x2 starting php.exe in Laravel - php

I am suddenly got this error in my composer when I am using php artisan and I already find this link but it doesn't help me , How can I fix it, I am using laravel 5.4 and PHP 7.1 and IIS 7.5 as my server

Related

I'm getting the error on Cpanel that I'm running php 7.4 yet when I run php -v I get 8.02

I've deployed a laravel app on cpanel. The app is working as expected on my local machine but on cpanel I'm getting the error below.
Fatal error: Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 8.0.2". You are running 7.4.30. in /home4/peakcoke/public_html/vendor/composer/platform_check.php on line 24
When I run php -v I get 8.0.20.
How can I fix this?
Do a phpinfo(), what you get by running php -v from terminal is PHP CLI version.
Also, Cpanel usually comes with PHP Selector component that allows you to switch between different installed versions.

Error while trying command: php yii migrate in terminal

I had errors while trying the command:
php yii migrate
A PDO driver error or other errors shown
After trying many solutions I got the answer:
1)I just uninstalled xampp on my computer from control panel
2)Downloaded and Installed xampp version 7.4.6
3)Downloaded and intalled composer pointing the required php.exe to C:\xampp\php\php.exe which was my xampp installation folder
4)Finally re run php yii migrate and it is successful

PHP PDOException connection issue - laravel

I am trying to run an existing Laravel application with "php artisan serve". Since the application have been developed with laravel 4.2, php 5.6 supported had to install php, apache separately in my local environment.
{"error":{"type":"PDOException","message":"could not find driver","file":"\/var\/www\/html\/PROJECT\/vendor\/laravel\/framework\/src\/Illuminate\/Database\/Connectors\/Connector.php","line":47}}
Can anyone tell how to fix this issue ? Am I missing any settings in the php.ini ?

Laravel error after changing php version

I just setup php 7.0.27 in both webserver and cli. My laravel project was working just fine before in php 7.2. When I try run command php artisan serve it shows an error:
PHP Parse error: syntax error, unexpected '?', expecting variable
(T_VARIABLE) in /var/www/html/pmanager/pmanager/vendor/symfony/console
/Output/Output.php on line 40
I followed this github discussion which says that the solution is installing same versions in cli and webserver, which, in my case is fine. I have 7.0.27 in both.
Another thing they are pointing it out is laravel shows this error with php 7.0. I cannot change my php version to 7.1 or 7.2 because I must stick with it so as to run magento 2.1 projects.
Any help without changing php version would be highly appreciated.
you can downgrade your laravel 5.6 project to 5.5!!
Changing the value of the Laravel version inside the composer.json file to the laravel 5.5.
Delete /vendor folder and run composer install

Laravel local insists PHP 7.1.5 even though WAMP running PHP 5.6.32

I have a WAMP installation and selected PHP 5.6.32 as the version to run.
When I run php artisan serve, the phpinfo() call returns PHP 7.1.5 Development Server
My host has PHP version 5.6.32 installed and I'd like to get Laravel working locally with something other than PHP 7.
What can I do here as the deployment to my host isn't working.
I'm running Laravel version 5.5.32
Yes you need to go down in Laravel Version 5.4 or lower,
https://laravel.com/docs/5.4
** Or you need to upgrade your WAMP PHP to 7 which is required for Laravel 5.5
If you read the docs it will tell you what is required in order to run version of Laravel. It is indicated in to very top of the page under requirements
Good luck with the development

Categories