Anyone faced the same thing before? I've tried the same script on a XAMPP, it worked. And I'm trying to do on a WAMP, it reported call to undefined function curl_init(). I've enabled and double-checked on my WAMP php.ini on line:
extension=php_curl.dll
The commenting was removed alright.
Could the reason be CakePHP ? I'm developing the App on Cake. Or something I need to do with WAMP...
You have to edit both these files:
wamp\bin\php\your php version\php.ini
wamp\bin\Apache\your php version\bin\php.ini
To get this problem where the side by side configuration is correct, but its still not working in wamp php 5.4.3 fixed. Follow: http://www.morningtime.com/kb/188
The php_curl.dll library is bugged and must be replaced. See attachment below. Replace the old php_curl.dll file (in your wampserver/bin/php/{version}/ext/ folder) with the new one attached. Restart Apache and you are set.
link that is currently working: http://www.morningtime.com/sites/default/files/attachments/book/188/php_curl-5.4.3-VC9-x64.zip
worked for me.
Thanks for pinpointing to checking out phpinfo() sometimes you just get too tired to test the basic. Well, after that I googled and found the solution. It seems that for a WAMP server, we need to enable both php.ini on folder PHP/..bin and Apache/..bin
I restarted after confirming both were enabled and here in phpinfo() I got curl enabled. I guess it should be working now.
or did you restart your wamp apache or what ever server you have?
EDIT:
maybe this helps. also notice the updates on top of the 1st post
How to get CURL to work with PHP on Windows? (WAMP)
Related
I have apache 2.4 and php 5 on a windows 7 machine, everything is working great. However, I can't make a session script work: it gives me a warning that file does not exist. I tried to set session.save_Path="C:/tmp" in php.ini as default, and still get the same warning. Looked online but didn't find anything. Only thing I didn't try was a path to the htdocs folder. However being a session file I guess that's not a good idea?
Thanks in advance
I have MAMP up and running and can run php in my browser, but when i attempt to connect to a MySQL database the connection fails. How do I correct this? I have read that to fix this I need to "enable php_mysqli extension in PHP.ini. It’s disabled by default. look for the following line: extension=php_mysqli".
I attempted this but i have multiple PHP.ini files and the first one i clicked on did not even have the line "extension=php_mysli".
I would like to know how to fix this problem so that i can test websites on my computer and not have to upload to a web server, also once everything is set up properly what are the correct parameters for the mysqli_connect() function?
Just installed MAMP to help you, and there is no php.ini in MAMP folder.
There is just 1 file php.ini in folder:
C:\MAMP\conf\php5.6.3\
since php5.6.3 is default version for my MAMP installation.
for my MAMP installation default user for MySQL is root and password root
I had this problem, my mysqli() function seemed to not be working after using it on multiple online servers. But not on MAMP! I followed all above instructions, looking in the php.ini files.
My fix...
I had my MAMP PHP version set to 7.0.0 (standard from install)
I changed this back down to 5.6.13 to test and everything started working correctly!
Im really not sure what caused it, or how to fix it to work with higher php versions.
Maybe something fundemental has changed since version 5.6.13.
Hope this helps someone! and please respond if you know why my problem is happening!
I created my php file as .bat file using
#ECHO OFF
php -f D:\wamp\www\scrapper\scrapper5.php
I used cURL in scrapper5.php, when i run .bet file manually i got and error
call to undefined function curl_init() in your file
I researched and i got cURL is not working in CLI mode.
I just follow below step but can't get success.
Run a php script as a background process in wamp server
How can i run batch file with cURL?
Can anybody give me solution?
From the error you have posted, it looks like you do not have cURL installed. Perhaps look at you CLI config for PHP and see if the curl module is active
Wamp may not have cURL installed by default - have a look at options for installing it on your system.
If i remember correctly, you should have a menu (right click on the wamp icon) for enabling/disabling apache modules. Have a look there for cURL and enable it. (sorry if this is a bit vague, I'm on a mac at the moment and on Windows it has been several years since I moved form WAMP to XAMPP)
If that doesn't work, some forums seem to mention downloading the cURL extension (on windows this is a .dll file) from here: http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/ and putting that in your ext folder under the WAMP instal directory. Just make sure to get your versions correct to ensure stability.
I think you have to enable cUrl feature in wamp server. Follow those steps may it will help you:
1. Go to wamp Server Tray icon which is placed in the task bar.
2.Open PHP Tab.
3.PHP Extensions.
4.Then make sure PHP_CURL is selected.
5.Then restart wamp server.
I hope it will help you!!!!
I am using the Xampp server with php5 . I have been trying to get the curl extension working. But, unable to do it. I uncommented the php_curl.dll line in php.ini. I dont see curl enabled in phpinfo() . I also copied the ssleay32.dll and libeay32.dll files to both syswow64 and system32 directories. Do i have to install anything on the server? Has anyone used xampp server before with curl ? thanks
To be honest I did not used XAMPP but couple of times I've faced problems with WAMP extensions on Windows.
Almost always reason was one of the following:
There aren't required file in /ext directory,
Extension line in php.ini is commented,
I forgot to restart server.
Also, this looks interesting (from link #1 below):
There’s a straight-forward XAMPP FAQ
Entry about their php.ini stucture.
For those looking for the easy fix,
ignore everything but the
/apache/bin/php.ini file. That’s the
only one that counts, regardless of
which PHP version you’re currently
using.
What about all the .dll files you
need? Well, you don’t need them.
Everything you need to run CURL on a
XAMPP install is included in the
download. Stop downloading extra crap
and sticking it all over your system.
XAMPP knows what it needs, where it’s
at, and how to use it. End of story.
If above steps doesn't help, read following articles (and comments):
Using CURL in XAMPP
Enable CURL with XAMPP on Windows XP
Enable Curl on Xampp
Getting cURL to Work in XAMPP
Be aware of multiple php.ini files in XAMPP. Be sure that you have edited right one.
P.S. I've just tried to enable cURL in Wamp/XP. I've removed leading semicolon ; from line ;extension=php_curl.dll and restarted server. Now I can see cURL support: enabled in phpinfo() page. I guess that's easy in XAMPP too.
I was asked to perform(first time) a task in PHP with PostgreSQL for the purpose I intalled XAMPP 1.7.4, PostgreSQL 9.X, I was unaware how to setup phpPgadmin(5.0.2) so I googled and found Configuration Instruction here; and here
after configuring all this i found following error when i tried to https://localhost/phppgadmin
Your PHP installation does not support
PostgreSQL. You need to recompile PHP
using the --with-pgsql configure
option.
I googled again found some possible reasons those are
you did't restarted aphace
the php.ini you changed is not the right php.ini file, make it sure from xampp console under phpinfo()
I have checked both but still error is there no change at all. please someone help me, I already spent more than a business day, THANKs
As I replied there, copying around php/libpq.dll into apache/bin should (hopefully) do the trick.
Did you uncomment the line:
extension=php_pgsql.dll
in
C:\xampp\php\php.ini
and after that restart Apache?
I tried following article and it worked.
http://programmingmeetsmath.wordpress.com/2010/12/21/a-step-by-step-guide-of-installing-apache-php5-postgresql-windows/
Are you sure you installed the postgresql module?
Just do a phpinfo(); to find out which modules are installed.
I was facing the same issue. Everything uncommented and displayed in phpinfo()
Finally I went to xampp:/php/ directory and double clicked php.exe to execute
And the command prompt showed the error in my php.ini
I fixed the missing semicolon in a line and everything went smooth. Hope it helps someone