rabark Posted March 14, 2008 Share Posted March 14, 2008 Recently, I created a PHP page that makes use of executing file_get_contents() on a URL. The URL happened to be a https URL, and it was determined PHP needed to be reconfigured with the option '--with-openssl' in order for file_get_contents() to work. The sysadmin has reconfigured PHP, and upgraded PHP from 4.3.8 to 4.4.8 while at it. My script works great when run from the command line, but when run from a browser, phpinfo() shows the previous version and compilation of PHP in effect, thus my page throws a file_get_contents related error. Apache was restarted twice after the reconfiguration, but it seems it didn't quite get the memo. Any idea what might be wrong? Quote Link to comment https://forums.phpfreaks.com/topic/96156-help-with-reconfiguring-php/ Share on other sites More sharing options...
trq Posted March 14, 2008 Share Posted March 14, 2008 Maybe your sysadmin only reconfigured the cli version of php? they can be installed as two different beasts. Quote Link to comment https://forums.phpfreaks.com/topic/96156-help-with-reconfiguring-php/#findComment-492611 Share on other sites More sharing options...
rabark Posted March 18, 2008 Author Share Posted March 18, 2008 Hmm, that might be possible. I ran a "php --version" command and got this: PHP Warning: Unknown(): (null): Unable to initialize module Module compiled with module API=20041030, debug=0, thread-safety=1 PHP compiled with module API=20020429, debug=0, thread-safety=1 These options need to match in Unknown on line 0 PHP Warning: Unknown(): Invalid library (maybe not a PHP library) 'ldap.sl' in Unknown on line 0 PHP 4.4.8 (cli) (built: Mar 13 2008 19:24:40) Copyright © 1997-2008 The PHP Group Zend Engine v1.3.0, Copyright © 1998-2004 Zend Technologies I'm fairly certain the ldap part of the error is being caused because we didn't reconfigure with the '--with-ldap[=DIR]' configuration option. However, does the "PHP 4.4.8 (cli)" part indicate that only the CLI version was installed? Quote Link to comment https://forums.phpfreaks.com/topic/96156-help-with-reconfiguring-php/#findComment-494862 Share on other sites More sharing options...
trq Posted March 18, 2008 Share Posted March 18, 2008 does the "PHP 4.4.8 (cli)" part indicate that only the CLI version was installed? No, but you called the php cli by calling php from a term. Quote Link to comment https://forums.phpfreaks.com/topic/96156-help-with-reconfiguring-php/#findComment-494888 Share on other sites More sharing options...
rabark Posted March 21, 2008 Author Share Posted March 21, 2008 We got Apache to recognize the reconfiguration! Apparently you are supposed to have stopped Apache *before* you run the configure, make, and make install commands. Now everything is workign great. Except for LDAP We've tried pointing '--with-ldap=' to all kinds of locations, but no matter what, we always get this error: configure: error: Cannot find ldap.h A find command reveals that indeed there is no ldap.h file anywhere on the server (although all the other ldap files are in the folder where the ldap.h file should be). It would seem then that we need to reinstall and recompile LDAP I'm guessing?. That seems strange though since the LDAP extension was working fine before. Could the reconfiguring of PHP possibly removed the ldap.h file or something? Quote Link to comment https://forums.phpfreaks.com/topic/96156-help-with-reconfiguring-php/#findComment-497447 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.