#248 mysqli_num_rows() doesn't like bool

오픈
ajdunevent3 년 전을 오픈 · 2개의 코멘트
AJ 코멘트됨, 3 년 전

GNU Social 2.0.0beta0
Arch Linux w/ Apache 2.4.48 and PHP 8.0.8

I keep hitting a wall trying to complete the installer. I can put in the info about the site, data base, and admin user but I get the following output on the next page:

Page notice

       * Initializing...
       * Starting installation...
       * Checking database...

        Warning: is_readable(): open_basedir restriction in effect. File(/MDB2/Driver/Datatype/mysqli.php) is not within the allowed path(s): (/srv/http/:/srv/gnu-social/:/usr/share/webapps/:/etc/webapps/:/usr/share/pear/:/proc/meminfo:/usr/bin/composer:/dev/urandom) in /srv/gnu-social/extlib/MDB2.php on line 934
       * Creating database tables...
       * Adding SMS carrier data to database...
       * Adding notice source data to database...
       * Adding foreign service data to database...
       * Writing config file...

        Fatal error: Uncaught TypeError: mysqli_num_rows(): Argument #1 ($result) must be of type mysqli_result, bool given in /srv/gnu-social/extlib/MDB2/Driver/mysqli.php:1647 Stack trace: #0 /srv/gnu-social/extlib/MDB2/Driver/mysqli.php(1647): mysqli_num_rows() #1 /srv/gnu-social/extlib/DB/DataObject.php(1662): MDB2_BufferedResult_mysqli->numRows() #2 /srv/gnu-social/classes/Memcached_DataObject.php(907): DB_DataObject->_query() #3 /srv/gnu-social/extlib/DB/DataObject.php(4552): Memcached_DataObject->_connect() #4 /srv/gnu-social/lib/database/schema.php(54): DB_DataObject->getDatabaseConnection() #5 /srv/gnu-social/lib/database/schema.php(83): Schema->__construct() #6 /srv/gnu-social/lib/util/util.php(2398): Schema::get() #7 /srv/gnu-social/lib/util/gnusocial.php(486): common_database_charset() #8 /srv/gnu-social/lib/util/gnusocial.php(199): GNUsocial::loadConfigFile() #9 /srv/gnu-social/lib/util/common.php(30): GNUsocial::init() #10 /srv/gnu-social/lib/util/installer.php(596): require_once('...') #11 /srv/gnu-social/lib/util/installer.php(676): Installer->registerInitialUser() #12 /srv/gnu-social/public/install.php(283): Installer->doInstall() #13 /srv/gnu-social/public/install.php(103): WebInstaller->handlePost() #14 /srv/gnu-social/public/install.php(385): WebInstaller->main() #15 {main} thrown in /srv/gnu-social/extlib/MDB2/Driver/mysqli.php on line 1647

The installation fails because going to the root page only gives the following output:


Internal Server Error
mysqli_num_rows(): Argument #1 ($result) must be of type mysqli_result, bool given

Is this an issue, maybe, with PHP 8?

GNU Social 2.0.0beta0 Arch Linux w/ Apache 2.4.48 and PHP 8.0.8 I keep hitting a wall trying to complete the installer. I can put in the info about the site, data base, and admin user but I get the following output on the next page: ``` Page notice * Initializing... * Starting installation... * Checking database... Warning: is_readable(): open_basedir restriction in effect. File(/MDB2/Driver/Datatype/mysqli.php) is not within the allowed path(s): (/srv/http/:/srv/gnu-social/:/usr/share/webapps/:/etc/webapps/:/usr/share/pear/:/proc/meminfo:/usr/bin/composer:/dev/urandom) in /srv/gnu-social/extlib/MDB2.php on line 934 * Creating database tables... * Adding SMS carrier data to database... * Adding notice source data to database... * Adding foreign service data to database... * Writing config file... Fatal error: Uncaught TypeError: mysqli_num_rows(): Argument #1 ($result) must be of type mysqli_result, bool given in /srv/gnu-social/extlib/MDB2/Driver/mysqli.php:1647 Stack trace: #0 /srv/gnu-social/extlib/MDB2/Driver/mysqli.php(1647): mysqli_num_rows() #1 /srv/gnu-social/extlib/DB/DataObject.php(1662): MDB2_BufferedResult_mysqli->numRows() #2 /srv/gnu-social/classes/Memcached_DataObject.php(907): DB_DataObject->_query() #3 /srv/gnu-social/extlib/DB/DataObject.php(4552): Memcached_DataObject->_connect() #4 /srv/gnu-social/lib/database/schema.php(54): DB_DataObject->getDatabaseConnection() #5 /srv/gnu-social/lib/database/schema.php(83): Schema->__construct() #6 /srv/gnu-social/lib/util/util.php(2398): Schema::get() #7 /srv/gnu-social/lib/util/gnusocial.php(486): common_database_charset() #8 /srv/gnu-social/lib/util/gnusocial.php(199): GNUsocial::loadConfigFile() #9 /srv/gnu-social/lib/util/common.php(30): GNUsocial::init() #10 /srv/gnu-social/lib/util/installer.php(596): require_once('...') #11 /srv/gnu-social/lib/util/installer.php(676): Installer->registerInitialUser() #12 /srv/gnu-social/public/install.php(283): Installer->doInstall() #13 /srv/gnu-social/public/install.php(103): WebInstaller->handlePost() #14 /srv/gnu-social/public/install.php(385): WebInstaller->main() #15 {main} thrown in /srv/gnu-social/extlib/MDB2/Driver/mysqli.php on line 1647 ``` The installation fails because going to the root page only gives the following output: ``` Internal Server Error mysqli_num_rows(): Argument #1 ($result) must be of type mysqli_result, bool given ``` Is this an issue, maybe, with PHP 8?
AJ 코멘트됨, 3 년 전
포스터
May be solved by https://notabug.org/diogo/gnu-social/pulls/252
senooken 코멘트됨, 2 년 전

Hi. In PHP v7.4, this problem was not occurred. It seems PHP v7.4-v8.0 problem.

I think we should better to use GNU social v2.0.0 in PHP v7.4.

Hi. In PHP v7.4, this problem was not occurred. It seems PHP v7.4-v8.0 problem. I think we should better to use GNU social v2.0.0 in PHP v7.4.
로그인하여 이 대화에 참여
마일스톤 없음
담당자 없음
참여자 2명
로딩중...
취소
저장
아직 콘텐츠가 없습니다.