설치환경

XAMPP

php7.4.


기존 배포본 지원 버전 php4.


오류

1. 


Warning: Use of undefined constant mon - assumed 'mon' (this will throw an Error in a future version of PHP) in D:\web\eond\dev\bzpe\modules\env.inc.php on line 5

Warning: Use of undefined constant mday - assumed 'mday' (this will throw an Error in a future version of PHP) in D:\web\eond\dev\bzpe\modules\env.inc.php on line 5

Warning: Use of undefined constant year - assumed 'year' (this will throw an Error in a future version of PHP) in D:\web\eond\dev\bzpe\modules\env.inc.php on line 5

Fatal error: Uncaught Error: Call to undefined function split() in D:\web\eond\dev\bzpe\modules\env.inc.php:8 Stack trace: #0 D:\web\eond\dev\bzpe\setup.php(2): include() #1 {main} thrown in D:\web\eond\dev\bzpe\modules\env.inc.php on line 8 


해결방법

bzpe/modules/env.inc.php

$TODAYSTART = mktime(0,0,0,$tmptime['mon'],$tmptime['mday'],$tmptime['year']);

참조 : https://www.phpschool.com/gnuboard4/bbs/board.php?bo_table=qna_function&wr_id=325465 

$_POST[name]

$_POST['name']

http://php.net/manual/en/language.types.string.php
http://php.net/manual/en/language.types.array.php 


2. 


Fatal error: Uncaught Error: Call to undefined function split() in D:\web\eond\dev\bzpe\modules\env.inc.php:7 Stack trace: #0 D:\web\eond\dev\bzpe\setup.php(2): include() #1 {main} thrown in D:\web\eond\dev\bzpe\modules\env.inc.php on line 7 

참조 : https://github.com/Needlworks/Textcube/issues/1845 


bzpe/modules/env.inc.php

explode 로 변경


3.



Notice: Undefined variable: hostname in D:\web\eond\dev\bzpe\setup.php on line 81

Notice: Undefined variable: username in D:\web\eond\dev\bzpe\setup.php on line 82

Notice: Undefined variable: userpassword in D:\web\eond\dev\bzpe\setup.php on line 83

Notice: Undefined variable: databasename in D:\web\eond\dev\bzpe\setup.php on line 84

Notice: Undefined variable: act in D:\web\eond\dev\bzpe\setup.php on line 88

Notice: Undefined variable: conn in D:\web\eond\dev\bzpe\setup.php on line 346 


bzpe/modules/env.inc.php

$hostname='localhost';
$username = 'eond';
$userpassword = 'password';
$databasename = 'eond';

직접 코드 추가

4. 

Notice: Undefined variable: act in D:\web\eond\dev\bzpe\setup.php on line 88

Notice: Undefined variable: conn in D:\web\eond\dev\bzpe\setup.php on line 346 

$act = 's2setup';

직접 추가.


5. 

Warning: mysqli_select_db() expects exactly 2 parameters, 1 given in D:\web\eond\dev\bzpe\setup.php on line 120 


참조 : https://stackoverflow.com/questions/26595886/warning-mysqli-select-db-expects-exactly-2-parameters-1-given-in-c/26595918 

직접추가1. bzpe/modules/env.inc.php

$con = mysqli_connect($hostname, $username, $userpassword);

직접추가2. setup.php

