Ldap configuration on xammp - php

I have been trying to configure ldap on xammp localhost.
I have enabled ldap extension in php.ini file.
I have also tried to change the system variables.
I have been continuously getting this error
LDAP functionality not present. Either load the module ldap php module or use a php with ldap support compiled in.
Any help is welcomed

I've found this solution and it works for me:
"I have copied the "libsasl.dll" from the "xampp/php" directory into the "xampp/apache/bin" directory, uncommented the "extension=php_ldap.dll" in "xampp/php/php.ini", and started Apache."
I found it in https://community.apachefriends.org/f/viewtopic.php?f=16&t=48302#p186324

Related

I'm trying to enable sqlsrv in PHP on my local machine, but it's not showing in php.ini

I'm trying to enable sqlsrv in php, i've installed/downloaded the php_sqlsrv_74_ts_x64.ddl and added it to the extensions in php.ini, resarted iis. When I open phpinfo it doesn't show.
I cannot figure out what's wrong with it.
I'm trying to connect to a MS SQL server.
PHP Version = 7.4.6.
Any help is appreciated.
You should be able to view the real error message when you double click C:\...\PHP\v7.4\PHP_CGI.exe like
So please check whether your extension_dir are pointing to the right place.
extension_dir = "C:\Program Files\PHP\v7.4\ext"
And you have put php_sqlsrv_74_ts_x64.dll in the ext file.
This is how I register the extension. The driver file must match the PHP version, architecture, and threadedness of your PHP environment.
extension=sqlsrv_74_nts_x64
You can modify the configurations untill php-cgi.exe no longer report any exception.
Finally the most important thing is run "IISRESET" in CMD adminsitrator mode.
Then you will see these extension in phpinfo.
Please ensure your IIS is mapping to the correct php_cgi.

How to connect to remote MSSQL database using php 5.5.19

I have had a problem trying to establish a connection to a MSSQL database I created in Microsoft SQL Server Manager 2008 R2 using php 5.5.19 in XAMPP.
In the php.ino configuration file under extensions, there is commented out a ';extension=php_mssql.dll'. I removed the comment and ran apache in the xampp control panel.
Naturally an error occurred stating ''PHP Startup: Unable to load dynamic library '..\ext\php_mssql.dll cannot be found'. I looked in the ext directory and sure enough it wasn't there. I added the mssql.dll file from
www.dll-files.com/dllindex/dll-files.shtml?php_mssql
,but then I got an Entry Point not found error stating 'The procedure entry point php_body_write could not be located in the dll php5ts.dll'.
After further research, I discovered that mssql_connect was not working since PHP version 5.3: http://php.net/manual/en/intro.mssql.php
I instead tried to use the 'sqlsrv_connect'' function, but I had to install the new drivers from https://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx
After reading the readme, I saw that I needed the libraries php_sqlsrv_55_ts.dll and php_pdo_sqlsrv_55_ts.dll to work with xampp's php5ts.dll in the php folder.
I added the libraries in the php\ext folder and added corresponding extensions to the new dll's and restarted Apache.
I then got an system error 'The program can't start because MCVCP110.dll is missing from your computer. Try reinstalling the program to fix this problem.' Obviously reinstalling isn't an option as I will lose my new dll's so I verified that MCVCP110.dll is in the php folder, which it was.
Please help, I really need to find a way to load the libraries with the 'sqlsrv_connect' function properly so I can connect to a MSSQL database.

Fatal error: Class 'COM' not found in E:\Server\wwwroot\PHPWebAdmin\initialize.php on line 13

