CERN Accelerating science

Change of PHP configuration on centrally managed web servers

Description of Service Change: 

The configuration of PHP in the centrally managed web hosting servers running IIS7 will be changed, to load by default all the PHP extensions that are currently used in CERN websites.

The change will affect web sites which loads an extension dynamically, using the method "dl()". After the change PHP would produce an error and stops the execution if the code tries to load an extension that was already loaded.

Users are asked to make a small change in their code to prevent this problem. To make the change search all the lines in *.php files where the function “dl()” is used, and simply add a line before loading the extension, to check if it was already loaded. Here there is an example:  
if (!extension_loaded('oci8')) {           dl("php_oci8.dll"): }
Please note that the method "extension_loaded" requires the name of the extension, such as "gd2" or "mysql" instead of "php_gd2.dll" or "php_mysql.dll".

Remember that if this change is not done, the website will stop working after the configuration change.

If you have doubts, or need any help to perform this change, please submit a precise request via the CERN service portal with the form:
https://cern.service-now.com/service-portal/report-ticket.do?name=request&se=web

 

Service Element Affected: 
Web Service
Effective from: 
Wednesday, September 21, 2011 - 09:00
Posted by: 
IT-OIS
Unit responsible for resolution: 
IT Department