We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Running php 7.4.8 | Forum

dave Leader
dave Jul 30 '20

Here are the first issues i have found when running oxwall on php 7.4.8, there may be more to come. 


One of these is easy to fix just removing the call to the function... But the others ill have to check the manuals and update this topic later.  I will also check github to see if someone has already addressed these.


[ow_core_log] [Notice] Message: Function get_magic_quotes_gpc() is deprecated File: /home/username/public_html/sitefolder/ow_core/request.php Line:48


[ow_core_log] [Notice] Message: Unparenthesized `a ? b : c ? d : e` is deprecated. Use either `(a ? b : c) ? d : e` or `a ? b : (c ? d : e)` File: /home/username/public_html/sitefolder/ow_plugins/newsfeed/classes/event_handler.php Line:1444


[w_core_log] [Notice] Message: Array and string offset access syntax with curly braces is deprecated File: /home/username/public_html/sitefolder/ow_libraries/jevix/jevix.class.php Line:1025



Also just a heads up to other developers.  I suppose this means that to get our plugins ready for php 7.4 we will have to replace all


$whatever = array();

$whatever = [];


If that is true then its a HUGE undertaking to get oxwall itself ready...




dave Leader
dave Jul 31 '20

The first one we just need to remove the lines of code that reference get_magic_quotes_gpc().... at the top of the file easy peasy like so:


       /* DEPRECATED
        if ( get_magic_quotes_gpc() )
        {
            $_GET = $this->stripSlashesRecursive($_GET);
            $_POST = $this->stripSlashesRecursive($_POST);
        }
        */



==========================

the second one  deals with setting a priority for execution when using long php ternary commands...  so in this case (if i am correct) we just have to sort this out. The objective is to use parenthesese to let the server know what we want to execute first and so on..


So in this case:


Original code:

 $status = empty($actionData['data']['status'])
            ? $actionData['string']
            : empty($actionData['data']['status']) ? null : $actionData['data']['status'];


New code (untested)


$status = (empty($actionData['data']['status'])
            ? $actionData['string']
            : empty($actionData['data']['status'])) ? null : $actionData['data']['status'];


So we want to execute this part first - here is a breakdown


(empty($actionData['data']['status']) ? $actionData['string'] : empty($actionData['data']['status']))


notice i added the parenthesese in the first and last position


then we can execute the rest of the long ternary


? null : $actionData['data']['status'];



=======================


And the last one has to do with using {} to pull individual characters from a string in the jevix class.  You can no longer use {}, you have to change them to []


for example: 


original code

return ($h & 0x0F) << 18 | (ord($c{1}) & 0x3F) << 12 | (ord($c{2}) & 0x3F) << 6 | (ord($c{3}) & 0x3F);


we would just replace {number} with [number] like so


new code

return ($h & 0x0F) << 18 | (ord($c[1]) & 0x3F) << 12 | (ord($c[2]) & 0x3F) << 6 | (ord($c[3]) & 0x3F);


patricia, SD, artmedia,  does this look about right, i think i got it...

The Forum post is edited by dave Jul 31 '20
dave Leader
dave Jul 31 '20

Here is another concern, jevix is no longer being developed (youll have to translate the site to read it)


https://code.google.com/archive/p/jevix/


so there is no update for it.  So it would have to be edited and if we are lucky it will work. Or we may have to find a new html filter script to use.



The Forum post is edited by dave Jul 31 '20
Paul
Paul Jul 31 '20
I´ve tried to recode this for php 7.4 month ago and the last part was the reason, I´ve given up. 
Nice too see some your work on this
The Forum post is edited by Paul Jul 31 '20
dave Leader
dave Jul 31 '20

The first two corrections are tested and seem to work fine. The last one i am still working on.


here is the jevix changed code... it did not blow up on me so thats good... :) 


its the last function in the file


function uniord( $c )
{
    $h = ord($c[0]);
   
    if ( $h <= 0x7F )
    {
        return $h;
    }
    else if ( $h < 0xC2 )
    {
        return false;
    }
    else if ( $h <= 0xDF )
    {
        return ($h & 0x1F) << 6 | (ord($c[1]) & 0x3F);
    }
    else if ( $h <= 0xEF )
    {
        return ($h & 0x0F) << 12 | (ord($c[1]) & 0x3F) << 6 | (ord($c[2]) & 0x3F);
    }
    else if ( $h <= 0xF4 )
    {
        return ($h & 0x0F) << 18 | (ord($c[1]) & 0x3F) << 12 | (ord($c[2]) & 0x3F) << 6 | (ord($c[3]) & 0x3F);
    }
    else
    {
        return false;
    }
}




