Problems building php5

Discussion in 'Technical' started by wildgoosed, Aug 21, 2007.

  1. wildgoosed

    wildgoosed New Member

    hey everyone.

    i'm currently trying to re-install php5 from source on a fedora core 4 box (yes i know old). reason i am doing this from source is that i need mssql support which isn't included in the rpm i had used before.

    i read that i needed to install freetds, so i downloaded the src and did the following commands...

    ./configure
    make
    make install

    everything went fine with that install.

    i didn't want to break any other packages that need php5 and that were currently using my rpm build of php5, so i used the configuation commands from the phpsysinfo output + the --with-mssql=/usr/src/freetds on my source install.

    when i attempt to ./configure the php5 source, i get the following error...

    Code:
    checking for MSSQL support via FreeTDS... yes
    configure: error: Could not find /usr/src/freetds/lib/libtds.a|so
    [root@localhost php-5.2.3]# find / -name freetds
    /usr/src/freetds

    any ideas? thanks.
     
  2. falko

    falko Super Moderator Howtoforge Staff

    I think --with-mssql=/usr/src/freetds is wrong (that the source directory, but you have already compiled and installed freetds). You must find out where freetds is installed (maybe /usr/lib or just /usr or something like that).
     
  3. wildgoosed

    wildgoosed New Member

    I used the --prefix and was able to install freetds where i wanted to, but now i'm getting a new error when trying to compile php5...

    My freetds dir is /usr/local/freetds
    My php5 source is /usr/local/src/php5

    Code:
    configure: error: ODBC header file '/usr/include/sqlext.h' not found
     
  4. wildgoosed

    wildgoosed New Member

    Well I broke apache this afternoon and it took me about an hour to get it back up and running :/

    What I'm wanting is php to have support for mssql and mysql. Can't I download modules for this? Why do I have to re-compile php5 ?
     
    Last edited: Aug 21, 2007
  5. falko

    falko Super Moderator Howtoforge Staff

    Is ODBC installed? I think you need to install the dev version of ODBC as well. Do you see something like that in the output of
    Code:
    yum search odbc
    ?
     
  6. wildgoosed

    wildgoosed New Member

    I get a tone of results for that search. Any idea what ODBC rpm I need installed? php-odbc ?
     
  7. wildgoosed

    wildgoosed New Member

    If this helps, heres all the modules I have installed...

    Code:
    [root@localhost src]# rpm -qa | grep php-
    php-devel-5.0.4-10.5
    php-mysql-5.0.4-10.5
    php-odbc-5.0.4-10.5
    php-imap-5.0.4-10.5
    php-5.0.4-10.5
    php-ldap-5.0.4-10.5
    php-gd-5.0.4-10.5
    php-xml-5.0.4-10.5
    php-xmlrpc-5.0.4-10.5
    php-pear-5.0.4-10.5
    
    So it looks like I should be able to connect to mysql databases as I have the module installed, but isn't there a php-mssql module?
     
  8. wildgoosed

    wildgoosed New Member

    I got php-mssql module install via yum.

    I was able to get a sample script running that connects to my mssql server. However I'm getting the following error that leads me to believe that the php-mssql module on my system still requires further configuring...

    Code:
    Call to undefined function mssql_connect()
     
  9. falko

    falko Super Moderator Howtoforge Staff

    Please check if the module is enabled in php.ini. If you have to modify php.ini, don't forget to restart Apache.
     
  10. wildgoosed

    wildgoosed New Member

    I was finally able to get the rpms going for php5, freetds and php_mssql.
     

Share This Page