php5 apache2.2 安装时出现 libphp5.so: cannot restore segment prot after reloc: Permission denied 的原因及解决办法
php5 apache2.2 安装时出现 libphp5.so: cannot restore segment prot after reloc: Permission denied 的原因及解决办法
工具AB(apache benchmark).在APACHE的bin目录下。 格式: ./ab [options] [http://]hostname[:port]/path 参数: -n requests Number of requests to perform //在测试会话中所执行的请求个数。默认时,仅执行一个请求 -c concurrency Number of multiple requests to make //一次产生的请求个数。默认是一次一个。 -t timelimit Seconds to max. wait for responses //测试所进行的最大秒数。其内部隐含值是-n 50000。它可以使对服务器的测试限制在一个固定的总时间以内。默认时,没有时间限制。 -p postfile File containing data to POST //包含了需要POST的数据的文件. -T content-type Content-type header for POSTing //POST数据所使用的Content-type头信息。 -v verbosity How much troubleshooting info [Read More →]
经常遇到系统 load average因某些原因突然飙涨到上百,以致系统假死。故根据飞信的php接口写了一个监控程序。当系统平均负载超过某个flag时,自动发短信到我手机上通知我。 要求:1、开启php的系统调用函数,注意,这有一定的安全隐患。 2、拥有飞信的账号,确切点说就是使用中国移动! 3、能操作shell 注:本系统使用的是centos 附件里有整个程序及Fetion类下载,有兴趣的请便 <?php /** * @author blvming * @link http://www.sphinxsearch.org * @todo 本程序用于检测linux/unix系统负载,并对超过限定值时发送短信通知管理员 * @copyright copyleft * @example crontab : * /2 * * * * /usr/bin/php /webserver/chkload.php ; 每2分钟检测一次 * @warning 注意防火墙要打开 https(443)端口,另外还需要注意php的安全模式,能让php调用系统函数 * @version 1.0 * * */ set_time_limit(360); //多则无益 error_reporting(0); define(‘ALERT’,10);//普通警告 define(‘CRASH’,30); [Read More →]
原文:http://blog.creke.net/669.html 使用.htaccess可以在某种程度上更改PHP的错误显示的设置,实际上,相当于更改PHP.ini的参数,很是方便。 将以下相应代码放到对应目录中的.htaccess文件,即可实现相应功能。 关闭错误显示: php_flag display_startup_errors off php_flag display_errors off php_flag html_errors off php_value docref_root 0 php_value docref_ext 0 只显示PHP错误: php_flag display_errors on php_flag display_startup_errors on php_value error_reporting 2047 其中,“2047”为要显示的错误的级别,详细表格如下: 1 E_ERROR 2 E_WARNING 4 E_PARSE 8 E_NOTICE 16 E_CORE_ERROR 32 E_CORE_WARNING 64 E_COMPILE_ERROR 128 E_COMPILE_WARNING 256 E_USER_ERROR 512 E_USER_WARNING 1024 E_USER_NOTICE 2047 E_ALL 2048 [Read More →]