The Forum post is edited by dave Jul 31 '20
OW-Ghost
OW-Ghost Aug 11 '20
Can you please make rules that new plugins add to the store need follow php 7.4 standard.


If i for example add a android app i need follow googles new standard if not they will reject my app. And they standard changes every year.


I not sure what rules you have about php and plugins that they submit to store year 2020 where we have now php 7.4 available ?


If there is no rules theer should bee, it is like developers working with old languages and that is not good at all.


Like a refuse speak new words because i learned old words already and not need learn new words. It is a school thing. Tell you student learn new words and you need bee hard teach you student new words if not they will give you old language and old words back


For me you are the teacher and they need follow the teacher or have the projects rejected to they pass school teachers test

The Forum post is edited by OW-Ghost Aug 11 '20
dave Leader
dave Aug 11 '20
That is a great idea Ghost but we really cant make it manditory until oxwall gets updated itself.  Then we can have php rules.
OW-Ghost
OW-Ghost Aug 11 '20
we can not put new tires because the car is old.....okey i got it....what happen if you do that the car will bee broken? hmmmmmmmm.........if there was a logical reason behind your answer i would buy it...but there is no logical reason at all for prevent half software prepared for the future....even the github version is support 7.3 at least my oxwall/skalfa version do that include skalfa plugins


anyways...you the boss ...keep the old 5.6 forever to it sinks to bottom...im out from the discussion you would not agree with me even payed you 10000000000000 usd ....so fine do what you want....i will ask developers who created the plugin if they support php version 7.4 if not i will not buy 


i take action on my own and recommend others do that to...support future ...i will never again buy a plugin that support only php 5.6 ....hope other will follow me so things will bee better

The Forum post is edited by OW-Ghost Aug 11 '20
dave Leader
dave Aug 11 '20

wow you are so aggressive for no reason.  All i said is that when oxwall is updated we can then require more current versions for the plugins as well.   I did not shoot down your idea, we just have to wait. 



Ash
Ash Jun 29 '21

Quote from dave

The first two corrections are tested and seem to work fine. The last one i am still working on.


here is the jevix changed code... it did not blow up on me so thats good... :) 


its the last function in the file


function uniord( $c )
{
    $h = ord($c[0]);
   
    if ( $h <= 0x7F )
    {
        return $h;
    }
    else if ( $h < 0xC2 )
    {
        return false;
    }
    else if ( $h <= 0xDF )
    {
        return ($h & 0x1F) << 6 | (ord($c[1]) & 0x3F);
    }
    else if ( $h <= 0xEF )
    {
        return ($h & 0x0F) << 12 | (ord($c[1]) & 0x3F) << 6 | (ord($c[2]) & 0x3F);
    }
    else if ( $h <= 0xF4 )
    {
        return ($h & 0x0F) << 18 | (ord($c[1]) & 0x3F) << 12 | (ord($c[2]) & 0x3F) << 6 | (ord($c[3]) & 0x3F);
    }
    else
    {
        return false;
    }
}




Hi Sir, Does this works? i am testing it on 7.4 and this third one should i apply? the first two i sorted as per your starting inputs
AppXprt
AppXprt Jun 30 '21
Anyone running PHP 8?
dave Leader
dave Jun 30 '21
I am no longer running oxwall so i do not know, but at the time i posted it i guess it did.
kennedystewart
kennedystewart Jan 9 '22
I'm having a problem with the above code

 Drift Boss

htywer
htywer Apr 29 '22
Thanks for your post! stick merge

 

candymika
candymika May 27 '22
A good article, an attractive story requires the author to have a good sense and a keen eye to have a deep insight into it. I am very impressed with your article. retro games
otis
otis Jul 24 '22
PHP 7.4.8 is a bug fix release which fixes security issues and bugs in PHP. PHP 7.4.8 is the first maintenance release in the PHP 7 series of releases and includes several bug fixes and security fixes. This release also fnaf includes some deprecations and will be the last one to support PHP 5.6. PHP 7.4.8 is the last supported version of PHP 5.6, with deprecation warnings raised for unsupported versions as they become available (see NEWS below).


Craig Wilder
Craig Wilder Aug 15 '22
Unfortunately, I am no longer using Oxwall, so I do not know happy wheels whether this still holds true, but at the time of posting, I assume it did.
henny hall
henny hall Oct 31 '22
wordle 2 is an educational game where players take turns drawing tiles from a bag to see who can create the best word. The catch with this game is that you only get one letter at a time
Rendell parito
Rendell parito Dec 4 '22
I have an error with php 7.4.8 and when I search a lot and found about this gb whatsapp my issue got solved.
Pages: 1 2 »