网络学习过程中遇到的问题及解决方案
-
在安装php的过程中,出现【Unable to locate package libapache2-mod-php7.0 E: Couldn’t find any packag】的错误。
出现原因:安装的版本不对
解决方法:在网络上查找了很久,基本都是更新/升级apt,但使用了这一切方法后,还是无法安装成功,然后使用了dpkg -l | grep php
命令,发现系统上本身有的php是8.2的,遂将所有安装的所有包都改为了8.2后,成功安装。 -
使用
wget http://download.oracle.com/otn-pub/java/jdk/8u181-b13/96a7b8442fe848ef90c96a2fad6ed6d1/jdk-8u181-linux-x64.tar.gz
获取安装包,但是用tar -zxvf命令解压时报错。
【gzip: stdin: not in gzip format
tar: Child returned status 1
tar: Error is not recoverable: exiting now】
出现原因:使用file jdk-8u181-linux-x64.tar.gz
查看,发现获取到的为html文件。
解决原因:重新去Oracle上获取新的压缩包。 -
Burp Suite拦截不到localhost和127.0.0.1的请求
解决方法:在搜索框中输入 about:config --> 然后在搜索框内搜索 network.proxy.allow_hijacking_localhost,将值改为true。
-
php报错:Call to undefined function get_magic_quotes_gpc()
出现原因:PHP版本6中 取消了get_magic_quotes_gpc()函数,首先这个函数的作用:是为了防止sql注入,当该函数打开时将所有单引号,双引号,反斜线和空字符转会自动转为含有反斜线的溢出字符。PHP6取消magic_quotes机制,那么就是默认转义一些特殊字符来防止sql注入。
解决方法:把源代码改为:(PHP_VERSION >= 6 || !get_magic_quotes_gpc())
或者(PHP_VERSION < 6 && get_magic_quotes_gpc())
来提升兼容性。 -
安装bluelotus时,界面出现出现“xss数据存储路径不可写”提示。
解决方法:通过chmod 777 -R bluelotus/
(-R不可落下)赋上写的权限。 -
安装upload-labs靶场时,报错【Warning: Undefined array key “pass” 】
解决办法:
方法一:(搜索的答案,但改了未生效,不知原因)
修改php.ini:error_reporting = E_ALL & ~E_NOTICE display_errors = Off
方法二:
在每个php文件头加上error_reporting(0)
,关闭错误报告。
7. Access denied for user ‘root‘@‘localhost‘
解决方法:执行授权命令
mysql> grant all privileges on *.* to root@'localhost' identified by '密码';
mysql> flush privileges;
mysql> quit;
来源:https://blog.youkuaiyun.com/lhl1124281072/article/details/80277163
8.Uncaught Error: Call to undefined function curl_init() in /var/www/html/pikachu/vul/ssrf/ssrf_curl.php:31
出现原因:缺少php_curl插件
解决方法:使用php -m | grep curl
命令查看是否存在curl。若不存在,则安装curl【sudo apt-get install php-curl
】,然后重启apache【service apache2 restart
】