Symptoms
A task to install or update Joomla to version 3.4.6 or 3.4.8 fails with:
Script execution failed: executing '/usr/bin/php -d open_basedir= -q configure' for APS application instance with id 42129 returned value '255' with output '' and errors 'PHP Fatal error: Call to undefined method DirectoryIterator::getExtension() in /var/www/vhosts/9/102265/webspace/siteapps/joomla-42129/htdocs/libraries/cms/installer/installer.php on line 2254
Cause
PHP executable of the default PHP version (5.3) is used for configuration script, despite Alt-PHP is activated on a webspace
The issue is recognized as APS-31434.
Resolution
The permanent fix is included into Odin Service Automation 6.0 Update 7. Install the available OA updates to have the issue fixed.
In order to apply a workaround to complete the tasks immediately, follow the steps below:
Import the new Joomla APS into OA.
Go to OA Management Node and copy the package into some directory:
# mkdir joomla # cp /usr/local/pem/APS/packages/joomla-3.4.8-89.app.zip joomla/
Unzip the package:
# cd joomla/ # unzip joomla-3.4.8-89.app.zip
Edit the file:
# vim htdocs/libraries/cms/installer/installer.php
Find the line:
if (!$file->isFile() || $file->getExtension() != 'php')
Replace it with:
$ptmp = pathinfo($fileName); if (!$file->isFile() || $ptmp['extension'] != 'php')
Pack the package back:
# zip -r joomla-3.4.8-89.app.zip *
Put the package to the OA APS repository:
# mv joomla-3.4.8-89.app.zip /usr/local/pem/APS/packages/
Note: it should replace the original version.
- Make sure that the old package is not located on any Web Server at
/usr/local/pem/APS/packages
. - Re-run the task(s).
The above steps will work fine as well for each new Joomla version.