4

I am installing laravel and encounter some problems:

I got an error saying that I my php version is not > 5.5.9. However, when I run a phpinfo(); test, it returns 5.5.28. When I use putty (php -v), I get 5.3.3.

I started googling (and especially on this site) and one of the solutions was to change the httpd.config file (https://github.com/Homebrew/homebrew-php/issues/1009). However, adding LoadModule php5_module /usr/local/opt/php55/libexec/apache2/libphp5.so does not work (there is not such a file). What else should I try? My OS is CentOS 6.5.

user3253002
  • 1,521
  • 3
  • 21
  • 43

2 Answers2

2

I'm not sure about CentOS, but on Debian/Ubuntu, php5 (for the web server) and php5-cli (for the command line) are two different packages and can be installed independently. I've never done it before, but I can imagine it would be possible to install two different versions of PHP.

It appears that this is the state you are in: your version of php5-cli is 5.3.3. When you install Laravel using composer, you are using the command line. Thus, it is picking up 5.3.3 as the version and complaining that it's too low. It seems that Laravel is assuming that the versions of both packages are the same.

I can see two possible solutions:

  1. uninstall PHP and reinstall it. To be on the safe side, I'd uninstall everything & reinstall it. You could fiddle around & try to bring php5-cli up to the correct version, but that would probably be more trouble than it's worth.

  2. install Laravel by downloading the source and unzipping it into the correct location. This also seems like it might be a lot of work. I'm not sure how much configuration the Laravel install script does - you'll have to figure it out & do it by hand. But in this case, Laravel should run, since PHP for the web server meets the minimum requirements; however, you're probably going to have trouble using composer to install dependencies...

Kryten
  • 15,230
  • 6
  • 45
  • 68
0

this link helped me to solve my problem. Hope it does help others as well.

user3253002
  • 1,521
  • 3
  • 21
  • 43