문제

장시간의 비트 - 클라이언트의 빠른 간단한 CMS를 수행 한 다음 호스트가 PHP 4.4.7 를 실행하는 것을 깨달았습니다.

그래서 PHP ADODB를 사용하여 코드를 업로드했을 때 DB에 간단한 연결을 수행하지는 않습니다. Direct MySQL 메서드를 사용하여 간단한 연결을 시도하고 작동합니다.

그래서 나는 그것이 호환성 문제라고 생각하고 있습니까?나는 그것이 PHP 4.0.5에 이르기까지 지원한다고 말하는 ADODB 매뉴얼을 보았다. 그러나 왜 그렇게 일어나지 않는 이유를 생각할 수 없다.

INPT는 구문 오류입니다 : 구문 오류, 예기치 않은 T_Static, T_OLD_FUNCTION 또는 T_FUNCTION 또는 T_VAR 또는 '}'을 기대하는 /blah/blah/adodb/adodb.inc.php 행 435

그냥 긴 샷이지만 누군가가 어떻게 재사용 할 수있는 빠른 방법을 알고 있는지 궁금해합니다. 그렇지 않으면 adodb를 제거해야합니다.

도움이 되었습니까?

해결책

Yikes. Where did you manage to find a host still running PHP4?

Anyway, it sounds to me like the class is written using PHP5 syntax, despite you saying it supports PHP4.

I quickly looked up the web page for it (http://adodb.sourceforge.net/), and I found this in the documentation:

Requirements: PHP 5.0 or later. There is a version available that works with PHP 4.1 to 5.2 also.

...so it sounds to me like you've got the PHP5 version. You may need to dig up the PHP4 version instead.

However, I'd suggest trying to find a way to get the client's PHP version upgraded instead -- PHP4 is not supported any longer, and hasn't been supported for quite a long time now. It really does need to be upgraded.

It's also very likely that the old PHP4-compatible version of the library is no longer being maintained either, so if there's any bugs in it, or incompatibilities with other code you've written, then you'll be stuck.

And of course, that's just one library -- if you're using any other third party libraries, you'll probably come across the same problems or worse.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top