|
Posted by Andy Hassall on 10/02/96 11:18
On Sun, 12 Jun 2005 01:00:00 +0200, "Christian Rasmussen" <something@somewhere>
wrote:
>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...!?
This sort of thing is almost always due to the fact that your webserver runs
scripts under a different and much more privilege-limited environment than your
login user.
Some approaches:
(a) Modify permissions on the ODBC drivers and any related files (can't comment
what they may be, since I don't know what "Simba" is).
(b) If you're connecting via a DSN, check it's set up as a System DSN not a
User DSN - remember, you're running as a different user in the webserver.
(c) Set up a new account specifically for the webserver, so you can grant
specific privileges to it.
(d) Probably others depending on your exact situation.
--
Andy Hassall / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Navigation:
[Reply to this message]
|