XAMPP and cURL not working, after uncommenting php.ini - php

Someone else with the same problem still didn't get a decent answer/fix for my problem:
Before you comment or criticize, please make sure you read my proceedures below so as not to repeat what I've seen 100x already in Google and Stack Overflow...
XAMPP (Lite) installed on Windows 7 in C:\xampplite (newest version, only one php.ini file in C:\xampplite\php)
XAMPP and PHP scripts run correctly in http://localhost/
libcurl installed (by XAMPP default) in C:\xampplite\php\ext\php_curl.dll
php.ini edited and saved for removal of ; at beginning of line extension=php_curl.dll
php.ini default for extension_dir = "C:\xampplite\php\ext" correct and left alone
Apache service restarted in Windows Services
Computer restarted
Apache service (manually) restarted again
phpinfo(); still does not display anything with the word "curl" in it
Still no success
Thanks in advance.

I had the exact same problem but could not find the solution online.
Every site I saw said to uncomment "extension=php_curl.dll" which didn't fix the problem.
I finally solved it by adding the path to curl.dll to the variable.
That is, I changed: extension=php_curl.dll
to:
extension="F:/WebServer/PHP/ext/php_curl.dll"
Hope this helps you or somebody else.

I had a similar problem except for error reporting. Searched all over the internet and all I found was "modify the php.ini file". I modified all the php.ini files but I was still getting the same error. Turns out WAMP has visual settings which I believe overwrite the php.ini. So to turn on curl, you'd left click on XAMPP icon in your start start menu -> PHP -> PHP Settings -> php_curl (make sure it is checked).
Maybe this is your problem.
Hope it helps.
-c0d3

Try executing curl
xampp/apache/bin/curl.exe
with admin privileges.

Restarting the PHP server will do.

Related

problem when restarting apache by updating php code

Good evening friends, I need your help since I have a problem with a webservice mounted in centos 6.9 with the version of apache 2.2.15 and php 5.5.38.
Before when doing any code I only loaded it and it worked immediately, I had a vacation and a partner of the work made a modification to that server that now every time you update a file, it is required to restart the apache so that you can apply the changes
Currently the partner does not work in the company and I need to replace the apache as it was by default.
They have some idea of ​​how to solve this problem.
Thank you for your cooperation
It sounds like you have the opcache extension enabled.
You can remove the extension or tell opcache to check your file for changes every time its loaded by adding
opcache.revalidate_freq=0 your php config
info
check the php.ini and the function php_opcache.dl is the one that is configured under
zend_extension = php_opcache.dl
the php.ini image is appended
problem solved.
the file opcache.ini was modified in the path /etc/php.d/opcache.ini and the option opcache.enable was set to 0 and that's it, it works correctly thank you very much.

Editing php.ini is not causing any effect

I tried everything, but I can't make it work. I recently installed MAMP. The PRO version came with an option to add OAuth via a checkbox, but now that the PRO version expired I need to install it by hand.
When I check phpinfo() on my browser it says that the path to my php.ini file is:
/Applications/MAMP/bin/php/php7.1.0/conf/php.ini
Also, there is (none) under additional ini files. So I am pretty sure that is the correct php.ini file
The problem is that after adding the OAuth extension to the ini file, and restarting MAMP, PHP still can't find OAuth.
Also strange is that I don't see any of the other enabled extensions (like mcrypt) in the phpinfo() output.
Any tip in the right direction will be appreciated,
Thanks!
After much debugging, this is what I did in order to figure out the problem and solve it.
As suggested in the comments of my question, once I checked the http logs I found out that PHP was not finding the extensions.
I checked php.ini for extension_dir and it was pointing to a different path than the one that pecl was installing packages on.
If you need to find that path, simply use:
pear config-get php_dir
After correcting that everything works fine.

Editing php.ini with MAMP 3.5 where is the right ini file?

I'm trying to edit my php.ini file to turn off short tags. Pretty standard.
phpinfo() tells me I am running PHP Version 5.6.10
I have edited 2 php.ini files so far, and neither has taken effect (yes, I restarted MAMP)
MAMP/conf/php5.6.10/php.ini
MAMP/bin/php/php5.6.10/conf/php.ini
Neither file changes the status of short tags
Can anyone direct me where/how to change my php.ini settings?
I really freaking miss WAMP. Whose bright idea was it to buy a Mac?!?
When you run phpinfo() you need to look for the value Loaded Configuration File. This tells you which php.ini file PHP is using in the context of the web server.
Aaannnnnnnnddddd I was being a dufus
I had been commenting the line out instead of changing to "Off"
as you version is 5.6.10, and supposed your apache2 server runing on ubuntu.
php.ini dir is
/etc/php5/apache2/php.ini
On my Mac, running MAMP I have a few locations that would contain the likely php.ini
So I edited the memory_limit to different values in the 2 suspected files,
to test which one effected the actual MAMP PHP INFO page details.
By doing that I was able to determine that this was the correct php.ini:
/Applications/MAMP/bin/php/php7.2.10/conf/php.ini

Weird ungrammatical PHP error msg when trying to set upload folder

I've been getting this error, verbatim:
// PHP setup Edit php.ini (try /usr/local/php5/lib/php.ini search for "tmp" and make sure file uploads are, and that you have a tmp director of that name, with permissions set. To load the new php.ini, restart apache: apachectl restart
What's weird about this, besides the grammatical flaws, is that I get it no matter what I set upload_tmp_dir to in php.ini...or even if I remove php.ini entirely.
I do an apachectl restart after each change. I've also tried rebooting.
I believe I'm editing the right php.ini, because it's the one listed when I do a phpinfo(): /usr/local/php5/lib/php.ini. It lists whatever upload directory I edit into it.
This happens under Mac Lion with both Chrome and Firefox
phpinfo tells me I'm running PHP Version 5.4.6
I am the opposite of an expert.
Thanks for whatever help you can give me. I am preparing to D'oh slap myself.
It was indeed a comment in a buried file. Aaarrrggghh! Thanks to do those who offered suggestions. I am equally grateful and embarrassed.

mysqi extension is missing

I had uncommented the 'extension=php_mysqli.dll' in the PHP config file but I'm still getting the error message that my mySQLi extension is missing. What else do I verify?
After restarting your web service, check PHP info:
phpinfo();
Does the extension appear there? If so, it loaded correctly. If not, you are likely missing the DLL, or have the wrong extension path.
Look for something like this:
For anyone else using ubuntu. I ran into this problem on a fresh ubuntu installation. I solved it by adding this line to php.ini.
extension=mysqli.so
My php.ini was located # /etc/php5/apache2/php.ini
I was also getting the same error while clicking on phpmyadmin and tried all possible solns povided in google. i tried with wamp and then reinstalling xamp.neither didnt and looked at the php.ini file.but everything was perfect. Later i realised i was selecting google chrome as my default browser while installing xamp. but then i tried opening localhost with Internet Explorer and everyhtng was fine.
Thanks
Sobbosanchi
Was on this problem for hours...
Solved it by changing extension_dir = "ext" to extension_dir = "C:/PHP-5.5.13/ext"
Seems like it doesn't like relative pathing...

Categories