[SOLVED] ERROR Scriptcase PHP 8.1

Can you afford that? We can’t. I simply NEED to go to 8.x after 7.4 is end-of-life. Many companies will simply not accept eol PHP. The university I work for certainly will not accept.

But this behavior is not uncommon to SC, as I always have had issues for months after a new big release came out. I hope they will be able to fix the issues in that period of time. Personally, I have no issues with SC as I’m not using it anymore. But my university has a lot of code and needs to decide what will come next…

I have been using SC since version 5, and it has always been the same. Pfff, when will they learn?

Paying for updates that don’t work for two years :stuck_out_tongue:

1 Like

Hi @aducom ,
I agree with the problems with SC.
But why the need to go to a version, in this case PHP 8.x, just because eol is near. Should’nt the criteria be… the system(SC or something else) is stable before one jumps on it.
My clients were on PHP 5.6 until dec last year. Only this year I switched to PHP 7.4.
Don’t get me wrong… eventually I do want to get to 8.x, but not until I am absolutely sure everything is fine with the SC version.
I will be just asking for a boatload of pain if I convert to SC 9.8 rightaway. I do not want it to be my loss if their PHP 8.x version is not stable. I will just stick with SC 9.7 for now.
It will be SC’s loss if I or many folks don’t switch to SC 9.8 as new customers will be skeptical if the existing user base is not happy with it.
But I do want SC to succeed with this release(PHP 8.x) eventually. It is a fine PHP tool. The sooner they stabilize it and take care of the problems the better for everyone.

2 Likes

the problem with php versions i found is that your dev should be also on the same version as production, otherwise you get all kinds of surprises. SC does not support that , you cannot set a php version in the dev, and basically we need a new dev installation for php8, next to the current php7. other dev products (eg phpstorm) do support multiple versions of php in one dev. i wonder why sc never thought of it? it seems it was always a bumpy road with php versions for decades. basically any big tech started on php and they all are gone.

I think the best approach is to stay with SC9.8 php7.3 on dev and deploy to php8.1 in production.
This works.
The issues are not with generated code but with SC compiler which does not work well with PHP8 yet.
Generated code runs on PHP8 with no problem.

Interesting option. Are there requirements to stay on dev 7.3 while upgrading? Because if you don’t then the applications will not run on 8.1 at all.

Dear,

@afpsistemas, @Nico

Version 9.8.001 released. Available for download or update.

Corrections reported in the changelog

Acabo de probarlo y ya no tenemos el error, gracias !

Thank you kind Sir. Will update, test and give feedback

Did the upgrade and working much better now. There is a speed increase in generation as well.
The version number does not show 9.8.001
image

1 Like

Dear, @Nico

There was an issue with one of our update servers, but the issue has now been resolved.

You can run the scriptcase update and the version will be incremented to version 9.8.001.

NOTE: The error only occurred in the PHP 8.1 environment

I tried this (deploy from 9.8/ 7.3 dev to 8.1 prod) and my startup app immediately gives the error:

Fatal error: During inheritance of Iterator: Uncaught ArgumentCountError: Too few arguments to function scriptcase_error_handler(), 4 passed in /var/www/html/_lib/prod/third/adodb/adodb-iterator.inc.php on line 24 and exactly 5 expected in /var/www/html/startup/startup_erro.php:6 Stack trace: #0 /var/www/html/_lib/prod/third/adodb/adodb-iterator.inc.php(24): scriptcase_error_handler(8192, 'Return type of ...', '/var/www/html/_...', 47) #1 /var/www/html/_lib/prod/third/adodb/adodb.inc.php(2905): include_once('/var/www/html/_...') #2 /var/www/html/startup/startup.php(682): include_once('/var/www/html/_...') #3 /var/www/html/startup/startup.php(1598): startup_ini->init() #4 /var/www/html/startup/startup.php(2399): startup_apl->controle() #5 /var/www/html/startup/index.php(2): include_once('/var/www/html/s...') #6 {main} in /var/www/html/_lib/prod/third/adodb/adodb-iterator.inc.php on line 24

Totally discouraging and looks like a compatibility problem right at generated code which cannot be altered.

I just converted to php v8. while testing my application i received - Fatal error : Uncaught TypeError: Unsupported operand types: float - string in /opt/NetMake/v9-php81/wwwroot/scriptcase/app/anthony_carson_marbethdist/form_standard_order/form_standard_order_apl.php:7430. it looks like it was while performing a calculation using fields in my from from my table. it looks like the code is {order_amt} = ({price}*{order_qty} - {product_discount}); the fields in {} are form fields from my order details table. i tried googling but have not found a solution. if it is the {} being used to reference the form fields - what is the workaround to reference form fields from a table? Can any one assist?

Also the fields in the table are defined as decimal with 2 decimal places. and product_discount is 0.00 in many cases,

I resolved the issue by using the (int){price} for each field used in the calculation. You don’t need to create $variables.

1 Like