PHP 7 compability check

110 views
Skip to first unread message

Tom Cloud

unread,
Jan 21, 2019, 10:28:06 AM1/21/19
to AJAX-chat
I checked Ajax-Chat with php7mar to check for PHP 7 compatibility.  The test was run with PHP 5.6, hence the error at the top of the report which is in markdown format:

2019-01-21T09:02:12-06:00
Scanning C:\....\chat
Including file extensions: php
ERROR!  Syntax checking was selected and a PHP binary lower than 7.0.0-dev was specified.
Processed 10588 lines contained in 71 files.
Processing took 38.638283014297 seconds.


#### lib\class\AJAXChat.php
* oldClassConstructors
 * Line 25: `    function AJAXChat() {`

#### lib\class\AJAXChatDataBase.php
* oldClassConstructors
 * Line 12: `    function AJAXChatDataBase(&$dbConnectionConfig) {`

#### lib\class\AJAXChatHTTPHeader.php
* oldClassConstructors
 * Line 14: `    function AJAXChatHTTPHeader($encoding='UTF-8', $contentType=null, $noCache=true) {`

#### lib\class\AJAXChatLanguage.php
* oldClassConstructors
 * Line 15: `    function AJAXChatLanguage($availableLangCodes, $defaultLangCode, $langCode=null, $strictMode=false) {`

#### lib\class\AJAXChatMySQLDataBase.php
* oldClassConstructors
 * Line 15: `    function AJAXChatDataBaseMySQL(&$dbConnectionConfig) {`
* deprecatedFunctions
 * Line 22: `        $this->_connectionID = @mysql_connect(`
 * Line 38: `        if(!@mysql_select_db($dbName, $this->_connectionID)) {`
 * Line 39: `            $this->_errno = mysql_errno($this->_connectionID);`
 * Line 40: `            $this->_error = mysql_error($this->_connectionID);`
 * Line 70: `        return "'".mysql_real_escape_string($value, $this->_connectionID)."'";`
 * Line 83: `        return mysql_insert_id($this->_connectionID);`

#### lib\class\AJAXChatMySQLQuery.php
* oldClassConstructors
 * Line 17: `    function AJAXChatMySQLQuery($sql, $connectionID = null) {`
* deprecatedFunctions
 * Line 21: `            $this->_result = mysql_query($this->_sql, $this->_connectionID);`
 * Line 23: `                $this->_errno = mysql_errno($this->_connectionID);`
 * Line 24: `                $this->_error = mysql_error($this->_connectionID);`
 * Line 27: `            $this->_result = mysql_query($this->_sql);`
 * Line 29: `                $this->_errno = mysql_errno();`
 * Line 30: `                $this->_error = mysql_error();`
 * Line 55: `            return mysql_fetch_assoc($this->_result);`
 * Line 63: `            return mysql_num_rows($this->_result);`
 * Line 71: `            return mysql_affected_rows($this->_connectionID);`
 * Line 76: `        @mysql_free_result($this->_result);`

#### lib\class\AJAXChatMySQLiDataBase.php
* oldClassConstructors
 * Line 15: `    function AJAXChatDataBaseMySQLi(&$dbConnectionConfig) {`

#### lib\class\AJAXChatMySQLiQuery.php
* oldClassConstructors
 * Line 17: `    function AJAXChatMySQLiQuery($sql, $connectionID) {`

#### lib\class\AJAXChatTemplate.php
* oldClassConstructors
 * Line 18: `    function AJAXChatTemplate(&$ajaxChat, $templateFile, $contentType=null) {`


Mark Holliday

unread,
Feb 17, 2019, 3:43:45 PM2/17/19
to AJAX-chat
Upgraded my PHP version from 5.6 to 7.2 and AJAXChat works without issues.

Tom Cloud

unread,
Feb 17, 2019, 9:01:29 PM2/17/19
to ajax...@googlegroups.com

I have confirmed that old-style myql queries work under PHP 7.2 even though the claim was made support would be dropped in PHP 7.  I can't find anything confirming that support was left in PHP 7, so wonder when it will be dropped?

--
You received this message because you are subscribed to a topic in the Google Groups "AJAX-chat" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ajax-chat/VVRI4ZyIO7U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ajax-chat+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Mark Holliday

unread,
Feb 18, 2019, 9:38:16 AM2/18/19
to AJAX-chat
Regarding the errors you originally showed I found this ...


but nothing about old style MySQL queries.
Reply all
Reply to author
Forward
0 new messages