Jump to content

Help with Reconfiguring PHP


Recommended Posts

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?

Link to comment
Share on other sites

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?

 

 

Link to comment
Share on other sites

We got Apache to recognize the reconfiguration! ;D  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?

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.