Perfect Server ubuntu 10.04 issue

Discussion in 'HOWTO-Related Questions' started by dxh, Sep 9, 2010.

  1. dxh

    dxh New Member

    Hello. I have set up a server following this how to, and I am having an issue with a php script. I get this error when I run the script:

    PHP Fatal error: call to undefined function odbc_connect

    I installed the freetds and unixodbc items, but I still get the same error.
    This is trying to access my MSSQL db

    I am pretty weak with php so any help is great.

    Last edited: Sep 9, 2010
  2. till

    till Super Moderator Howtoforge Staff HowtoForge Supporter ISPConfig Developer

    Looks as if the php odbc module is not installed or not loaded. To install it, run:

    apt-get install php5-odbc

    and then restart the apache webserver.
  3. dxh

    dxh New Member

    Thanks Till. That did the trick.

    I noticed that when I run this script from the default profile it works, but when I run it from a client vhost it does not. I think this is an issue of what PHP is allowed to do for that vhost? Why would it work in the default site, but not under client sites I create?
    Just curious if you have any suggestions.
    Thanks again, your solution got me running.

Share This Page