Class 'ZipArchive' not found 에러 발생! 도와주세요~~~
관련링크
본문
https://apachezone.com/qa/1290 에도 올린 질문입니다.
아파치님의 AAI 1.56을 이용하여 서버를 설치했고요.
경험 있으신 분의 조언을 부탁 드려요.
엑셀 업로드 후 업로드된 파일을 읽으려는데...
" Error loading file "20220127093532160305.xlsx": ZipArchive library is not enabled "
이런 에러가 발생하네요...
좀 더 조사해보니,
PHPExcel에서 에러가 나고 있군요.
// Check if zip class existsif (!class_exists('ZipArchive',FALSE)) {throw new PHPExcel_Reader_Exception("ZipArchive library is not enabled");}
엑셀로 업로드 한 파일을 저 클래스가 읽어야 하는데, 클래스를 못찾고 있는 버그인듯 합니다.
에러로그...
/var/log/httpd/error_log <-- 여긴 별 내용 없고...
/var/log/httpd/******-error_log <-- 여기를 보면...
[Thu Jan 27 09:55:28.934478 2022] [:error] [pid 216599:tid 140243617404672] [client 121.139.158.55:53253] [client 121.139.158.55] ModSecurity: Warning. Pattern match "([\\\\~\\\\!\\\\@\\\\#\\\\$\\\\%\\\\^\\\\&\\\\*\\\\(\\\\)\\\\-\\\\+\\\\=\\\\{\\\\}\\\\[\\\\]\\\\|\\\\:\\\\;\\"\\\\'\\\\\\xc2\\xb4\\\\\\xe2\\x80\\x99\\\\\\xe2\\x80\\x98\\\\`\\\\<\\\\>].*?){4,}" at ARGS_NAMES:order[0][dir]. [file "/etc/httpd/modsecurity.d/activated_rules/modsecurity_crs_41_sql_injection_attacks.conf"] [line "159"] [id "981173"] [rev "2"] [msg "Restricted SQL Character Anomaly Detection Alert - Total # of special characters exceeded"] [data "Matched Data: ] found within ARGS_NAMES:order[0][dir]: order[0][dir]"] [ver "OWASP_CRS/2.2.9"] [maturity "9"] [accuracy "8"] [tag "OWASP_CRS/WEB_ATTACK/SQL_INJECTION"] [hostname "my-domain"] [uri "/InputList.php"] [unique_id "YfHtgEpbYZ6tfERzHdXWMwAAAM4"], referer: http://my-domain/Input.php
[Thu Jan 27 09:55:28.980463 2022] [:error] [pid 216599:tid 140243617404672] [client 121.139.158.55:53253] [client 121.139.158.55] ModSecurity: Warning. Operator GE matched 5 at TX:inbound_anomaly_score. [file "/etc/httpd/modsecurity.d/activated_rules/modsecurity_crs_60_correlation.conf"] [line "37"] [id "981204"] [msg "Inbound Anomaly Score Exceeded (Total Inbound Score: 240, SQLi=80, XSS=0): Restricted SQL Character Anomaly Detection Alert - Total # of special characters exceeded"] [hostname "my-domain"] [uri "/InputList.php"] [unique_id "YfHtgEpbYZ6tfERzHdXWMwAAAM4"], referer: http://my-domain/Input.php
Mod SEcurity에서 에러를 발생시키는 것 같은데...
에고 해결책을... ㅠㅠ
흠냐... 상용 서비스 중인데...
zip 라이브러리가 설치는 된 것 같은데,
phpinfo를 보면 정확하게 zip 라이브러리가 보이진 않네요. bZip만 보임...