if(mysqli_select_db($con, $databasename)) {

6. 

Fatal error: Uncaught Error: Call to undefined function mysqli_list_tables() in D:\web\eond\dev\bzpe\setup.php:158 Stack trace: #0 {main} thrown in D:\web\eond\dev\bzpe\setup.php on line 158 

참조 : https://stackoverflow.com/questions/13382571/what-is-the-alternate-function-mysql-list-tables-in-php-5 

if (!function_exists("mysqli_list_tables")){
   function mysqli_list_tables($databasename, $dbconnect=null){
      $sql = "SHOW TABLES FROM $databasename";
      $result = mysqli_query($sql);
      return $result;
   }
}

7.

Warning: mysqli_query() expects at least 2 parameters, 1 given in D:\web\eond\dev\bzpe\modules\env.inc.php on line 21

Warning: mysqli_num_rows() expects parameter 1 to be mysqli_result, null given in D:\web\eond\dev\bzpe\setup.php on line 159

Notice: Undefined variable: table_exists in D:\web\eond\dev\bzpe\setup.php on line 166

Notice: Trying to access array offset on value of type null in D:\web\eond\dev\bzpe\setup.php on line 166

Warning: mysqli_query() expects at least 2 parameters, 1 given in D:\web\eond\dev\bzpe\setup.php on line 167

Notice: Undefined variable: table_exists in D:\web\eond\dev\bzpe\setup.php on line 175

Notice: Trying to access array offset on value of type null in D:\web\eond\dev\bzpe\setup.php on line 175

Warning: mysqli_query() expects at least 2 parameters, 1 given in D:\web\eond\dev\bzpe\setup.php on line 176

Notice: Undefined variable: table_exists in D:\web\eond\dev\bzpe\setup.php on line 187

Notice: Trying to access array offset on value of type null in D:\web\eond\dev\bzpe\setup.php on line 187

Warning: mysqli_query() expects at least 2 parameters, 1 given in D:\web\eond\dev\bzpe\setup.php on line 188

Notice: Undefined variable: table_exists in D:\web\eond\dev\bzpe\setup.php on line 197

Notice: Trying to access array offset on value of type null in D:\web\eond\dev\bzpe\setup.php on line 197

Warning: mysqli_query() expects at least 2 parameters, 1 given in D:\web\eond\dev\bzpe\setup.php on line 198

Notice: Undefined variable: table_exists in D:\web\eond\dev\bzpe\setup.php on line 208

Notice: Trying to access array offset on value of type null in D:\web\eond\dev\bzpe\setup.php on line 208

Warning: mysqli_query() expects at least 2 parameters, 1 given in D:\web\eond\dev\bzpe\setup.php on line 209

Notice: Undefined variable: table_exists in D:\web\eond\dev\bzpe\setup.php on line 218

Notice: Trying to access array offset on value of type null in D:\web\eond\dev\bzpe\setup.php on line 218

Warning: mysqli_query() expects at least 2 parameters, 1 given in D:\web\eond\dev\bzpe\setup.php on line 219

Notice: Undefined variable: table_exists in D:\web\eond\dev\bzpe\setup.php on line 237

Notice: Trying to access array offset on value of type null in D:\web\eond\dev\bzpe\setup.php on line 237

Warning: mysqli_query() expects at least 2 parameters, 1 given in D:\web\eond\dev\bzpe\setup.php on line 238 

if (!function_exists("mysqli_list_tables")){
   function mysqli_list_tables($databasename, $dbconnect=null){
      $hostname='localhost';
      $username = 'eond';
      $userpassword = 'password';
      $databasename = 'eond';
      $con = mysqli_connect($hostname, $username, $userpassword);       
      $sql = "SHOW TABLES FROM $databasename";
      $result = mysqli_query($con, $sql);
      return $result;
   }
}

6번 코드를 수정함.

참조 : 

https://cnpnote.tistory.com/entry/%EC%A0%95%EC%9D%98%EB%90%98%EC%A7%80-%EC%95%8A%EC%9D%80-%ED%95%A8%EC%88%98-mysqlconnect 


8. 

Fatal error: Uncaught Error: Call to undefined function mysqli_tablename() in D:\web\eond\dev\bzpe\setup.php:161 Stack trace: #0 {main} thrown in D:\web\eond\dev\bzpe\setup.php on line 161 


https://github.com/codingeverybody/codingyahac/issues/142


포기...2020.04.16 03.53 am



 
댓글은 로그인 사용자만 작성 가능합니다. 로그인하기