Support

UNiTE, Remote CLI, eXtract Wizard

#11511 RemoteCLI curl_init problem

Posted in ‘UNiTE and Remote CLI’
This is a public ticket

Everybody will be able to see its contents. Do not include usernames, passwords or any other sensitive information.

Environment Information

PHP version
n/a
Tool
UNiTE
Tool version
n/a

Latest post by nicholas on Sunday, 11 March 2012 11:35 CDT

nickbunyan
Mandatory information about my setup:

Have I read the related troubleshooter articles above before posting (which pages?)? yes
Have I searched the tickets before posting? yes
Have I read the documentation before posting (which pages?)? yes
Joomla! version: n/a
PHP version: 5.3+
MySQL version: n/a
Host: localhost
Akeeba eXtract Wizard / Remote CLI / SiteDiff version: Remote CLI

EXTREMELY IMPORTANT: Please attach a ZIP file containing the Remote Control and Akeeba Backup log files if you are reporting an Akeeba Remote Control issue, othrewise we can not help you. Remember that your attachment must be a ZIP file! Other file formats (including .txt) may be silently rejected by our site.

Description of my issue:
When trying to test Remote CLI prior to building a control script for automation, I am trying to test from the command line, but I am receiveing a curl error from the remote.phar file as shown below. Please advise.
####################################################################
root@chi:/data/nickb# php remote.phar --action=test --host=http://localhost --secret=iloveakeeba Akeeba Remote Control CLI 1.2 (2012-03-05)
Copyright ©2008-2011 Nicholas K. Dionysopoulos / AkeebaBackup.com
--------------------------------------------------------------------------------
This program comes with ABSOLUTELY NO WARRANTY. This is Free Software and you
are welcome to redistribute it under certain conditions. Use command line
option --license for details.
--------------------------------------------------------------------------------
PHP Fatal error: Call to undefined function curl_init() in phar:///data/nickb/remote.phar/api/api.php on line 59
root@chi:/data/nickb#
######################################################################

nicholas
Akeeba Staff
Manager
The error message you are receiving indicates that the PHP cURL extension is either not installed or not activated. I guess that you are running it on a managed server. Please ask your host to enable the PHP cURL extension for PHP. If they say it's already installed, please ask them to enable it for the PHP CLI version used by command line scripts, not the mod_php version used by Apache (the two versions use different configuration files).

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

nickbunyan
Hi Nic - thanks for the prompt response.
I am running the script on a local server, which is the manager for a number of remote sites... and I could not get it to work locally. Having seen your response, which I had already seen on another thread, I took another look at my local configuration.

Lo and behold! Despite it being what I thought was a full install, with a complete XAMPP stack and all the bells and whistles, cURL was not installed it seems!!!
After a quick google, I found a suggestion that Ubuntu requires the the php5-curl package to be installed manually. So...

sudo apt-get install php5-curl

and WHOOP WHOOP WHOOP!!! - everything now seems to work fine. Well your part of it anyway. The bugs in my script I will figure out later. Many thanks for pointing me in the right direction and for such a great utility package. Akeeba is a lifesaver!

NickB

nicholas
Akeeba Staff
Manager
You're welcome!

It always struck me as odd that XAMPP never enabled basic stuff, like the PHP cURL extension or Apache's mod_rewrite, out of the box. I guess that's one of the reasons why I'm not using XAMPP anymore :D

Nicholas K. Dionysopoulos

Lead Developer and Director

πŸ‡¬πŸ‡·Greek: native πŸ‡¬πŸ‡§English: excellent πŸ‡«πŸ‡·French: basic β€’ πŸ• My time zone is Europe / Athens
Please keep in mind my timezone and cultural differences when reading my replies. Thank you!

Support Information

Working hours: We are open Monday to Friday, 9am to 7pm Cyprus timezone (EET / EEST). Support is provided by the same developers writing the software, all of which live in Europe. You can still file tickets outside of our working hours, but we cannot respond to them until we're back at the office.

Support policy: We would like to kindly inform you that when using our support you have already agreed to the Support Policy which is part of our Terms of Service. Thank you for your understanding and for helping us help you!