[PHP] PHP mail() error (“sh: -t: command not found”)

2023-05-18 KENNETH 0

PHP mail() error (“sh: -t: command not found”)   PHP code   exec result     처음 보는 에러라서 흠칫… 대체 -t 는 근거가 뭘까 싶었는데.. php.ini 의 설정과 관련이 있음     정상(??)서버     문제의 서버 앞의 sendmail 이 없으니 발생하는 에러로 보여짐     해결 php.ini 수정 default   변경        

[PHP] Severity: Notice Only variable references should be returned by reference on CodeIgniter-2.1

2020-10-16 KENNETH 0

Severity: Notice Only variable references should be returned by reference (아주) 구 버전의 CodeIgniter 에서 발생할 수 있는 오류     1. 환경 PHP-5.6 CodeIgniter-2.1.3   php-5.2 버전에서는 에러 출력X CodeIgniter-2.2 버전부터는 수정된 문제     2. 수정 파일명 : $CodeIgniter_PATH/system/core/Common.php line : 257     원래내용     변경  

PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP

2019-11-05 KENNETH 0

환경 PHP-7.3 * 아마도 PHP-7.0 이상이면 발생하는것으로 추정 된다.   오류(??)메세지 PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP   원본코드   원인 class 이름과 function 이름이 동일할 경우 발생하는 메세지 현재 상태에서 당장 “심각” 수준은 아니지만 오류가 발생하기 때문에 조치가 필요하긴 함… 참조 URL : http://docs.php.net/manual/kr/language.oop5.decon.php 처음 메세지를 봤을 때는… “에이 뭐 이런…!!!” 이었으나 글을 보고 나니 “아.. 따르는게 좋겠네…” 라는 느낌.. 뭐 난 개발자스런 지식이 없기 때문에 ㅋㅋㅋㅋ   수정코드      

charset=utf8 VS ‘SET NAMES “utf8″‘ in PHP pdo_mysql

2019-03-26 KENNETH 0

pdo_mysql 기반의 DB커넥션을 찾다보니소개하는 글마다 약간의 차이가 있는 항목이 있음… 바로 charset을 설정하는 부분… 어떤 소개자료에서는$pdo->exec(“set names utf8”)이렇게 설명을 하기도 하고 어떤 소개자료에서는“charset=utf8”이런 형태로… 두 사례의 결과는 동일하지만 “왜 이렇게 해야 하는가?” 하는 의문이 들었음그래서 찾아보니 PHP-5.3.6 이전 버전에서는 charset 옵션이 적용되지 않는 문제가 있었기 때문에$pdo->exec(“set names utf8”)요런식으로 사용해왔음 하지만 이후 버전에서는 해결되어접속 선언 파라미터에$pdo = new PDO(“mysql:host=$host;dbname=$db;charset=utf8”, $user, $pass);즉, “charset=utf8” 옵션을 추가해 주면 된다. 는것… 구버전(php-5.3.6이전)을 사용한다면 전자의 경우를.. 이후 버전을 사용한다면(하긴… 요즘 7.X 까지 나와있으니) 후자의 경우를 사용하면 되겠다.

Unsupported major.minor version 52.0 error on java & tomcat

2018-08-01 KENNETH 0

Unsupported major.minor version 52.0 error on java & tomcat   에러메세지 Stacktrace:] with root cause java.lang.UnsupportedClassVersionError: com/mysql/cj/jdbc/Driver : Unsupported major.minor version 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:800) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)   원인 참조 URL : https://jirak.net/wp/major-version-number-of-the-java-class-file-format/ 클래스 파일이 컴파일된 버전(환경)과 실행되는 버전이 맞지 않을 때 발생 하는 에러 보통 구버전의 JAVA환경에서 새로나온 클래스를 적용할 경우 발생하겠지… 아마도…   해결 Java SE 10 = 54 (0x36 hex) Java SE 9 = 53 (0x35 hex) Java SE 8 = 52 (0x34 hex) Java SE 7 = 51 (0x33 hex) Java SE 6.0 = 50 (0x32 hex) Java SE 5.0 = 49 (0x31 hex) JDK 1.4 = 48 (0x30 hex) JDK 1.3 = 47 (0x2F hex) JDK 1.2 = 46 (0x2E hex) JDK 1.1 = 45 (0x2D hex) 요 내용에 맞게 버전을 맞춰주면 해결..