On this page
SimpleTest upload tests hanging
Drupal 7 will no longer be supported after January 5, 2025. Learn more and find resources for Drupal 7 sites
The Symptom
SimpleTests involving file uploading of any kind result in the test never finishing on Mac OS X covering Leopard and possibly other versions as well.
The Problem
It appears that the stock cURL that comes with Mac OS X is broken. As of the 10.5.7 release, this appears to be cURL 7.16.3.
Solutions
One option is to compile cURL and PHP from source in place. However, it's easier and more manageable to install your development environment using MacPorts. You can run both environments side by side on different ports, setup to run at different times, or to completely supersede the stock Apache+PHP setup.
If you already have MacPorts installed and current, this process will take 20-30 minutes. If this is your first MacPorts install, the process may require an hour depending on the speed of your computer.
First, install MacPorts.
*More verbose instruction set [off-site]
Update cURL with SSL support:
sudo port install curl +ssl
Install Apache 2:
sudo port install apache2
Install PHP 5:
sudo port install php5 +apache2 +mysql5 +pear
Configure Apache
sudo cp /opt/local/etc/php5/php.ini-dist /opt/local/etc/php5/php.ini
sudo cp /opt/local/apache2/conf/httpd.conf.sample /opt/local/apache2/conf/httpd.confActivate the PHP 5 Module
cd /opt/local/apache2/modules
sudo /opt/local/apache2/bin/apxs -a -e -n "php5" libphp5.soYou will need to add the following within the <IfModule mime_module> block in httpd.conf:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phpsYou will probably also want to add index.php to the line in the <IfModule dir_module block.
Finish configuring Apache as seen fit.
Starting & Stopping Apache
Apache will be managed by launchd. Start apache with:
sudo launchctl load -w /Library/LaunchDaemons/org.macports.apache2.plist
This will also have Apache automatically start if the machine is rebooted.
Stop apache with:
sudo launchctl unload -w /Library/LaunchDaemons/org.macports.apache2.plist
This will also stop Apache from automatically starting.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion
Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.