Hi,

I connect via ODBC to an economic system, works fine from a windows commandline with this script:

<?
odbc_connect("name", "", "");
?>

But if I execute it in a browser via the Apache webserver (2.0.54) I get:

Warning: odbc_connect(): SQL error: [Simba][SimbaEngine ODBC Driver][DRM File Library]General error., SQL state S1000 in SQLConnect in C:\html\test.php on line 2

I don't understand why there is a difference, I just installed PHP and Apache on this Windows XP workstation - any ideas? I read in the php.ini that no dll's were required anymore for ODBC...!?

Best regards,
Christian Rasmussen

    Sounds like a permissions error in the db...the apache (web) user may not have sufficient priviliges on the network to gain access...

      Originally posted by bastien
      Sounds like a permissions error in the db...the apache (web) user may not have sufficient priviliges on the network to gain access...

      Hi Bastien,

      Thanks for your reply.

      I better explain the setup in more detail, the database system is located on a Windows 2003 server to which 3 clients are connected. All clients has the S-drive mapped to the data-share (which include the database) on the server.

      I access the database via a native economic program (Concorde C5). I have so far used ODBC to insert data from the database into Excel, the ODBC setting:

      A system DSN has been created with a name I can select from Excel, username/pass and the datafile located on the S-drive.

      As explained I would like to access it via PHP. I installed both CLI and CGI PHP, the command-line version works just fine, the web does not.

      I agree that it might be a permission-issue. I've tried to change the service user of apache to my own user (which has access to the datafile on the server) - unfortunately this didn't change anything..

      Instead I just copied the whole program including database file to C:, changed the location of the datafile to C: on the DSN and it worked!! 🙂

      The big question is now how to get it working from the server... As I tried my own user (which I also used to execute the PHP script successfully via CLI) and it didn't work Im not sure if it can still be a permission issue...??

      Thanks in advance.

      Best regards,
      Christian Rasmussen

        Write a Reply...