January 23, 2011 in PHP5, Programming
This time i want to share with you how to install Curl in PHP5 in Linux Environtment (I’m using Ubuntu 8.10) and using apache web server, but if you have any question to install php-curl in other environment, feel free to contact me of leave any comment, i will glad to help you.
Okay, now let’s start with check if php-curl is already installed in your server or not. To check it please follow this step:
1. Create a file in your web server (in Ubuntu it would be in /var/www folder), name it info.php
2. Open that file and type this command:
< ?php phpinfo(); ?>
3. Save that file
4. Open your favorite browser and open that file (ex: http://localhost/info.php)
5. Now you will see the Information about your PHP installation
6. Search for Curl, and if you cannot find it, it mean your php doesn’t have curl installed.
To install php-curl please follow this steps:
1. Open your terminal and type this command:
sudo apt-get install curl libcurl3 libcurl3-dev php5-curl php5-mcrypt
2. After it finish open php.ini file (mine is at /etc/php5/apache2/php.ini ) and add this command: extension=curl.so
3. Save the file and restart apache with this command:
/etc/init.d/apache2 restart
4. Check the PHP information page again, you will find PHP-CURL installed
5. That’s it
If you found this post usefull please leave me any comment. Thanks, and have a nice day.
Tags: Apache, CURL, Instal Curl in PHP, php, php5
Recent Comments