Topic: PHP 7 Compatability

Hi,

Anyone used xajax 0.6 with PHP 7 yet (GA release very soon), and is it compatible. Haven't had chance to try yet.

Worried that one day, xajax will be incompatible with either PHP or a browser and the original developers aren't around to fix.

Xajax is a superb library which makes ajax development easy in PHP. Haven't found another ajax/php product this easy to use. Judging by the forum activity, the project seems well and truly dead. I guess there's plenty of us developers out there though happily using it, happy with the features and not needing support.

Jon

Re: PHP 7 Compatability

Jon,

Agreed. Someone needs to try PHP7 with xajax. I use WAMP and have not been able to get 7 to work yet.

Anyone??

Ed

Edit: I am still using XP and probably won't be able to do anything until  update...

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.

Re: PHP 7 Compatability

edrobinson wrote:

Jon,
Agreed. Someone needs to try PHP7 with xajax. I use WAMP and have not been able to get 7 to work yet.

[17-Dec-2015 08:46:19 Europe/Rome] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; xajaxCustomRequest has a deprecated constructor in /www/xajax/xajax_core/xajaxRequest.inc.php on line 291
[17-Dec-2015 08:46:19 Europe/Rome] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; xajaxCustomResponse has a deprecated constructor in /www/xajax/xajax_core/xajaxResponse.inc.php on line 1969
[17-Dec-2015 08:46:19 Europe/Rome] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; xajaxEventPlugin has a deprecated constructor in /www/xajax/xajax_core/plugin_layer/xajaxEventPlugin.inc.php on line 43
[17-Dec-2015 08:46:19 Europe/Rome] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; xajaxUserFunction has a deprecated constructor in /www/xajax/xajax_core/plugin_layer/support/xajaxUserFunction.inc.php on line 31

All the rest works as usual.

Have a nice day
L.

Re: PHP 7 Compatability

lucianob,

Thanks for the input. Those items should be fairly easy fixes.

If you ever stop learning you may as well dig a hole, crawl in and pull the top over yourself.

Re: PHP 7 Compatability

I've upgraded to PHP 7.02 on my development server (windows 2008/IIS) and can confirm that xajax (0.6) works ok. I didn't get the errors lucianob had, probably due to me not using custom events.

My apps which still use 0.5 have the following error:-

Parse error: syntax error, unexpected 'new' (T_NEW) in D:\WEBSITES\JONSHAW\php_applications\translation\plugins\xajax\xajax_core\xajax.inc.php on line 360

which relates to this code:-

                if (false == is_a($xuf, 'xajaxUserFunction'))
                    $xuf =& new xajaxUserFunction($xuf);

I removed the & which seemed to work, but I'll probably upgrade to 0.6 as it's stable enough. So, quite relieved that it works.

Cheers,

Jon

Re: PHP 7 Compatability

Apologies, posted in the development section earlier.

I am using Xajax 0.6 with PHP7 on both Xampp and normal install of PHP7.0.3 - got the various errors already noted but by removing the & (already noted by jonS), that problem went away.   Had to change the
way I loaded it to the 0.6 pattern:
        $xajax = new xajax("server.php");
        $xajax->configure('javascript URI', "support/xajax/");
        $xajax->register(XAJAX_FUNCTION, "xajax_form");
        $xajax->register(XAJAX_FUNCTION, "xajax_service");
So far, so good, although my use is mainly limited to the Response object.

Probably like many others, using this in conjunction with JQuery, it is both powerful and flexible.

Hope it continues....