Will Laravel work on php 5.3.3 server - php

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

Related

How to downgrade PHP 5.6 to PHP 5.3?

Do you know how to downgrade php from 5.6 to 5.3?
I created a website with PHP 5.6 but when my client uploaded on their server some functions on my website are not compatible and they say that the problem is because their PHP version is 5.3 and I don't know about it, so they want me to downgrade my PHP version. Can you help me?
Or any solution to my problem? So, my website can be compatible on their server.
You're most likely talking not about downgrading of the PHP executables, but about downgrading language level from 5.6 to 5.3
There is no automatic way to do it, but you can study syntax changes between versions (information can be found into official manual) and update your code accordingly.
Also it may be good idea to remind customer that PHP 5.3 is not supported anymore so it may be good idea to upgrade PHP version instead of downgrading site. 5.3 -> 5.6 upgrade is relatively plainless.

How to find on which PHP version my CakePHP website was working?

I have custom made website built on CakePHP 1.3 framework. I can't update the framework, because i have so many custom made functions.
The problem is that my website doesn't work with latest PHP versions. Few weeks ago i found that many of the functions on the site doesn't work. I asked the host provider if they made any changes and they told that the server php version has been upgraded. They can't tell me what was the php verison of my acount and now i'm stuck.
Is there anyway to find out what was the php version that worked on my CakePHP script?
You can create a file with following code and check your php version and other informations as well
<?php
phpinfo();
?>
If you need programatically check this http://php.net/manual/en/function.phpversion.php
phpversion()
Change your provider and get a VPS, you can install any php version on this virtual server instance you want then. Read this.
php 5.4 has already reached it's end of life and 5.5 will do so in November 2016 as well. The best is to upgrade the server and php script to work with php 7.
Not upgrading is IMHO not an option because of security.
I'm pretty sure your site was running on 5.3 or 5.4.

Upgrading PHP 5.3 to 5.5

My website is running in CakePHP 1.3 and PHP 5.3. I got a mail from the host that they will be upgrading PHP to 5.5. How will it affect my website? What all changes should I make to keep my website working in PHP 5.5?
This won't change much, you'll have updated functions available and certain old ones may be deprecated.
This isn't a large PHP update, for a list of changes look here: http://php.net/manual/en/migration54.php
http://php.net/manual/en/migration55.changes.php

Failed installation of zend-escaper with Composer

I'm trying to install zend-escaper but I'm getting this error:
This is strange as my PHP version (from phpinfo()) is 5.5.19, the message claims it is 5.3.5(!) which should satisfy the requirement anyway.
My ZF version is 1.12.13
I'm using PHP Storm
Can anyone help please?
Thanks
Tomasz
The PHP version on the command line can be a different executable than the PHP running inside the web server. It also can use a different pho.ini configuration file.
So if Composer states the PHP it is using is 5.3.5, this is correct because Composer is directly asking the PHP it is running on for its version. The problem is when this PHP version on the command line is way older then the PHP version in the web server.
Try to update your command line PHP.
Some more things to say: the version 5.3.5 is lower than the required 5.3.23, because the last number in the version is 5 compared with 23, and 5 is less than 23. So the version you are using is below the minimum requirement for zend escaper - at least in the version 2.5.1 you try to use. Such an old PHP was last supported in the 2.2 framework versions, so you might as well try to depend on ~2.2. However this will simply be a workaround for the old cli version.
One other note: You are in the process of installing a zend framework 2 component - don't expect your installed zend framework 1 to support any fancy stuff on its own. It is possible to mix classes with namespaces and without, and even use zf2 things together with zf1, but zf1 won't offer any automatic functionality to use these.

Choosing PHP version for a Heroku app

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.

Categories