| Autor | Zpráva | ||
|---|---|---|---|
| michal17 Profil * |
#1 · Zasláno: 25. 11. 2006, 11:32:12
Potřeboval bych poradit s tímto PHP nastavení.
Píše mi tuto chybu: Error Occured. Error (2): fopen(myforms/fproc_run.log): failed to open stream: Permission denied file:/home/ftponly/usr/gntservi/web/formproc/fm_filehandler.inc line: 79 <?PHP /* ---------------------------------------------------------------------- --- PHP Form Processor */ require_once "strings.inc"; require_once "fm_config.inc"; class FM_ErrorHandler { var $config_data; var $file_handler; var $classfactory; function FM_ErrorHandler(&$class_factory) { $this->config_data = &$class_factory->getConfig(); $this->file_handler = $class_factory->CreateFileHandler(); $this->classfactory = &$class_factory; } function ShowError($error_code) { $this->DisplayError($error_code); } function ShowErrorEx($error_code,$error_extra_info) { $this->DisplayError($error_code."\n".$error_extra_info); } function DisplayError($str_error) { $templ = $this->config_data->get_error_display_template_page(); if(strlen($templ)>0) { $datamap["error"] = nl2br($str_error); $composer = new MailComposer($this->classfactory); if(true == $composer->ComposeMessage($templ,$datamap)) { echo $composer->message_body; return; } else { $str_error .= "\n could not open error template page"; } } echo "<HTML><BODY><H3>Error Occured.</H3> "; echo nl2br($str_error); echo "</BODY></HTML>"; } function HandleConfigError($error_code,$extrainfo) { $logfile = $this->config_data->getErrorLogFile(); $fh = $this->classfactory->CreateFileHandler(); $opened=false; if(!$fh->is_file_existing($logfile)) { $opened = $fh->create_file($logfile); } else { $opened = $fh->Open($logfile,"r+"); } $disperror = E_CONF_ERROR_INTERNAL; if($opened) { $globals = &$this->classfactory->getGlobalData(); $logstr = $globals->server_vars['PHP_SELF']."|"; $logstr .= $globals->server_vars['REMOTE_ADDR']."|"; $logstr .= date("Y-m-d h:i:s A|")."\n"; $logstr .= $error_code."\n".$extrainfo."\n\n"; $fh->append_line($logstr); $fh->close_file(); $disperror .= E_CONF_ERROR_LOGGED; } else { $disperror .= E_CONF_ERROR_NOT_LOGGED; } $this->DisplayError($disperror); }//HandleConfigError } class fm_SysErrorHandler { var $logfilename; var $error_handler; function fm_SysErrorHandler($logfilefolder) { $this->logfilename = $logfilefolder._FM_ERROR_LOG_FILE_NAME; } function set_errorhandler(&$error_handler) { $this->error_handler = &$error_handler; } function Init() { set_error_handler(array(&$this, 'error_handler')); } /*PHP 4.0.2 reqd for 4 params*/ function error_handler($errno, $errstr, $errfile, $errline) { if($errno == E_USER_NOTICE || $errno == E_NOTICE || $errno ==E_STRICT ) { return; } $error_str = "Error ($errno): $errstr\n file:$errfile\nline: $errline \n\n"; //error_log($error_str, 3, $this->logfilename); //$disp_error = E_CONF_ERROR_INTERNAL.E_CONF_ERROR_LOGGED; $disp_error = $error_str; //if(is_object($this->error_handler)) //{ // $this->error_handler->ShowError($disp_error); //} //else { echo "<HTML><BODY><H3>Error Occured.</H3> "; echo $disp_error; echo "</BODY></HTML>"; } exit; } } /* Copyright (C) 2005 Simfatic Solutions . All rights reserved. */ ?> |
||
| Peca Profil |
#2 · Zasláno: 25. 11. 2006, 11:58:23
Permission denied - problém asi nebude v PHP, ale v nastavených právech u souboru.
|
||
|
Časová prodleva: 19 let
|
|||
Toto téma je uzamčeno. Odpověď nelze zaslat.
0