Добрый день,коллеги. Такая проблема.Хотел сделать справочник.На скрипте ref.php вылетает "Невозможно отобразить страницу" и в апаче такая ошибка. Помогите советом. Непонятно,это я косяку страшно в коде или баг какой-то... ********************************** PHP Warning: PHP Startup: sqlsrv: Unable to initialize module\nModule compiled with module API=20090626, debug=0, thread-safety=1\nPHP compiled with module API=20060613, debug=0, thread-safety=1\nThese options need to match\n in Unknown on line 0 [Fri Mar 04 15:11:12 2011] [warn] mod_wsgi: Compiled for Python/2.5. [Fri Mar 04 15:11:12 2011] [warn] mod_wsgi: Runtime using Python/2.5.4. [Fri Mar 04 15:11:12 2011] [warn] mod_wsgi: Python module path 'C:\\WINDOWS\\system32\\python25.zip;C:\\Python\\Lib;C:\\Python\\DLLs;C:\\Python\\Lib\\lib-tk;;C:\\Apache2.2\\bin'. [Fri Mar 04 15:11:12 2011] [notice] Apache/2.2.14 (Win32) PHP/5.2.10 mod_wsgi/2.0 Python/2.5.4 configured -- resuming normal operations [Fri Mar 04 15:11:12 2011] [notice] Server built: Sep 28 2009 22:41:08 [Fri Mar 04 15:11:12 2011] [notice] Parent: Created child process 2596 PHP Warning: PHP Startup: sqlsrv: Unable to initialize module\nModule compiled with module API=20090626, debug=0, thread-safety=1\nPHP compiled with module API=20060613, debug=0, thread-safety=1\nThese options need to match\n in Unknown on line 0 [Fri Mar 04 15:11:12 2011] [warn] mod_wsgi: Compiled for Python/2.5. ********************************** Прилагаю также 3 скрипта: 1.reflist.php -получаю все названия параметров LISTNAME 2.ref.php -Ищу все значения параметров с именем,полученным в reflist.php 3.connect.inc - коннект к базе 1.reflist.php PHP: <?php include_once($_SERVER['DOCUMENT_ROOT']."/creditreporter/db_connect/connect.inc"); $q_listname_1='select distinct(r.listname) as reflist from car_reflists'; $q_listname_2=' r where r.validto is null order by r.listname'; $q_db_cf='@slolpcf'; $q_db_rb='@slolprb'; echo ""; echo "<center><form action='reflist.php'> <select size='1' name='slolp'> <option value='SLOLPCF'>SLOLP CF</option> <option value='SLOLPRB'>SLOLP RB</option> </select> <input type='submit' value='Search'> </form> </center>"; global $sl; $sl=$_REQUEST['slolp']; $err=''; if (empty($sl)){ echo $err='âûáåðèòå slolp'; end; } //cf if ($sl=='SLOLPCF') { //echo '<ce>REFLIST SLOLPCF'; $q_ref=$q_listname_1.$q_db_cf.$q_listname_2; $s = oci_parse($conn,$q_ref); oci_execute($s); oci_fetch_all($s, $res); foreach ($res['REFLIST'] as $listname) { echo "<a href='ref.php?sll=slolpcf&sll_ref=$listname'>".$listname."</a><br>"; } } //rb if ($sl=='SLOLPRB') { //echo 'rb'; $q_ref=$q_listname_1.$q_db_rb.$q_listname_2; $s = oci_parse($conn,$q_ref); oci_execute($s); oci_fetch_all($s, $res); foreach ($res['REFLIST'] as $listname) { echo "<a href='ref.php?sll=slolprb&sll_ref=$listname'>".$listname."</a><br>"; } } //oci_close($conn); ?> ********************************* 2.ref.php PHP: <?php include($_SERVER['DOCUMENT_ROOT']."/creditreporter/db_connect/connect.inc"); //error_reporting(E_ALL); $sl=$_REQUEST['sll']; $lst="'".$_REQUEST['sll_ref']."'"; //$conn=$_REQUEST['conn']; echo $sl.'<br>'; echo $lst.'<br>'; $q_value1='select r.listname,r.listitemid,r.listvalue,r.externallistvalue,r.readonly,l.langid,l.text from car_reflists'; $q_value2=' r, car_languagetexts'; $q_value3=' l where r.textid=l.textid and r.validto is null and r.listname='; $q_value4=' order by r.listitemid'; $q_db_cf='@slolpcf '; $q_db_rb='@slolprb '; $q_cf=$q_value1.$q_db_cf.$q_value2.$q_db_cf.$q_value3.$lst.$q_value4; $q_rb=$q_value1.$q_db_rb.$q_value2.$q_db_rb.$q_value3.$lst.$q_value4; if ($sl=='slolpcf'){ echo $q_cf; $s=oci_parse ($conn,$q_cf); echo '<table border=1>'; oci_execute($s); while (oci_fetch($s)) { $var1=oci_result($s,'LISTNAME'); $var2=oci_result($s,'LISTITEMID'); $var3=oci_result($s,'LISTVALUE'); $var4=oci_result($s,'EXTERNALLISTVALUE'); $var5=oci_result($s,'READONLY'); $var6=oci_result($s,'LANGID'); $var7=oci_result($s,'TEXT'); echo "<tr> <td>"."$var1"." </td> <td>"."$var2"." </td> <td>"."$var3"." </td> <td>"."$var4"." </td> <td>"."$var5"." </td> <td>"."$var6"." </td> <td>"."$var7"." </td> </tr>"; } oci_free_statement($s); echo '</table>'; } if ($sl=='slolprb'){ echo $q_rb; $s=oci_parse ($conn,$q_rb); //oci_bind_by_name($s,':listname',$lst); echo '<table border=1>'; oci_execute($s); while ($res=oci_fetch_array($s, OCI_NUM+OCI_RETURN_NULLS)) { echo '<tr><td>'.$res[0].'</td><td>'.$res[1].'</td><td>'.$res[2].'</td><td>'.$res[3].'</td><td>'.$res[4].'</td><td>'.$res[5].'</td><td>'.$res[6].'</td></tr>'; } echo '</table>'; } //oci_free_statement($s); //oci_close($conn); ?> -**************************** 3.connect.inc PHP: <?php //Connect to DATABASE $conn=oci_connect('***','***','****'); if(!$conn){ die; } ?>
в пхп.ини попробовать закомментировать модуль sqlsrv описание ошибки поискать по запросу sqlsrv: Unable to initialize module
закомментил php_sqlsrv Ошибка изменилась на такую ***************** [Sat Mar 05 10:21:08 2011] [notice] Parent: child process exited with status 0 -- Restarting. [Sat Mar 05 10:21:08 2011] [warn] mod_wsgi: Compiled for Python/2.5. [Sat Mar 05 10:21:08 2011] [warn] mod_wsgi: Runtime using Python/2.5.4. [Sat Mar 05 10:21:08 2011] [warn] mod_wsgi: Python module path 'C:\\WINDOWS\\system32\\python25.zip;C:\\Python\\Lib;C:\\Python\\DLLs;C:\\Python\\Lib\\lib-tk;;C:\\Apache2.2\\bin'. [Sat Mar 05 10:21:08 2011] [notice] Apache/2.2.14 (Win32) PHP/5.2.10 mod_wsgi/2.0 Python/2.5.4 configured -- resuming normal operations [Sat Mar 05 10:21:08 2011] [notice] Server built: Sep 28 2009 22:41:08 [Sat Mar 05 10:21:08 2011] [notice] Parent: Created child process 6708 [Sat Mar 05 10:21:08 2011] [warn] mod_wsgi: Compiled for Python/2.5. [Sat Mar 05 10:21:08 2011] [warn] mod_wsgi: Runtime using Python/2.5.4. [Sat Mar 05 10:21:08 2011] [warn] mod_wsgi: Python module path 'C:\\WINDOWS\\system32\\python25.zip;C:\\Python\\Lib;C:\\Python\\DLLs;C:\\Python\\Lib\\lib-tk;;C:\\Apache2.2\\bin'. [Sat Mar 05 10:21:08 2011] [notice] Child 6708: Child process is running [Sat Mar 05 10:21:08 2011] [notice] Child 6708: Acquired the start mutex. [Sat Mar 05 10:21:08 2011] [notice] Child 6708: Starting 64 worker threads. [Sat Mar 05 10:21:08 2011] [notice] Child 6708: Starting thread to listen on port 80. [Sat Mar 05 10:21:09 2011] [notice] Parent: child process exited with status 0 -- Restarting. [Sat Mar 05 10:21:09 2011] [warn] mod_wsgi: Compiled for Python/2.5. [Sat Mar 05 10:21:09 2011] [warn] mod_wsgi: Runtime using Python/2.5.4. [Sat Mar 05 10:21:09 2011] [warn] mod_wsgi: Python module path 'C:\\WINDOWS\\system32\\python25.zip;C:\\Python\\Lib;C:\\Python\\DLLs;C:\\Python\\Lib\\lib-tk;;C:\\Apache2.2\\bin'. [Sat Mar 05 10:21:09 2011] [notice] Apache/2.2.14 (Win32) PHP/5.2.10 mod_wsgi/2.0 Python/2.5.4 configured -- resuming normal operations [Sat Mar 05 10:21:09 2011] [notice] Server built: Sep 28 2009 22:41:08 [Sat Mar 05 10:21:09 2011] [notice] Parent: Created child process 1668 [Sat Mar 05 10:21:09 2011] [warn] mod_wsgi: Compiled for Python/2.5. [Sat Mar 05 10:21:09 2011] [warn] mod_wsgi: Runtime using Python/2.5.4. [Sat Mar 05 10:21:09 2011] [warn] mod_wsgi: Python module path 'C:\\WINDOWS\\system32\\python25.zip;C:\\Python\\Lib;C:\\Python\\DLLs;C:\\Python\\Lib\\lib-tk;;C:\\Apache2.2\\bin'. [Sat Mar 05 10:21:09 2011] [notice] Child 1668: Child process is running [Sat Mar 05 10:21:09 2011] [notice] Child 1668: Acquired the start mutex. [Sat Mar 05 10:21:09 2011] [notice] Child 1668: Starting 64 worker threads. [Sat Mar 05 10:21:09 2011] [notice] Child 1668: Starting thread to listen on port 80. [Sat Mar 05 10:21:15 2011] [error] [client 172.25.10.224] File does not exist: C:/Apache2.2/htdocs/creditreporter/monitoring/index_new.files, referer: http://ussrbk2/creditreporter/monitorin ... _usage.php [Sat Mar 05 10:21:44 2011] [error] [client 172.25.10.224] File does not exist: C:/Apache2.2/htdocs/creditreporter/monitoring/index_new.files, referer: http://ussrbk2/creditreporter/monitorin ... _usage.php [Sat Mar 05 10:22:06 2011] [error] [client 172.25.10.224] File does not exist: C:/Apache2.2/htdocs/creditreporter/monitoring/index_new.files, referer: http://ussrbk2/creditreporter/monitorin ... _usage.php [Sat Mar 05 10:23:14 2011] [error] [client 172.24.73.231] File does not exist: C:/Apache2.2/htdocs/favicon.ico [Sat Mar 05 10:23:16 2011] [error] [client 172.24.73.231] File does not exist: C:/Apache2.2/htdocs/favicon.ico
По второй ошибке-я не вижу что искать. Сервис перезагружается.Ошибки модулей питона к моей проблеме не относятся
Короче,проблема исключительно при запросе через DBLINK-и. Подключая коннекты к самим базам-все работает на ура. Всем спасибо. Тема закрыта.