How do you enable curl and JSON support with PHP on a Hardy Ubuntu Server?
How do you enable curl and JSON support with PHP on a Hardy Ubuntu Server?
There are several options:
- recompile PHP from the source with somehting similar to --with-curl=/usr/local/curl (depending on your system pathes). same applies to JSON or plug them as shared modules.
More on that:
http://www.google.co.uk/search?hl=en...G=Search&meta=
Or tutorial on "how to find out if PHP is compiled with CURL extension installed enabled"
http://www.wallpaperama.com/forums/h...led-t1576.html
and then just uncomment ";extension=php_curl.dll" adn restart apache.
The standard php5 available from Ubuntu is already set up to use curl, just install it from the repositories. It also seems that it is ready to use JSON, there are packages also available from the repostiories.
A little searching in synaptic answered the questions.
Jim
Do I only need to install them? Is there any type of configuration?
I added the extensions to the php.ini file and restarted apache. I ran a php script to test curl, and it works. Is there anyway to test things like ffmpeg and json?
I think I got JSON and CURL under control. To see if CURL is working, open a text editor and make the following script:
<?php
echo '<pre>';
var_dump(curl_version());
echo '</pre>';
?>
save it was testcurl.php and then run it from the browser, if all is well, there should be no errors. These's still one thing I can't get working... ffmpeg. I can't figure this guy out... I installed ffmpeg and php-ffmpeg... it won't work... help!
Here's a little tutorial on this subject. To install JSON and CURL, open synaptic with admin controls...
sudo synaptic
search for json and curl, install the packages. Then open up your php.ini file. *Only do this if you know what you're doing, make a backup*
sudo vi /etc/php5/apache2/php.ini
Add the following lines:
extension=php_curl.dll
extension=ffmpeg.so
extension=json.so
Save and restart Apache:
sudo /etc/init.d/apache2 restart
If all is well, these functions should now be operational.
Hi
I am running civiCRM on my Ubuntu/joomla webserver.
My problem is "... dashboard is in a continual "Loading" state ..."
See: http://forum.civicrm.org/index.php/topic,11355.0.html
The solution as per this forum, is to enable JSON support.
To do this I have:
1) I have installed php5-jsonsudo using aptitude. :~$ sudo aptitude install php5-jsonsudo
2) have added extension=json.so to /etc/php5/apache2/php.ini
;;;;;;;;;;;;;;;;;;;;;;
; Dynamic Extensions ;
;;;;;;;;;;;;;;;;;;;;;;
;
; If you wish to have an extension loaded automatically, use the following
; syntax:
;
; extension=modulename.extension
;
; For example, on Windows:
;
; extension=msql.dll
;
; ... or under UNIX:
;
; extension=msql.so
;
; Note that it should be the name of the module only; no directory information
; needs to go here. Specify the location of the extension with the
; extension_dir directive above.
And 3) restarted apache. sudo /etc/init.d/apache2 restart
However this problem persists.
Any suggestions will be greatly appreciated.
****
I've never used Joomla before, so I don't think I can help you out there. You might get better responses if you post your issue into a new thread relating to Joomla.
We have no Great War, no Great Depression. Our Great War is a Spiritual War. Our Great Depression is our lives. - Tyler Durden
I did not have to modify php.ini, but I had to run this command
Code:sudo apt-get install curl libcurl3 libcurl3-dev php5-curl
Bookmarks