Помощник
|
неполадка с php.ini |
digor
|
Сообщение
#1
|
||
|
|
||
|
|||
Apay |
23.7.2009, 8:37;
Ответить: Apay
Сообщение
#2
|
|
скорей всего это не php.ini а конфиг апача, проверьте, есть ли там строчки вроде этих
PHPIniDir "путь_к_php/"
LoadModule php5_module "путь_к_php/php5apache2_2.dll" AddType application/x-httpd-php .php .phtm .phtml |
|
|
digor
|
Сообщение
#3
|
|
скорей всего это не php.ini а конфиг апача, проверьте, есть ли там строчки вроде этих В httpd.conf ето есть LoadModule php5_module "c:/wamp/bin/php/php5.3.0/php5apache2_2.dll" здесь добавил AddType application/x-httpd-php .php .phtm .phtml этого строка нету PHPIniDir "путь_к_php/" я добавил ее PHPIniDir "c:/wamp/bin/php/php5.3.0" даже и /php.ini но всерамно не то... никакой изменении нет |
|
|
Apay |
26.7.2009, 19:05;
Ответить: Apay
Сообщение
#4
|
|
путь должен оканчиваться /
PHPIniDir "c:/wamp/bin/php/php5.3.0/" и там должен быть файл php.ini (у вас он может быть в другом каталоге)посмотрите еще в логах апача, там гле лежит лог говорит строчка в httpd.conf ErrorLog "путь/error.log" , что там пишется по поводу php?
|
|
|
digor
|
Сообщение
#5
|
|
В C:\wamp\logs есть apache_error
[Sun Jul 26 19:03:30 2009] [notice] Parent: Received shutdown signal -- Shutting down the server. зашел там и line 375 нет, есть только 374
[Sun Jul 26 19:03:30 2009] [notice] Child 5312: Exit event signaled. Child process is ending. [Sun Jul 26 19:03:31 2009] [notice] Child 5312: Released the start mutex [Sun Jul 26 19:03:32 2009] [notice] Child 5312: All worker threads have exited. [Sun Jul 26 19:03:32 2009] [notice] Child 5312: Child process is exiting [Sun Jul 26 19:03:32 2009] [notice] Parent: Child process exited successfully. [Sun Jul 26 19:03:35 2009] [notice] Apache/2.2.11 (Win32) PHP/5.3.0 configured -- resuming normal operations [Sun Jul 26 19:03:35 2009] [notice] Server built: Dec 10 2008 00:10:06 [Sun Jul 26 19:03:35 2009] [notice] Parent: Created child process 208 [Sun Jul 26 19:03:36 2009] [notice] Child 208: Child process is running [Sun Jul 26 19:03:36 2009] [notice] Child 208: Acquired the start mutex. [Sun Jul 26 19:03:36 2009] [notice] Child 208: Starting 64 worker threads. [Sun Jul 26 19:03:36 2009] [notice] Child 208: Starting thread to listen on port 80. [Sun Jul 26 19:05:03 2009] [error] [client 127.0.0.1] PHP Parse error: parse error in C:\\wamp\\www\\my_site\\classes\\msac\\tree\\tree.class.php on line 375 [Sun Jul 26 19:09:17 2009] [error] [client 127.0.0.1] PHP Parse error: parse error in C:\\wamp\\www\\my_site\\classes\\msac\\tree\\tree.class.php on line 375 [Sun Jul 26 19:09:26 2009] [error] [client 127.0.0.1] PHP Parse error: parse error in C:\\wamp\\www\\my_site\\classes\\msac\\tree\\tree.class.php on line 375 [Sun Jul 26 19:09:26 2009] [error] [client 127.0.0.1] File does not exist: C:/wamp/www/favicon.ico, referer: http://localhost/my_site/ |
|
|
Apay |
26.7.2009, 20:30;
Ответить: Apay
Сообщение
#6
|
|
php запущен и работает, проблема в файле tree. class.php, может там баланс скобок нарушен или еще что?
|
|
|
digor
|
Сообщение
#7
|
|
|
|
|
Apay |
26.7.2009, 22:42;
Ответить: Apay
Сообщение
#8
|
|
выложите проблемный файл
|
|
|
digor
|
Сообщение
#9
|
|
выложите проблемный файл вот файл [php] <?php /** * */ class tree { public $table; public $id_field; public $id_parent_field; protected $ord_field; protected $active_field; protected $name_field; protected $id_sequence_name; public $last_event_message; protected $max_min_ord; protected $db; protected $get_tree_result; protected $show_add_edit_form=false; public $tree_node_children_array=false; //public $showing_level=0; public $affected_node=false; public $smarty=false; public $type; public $url; public $db_engine; public $statistics; public $class_name=""; public $showing_level; public function __construct($tree_params) { $this->table=$tree_params['table_name']; $this->id_field=$tree_params['id_name']; $this->id_parent_field=$tree_params['id_parent_name']; $this->ord_field=$tree_params['ord_name']; $this->active_field=$tree_params['active_name']; $this->name_field=$tree_params['name_name']; $this->id_sequence_name=$tree_params['sequence_name']; $this->type=$tree_params['type']; $this->url=$tree_params['url']; $this->db_engine=$tree_params['db_engine']; if ($this->db_engine=='oracle') {$this->db=odb::get_instance();} else {$this->db=mydb::get_instance();} $this->class_name="tree"; $this->statistics = new Statistics(); } protected function get_tree() { if ($this->db_engine=='oracle') {return $this->o_get_tree();} elseif ($this->db_engine=='mysql') {return $this->my_get_tree();} } /** * * ========================================== */ /** * * ========================================== */ function set_tree_js_event_heandler() { $a=$this->class_name; $result= <<< END (function(){ if(!window.$a) { window['$a'] = {} } function expand(id, t) { }; window['$a']['expand'] = expand; function expand(id, t) { if (document.getElementByid('ul_'+id).style.display=="none") { document.getElementByid('ul_'+id).style.display="block"; t.innerHTML="<img src='img/open.gif'>"} else { document.getElementByid('ul_'+id).style.display="none"; t.innerHTML="<img src='img/close.gif'>";}; } })(); END; echo $result; } protected function o_get_tree() { $this->get_tree_result=$this->db->ora_query("select $this->id_field, $this->name_field, $this->id_parent_field, $this->active_field, $this->ord_field from $this->table order by $this->ord_field asc"); } protected function my_get_tree() { $this->get_tree_result=$this->db->ora_query("select $this->id_field, $this->name_field, $this->id_parent_field, $this->active_field, $this->ord_field from $this->table order by $this->ord_field asc"); } protected function requery_get_tree() { $this->get_tree(); } protected function fetch_tree() { if (!$this->get_tree_result) {$this->get_tree();} return $this->db->ora_fetch($this->get_tree_result); } protected function fetch_tree_all() { if (!$this->get_tree_result) {$this->get_tree();} return $this->db->ora_fetch_all($this->get_tree_result); } protected function get_node_data($id_node) { if ($this->db_engine=='oracle') {return $this->o_get_node_data($id_node);} elseif ($this->db_engine=='mysql') {return $this->my_get_node_data($id_node);} } /** * * ========================================== */ protected function o_get_node_data($id_node) { $this->db->add_bind_arg("node_id",$id_node, -1,'in', 'var', null, null, true); $r=$this->db->ora_query("Select $this->name_field as NAME, $this->active_field as ACTIVE, $this->type as TYPE, $this->url as URL from $this->table where $this->id_field=:node_id", true); return $this->db->ora_fetch($r); } /** * * ========================================== */ protected function my_get_node_data($id_node) { $this->db->add_bind_arg("node_id",$id_node,'int'); $sql = "Select * from $this->table where $this->id_field=:node_id"; $r=$this->db->ora_query($sql, true); return $this->db->ora_fetch($r); } /** ************************ */ public function set_tree_event_hendler($vars) { //echo "<pre>"; //print_r($vars); //echo "</pre>"; if (isset($vars["id_category"])) { $this->affected_node=$vars["id_category"]; } echo $this->affected_node."-----------"; } public function get_parents($node) { if ($node===false) return Array(); if ($node==0) return Array(); foreach ($this->tree_node_children_array["children"] as $key=>$value) { if (array_search($node, $value)!==false) { if ($key==0) { $ret=Array(); break; } else { $ret=$this->get_parents($key); break; } } } array_push($ret, $key); return $ret; } /** ************************ */ public function show_tree_admin_old() { echo "<table border=1>"; echo "<tr><td colspan=100><A HREF=\"".$_SERVER["PHP_SELF"]."?show_form=add&id_parent=0\">ADD ROOT</A></td><tr>"; echo "<tr><td>id</td><td>NAME</td><td>id_PARENT</td><td>ACTIVE</td><td>ORD</td><td></td><td></td><td></td></td>"; while ($row = $this->fetch_tree()) { echo "<tr>"; foreach ($row as $key=>$value) echo "<td>$value</td>"; ?> <td><A HREF="<? echo $_SERVER["PHP_SELF"] ?>?show_form=edit&id=<? echo $row[$this->id_field] ?>">Edit</A></td> <td><A HREF="<? $_SERVER["PHP_SELF"]?>?show_form=add&id_parent=<? echo $row[$this->id_field] ?>">Add child</A></td> <td><? if (!$this->is_first($row[$this->ord_field], $row[$this->id_parent_field])) { ?><A HREF="<? $_SERVER["PHP_SELF"]?>?change=move_up&id=<? echo $row[$this->id_field] ?>">Change UP</A><? } ?></td> <td><? if (!$this->is_last($row[$this->ord_field], $row[$this->id_parent_field])) { ?><A HREF="<? $_SERVER["PHP_SELF"]?>?change=move_down&id=<? echo $row[$this->id_field] ?>">Change DOWN</A><? } ?></td> <FORM METHOD=POST ACTION="<? echo $_SERVER["PHP_SELF"] ?>"> <INPUT TYPE="hidden" name="change" value="delete_node"> <INPUT TYPE="hidden" name="id" value="<? echo $row["id"] ?>"> <td><INPUT TYPE="submit" value="Delete"></td> </FORM> <? echo "</tr>"; } echo "</table>"; } public function get_tree_node_children_array($just_active=true, $return_ords=false, $return_active=false, $return_types=true, $return_urls=true) { $return=Array(); if ($just_active) {$sh=" where $this->active_field=1";} else {$sh="";} $ret=$this->db->ora_query("select * from $this->table $sh order by $this->ord_field"); while ($r=$this->db->ora_fetch($ret)) { $return["nodes"][$r[$this->id_field]]=$r[$this->name_field]; $return["children"][$r[$this->id_parent_field]][]=$r[$this->id_field]; //if ($return_ords) {$return["ords"][$r[$this->id_field]]=$r[$this->ord_field];} //if ($return_active) {$return["active"][$r[$this->id_field]]=$r[$this->active_field];} if ($return_ords) {$return['add'][$r[$this->id_field]]["ords"]=$r[$this->ord_field];} if ($return_active) {$return['add'][$r[$this->id_field]]["active"]=$r[$this->active_field];} if ($return_types) {$return['add'][$r[$this->id_field]]["type"]=$r[$this->type];} if ($return_urls) {$return['add'][$r[$this->id_field]]["url"]=isset($r[$this->url]) ? $r[$this->url] : "";} $return['add'][$r[$this->id_field]]["redirect"] = $r['redirect']; } /*echo "<pre>"; print_r($return); echo "</pre>";*/ $this->tree_node_children_array=$return; } public function node_have_children($arr, $id_parent) { return isset($arr["children"][$id_parent]); } public function show_tree($id_parent, $link, $paramether, $showing_level=0) { if (!$this->tree_node_children_array) { $this->get_tree_node_children_array(); } if ((isset($this->tree_node_children_array["nodes"])) && (isset($this->tree_node_children_array["children"][$id_parent]))) { $show_first_ul_close=false; $arr=$this->get_parents($this->affected_node); if (($showing_level==0) || in_array($id_parent, $arr)) { $display="block"; } else { $display="none"; } if (!$this->smarty) { require_once ('../smarty/Smarty.class.php'); $this->smarty=true; } $smarty=new Smarty; $smarty->assign("link",$link); $smarty->assign("paramether",$paramether); $smarty->assign("have_children",$this->node_have_children($this->tree_node_children_array,$id_parent)); $smarty->assign("showing_level",$showing_level); $showing_level++; $smarty->assign("showing_level_next",$showing_level); $smarty->assign("id_parent",$id_parent); $smarty->assign("display",$display); $smarty->assign("parent_children",$this->tree_node_children_array["children"][$id_parent]); $smarty->assign("arr",$arr); $smarty->assign("class",$this->class_name); $smarty->assign("receiver_class",'articles'); $smarty->assign("tthis", $this); $smarty->display('tree/show_tree.html'); } } public function show_user_tree($id_parent, $page, $paramether) { if (!$this->tree_node_children_array) {$this->get_tree_node_children_array();} //echo "<pre>"; //print_r($this->tree_node_children_array); //echo "</pre>"; if ($this->showing_level==0) {$display="block";} else { //$display="none"; $display="block"; } $this->showing_level++; $have_children=$this->node_have_children($this->tree_node_children_array,$id_parent); echo "<ul style=\"display:$display\">"; if ($have_children) { foreach ($this->tree_node_children_array["children"][$id_parent] as $key=>$value) { echo "<li><A HREF=\"$page?$paramether=$value\">".$this->tree_node_children_array["nodes"][$value]."</A></li>"; $this->show_user_tree($value, $page, $paramether); //echo "</li>"; } } echo "</ul>"; //echo "<pre>"; //print_r($this->tree_node_children_array); //echo "</pre>"; } public function show_titles_table($id_node) { $arr_titles = array(); $sql = "SELECT * FROM cat_rus WHERE id=2"; $res = mysql_query($sql); while ($row = mysql_fetch_assoc($res)) { $sql1 = "SELECT * FROM articles_rus_cat_rus WHERE cat_rus_id={$row['id']}"; $res1 = mysql_query($sql1); while ($row1 = mysql_fetch_assoc($res1)) { $sql2 = "SELECT * FROM articles_rus WHERE id={$row1['articles_rus_id']}"; $res2 = mysql_query($sql2); if (mysql_num_rows($res2) != 0) { $row2 = mysql_fetch_assoc($res2); $arr_titles[$row2['id']] = str_replace(' ',' ',$row2['title']); } } } if (!$this->smarty) { require_once ('smarty/Smarty.class.php'); $this->smarty=true; } $smarty=new Smarty; $smarty->assign("arr_titles",$arr_titles); $smarty->display('tree/show_titles_table_for_bottom.html'); } } ?> [/php] |
|
|
Apay |
26.7.2009, 23:09;
Ответить: Apay
Сообщение
#10
|
|
на первый взгляд все нормально, надо сверить настройки php у вас и на сервере[php]<?php echo phpinfo(); ?>[/php]
|
|
|
|
Похожие темы
Тема | Ответов | Автор | Просмотров | Последний ответ | |
---|---|---|---|---|---|
СОЗДАНИЕ : / САЙтЫ / ЛЕНДЫ / БОТЫ ТГ / ВАЙТЫ / КРЕО / СОФТЫ / ДИЗАЙН [PHP, JS, HTML/CSS] и другое | 5 | CULA | 3400 | 19.12.2023, 18:55 автор: CULA |
|
Услуги по созданию и доработке скриптов PHP, MySQL, JavaScript, jQuery Разработка сайтов и сервисов под-ключ |
0 | alexey | 1242 | 24.11.2023, 14:46 автор: alexey |
|
Веб-разработка (HTML5, CSS3, JavaScript, jQuery, Ajax, PHP) | 56 | qpPeW | 44908 | 19.7.2023, 10:03 автор: qpPeW |
|
Есть спецы по php/laravel? | 3 | Mixatraider | 1889 | 26.5.2023, 20:48 автор: Mixatraider |
|
Опытный PHP\Python разработчик в поиске интересных задач | 6 | daikzlex | 3402 | 25.5.2023, 13:55 автор: daikzlex |
Текстовая версия | Сейчас: 20.4.2024, 0:41 |