Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

想讨论下php8.2以上,蚁剑、哥斯拉、冰蝎使用mysqli连不了数据库的原因 #6

Open
fjh1997 opened this issue Nov 10, 2024 · 2 comments

Comments

@fjh1997
Copy link

fjh1997 commented Nov 10, 2024

目前,如果是php8.2以上的环境,蚁剑、哥斯拉、冰蝎使用自带的基于mysqli的管理工具均连不了数据库,渴望该项目成为以上shell管理工具的平替。

@Marven11
Copy link
Owner

有在考虑要怎么做了

@Marven11
Copy link
Owner

Marven11 commented Nov 11, 2024

简单看了看蚁剑,看来是用了一个被PHP8.0弃用的函数get_magic_quotes_gpc导致代码没法正确执行,这个函数和mysqli没有太大关系

image

然后冰蝎我这边测试出来是可以用的

image

用来测试的docker环境:

name: testenv
services:
    mysql:
        container_name: some-mysql
        network_mode: host
        environment:
            - MYSQL_ROOT_PASSWORD=password
        image: mysql:latest
    php:
        container_name: php
        network_mode: host
        volumes:
            - ./test_environment:/var/www/html
        # image: php:7.4-apache
        build:
          context: test_environment/
          network: host
FROM php:8.2-apache
RUN apt-get update && apt-get install -y \
		libfreetype-dev \
		libjpeg62-turbo-dev \
		libpng-dev \
	&& docker-php-ext-configure mysqli \
	&& docker-php-ext-install -j$(nproc) mysqli

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants