Get Ready for PHP7

The release date for PHP7 is November 12. Some of our users will continue to use PHP5 for a while, but will upgrade to v7 when it becomes available. We wanted to make sure ActiveCollab was working on v7 so we started testing it earlier. You can find it here: installation is as easy as running a couple of commands:git clone
cd php7dev && vagrant up
vagrant ssh
Once you are in VM, type:makephp 7.
php -v
The last command will tell you that you’re running PHP 7 (currently the exact version number is PHP 7.1.0-dev).We then downloaded ActiveCollab 5.0.91 and unpacked it to `/var/www/activecollab`. We needed to set up vhost for testing. VM has nginx and PHP-FPM, so we added `/etc/nginx/conf.d/activecollab.conf` with the following settings:server { listen 80; server_name php7talk; root /var/www/activecollab/public; index router.php; access_log /var/log/nginx/activecollab-access.log; error_log /var/log/nginx/activecollab-error.log debug; if (!-e $request_filename) { rewrite ^//assets/(. *)$ //assets/$1 last; rewrite ^/avatars/(. *)$ /avatars/$1 last; rewrite ^/wallpapers/(. *)$ /wallpapers/$1 last; rewrite ^/verify-existence$ /verify.php last; rewrite ^/proxy.php$ /proxy.php last; rewrite ^/api/v([0-9]*)/(. *)$ /api.php?path_info=$2&api_version=$1 last; rewrite ^$ /router.php last; rewrite ^(. *) /router.php?path_info=$1 last; } include php.conf;} Finally, we added php7dev to `/etc/hosts` on the machine that was running the VM – and we were ready to go.When we first ran the ActiveCollab installer, it reported a couple of errors.The first one happened because version_compare()function said PHP 7.0.0-dev is lower than 7.0.0 (being a dev release). We quickly fixed the problem and discovered that Phar extension was not installed by default. After adding it to the file php.ini and restarting PHP7, the installer allowed us to proceed to the next step. The database connection step went without problems so we added the test credentials and were immediately greeted by a 500 Internal Server error. This was caused by code errors in the module definition. These errors didn’t cause any problems with PHP5 but did in PHP7. These were easily fixed, but then we ran into the next problem: PHP7 introduced Error classin global namespace. ActiveCollab had a class with the exact same name since forever so we had to move it under Angie. After the refactoring was completed, ActiveCollab was successfully installed by the installer. This is the key difference between PHP5 and PHP7. In some cases, it can even exceed 100% according to the PHP team. It was put to the test by creating a script that made 830 requests on a sample data set. We then measured how fast it ran with PHP5.6 and PHP7 (same machine, 5 consecutive runs). Here are the results. The new release will include some interesting new features, stability enhancements, and experimental PHP7 support for those who are eager to play with it.

Related Posts

Five Surprising Qualities that Can Help You Build Highly Effective Teams

When I was in graduate school, my first job was managing people. It makes me cringe to think back on the things I said, did, and implemented…

5 Steps to Be an Influential Project Manager

As managers, success in any given project is often dependent on our ability to bring people together under a common goal. Of course, you don’t always have…

Five Skills of the Most Successful Project Managers in the World

You’ll likely find information about systems approach to project management in a book on project administration. You know what? This is awesome. I hope you’ll read every…

5 roles that you will need to fill on your AWS big-data team

Are you in the process of building big data teams for your business? Here’s a list of people you need to be part of your data squad…

5 Project Management Steps: Process Group Project Management

There are many ways to manage a project. To manage a project effectively, you need to consider all aspects, from scope and budget to the tasks that…

How to keep the approval process from bogging down your project

The approval process is the most important thing that slows down a project. Your team may be moving at a rapid pace. The next thing you know,…