linux大神环境下,网页上报PHP警告错误信息,急求大神解决!!!!

php在Linux环境下报了MYSQL错误_百度知道
php在Linux环境下报了MYSQL错误
htdocs&#47.php'db_}if
(isset($_SESSION['Login'do_html_footer();
/user_auth_fns!$result) {
throw new Exception('
do_html_header(&#39.&#39: mysqli.;Cnum_rows&gt.php on line 4W
and passwd ='
exit?phpfunction db_connect() { $result = new mysqli(&#39.php部分代码如下;
&#47.Warning?&Problem.103&#39?&';authmain:if ($username && $passwd){&#47, &#39?php&#47.;;xxxxx'usr&#47:mysqli() [a&gt在Windows环境下一切正常;/
if (;/
if ($result-&gt:;]:;$password&#39.php&quot, connect to db
$conn = db_connect();&#47.php on line 42You co);; check username and password with db&#47.php进去后create short variable names$username = $_POST['
/): Couldn'])) {
display_user_urls($url_array);麻烦各位大侠援助小弟;valid_user&#39.mysqli-mysqli].253;/ include function files for this applicationrequire_once(&#39,错误如下;login.ivo.;&#47:&&
catch (Exception $e){
/ else return false
/ do_html_footer().cn'query(&quot: Host 'IvoRtt/;);passwd'); give menu of optionsinclude('You co do_html_url('ivortt&#39.'' check if username is unique
$result = $conn-&
echo '/apache&#47.php页面上报错的;);)!$conn);
}}.;wrong_logout!$result) {
throw new Exception('192.php'] = $ivortt_ is not allowed to connect to this MySQL server in //$passwd = $_POST['IvoRtt/usr&#47。第二个错误在 user_auth_do_html_header('htdocs/&#47, $passwd); get the bookmarks this user has savedif ($url_array = get_user_urls($_SESSION['/xxxxxx');local&#47.php 页面;&#47:&#39.第一个错误在 db_ session_start(); unsuccessful login
&#47, $password){&#47.'local/: (00000&#47.mysqli-query];&#47.php&#39.php function login($);resume_Cusername'/
throw new Exception('select * from user
where username='t fetch mysqli in //);1130).php&quot,症状是从登陆页面login. You must be logged , ':&Could not connect to database server'Back to main page&valid_user'/&#47,代码片段为;/ if (.);/&lt,琢磨了一天没有个结果, 'a herf =& }else{
return $apache&#47:query() [);/ if they are in the database register the user id
$_SESSION[' they have just tried logging in try{
login($ } echo '$username&#39, ' }}服务器是Liux环境权限都是 777 全开的.;} else {
include(&quot, return true&#47,上传到Linux服务器上就出问题了.;valid_user'做数据单笔连接数据库测试可以读写到;])) { &#47.
You must be logged in to view this page.;];0) {;
1楼可以详细说明下吗?赋予这个用户什么权限?我还不能贴图能在线给我解释下吗?我自己添加了个用户不过问题依然存在
提问者采纳
;这台mysql服务器中 没有一个用户的 “host”项满足mysql服务器里面添加一个用户 username@%
然后把你的数据库权限赋给改用户.@&quot,用户的标识都是 &ksftp。建议你在&#39.在mysql中.103是你的数据库服务器吧.103&#39Host &#39.103' is not allowed to connect to this MySQL server192.168.168.168,所以mysq连接失败.253;192;'而在你&#.cn这个主机.host&quot
提问者评价
谢谢好久才上百度.....
其他类似问题
为您推荐:
mysql的相关知识
其他3条回答
下面说的有道理,O(∩_∩)O~
服务器没连接上,,,,换到本地用localhost试一下,,
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁查看: 1282|回复: 6
php的错误日志级别 error_report
; E_ALL& && && && & 所有错误和警告(除E_STRICT外)
; E_ERROR& && && &&&致命的错误。脚本的执行被暂停。
; E_RECOVERABLE_ERROR& & 大多数的致命错误。
; E_WARNING& && && &非致命的运行时错误,只是警告,脚本的执行不会停止。
; E_PARSE& && && && &编译时解析错误,解析错误应该只由分析器生成。
; E_NOTICE& && && & 脚本运行时产生的提醒(往往是我们写的脚本里面的一些bug,比如某个变量没有定义),这个错误不会导致任务中断。
; E_STRICT& && && & 脚本运行时产生的提醒信息,会包含一些php抛出的让我们要如何修改的建议信息。
; E_CORE_ERROR& && &在php启动后发生的致命性错误
; E_CORE_WARNING& & 在php启动后发生的非致命性错误,也就是警告信息
; E_COMPILE_ERROR& & php编译时产生的致命性错误
; E_COMPILE_WARNING&&php编译时产生的警告信息
; E_USER_ERROR& && & 用户生成的错误
; E_USER_WARNING& & 用户生成的警告
; E_USER_NOTICE& && &用户生成的提醒
& 表示并且
| 表示或者
比如: error_reporting&&=&&E_ALL & ~E_NOTICE&&表示错误级别为E_ALL 并且除了E_NOTICE
学习参考。
学习,在收藏
阿铭推荐 /1
现在国内做Linux运维培训的很多,当然他们不会像我这么朴实,叫“Linux运维培训”一般会起一个高大上的名字,比如“Linux运维架构师”培训,看着就牛逼,其实结果你懂的,这也就是为什么网络上对很多培训机构嗤之以鼻的原因,因为宣传大于实质,动不动就是架构师。
Powered bylinux 下安装nagios 在启动apache服务时报警,求大神解决!详细信息如下_百度知道
linux 下安装nagios 在启动apache服务时报警,求大神解决!详细信息如下
我安装Nagios服务时,需要启动apache,前面安装apache和php时都没有报错,后来按照如下修改过配置文件找到apache 的配置文件/usr/local/apache2/conf/httpd.conf 找到:User daemonGroup daemon 修改为 User nagiosGroup nagios 然后找到 &IfModule dir_module&DirectoryIndex index.html&/IfModule& 修改为 &IfModule dir_module&DirectoryIndex index.html index.php&/IfModule& 接着增加如下内容: AddType application/x-httpd-php .php 为了安全起见,一般情况下要让nagios 的web 监控页面必须经过授权才能访问,这需要增加验证配置,即在httpd.conf 文件最后添加如下信息: #setting for nagiosScriptAlias /nagios/cgi-bin &/usr/local/nagios/sbin&&Directory &/usr/local/nagios/sbin&&AuthType BasicOptions ExecCGIAllowOverride NoneOrder allow,denyAllow from allAuthName &Nagios Access&AuthUserFile /usr/local/nagios/etc/htpasswd
//用于此目录访问身份验证的文件Require valid-user&/Directory&Alias /nagios &/usr/local/nagios/share&&Directory &/usr/local/nagios/share&&AuthType BasicOptions NoneAllowOverride NoneOrder allow,denyAllow from allAuthName &nagios Access&AuthUserFile /usr/local/nagios/etc/htpasswdRequire valid-user&/Directory& 结果在启动时检查,出现如下报警信息:[root@localhost conf]# /usr/local/apache2/bin/apachectl -tSyntax error on line 428 of /usr/local/apache2/conf/httpd.conf:Invalid auth file type: //\xe7\x94\xa8\xe4\xba\x8e\xe6\xad\xa4\xe7\x9b\xae\xe5\xbd\x95\xe8\xae\xbf\xe9\x97\xae\xe8\xba\xab\xe4\xbb\xbd\xe9\xaa\x8c\xe8\xaf\x81\xe7\x9a\x84\xe6\x96\x87\xe4\xbb\xb6求大神帮忙分析和解决!
应该是文件类型的问题 其实在安装n憨花封拘莩饺凤邪脯矛agios的时候有个选项的 就是make install-webconf 这个的话自动生成apache针对nagios的配置文件 然后自己稍微修改一下就好了
可以给我一个配置好了的文件吗?我自己比对着看一下,你的方法我试过了,还是报警,报警内容没有改变!
其他类似问题
为您推荐:
nagios的相关知识
等待您来回答
下载知道APP
随时随地咨询
出门在外也不愁获取PHP警告错误信息的解决方法_小组_ThinkSAAS
获取PHP警告错误信息的解决方法
获取PHP警告错误信息的解决方法
代码如下所示: 代码如下:&?php/*** 更新非法字符、?送??信息*
* @author* @copyright */error_reporting(E_ERROR | E_WARNING | E_PARSE);set_error_handler('displayErrorHandler');//自定???//??信息echo "time:".date("Y-m-d H:i:s")."n";//???渲?BR&//公共函??BR&function displayErrorHandler($error, $error_string, $filename, $line, $symbols){
$error_no_arr = array(1=&'ERROR', 2=&'WARNING', 4=&'PARSE', 8=&'NOTICE', 16=&'CORE_ERROR', 32=&'CORE_WARNING', 64=&'COMPILE_ERROR', 128=&'COMPILE_WARNING', 256=&'USER_ERROR', 512=&'USER_WARNING', 1024=&'USER_NOTICE', 2047=&'ALL', 2048=&'STRICT');
$msg = sprintf("%s: %s at file %s(%s)", $error_no_arr[$error] ,$error_string, $filename, $line);
if(in_array($error,array(1,2,4))){
echo $ echo "n";//???示
if($error==1||$error==2) {
sendBankMsg($error_string); //?送??
if(strpos($error_string, 'xml_parse(): Bytes:')!==FALSE){
writeFiltefile($error_string);
}}function hex2bin($hexdata) {
$bindata = '';
for($i=0; $i & strlen($hexdata); $i += 2) {
$bindata .= chr(hexdec(substr($hexdata, $i, 2)));
return $}function writeFiltefile($error_string){
if(strpos($error_string, 'xml_parse(): Bytes:')===FALSE||strpos($error_string, ' 0x')===FALSE){
//??入文件
$filename = 'filtetext.php';
include($filename);
$error_string = str_replace('xml_parse(): Bytes:', '', $error_string);
$error_string = str_replace(' 0x','', $error_string);
$error_text = hex2bin($error_string);
$filtetextArr[] = $error_
$tempArr = array_unique($filtetextArr);//去除重??BR&
$result = implode("','",$tempArr);
$result = "&?phpn$filtetextArr = array('".$result."');n?&";
fileWrite($filename, $result, 'w');
}function sendBankMsg($msg){
$timestamp = time();
$params = "msg=".$msg
."&posttime=".$
$length = strlen($params);
//创建socket连接
$domain = ""; //socket域名
$actionPath = "/action/bank/bankmsg.php"; //文件路??BR&
$fp = fsockopen($domain,80);
//构造post请求的头
$header = "POST ".$actionPath." HTTP/1.1rn";
$header .= "Host:".$domain."rn";
$header .= "Content-Type: application/x-www-form-urlencodedrn";
$header .= "Content-Length: ".$length."rn";
$header .= "Connection: Closernrn";
//添加post的字符串
$header .= $params."rn";
//发送post的数据
fputs($fp,$header);
while (!feof($fp)) {
$line = fgets($fp,1024); //去除请求包的头只显示页面的返回数据
if ($inheader && ($line == "n" || $line == "rn")) {
fclose($fp);
}}function fileWrite($fFileName, $fContent, $fTag = 'w') {
ignore_user_abort (TRUE);
$fp = fopen($fFileName, $fTag);
if (flock($fp, LOCK_EX)) {
fwrite($fp, $fContent);
flock($fp, LOCK_UN);
fclose($fp);
ignore_user_abort (FALSE);}?&
PHP开发框架
缓存Memcache
服务器环境
ThinkSAAS商业授权:
ThinkSAAS为用户提供有偿个性定制开发服务
ThinkSAAS将为商业授权用户提供二次开发指导和技术支持
手机客户端
ThinkSAAS接收任何功能的Iphone(IOS)和Android手机的客户端定制开发服务
让ThinkSAAS更好,把建议拿来。

我要回帖

更多关于 大神f1 的文章

 

随机推荐