I've the next downloaded on my small machine
apache2.2.21 zip from apachelounge
php 5.3.8 thread safe zip from php.internet
Home windows 7
I have unzipped both of them with a path on my small computer. Let us say its known as $HOME.
And So I have $HOME/apach2 and $HOME/php.
I have effectively become the phpinfo() page to show as well as installed the xdebug extension for debugging reasons in netbeans.
My issue is the next :
I uncommented 'extension=php_ldap.dll' within the php.ini because I want ldap connectivity.
I'll start apache and also the monitor states that apache is running. Then i navigate to my index.php but a mistake happens stating that ldap_connect does not exist.
After I type if 'php --radio wave ldap_connect' in to the command line, I recieve the function prototype not a problem.
I actually have a php script written which will make use of the ldap extension to complete ldap search.
$conn = ldap_connect( 'ldap://myhostsomewhere', 389 ); ldap_set_option( $conn, LDAP_OPT_PROTOCOL_VERSION, 3 ); ldap_bind( $conn, 'cn=admin,dc=emc,dc=com', 'secret' ); $rs = ldap_search( $conn, 'cn=jerry,ou=people,dc=example,dc=com', '(cn=jerry)'); $stuff = ldap_get_entries( $conn, $rs ); var_dump( $stuff );
The code above will return an assortment with the results and that i get NO errors.
After I look into the Apache error log however, I recieve the next error,
PHP Warning: PHP Startup: Not able to load dynamic library 'C:/Customers/jerry/Documents/myprogs/php/ext/php_ldap.dll' - The required module couldn't be located.registered nurse in Unknown online .
I have double checked and triple checked and also the directory can there be and basically it is not loading when apache attempts to run php. However it loads fine after i run PHP with the command line.
I have checked out the phpinfo() and apache is loading the right php.ini file too.
I have no idea what's going one.
The strange part is the fact that often a php error like this could potentially cause apache to prevent and cause some kind of fault. It is a PHP Warning though, and apache begins all right however it gripes after i attempt to call ldap_connect.
Anybody have suggestions?
This is the way I solved it.
I believe which i must've switched the need for something within the php.ini file. I required the home windows php installer, went it and allow it to override the present php.ini file.
Next, I required the zipped version of php and dropped it directly into replace the home windows installer version however i saved the php.ini file. Then it labored fine, no issues.