I am trying to set up hMailServer in "Windows Server 2008 Enterprise Edition Service Pack 1".I've setup hMailServer,Apache,PHP and webmail Interface "AfterLogic webMail" successfully.And all work well.But I am stuck in a problem while I tried to install "PHPWebAdmin"。
Error message as follows :
Fatal error: Class 'COM' not found in E:\Server\wwwroot\PHPWebAdmin\initialize.php on line 13
This infomation occurs while visiting "http://192.168.2.66:8088/PHPWebadmin/".
I've configured PHP configuration file php.ini options as follows:
[PHP]
register_globals = Off
display_errors = Off
doc_root = "E:/Server/wwwroot"
extension_dir = "E:/Server/php5_4_5/ext"
[Session]
session.save_path = "E:/Server/php5_4_5/tmp"
[COM]
com.allow_dcom = true
I've also finished these things as hMailServer manual suggests:
DCOM permissions
Overview
By default, IIS6 is not allowed to connect to hMailServer because of the Distributed COM permissions that Windows uses. Also, Apache run as a user account with restricted permissions is not allowed to connect by default.
Steps
Follow these steps to give IIS or Apache the required permissions to connect to hMailServer using DCOM.
1.Start DCOM config by selecting Start, Run, enter dcomcnfg.exe and press OK.
2.In the Component Services program, expand the Component Services folder
3.Expand down to Computers | My Computer | DCOM Config
4.Right-click on hMailServer and select properties
5.Select the Security tab
6.Under "Launch and Activation Permissions", select Customize and click on Edit
7.Under "Group or user names", click Add
8.For IIS6: add the built-in anonymous IIS user account
9.For Apache: add the Apache user account
10.Set the Local Launch and Local Activation permissions for this user to Allow
Actually,I even tried to give permission to EveryOne in the DCOM configuration.
Installing PHPWebAdmin is to give users a place to change their email password.
Enviroment here:Windows Server 2008,Apache2.2,PHP5.4.5.
Why this problem happen? And How to handle it?
Thanks a lot!
The php 5.4.5 build from windows.php.net ships the com/dotnet module as extension dll. If that's the case with your version of php too you can enable the module via
extension=php_com_dotnet.dll
in your php.ini
If you are using windows 8 and apache server and
extension=php_com_dotnet.dll did not work for you then:
copy php_com_dotnet.dll file to c:/windows/system32
and write to php.ini file:
extension = c:/windows/system32/php_com_dotnet.dll
I am using windows8 and apache server for windows.
Worked for me.
I hope this helped to you :))
For additonal clue to fix this issue I've noted that under IIS 10 / Windows Server 2016 I wasn't abble to make this interface working using a 32bits version of PHP 7.2 (FastCGI).
The solution was quite evident for me : running it with the 64 bit version of PHP 7.2 (in my case by creating a new application for the subdirectory "PHPWebadmin" and changing handler mapping as the main application needs to be run using a 32 bits version of php due to some spécific 32 bits developped extension).
Hope it may help,
Regards

Changing PHP plugin configuration ( LDAP )

I am running PHP (on Apache/Windows) and I am trying to connect to a LDAP server to authenticate users. PHP's LDAP plugin is just OpenLDAP.
While I've been successful in connecting to the LDAP server without SSL, I can't do it WITH SSL. I know I got everything right, except OpenLDAP won't connect to the server without the CA certificate. The connection fails and it gives me this error:
"error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed"
Now, I know I can suppress this behavior by setting TLS_REQCERT to "never" in the ldap.conf file. But the plugin on windows is just a dll file; and I have no idea on where to put the .conf file. Does anyone know?
Thanks in advance.
Apparently you need to place the ldap.conf file in the following directory:
C:\openldap\sysconf\
Since it's hardcoded into the DLL file. PHP.net Manual: LDAP Functions - Comment #47427

PHP SOAP cannot connect to an SSL WSDL source

Trying to make Soap connection to a https:// WSDL source via PHP/Win32, but keep getting the error:
Warning: SoapClient::SoapClient() [soapclient.soapclient]: I/O warning
: failed to load external entity "https://...
If I try to save the WSDL locally and access it then, the SoapFault->faultstring property has the message "SSL support is not available in this build".
After some Googling, seems like PHP SOAP cannot connect to a HTTPS source. HTTP is OK, though.
Is there a workaround for this? Or is there an alternative SOAP version/module I can install?
HTTPS support for SOAP in PHP5
If you’re seeing error messages about missing https wrappers when trying to use SOAP (”Unable to find the wrapper “https” – did you forget to enable it when you configured PHP?” or “[HTTP] SSL support is not available in this build”), you haven’t installed the SSL libraries to support secure transactions.
Uncomment
extension=php_soap.dll
in your php.ini
Uncomment
extension=php_openssl.dll
in your php.ini
Copy
ssleay32.dll
and
libeay32.dll
to your windows system32 directory
Reboot apache, et voila!
I originally found this answer at: http://webponce.com/rants/2008/04/https-support-for-soap-in-php5-under-windows/
I had the same problem. openSSL, cURL were enabled, initiated a SoapClient with option of location to stored certificated, etc, etc.. tried everything.
Turns out it does work in CLI mode. Thus php_sapi = CLI.
As we almost always run our webservices calls as a cronjob, scheduled task in Windows, this is not really a bad thing. I was really glad to get it working!
Update:
Okay, turns out when PHP is running as an Apache module, it uses the by opensll required libraries libeay32.dll and ssleay32.dll from the Apache install. When using PHP in CLI is uses the libraries from the PHP directory/install. Overwriting the 2 Apache dlls with the dlls from the PHP directory did the trick. It now also runs under Apache.
So your PHP version should match with the working dlls for the specific version. When it still doesn't work in the web interface. Please check that Apache isn't loading these dlls from a Windows System directory, specified earlier in your system defined path, which is picked up by Apache.
I've had success with SSL and SOAP using NuSOAP:
http://nusoap.sourceforge.net/

Categories