Consultor Eletrônico



Kbase P149377: PHP, running under IIS6, error log shows ODBC errors when the SQL-92 query retrieves a large sets of
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   10/07/2009
Status: Unverified

SYMPTOM(s):

PHP, running under IIS6, error log shows ODBC errors when the SQL-92 query retrieves a large sets of records from the progress/OpenEdge database

PHP Warning: odbc_exec() [<a href='function.odbc-exec'>function.odbc-exec</a>]: SQL error: [DataDirect-Technologies][ODBC PROGRESS driver]Cannot open file 'C:\WINDOWS\SYSTEM32\INETSRV\'., SQL state S1000 in SQLExecDirect in C:\Inetpub\wwwroot\Jargon_TT\select.php on line 55

The ODBC trace log is intermittently generated but when it works shows the following errors

DIAG [S1000] [DataDirect-Technologies][ODBC PROGRESS driver]Cannot open file 'C:\WINDOWS\SYSTEM32\INETSRV\'. (30040)

DIAG [S1000] [DataDirect-Technologies][ODBC PROGRESS driver]Cannot delete file: 'C:\WINDOWS\SYSTEM32\INETSRV\'. (1502)

DIAG [01S02] [DataDirect-Technologies][ODBC PROGRESS driver]Option value changed. (0)

FACT(s) (Environment):

Allowing full control to IUSR_MACHINE-NAME user or everyone to 'C:\WINDOWS\SYSTEM32\INETSRV folder did not resolve the issue
When retrieving small sets or results, everything works fine
Other 3rd party ODBC tools, such as WinSQL, works fine regardless of the size of the record set provided that the database is started with some SQL tuning parameters
The JDBC also works fine
Running the same PHP script from DOS prompt works fine, and the ODBC trace log also gets created every time as well
Changing the anonymous user of IIS from IUSR_Machine-name to a user with administrator rights resolved the issue
PHP 5.2.x or 5.3.x
IIS 6 on Windows 2003
Windows
Progress 9.x
OpenEdge 10.x

CAUSE:

This is an IIS issue with IIS user privileges. IIS user uses IUSR_MACHINE-NAME user with very limited rights on different folders outside of wwwroot folder. On the other hand ODBC driver tries to create a temp file to cache the records after a certain records set. Since IIS user is trying to run the query against ODBC driver, it lacks privileges to create temporary file by Progress/OpenEdge SQL-92 ODBC driver. Therefore, the errors are apparent.

FIX:

Change the anonymous user (IUSR_MACHINE-NAME) of IIS to a local system user with some local security policies added under Anonymous access and authentication control on the the directory security tab of the Web sites properties