Install Laravel 5.3 on Ubuntu 14.04.5 server

Asked

Viewed 355 times

0

When executing the command composer create-project --prefer-dist laravel/laravel blog Laravel 5.2 is installed. My machine is installed with php 5.5.9 but php 5.6.26 is installed on the site. Why is the Laravel 5.3 not installed?

  • This also happened to me this week. See how the composer.json.

  • '"name": "Laravel/Laravel", "Description": "The Laravel Framework.", "Keywords": ["framework", "Laravel"], "License": "MIT", "type": "project", ": {&#Xa require"php": ">=5.5.9", "Laravel/framework": "5.2.*"'

  • I need to change the data in Composer.json?

  • Just the Lavarel version.

  • I think you should set up your server for php 5.6.26 in general! and that’s why! so I believe that the php you are calling is the oldest.

  • @Gumball When doing Poser update it says I have php version 5.5.9 and not php 5.6.26, but php info is 5.6.26

  • I installed 5.6.26 through Plesk in the multiple php installation option and phpinfo is 5.6.26. Because it does not recognize?

  • 1

    It’s because the global PHP installation or configured in Composer should be 5.5, if you don’t configure Composer to use your other installation it won’t be able to find it on its own.

Show 3 more comments

1 answer

3

It is not installing because the Documentation of the Laravel 5.3 makes it clear:

Laravel 5.3 requires PHP 5.6.4 or Higher. HHVM is no longer Officially supported as it does not contain the same language Features as PHP 5.6+.

That is, you need to have on your machine a version equal or higher than PHP 5.6.4 for Laravel 5.3 to be installed.

Updating

I talked to AP in chat and we solved the problem. The problem was that the command php was recognizing the PHP version as 5.5.9, but in fact, as he installed via plesk, it was necessary to rotate the php which was in Plesk’s briefcase, which was /opt/plesk/php/5.6/bin/php. It seems that Plesk is a tool to facilitate the installation of multiple versions of PHP, so it did not affect the PHP that was installed by apt-get linux.

Run the command below to run the installation:

/opt/plesk/php/5.6/bin/php composer.phar create-project --prefer-dist laravel/laravel blog

And so the problem was solved.

  • I installed 5.6.26 through Plesk in the multiple php installation option and phpinfo is 5.6.26. Because it does not recognize?

  • If you are using Apache, you would probably have to enable it. If you’re not using apache, make sure you’re actually running version 5.6 >= of PHP. Run php -v.

  • When I run php -v it says I’m using 5.5.9. So just enable Apache? How do I enable?

  • No, did you install PHP 5.6 on your machine? Make sure that, in addition to the command php, there is no other. How php5.6 for example. To run apache you need to have installed. If you do not solve the problem, you will have to further detail your question, or even create a new one, as this Plesk information was not added in the body of the question until the time I answered.

  • Yes I have installed php 5.5.9 for Ubuntu but for the site itself I have 5.6.26, installed through Plesk. I’m sorry but I can’t understand the part where there’s no other command.

  • Okay. I want to say this. You are trying to install Laravel 5.3 on your machine, right? It will only install if you upgrade your php to 5.6. So far we understand. Now, about the other command, I quoted my Ubuntu, in addition to running the command php, I have the option to rotate php5.6 or php7.0. To check this just type php on the command line and then type tab to see if there will be any "completion".

  • It doesn’t really appear 5.6, as I should proceed?

Show 3 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.