0

I have a problem that appears to be a bug. I use Windows 7 x64 and recently set manually installed PHP (5.5.30) + Apache (2.4.17) + MySQL. I set up the php.ini with the extension directory and released the php_curl.dll. After that I went to Apache configuration, loaded the module, indicated the php.ini directory, installed the service through the terminal and ready, was running the php code. The problem begins when trying to run curl command, for example:

curl_init ($ url);

Face appears the error: Call to undefined function curl_init() After testing and testing, I found that when performing the same piece of code on other servers ready (xamp, WAMP, Vertrigo) code worked perfectly, including the built-in PHP server. After find out more, I realized that the problem always occurred when running the server via ApacheMonitor. In doing so the mistake was instantaneous, as much in the manual apache server, both the "amp's" automatic. Then run the server through the executable httpd.exe and to my surprise the curl code ran.

Anyway, I do not know if it's bug ApacheMonitor, or some misconfiguration, ams I think this should not be normal and I think that this has something preventing it from running. This would have an easy solution?

Thanks for listening guys, sorry for my bad English, I am Brazilian and I am learning, making plenty of company to google translator

1 Answers1

0

You don't have curl support in your PHP

Go to your php.ini file and remove the ; mark from the beginning of the following line:

;extension=php_curl.dll

ubuntu 13.0 and above, simply use the debundled package. In a terminal type the following to install it and do not forgot to restart server.

sudo apt-get install php5-curl
Jah
  • 986
  • 5
  • 26
  • Hello Jah, thanks for the reply. I am using Windows 7 and had already withdrawn ; in php.ini, although the curl works perfectly when starting the httpd server (cmd). My problem is when you start with Apache Monitor – Leandro Rodrigues Nov 15 '15 at 18:03
  • Oh thanks. I read the user-contributed notes and is working now – Leandro Rodrigues Nov 18 '15 at 18:12