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.
Related
I know this question has been answered in other threads, but having the same problem and not finding the solution for my case in the given answers, I found a different solution for my case and that took me a while to find out, and since I can't reply to those other questions because I have only 1 reputation point, I post it as a new question.
The problem in my case was, that the "extension_dir" setting in my php.ini was wrong, because originally I had installed PHP in a different directory and then moved it manually.
So, if you checked your php.ini and found openssl enabled and still got that error, you may want to also check extension_dir in php.ini, if it points to where you expect it, and if the directory actually contains the openssl module.
check extension_dir in php.ini, can become incorrect after moving a PHP installation to a different folder.
Did you installed your php from source?
If so, did you configured it with
./configure --with-config-file-path=/etc/php5/cli --with-openssl
Note about --with-openssl
Once done, it should work.
PS: Do not forget to make && make install
I am trying to load the php_memcache.dll extension using the Plesk Additional Directives section under the PHP Settings for a domain, subscription or subdomain. No matter what I do, I cannot get Plesk to load the extension!
The only way I can load the extension into PHP is by manually editing the php.ini, which is a dirty fix as I will need to edit this each time the server is updated as the php.ini gets overwritten each time!
The php_memcache.dll is definitely in the extensions directory referenced in the phpinfo(), this is proven by the fact that I can load the extension successfully by entering it into the php.ini manually.
I am pretty confident this is a bug, but just wanted to see if anybody else has had any similar issues?
The bug seems to be the description implying that it is possible when it really is not.
In this page: http://download1.parallels.com/Plesk/PP11/11.5/Doc/en-US/online/plesk-administrator-guide/index.htm?fileName=69696.htm it says that additional directives can take any setting that is listed as PHP_INI_USER and PHP_INI_ALL in this page: http://php.net/manual/en/ini.list.php.
In that page extension is listed as php.ini only, so it will not work from the additional directives option.
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.
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.
I am having difficulty getting PHP(5) on Windows to work with Sqlite. After some research, I found that I have to change the php.ini file so that it reads (without semi-colons):
extension=php_pdo.dll
extension=php_sqlite.dll
I ran the phpinfo() command, and verified that my computer is reading the right php.ini file. Additionally, I have both php_sqlite.dll and php_pdo_sqlite.dll located in an ext file located in the folder with the php.ini file. However, phpinfo indicates that the PDO drivers are "no value", and there is no indication of sqlite anywhere.
I am now stuck, because all of my resources state that the above should work. I noticed that my php.ini file has the following: extension=php_pdo_sqlite.dll and extension=php_sqlite.dll. The "extension=php_pdo_sqlite.dll" is different from "extension=php_pdo.dll" in my above example. I tried removing the extension and adding "extension=php_pdo.dll", but that did not make a difference.
Does anyone know how to resolve this issue?
Thank you,
DFM
As a resolution to this issue, I ended up installing WAMP and using a basic editor, instead of the IDE. The php.ini file was already configured so connecting to Sqlite was pretty much straight forward.
Thanks,
DFM