Choosing PHP version for a Heroku app - php

I deployed an app to Heroku and it correctly detected that it was a PHP app. It works great, but there's a small issue. Heroku chose to use PHP version 5.3, and I'd like to use version 5.4.
Is this possible? If so, how?

There are several unofficial buildpacks that use more modern PHP versions, here's an example that uses PHP 5.4 and has several other improvements: https://github.com/iphoting/heroku-buildpack-php-tyler
To use:
heroku config:add BUILDPACK_URL=git://github.com/iphoting/heroku-buildpack-php-tyler.git
... and push a new build.

Related

host a website built using Laravel Framework version 5.6

I want to host a website built using Laravel Framework version 5.6 that requires at least PHP version 7.1. Unfortunately, the only supported PHP versions that we've found in the CPanel are 7.0 downwards.
How do I add support for PHP v 7.1 onwards in cPanel? or this is povider-dependent, i.e. the hoster?
There's no actual question here, but CPanel supports higher versions of PHP. I am currently running several Laravel websites on version 7.1. I can't answer more in depth as to your situation without more information. Here is the link to the CPanel instructions on how to add new PHP versions to your account. CPanel Documentation

Will Laravel work on php 5.3.3 server

good day! Just a quick question about laravel since we are planning to use laravel on our new project, the problem is the client is using php 5.3.3 on their server. I know that laravel works on php 7 but the question is will it still work on php 5.3.3? Thank you in advance.
Looking at the oldest version available in the documentation located at https://laravel.com/docs/4.2/#server-requirements
It states
PHP >= 5.4
So I would say No.
This is due to found security risks in various versions of PHP so Laravel has a baseline for PHP.
If you can use Docker, you can use a PHP7 Docker container with the latest stable version of Laravel, and then you will not touch the PHP 5.3 version

I need different PHP version on the same machine

I'm working on symfony2 project, the same time, I have many projects are working on the same server On PHP 5.2, however symfony2 works just with PHP version 5.3 or newer.
I'm asking about a way to work with 5.2 and 5.3 in the same time.
It is possible to setup two servers with different PHP version on the same machine?

How to setup PHP nginx development environment with multiple versions of PHP in the right way

I want to develop PHP applications with different PHP requirements especially with Laravel 5.1 (which requires php 5.5.9) and Laravel 4.2 (which requires php 5.4). I want to be able to specify which php version is running per application (I mean per virtual host). There are many articles on the web about that setup with nginx and fastcgi, but it seems to be outdated.
For me the setup from http://coderoncode.com/2014/04/18/flexible-php-development-phpfarm.html is the best and the easiest.

good practise to handle composer, shebang and self-compiled php-versions?

I've started a new project in which I like to used the current version of PHP (5.5.12). I compiled this version myself because the version of my distro is 5.3.
I need propel ORM so I installed it via composer.
Now, the propel-script uses this shebang:
#!/usr/bin/env php
which of course calls the main PHP (5.3) and not my self-compiled one. Unfortunately propel needs PHP >= 5.4 and I cannot execute the script without errors.
So my quick-and-dirty solution is to replace the first line in the propel-script with:
#!/opt/php-5.5.12/bin/php
which works, but is not update-safe. At least I think this could be replaced by doing a composer-update.I still need the 5.3-version for other projects, so using an alias is no solution for me.
It's maybe some petty problem, but is there a finer way to combine 3rd-party-libraries via composer with a self-compiled php executable?
I would encourage you to use vagrant and setup a virtual machine environment where php5.5 is installed. You could setup an Ubuntu 14.04 for example, it contains PHP version 5.5.
Developing on your physical machine is sooo yesterday! ;)

Categories