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

Microsoft Power Platform Functional Consultant (PL-202) Certification – Practice Test Launched

Companies are thriving in a data-reliant world because they have millions of data that is recorded with every global sale. Data is created for a purpose. They…

Microsoft Power Platform App Maker (PL-100) Certification Preparation Guide

The Microsoft Power Platform App Maker Certification (PL-100), helps individuals to develop app-making skills that allow them to create solutions for transforming, automating, or simplifying their respective…

Microsoft Power Automate – Your Complete Guide

It doesn’t matter if you are an IT professional or a business user, it is crucial that you create efficient automated processes to increase productivity with Microsoft…

Knowledge Management

It is important to understand the many sources of information within an organization. Knowledge Management is the process of gathering, organizing and refining information within an organization….

Lori MacVittie: Exclusive Interview with Our Cloud Thought Leader – Know What You Know, and Know What It’s Not – Lori MacVittie

Lori MacVittie serves as the Principal Technical Evangelist for F5 Networks. F5 Networks has been her employer for 14 years. Currently, she focuses on how emerging technologies…

Keys to Effective Project Meetings

Meetings and the agenda that drives them should be organized in priority order. This ensures that the most important stuff gets done and that lower priority items…