The PHP-MSSQL Module On CentOS 5.0

Discussion in 'HOWTO-Related Questions' started by codex, Jun 14, 2007.

  1. codex

    codex New Member

    The PHP-MSSQL Module On CentOS 5.0

    i have server configured as The Perfect Setup - CentOS 5.0 (32-bit)

    i will install MSSQL modules on that server

    installation of freetds freetds-devel --enablerepo=rpmforge are succes

    php-devel is installed

    problem is that i cannot find php.spec file

    there is nothing /usr/src/redhat/SPECS/ directory

    what can i do for finish this installation

    sorry for my EN
     
  2. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    You can search for the file:
    Code:
    updatedb
    locate php.spec
     
  3. domeger

    domeger New Member

    Does this even work in centos x64 ?, i know in the past i have never gotten it to work, since freedts was only built for x32.
     
  4. xloouch

    xloouch New Member

    Hi All

    I did the HOWTO from
    *http://www.howtoforge.com/installing_php_mssql_centos5.0*

    Now I i got some problems by compiling the php.spec....

    here is the error:

    Code:
    + CFLAGS='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -fno-strict-aliasing'
    + CPPFLAGS=-DLDAP_DEPRECATED=1
    + export CFLAGS CPPFLAGS
    + exit 0
    Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.24067
    + umask 022
    + cd /usr/src/redhat/BUILD
    + cd php-5.1.6
    + LANG=C
    + export LANG
    + unset DISPLAY
    + '[' /var/tmp/php-root '!=' / ']'
    + rm -rf /var/tmp/php-root
    + pushd build-cgi
    /usr/src/redhat/BUILD/php-5.1.6/build-cgi /usr/src/redhat/BUILD/php-5.1.6
    + make install INSTALL_ROOT=/var/tmp/php-root
    make: *** No rule to make target `install'.  Stop.
    error: Bad exit status from /var/tmp/rpm-tmp.24067 (%install)
    
    
    RPM build errors:
        Bad exit status from /var/tmp/rpm-tmp.24067 (%install)
    
    I changed also something in the php.spec, before i could start compiling. I had to ad %package mssql like this:
    Code:
    %package mssql
    Group: Development/Languages
    Requires: php = %{version}-%{release}, php-pdo
    Summary: A module for PHP applications that use the MSSQL database.
    provides: php_database
    BuildRequires: freetds-devel
    
    %description mssql
    #The MSSQL package contains a dynamic shared object that will add support for accessing MSSQL databases to php.
    
    If I would not add the package it will produce an other error..

    Can someone please help me? i need the PHP-MSSQL connection..

    Thx for your Help.

    Greetings

    Xloouch
     
  5. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    What exactly did you modify in php.spec?
     
  6. xloouch

    xloouch New Member

    I changed this from the script:

    Code:
    Group: Development/Languages
    Requires: php = %{version}-%{release}, php-pdo
    Summary: A module for PHP applications that use the MSSQL database.
    provides: php_database
    BuildRequires: freetds-devel
    
    %description mssql
    #The MSSQL package contains a dynamic shared object that will add support for accessing MSSQL databases to php.
    
    to this:
    Code:
    [B]%package mssql[/B]
    Group: Development/Languages
    Requires: php = %{version}-%{release}, php-pdo
    Summary: A module for PHP applications that use the MSSQL database.
    provides: php_database
    BuildRequires: freetds-devel
    
    %description mssql
    #The MSSQL package contains a dynamic shared object that will add support for accessing MSSQL databases to php.
    
    Because of an earlier compilation error
     
  7. falko

    falko Super Moderator Howtoforge Staff Moderator HowtoForge Supporter ISPConfig Developer

    Did you also do this?
     

Share This Page