PHP/Freetype problem

I recently moved an OS X server to 10.11.5 from Yosemite. All went well, until I needed graphs in LimeSurvey. In the past I had installed the PHP package from lip.ch, adjusted Apache and carried on. This week I have tried all the packages I can; plus HomeBrew; and despite all theninstallations completing without error, I cannot get Apache to use anything other than the Apple install of PHP. It's extremely frustrating. Since this is not strictly an Apple fault, I have posted on other forums and there are other El Capitan users having the same issue. What complicates matters is that my web root folder is on another partition. A long time ago, I moved the Web folder from Library/Server and have since just migrated it. I will admit to being fairly clueless as to what this means in terms of where server is getting some of it's settings. However, it's all working - except for graphs in LimeSurvey. Any tips, directions to good explanations of Apache in OS X, etc etc would be much appreciated.

Posted on Jul 5, 2016 5:53 PM

Reply
Question marked as ⚠️ Top-ranking reply

Posted on Jul 6, 2016 4:07 PM

I'm successfully using the PHP 5.6.x version from


http://php-osx.liip.ch/


with OS X 10.11.5 and Server 5.1.5


After every update of the Server.app you have check and possibly modify web server settings again to make sure, that the web service uses the Liip PHP version.


Config file:

/Library/Server/Web/Config/apache2/httpd_server_app.conf


This is the line that loads the PHP version provided by Apple:

LoadModule php5_module libexec/apache2/libphp5.so


If you just want to comment this line out, then do it this way:

#LoadModule add_some_comment_here_for_example_the_date_when_you_made_the_change php5_module libexec/apache2/libphp5.so

Otherwise the Server.app might try to re-enable this line when you check the "enable PHP" checkbox in the Web Server panel.


Then either replace it with this line or add this line:

LoadModule php5_module /usr/local/php5/libphp5.so


Here this works without any issues.

7 replies
Sort By: 
Question marked as ⚠️ Top-ranking reply

Jul 6, 2016 4:07 PM in response to pkmusic

I'm successfully using the PHP 5.6.x version from


http://php-osx.liip.ch/


with OS X 10.11.5 and Server 5.1.5


After every update of the Server.app you have check and possibly modify web server settings again to make sure, that the web service uses the Liip PHP version.


Config file:

/Library/Server/Web/Config/apache2/httpd_server_app.conf


This is the line that loads the PHP version provided by Apple:

LoadModule php5_module libexec/apache2/libphp5.so


If you just want to comment this line out, then do it this way:

#LoadModule add_some_comment_here_for_example_the_date_when_you_made_the_change php5_module libexec/apache2/libphp5.so

Otherwise the Server.app might try to re-enable this line when you check the "enable PHP" checkbox in the Web Server panel.


Then either replace it with this line or add this line:

LoadModule php5_module /usr/local/php5/libphp5.so


Here this works without any issues.

Reply

Jul 6, 2016 4:26 PM in response to MacPro_de

Thanks very much for the response. Unfortunately, it's still not working. I made the changes to /Library/Server/Web/Config/apache2/httpd_server_app.conf exactly as you described. I used the one line installation - hope this was correct? Also I checked the two changes that the installer makes in /etc/apache2/httpd.conf and /etc/apache2/other/+php-osx.conf. Restarted Apache via the command line several times but still, info.php shows 5.5.34 and no FreeType. I also tried these changes at my web root which is on another partition. I'm very grateful for your assistance. If you do think of anything else that could be preventing this working? I'll keep trying here.

Reply

Jul 7, 2016 2:36 AM in response to pkmusic

IMO the /etc/apache2 config files will not be used at all by the Apache version which is part of OS X Server. Also the apachectl commands will have no effect.

You have to restart the web service either by using the GUI of the the Server.app (Stop the web service - wait a few seconds until it completely stopped - then start the web service again) or using the command line with the commands


sudo serveradmin stop web


to disable the web services and


sudo serveradmin start web


to enable the web services.


This should reload the configuration of the Apache instance used by OS X Server.

Reply

Jul 8, 2016 5:14 AM in response to pkmusic

I would suggest, that you set up a test machine with just OS X 10.11.5, OS X Server 5.1.5 and Liip PHP installed, patch the config file as described above, enable Web services on this server and then you check this again by opening a prepared info.php file in the default web site folder of this testserver on the testserver itself with a web browser


http://127.0.0.1/info.php


Content of info.php:


<?php

phpinfo();

?>


If everything was done correctly, this should show the PHP version from Liip including Freetype and mcrypt.

Reply

Jul 8, 2016 5:17 AM in response to MacPro_de

Exactly. On a fresh install, it works. Since I'm not the only one with this problem, the question is - what is stopping it from working on my server? The OS install was fresh, 6 months ago. There were no legacy settings and the only other non-Apple tweak was to install mysql. Now I have to decide if I can trash the server for Freetype. Thanks for your help - it's much appreciated.

Reply

Jul 12, 2016 3:28 PM in response to pkmusic

It's working! This morning I turned off PHP using Server, then reactivated it. This refreshed the file app.conf file (/Library/Server/Web/Config/apache2/httpd_server_app.conf). I then followed your instructions exactly again (as I did on the test server) and this time it worked. You have saved me so much work - I was considering rebuilding the server. Thanks so much.

Reply

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

PHP/Freetype problem

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.