Cannot re-assign auto-global variable _GET 에러

2023. 1. 17. 10:41·Development/PHP

Cannot re-assign auto-global variable _GET 

PHP 버전업에 따른 문제로, 5.3까지는 사용 가능하며 5.4부터 발생하는 에러이다.

php.ini에서 rester_globals 를 On 으로 하면 변수가 get, post, session 변수인지 체크하지 않아도 되는데, 5.4부터 register_globals가 없어졌다고 한다. 

파라미터이름을 $_GET 대신 다른걸로 변경하다가, 변경된 사항이 많아서 그냥 다운그레이드 하기로 결정했다(..)

[변수] => ['변수'], 정규 표현식 등등.. 기존 라이브러리 함수도 그렇고 변환해야될게 너무 많아서 다운 그레이드하고, 버전업은 다른 서버에서 테스트하려고 한다.

php 5.3 설치

wget https://www.php.net/distributions/php-5.3.27.tar.gz

압축해제

tar xvfpz php-5.3.27.tar.gz

경로 이동

cd php-5.3.27

./configure

./configure --prefix=/usr/local/php --with-config-file-path=/etc  --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-curl --disable-debug --enable-safe-mode  --enable-sockets --enable-sysvsem=yes --enable-sysvshm=yes --enable-ftp --enable-magic-quotes --with-ttf --enable-gd-native-ttf --enable-inline-optimization --enable-bcmath --with-zlib --with-gd --with-gettext --with-jpeg-dir=/usr --with-png-dir=/usr/lib --with-freetype-dir=/usr --with-libxml-dir=/usr --enable-exif --enable-sigchild --enable-mbstring --with-openssl
make && make install

 

'Development > PHP' 카테고리의 다른 글

openssl 연동의 늪(해결 완료)  (0) 2023.01.19
PHP Notice: Use of undefined constant  (0) 2023.01.18
mysql_connect(): No such file or directory  (0) 2023.01.16
익명 함수(Anonymous functions)  (0) 2023.01.13
[PHP] 로그파일에 소스코드가 출력되는 경우  (2) 2023.01.12
'Development/PHP' 카테고리의 다른 글
  • openssl 연동의 늪(해결 완료)
  • PHP Notice: Use of undefined constant
  • mysql_connect(): No such file or directory
  • 익명 함수(Anonymous functions)
곽진돔
곽진돔
Developer
  • 곽진돔
    echo "곽박한 세상";
    곽진돔
  • 전체
    오늘
    어제
    • 분류 전체보기 (200)
      • Development (73)
        • Linux (13)
        • k8s (3)
        • Docker (5)
        • AWS (1)
        • PHP (35)
        • Python (21)
        • Java (1)
        • SpringBoot (4)
        • JavaScript (1)
        • React (10)
        • MySql (19)
        • MongoDB (1)
      • Daily (5)
      • Study (7)
        • TIL (2)
        • license (3)
  • 블로그 메뉴

    • 홈
    • 태그
    • 방명록
    • 글쓰기
    • 설정
  • 링크

    • github
  • 공지사항

  • 인기 글

  • 태그

    Java
    IP
    정규표현식
    date
    php
    nodejs
    docker
    ssh
    CentOS
    SQL
    Shell
    chromedriver
    인코딩
    스프링부트
    react
    윈도우
    JavaScript
    Linux
    HTML
    springboot
    error
    Selenium
    리눅스
    db
    Python
    크롤링
    리액트
    MySQL
    CentOS7
    UTF8
  • 최근 댓글

  • 최근 글

  • hELLO· Designed By정상우.v4.10.3
곽진돔
Cannot re-assign auto-global variable _GET 에러
상단으로

티스토리툴바