I have problems when trying to update laravel 4.1 to 4.2.
I started that project on ubuntu, then got a new macbook pro and it looks like I'm missing something.
I'm using XAMPP 1.8.3
When I
composer update
I get the following error
Mcrypt PHP extension required.
Script php artisan clear-compiled handling the post-update-cmd event returned with an error
After few googling, found homebrew, then it's easy
brew install mcrypt
but I get the following warning
Warning: mcrypt-2.6.8 already installed
Any ideas?
Assuming your macbook pro is running Mavericks, the problem is most likely in your $PATH variable. The php command defaults to the built in php that ships with your mac. You can verify this by entering in terminal echo $PATH;
If it points to /usr/bin:/bin/usr/bin:/usr/local/bin then the problem is here because the native mac php does not include mcrypt. Add your XAMP PHP to your paths variable should solve the problem,
export PATH=$PATH:\path\to\xamp\bin\php5.ver\bin
Related
I am currently trying to install laravel, and following this tutorial :
I already installed brew, composer and php, but when I try to install valet I get the following error : valet: command not found.
I already changed my path (twice, I think), because when I echo path I get:
c/Users/Tiago/AppData/Roaming/Composer/vendor/bin:/snap/bin:/home/tiago/.composer/vendor/bin
What am I doing wrong?
Valet is for MacOS, seems like you are using windows.
Use Laravel Homestead instead.
I have installed Laravel 5.5 and I'm getting the same error, documentation says this:
PHP >= 7.0.0
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP Extension
Tokenizer PHP Extension
XML PHP Extension
I ran:
$ php artisan --version`
$ Laravel Framework 5.5.42
and I'm getting this error:
Symfony \ Component \ Debug \ Exception \ FatalThrowableError (E_PARSE)
Parse error: syntax error, unexpected '?', expecting variable (T_VARIABLE)
Is the documentation wrong? I'm using: https://laravel.com/docs/5.5/installation#installing-laravel
My server can only use PHP 7.0. Not 7.1. Is there no way to run Laravel on 7 anymore?
I'm installing via composer.
Is there a way to download a compatible version with 7.0?
If you have PHP 5.5 (actually 5.5.9 or greater) you should use Laravel 5.2.
If you have PHP 7.0 you can use Laravel 5.5.
The error you mentioned is because you are using PHP 5.5 which does not support PHP 7 Null coalescing operator (??) and it is being used somewhere in Laravel code.
As you said your server supports PHP 7.0, you might have more than one PHP versions installed on your system. Check PHP version running php --version.
The issue could be that the command line version of PHP differs to the Apache version of PHP. Run php --version and verify that you're using PHP 7.0.0 or greater.
Laravel 5.5.* has no issues running on PHP 7.0.*. I currently have a project running Laravel 5.5.43 on PHP 7.0.15 and this issue does not occur.
If the command line version of PHP is not up to date or if you have access to multiple versions of PHP, you should contact your hosting provider for help. You may also be able to run a command similar to the following to see if you can access a different version of PHP:
locate bin/php
The above may give you an idea of the installation location. For example, I see three different versions of PHP installed, but the default version (/usr/bin/php) is 7.0.15:
/opt/cpanel/ea-php56/root/usr/bin/php
/opt/cpanel/ea-php70/root/usr/bin/php
/opt/cpanel/ea-php71/root/usr/bin/php
/usr/bin/php
It was an issue with the Symfony Translation stack, i had to disable for the moment, also i have downgraded the carbon package to make it work, not sure why. It has some php7.1 code.
I'm facing this issue. I have a problem that
phpinfo() shows me 5.5.11 version is installed.
But while installing laravel 5.2 through composer it showing me following error,
[InvalidArgumentException] Could not find package laravel/laravel
with version 5.2.* in a version installable using your PHP version
5.5.8.
Laravel 5.2 needs,
PHP >= 5.5.9
OpenSSL PHP Extension
Both are working properly. And My current version is 5.5.11 which is >= 5.5.9 so what is the error. I can't figure it out.
EDIT :-
I have already set environment variable like this,
PATH=%PATH%;C:\xampp\php.
php.exe file in this path in my windows.
plz check your local path , copy your php environment path.
and open the floder with the path, check the php version in this path.
seems you should have differet php version.
I searched the net, I followed the instructions to solve this problem but I could not solve it,
when I want to use Laravel php artisian it gives errors like this:
Laravel requires php Mcrypt extenstion.
Note: I am using MAMP in Mac
please give example and solution for mac with MAMP.
I had a similar issue on Ubuntu 12.04. What version of PHP are you running and does Mcrypt show up as active when you run:
<?php
phpinfo()?
?>
It's quite possible that your command-line PHP isn't the same that MAMP is using, but rather the one that came with OSX. To find out, you can open your terminal and type php -i | grep php.ini, which will show you what ini file you're using.
If this is the case, which seems likely, you can follow the steps of older SO posts such as this one to create a symlink or overwrite the default PHP.
Alternatively, you can upgrade your system's PHP using Homebrew, for instance. I'm running 5.5.8 on my Macs, and it's working great. Do note that I do not necessarily recommend this, though, as configuring MAMP to use the new version isn't a fun experience. Also note that if you do this, you'll have to install both PHP and Mcrypt through Homebrew.
PhpMyAdmin install errors
Having some issues with installing phpMyAdmin. I would like to resolve the following issue, but don't have a clue where to start (except maybe php.ini?).
Here's the error message.
The mbstring PHP extension was not found and you seem to be using a multibyte charset. Without the mbstring extension phpMyAdmin is unable to split strings correctly and it may result in unexpected results.
And here's a related article I found on SO that was for Linux but didn't work on my Mac (OSX 10.6 with PHP updated, etc): PhpMyAdmin install errors
Like the error message says, your PHP installation lacks the mbstring extension. The Apple-provided PHP 5.3.3 in my Snow Leopard seems to have it, but many distributions bundle the extensions separately. For instance, if you use PHP from macports you need to install the php5-mbstring -package with:
sudo port install php5-mbstring
Minor note - if you have installed a different version of php (like php5.5) you must install the correct version of the mbstring package. In my case:
sudo port install php55-mbstring
To activate, you have to have a line like this in your php.ini file:
extension=mbstring.so
Which comes from:
/opt/local/var/db/php55/mbstring.ini
(if you use the default macports install root).
In the newest php versions the "extension_dir" path is not enabled initial.
It works with Windows and Linux, so maybe it helps also on MacOs ... :)
screenshot