Compiling PHP with Sybase

Discussion in 'OT Technology' started by RaginBajin, Oct 30, 2003.

  1. RaginBajin

    RaginBajin Have you punched a donkey today?

    Joined:
    Dec 24, 2001
    Messages:
    8,740
    Likes Received:
    0
    Location:
    NoVA
    Alright all...after 2 grueling days trying to get Sybase working properly on my Redhat 9.0 machine only to realize it was because the system was using /usr/bin/isql instead of the Sybase version, I got it working.

    The problem is that I have to recompile PHP with Sybase support. I'm fairly new to all this so it's not going real well. I have to ensure that I keep my Oracle support in PHP when I recompile. I'm attempting to run the following:

    rpmbuild --rebuild --define `oracle 1` php-4.2.2-17.2.src.rpm

    I added the following to php.spec:

    --with-config-sybase-ct=/opt/sybase-11.9.2 \

    When I run the rpmbuild command, I get the following errors:

    -bash: oracle: command not found
    rpmbuild: no packages files given for rebuild

    What am I doing wrong here?

    Please help me before I rip every last hair out of my head.
     
  2. RaginBajin

    RaginBajin Have you punched a donkey today?

    Joined:
    Dec 24, 2001
    Messages:
    8,740
    Likes Received:
    0
    Location:
    NoVA
    Ok...

    Does anyone know how to manually edit the php.spec file? When I add in the above line with sybase, it simply removes that later on. How do I get that configure line to remain when I do the recompile?
     
  3. samm

    samm Next in Line

    Joined:
    Dec 22, 2000
    Messages:
    2,630
    Likes Received:
    0
    Location:
    San Jose, CA
    what do you mean manually edit? Just use vi or emacs...

    When I compiled php with mysql support, I just downloaded the source code. I've never used rpmbuild.
     
  4. RaginBajin

    RaginBajin Have you punched a donkey today?

    Joined:
    Dec 24, 2001
    Messages:
    8,740
    Likes Received:
    0
    Location:
    NoVA
    You can manually edit the php.spec file in order to add something to the configure options. I edited in order to add sybase support.

    Added:
    --with-config-sybase-ct=/opt/sybase-11.9.2 \

    The problem is that when I edit this file and recompile php, it overwrites my changes and doesn't include the updates I've made to add sybase to the configure options. Basically, I need to find a way to get PhP working with Sybase and all I've found is that it needs to be done through this spec file. But, if the recompile overwrites it every time, I don't know where to go.
     

Share This Page