Notice (8): file_put_contents(): Write of 268 bytes failed with errno=28 No space left on device [CORE/src/Log/Engine/FileLog.php, line 140]

Notice: file_put_contents() [function.file-put-contents]: Write of 1108 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Notice (8): unserialize() [<a href='https://secure.php.net/function.unserialize'>function.unserialize</a>]: Error at offset 4079 of 4085 bytes [APP/Controller/NewsController.php, line 5571]

Notice: file_put_contents() [function.file-put-contents]: Write of 2758 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Warning (2): Undefined array key "nsort" [APP/Controller/NewsController.php, line 3613]

Notice: file_put_contents() [function.file-put-contents]: Write of 2074 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Warning (2): Trying to access array offset on value of type null [APP/Controller/NewsController.php, line 3613]

Notice: file_put_contents() [function.file-put-contents]: Write of 2098 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Warning (2): Undefined array key "nsort" [APP/Controller/NewsController.php, line 3613]

Notice: file_put_contents() [function.file-put-contents]: Write of 2074 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Warning (2): Trying to access array offset on value of type null [APP/Controller/NewsController.php, line 3613]

Notice: file_put_contents() [function.file-put-contents]: Write of 2098 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Notice (8): SplFileObject::fwrite() [<a href='https://secure.php.net/splfileobject.fwrite'>splfileobject.fwrite</a>]: Write of 113 bytes failed with errno=28 No space left on device [CORE/src/Cache/Engine/FileEngine.php, line 141]

Notice: file_put_contents() [function.file-put-contents]: Write of 2791 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Warning (512): long cache was unable to write 'bdcc0d65dbac2f6779fac2ef1dc7d468' to Cake\Cache\Engine\FileEngine cache [CORE/src/Cache/Cache.php, line 275]

Notice: file_put_contents() [function.file-put-contents]: Write of 2586 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Notice (8): SplFileObject::fwrite() [<a href='https://secure.php.net/splfileobject.fwrite'>splfileobject.fwrite</a>]: Write of 117 bytes failed with errno=28 No space left on device [CORE/src/Cache/Engine/FileEngine.php, line 141]

Notice: file_put_contents() [function.file-put-contents]: Write of 2791 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Warning (512): long cache was unable to write '0e085c740bcb4e56a71fe1b56523c5c5' to Cake\Cache\Engine\FileEngine cache [CORE/src/Cache/Cache.php, line 275]

Notice: file_put_contents() [function.file-put-contents]: Write of 2586 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Notice (8): unserialize() [<a href='https://secure.php.net/function.unserialize'>function.unserialize</a>]: Error at offset 4067 of 4085 bytes [APP/Controller/NewsController.php, line 5571]

Notice: file_put_contents() [function.file-put-contents]: Write of 2488 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
php开发基本安全知识小结 - 站长搜索
首页 > 资讯列表 > 编程/数据库 >>

php开发基本安全知识小结

Warning (2): Undefined array key "nsort" [ROOT/plugins/Kuhuang/templates/Websites/view.php, line 430]
Notice: file_put_contents() [function.file-put-contents]: Write of 2422 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Warning (2): Trying to access array offset on value of type null [ROOT/plugins/Kuhuang/templates/Websites/view.php, line 430]

Notice: file_put_contents() [function.file-put-contents]: Write of 2446 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
">
Warning (2): Undefined array key "nsort" [ROOT/plugins/Kuhuang/templates/Websites/view.php, line 430]

Notice: file_put_contents() [function.file-put-contents]: Write of 2422 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
Warning (2): Trying to access array offset on value of type null [ROOT/plugins/Kuhuang/templates/Websites/view.php, line 430]

Notice: file_put_contents() [function.file-put-contents]: Write of 2446 bytes failed with errno=28 No space left on device in /www/wwwroot/www.adminso.com/vendor/cakephp/cakephp/src/Log/Engine/FileLog.php on line 140
2014-12-16 17:06:06 转载来源: 网络整理/侵权必删

本文为大家整理了一些php开发中的基本安全知识小结,感兴趣的同学参考下。 1.不要依赖注册全局变量功能(register_globals) 注册全局变量的出现曾经让PHP变得非常易用,但也降低了安全性(方便之处经常会破坏安全性)

本文为大家整理了一些php开发中的基本安全知识小结,感兴趣的同学参考下。


1.不要依赖注册全局变量功能(register_globals)

注册全局变量的出现曾经让PHP变得非常易用,但也降低了安全性(方便之处经常会破坏安全性)。建议在编程时把register_globals指令关闭,在PHP6中这个功能也会被取消。

2.在使用变量之前对其进行初始化。

如果register_globals功能是启动的,即使程序员不使用它,恶意用户也可能利用为初始化变量的漏洞来侵入我们的系统。比如:

if(conditon){

$auth=TRUE;

}

如果变量$auth没有在这段之前被初始化为FALSE,那么用户就可以向脚本传递$_GET[‘auth']、$_POST[‘auth']或$_COOKIE[‘auth']轻易的实现验证。

3.检验和净化全部输入数据。

4.在利用变量引用包含文件时要小心。


如果脚本中有这样的代码:

require($page);

那么就应该确保$page不会来自外部资源(比如$_GET),或者,如果它的确来自于外部资源,那么就要确保它包含适当的值。

5.在使用任何服务器上执行命令的函数都要多加小心。

这些函数包括eval()、exec()、system()、passthru()、popen()和反撇号(``)。这些函数都能够在服务器上执行命令,永远都不要随意使用。如果在命令里不得不包含便来那个,就应该对这个变量进行彻底的安全检查。还应该使用escapeshellarg() escapeshellcom()进行额外的预处理。

6.更改默认的会话目录,或者使用数据库保存会话数据。

7.不要使用浏览器提供的文件名在服务器上保存上传的文件。

8.如果被提交的数据需要在web页面中重新显示,一定要注意其中的HTML,更重要的是JAVASCRIPT

可以利用函数

string htmlspecialchars ( string string [, int quote_style [, string charset]])

对提交的数据进行处理

9。不要在站点上暴露你的PHP错误信息

PHP错误信息能够在你开发的过程中把错误信息输出方便你的检查,但是如果暴露在Web上面,很可以成为攻击者的入口。

10.防止SQL注入攻击。

应该使用特定语言的数据库转义函数,比如mysqli_real_escape_data(),确保提交的内容不会破坏查询操作。

11.永远不要在服务器上保存phpinfo()脚本。


标签: php 开发 基本 安全 知识 小结


声明:本文内容来源自网络,文字、图片等素材版权属于原作者,平台转载素材出于传递更多信息,文章内容仅供参考与学习,切勿作为商业目的使用。如果侵害了您的合法权益,请您及时与我们联系,我们会在第一时间进行处理!我们尊重版权,也致力于保护版权,站搜网感谢您的分享!

站长搜索

http://www.adminso.com

Copyright @ 2007~2025 All Rights Reserved.

Powered By 站长搜索

打开手机扫描上面的二维码打开手机版


使用手机软件扫描微信二维码

关注我们可获取更多热点资讯

站长搜索目录系统技术支持