- The Ldap Extension Of Your Php Parser Isn T Installed Synonym
- The Ldap Extension Of Your Php Parser Isn T Installed Programs
- The Ldap Extension Of Your Php Parser Isn T Installed Updates
Error “The LDAP extension of your PHP parser isn't installed” (Page 1) — English speaking users — Forum GLPI-Project — Forum du projet GLPI - Glpi-project's Forum. Hope this helps! I'm not using. The PHP LDAP extension is a 3rd party library required within any PHP environment that uses the PHP LDAP functions. That requirement holds true for the JMapMyLDAP extension. If its not there you will need to get the version that corresponds with the version you have installed from PHP.net. [or alternatively you could upgrade your version of PHP] And then go into your php.ini and add or uncomment this.
I'm trying to set up a cronjob which requires curl, and I'm calling it directly from crontab with
The problem is, it looks like the curl module isn't installed for my phpcli.
It works just fine when I hit the url from my browser, but when I run
from the command line, it returns
When I run php -m
the curl module does not show up. However when I go to the browser and dump the php_info(), the module shows up and says its correctly installed.
The other kicker is i've been trying to install curl with apt-get
onto the server (Ubuntu 12.04 php 5.4), it seems to take down my PHP as it begins to simply attempt to download the index.php
file wherever I try to browse to.
Here are the attempts I've made to install curl that have taken down PHP:
After each of these I restarted the apache2 server and still no dice, it attempted to download the file instead of opening the page.
How can I install php5-curl
to just the cli, so that my server can run it and I don't have to go through a browser?
The other possibility is I could run the cronjobs through wget from the crontab file, but I've heard that's not the best option and potentially unreliable.
Any help is much appreciated. Thanks!
7 Answers
I had the same issue. But, finally I solved it by running the following command.
Restart the server after installing. This answer may not be useful for the user who asked because he asked it two months ago. But, this may be useful for the users who reading this in the future.
SriramanSriramanHere's how I've fixed this on ubuntu 14.04 when curl was working in php files run through apache, but not when called from the cli.
ssh to your server and cd to /
Run the above find command to locate where the curl binary is hanging out at. If you can't find the file, you might need to install curl and run the find command again.
You'll now want to edit the php.ini being used for php files run from the cli (it's different than the one used by apache), and is likely at /etc/php5/cli/php.ini
You can also run
To get the file path, just to be sure.
In your php.ini file search for [curl] by pressing ctrl + w
You'll now want to add the extension to the file and it should look something like the following, though your path to the curl.so file and such might be a little different:
After doing the above, I was able to use curl in php scripts run from the cli.
rmmoulrmmoulIf you are using the command-line interface ('cli') for php5
, instead of
please use:
php5-curl
seems to enable the curl
module for the cli php5
and not php
and both (can) load different configurations and modules.
I use ubuntu 14.04 and php 5.3. After upgrading to php 5.6.29 I also has problem with php curl. My directory structure after updating to php 5.6.29:
/etc/php5 - old version (5.3)
/etc/php/5.6 - new version
The next command
didn't help (looks like it connects to old php version - 5.3).
I have found next article: php 5.6 for magento
It advice to use command
apt-get -y install php5.6-curl
instead of
apt-get -y install php5-curl
It works for me!
The first thing you should always check is your php.ini file. You should have a php.ini file in your web root. Curl is installed by default on most web servers; I haven't found a web server with PHP that hasn't already had curl installed. Its not always enabled, though.
The Ldap Extension Of Your Php Parser Isn T Installed Synonym
Check your your php.ini file and search for php_curl.dll, it should look like this:
;extension=php_curl.dll
Just remove the semicolon (;) from before 'extension' and save the file. It should work right away. According to your phpinfo.php its already installed, so it likely just needs to be enabled.
A similar question can be found here if you're interested: Call to undefined function curl_init()
first find the version of your php cli by:
for example if it was version 7 then:
this will give you the proper module names for your current version:
so to add curl support, copy the name of curl module from the list above then do the following:
In case someone reached here to find windows version of running curl.
Open php.ini
and remove the ; before extension=php_curl.dll
around line 656.
I am pretty much sure what Apache loads is C:wampbinapacheApache2.2.17binphp.ini
therefore you may find curl working from browser.
But when php is run from command line then it may show unknown function curl_init();
Run php -r 'echo php_ini_loaded_file();'
in the command line to see which ini file is being loaded.
Usually its found inside C:wampbinphpphp5.3.5php.ini
its a different file from what Apache is using. So open it and then remove the ; before extension=php_curl.dll around line 656.
Hope it helps someone.
Pradeep Kumar KushwahaPradeep Kumar KushwahaNot the answer you're looking for? Browse other questions tagged phpubuntucurlcroncommand-line-interface or ask your own question.
I'm trying to write some LDAP authentication code on my WAMP server.
I'm using this:
I'm getting this error:
Fatal error: Call to undefined function ldap_connect() in C:Program FilesApache Software FoundationApache2.2htdocsoplwebindex.php on line 10
From some basic Googling, it looks like I need to turn on mod_ldap. Seems simple. I've done the following:
- Went to C:Program FilesApacheSoftware FoundationApache2.2modulesand made sure that mod_ldap.soexists.
- I've gone into C:ProgramFilesApache SoftwareFoundationApache2.2confhttpd.confand made sure that this line is notcommented out: LoadModule ldap_modulemodules/mod_ldap.so
- I've gone intoC:Program FilesPHPphp.ini and madesure this line is not commented out:extension=php_ldap.dll
- Restart apache
The problem still persists. Does the ldap_connect() function in php have any other dependencies? Am I missing a step?
Cheers
closed as off topic by kapa, oers, skolima, Florent, occulusOct 26 '12 at 12:57
Questions on Stack Overflow are expected to relate to programming within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.
5 Answers
I ran into this same issue with my Windows Server 2008 - Have you added the php.ini file to your windows path?
Go to Control Panel and open the System icon (Start -> Settings -> Control Panel -> System, or just Start -> Control Panel -> System for Windows XP/2003+)
Go to the Advanced tab
Click on the 'Environment Variables' button
Look into the 'System Variables' pane
Find the Path entry (you may need to scroll to find it)
Double click on the Path entry
Enter your PHP directory at the end, including ';' before (e.g. ;C:php)
Press OK
Check your phpinfo to make sure ldap is enabled. You should see an LDAP section, and
Support | enabled
You may have php set to auto-enable anything in your extension dir, or you may have to manually enable it by uncommenting a line that looks like:
extension=php_ldap.dll
in your php.ini file
Remember to restart apache after you enable it.
If you're connecting to an Active Directory, you can use this class which doesn't require any special PHP extension: http://sourceforge.net/projects/adldap/
CapsuleCapsulefor WAMP, the working version of php.ini is located at apachebin.i was experienced same problem before until i change php.ini setting inside apachebin and finally it works.
I ran into the same problem recently and I searched for php.ini
on my disk and found that there are two php.ini
files there -- one under the php directory and the other under the apachebin
directory. I uncommented the extension=php_ldap.dll
line in both files and the problem is solved.