Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Bug Reports » Cannot delete audit data
Re: Cannot delete audit data [message #7751 is a reply to message #7750] Sat, 09 July 2022 10:52 Go to previous messageGo to previous message
divico is currently offline  divico
Messages: 16
Registered: August 2008
Junior Member
Thanks for trying to recreate. Unfortuantely I figured out that I have issues with batches in general in my new environment. I am migrating from PHP 7.4 to PHP 8.1.7. Resolving this is of a higher priority for me.

1.) Refering to https://www.tonymarston.net/php-mysql/infrastructure-faq.htm l item #56: "In the radicore directory create file batch.ini from batch.ini.default"

Placing the batch.ini in the radicore directory creates the following exception in my environment:

Fatal error: Uncaught ArgumentCountError: Too few arguments to function errorHandlerBatch(), 4 passed and exactly 5 expected in /var/www/html/radicore/mysubsys/std.batch.inc on line 343

ArgumentCountError: Too few arguments to function errorHandlerBatch(), 4 passed and exactly 5 expected in /var/www/html/radicore/mysubsys/std.batch.inc on line 343

Call Stack:
0.0001 392976 1. {main}() /var/www/html/radicore/mysubsys/mybatch(batch).php:0
0.0005 443864 2. batchInit($batchfile = '/var/www/html/radicore/mysubsys/mybatch(batch).php') /var/www/html/radicore/mysubsys/mybatch(batch).php:12
0.0005 444768 3. parse_ini_file($filename = 'batch.ini.default') /var/www/html/radicore/mysubsys/std.batch.inc:32
0.0006 445144 4. errorHandlerBatch($errno = 2, $errstr = 'parse_ini_file(batch.ini.default): Failed to open stream: No such file or directory', $errfile = '/var/www/html/radicore/mysubsys/std.batch.inc', $errline = 32, $errcontext = ???) /var/www/html/radicore/mysubsys/std.batch.inc:32

Looks like radicore is not happy with my batch.ini in the radicore directory and tries to open batch.ini.default. Can you confirm that the radicore directory is the right directory, or adjust the documentation accordingly?

2.) Moving the batch.ini to the subsys-directory resolves the issue above. Still my batch fails with the same exception but issued from an another line of code:

Fatal error: Uncaught ArgumentCountError: Too few arguments to function errorHandlerBatch(), 4 passed and exactly 5 expected in /var/www/html/radicore/mysubsys/std.batch.inc on line 343

ArgumentCountError: Too few arguments to function errorHandlerBatch(), 4 passed and exactly 5 expected in /var/www/html/radicore/mysubsys/std.batch.inc on line 343

Call Stack:
0.0001 392976 1. {main}() /var/www/html/radicore/mysubsys/mybatch(batch).php:0
0.0005 443864 2. batchInit($batchfile = '/var/www/html/radicore/mysubsys/mybatch(batch).php') /var/www/html/radicore/mysubsys/mybatch(batch).php:12
0.0162 477656 3. require_once('/var/www/html/radicore/includes/include.genera l.inc') /var/www/html/radicore/mysubsys/std.batch.inc:158
0.0162 477656 4. fopen($filename = 'config.local.inc', $mode = 'r', $use_include_path = TRUE) /var/www/html/radicore/includes/include.general.inc:19
0.0163 478056 5. errorHandlerBatch($errno = 2, $errstr = 'fopen(config.local.inc): Failed to open stream: No such file or directory', $errfile = '/var/www/html/radicore/includes/include.general.inc', $errline = 19, $errcontext = ???) /var/www/html/radicore/includes/include.general.inc:19

I don't have a config.local.inc and didn't find any reference to it in the documentation. Changing the signature of the errorhandler function to "errorHandlerBatch ($errno, $errstr, $errfile, $errline, $errcontext = null)" temporarily resolved the issue. But you may want to check if all arguments are passed in the right order in all circumstances when calling the errorhandler.

3.) Still my batch does not run. Now getting:

Deprecated: Automatic conversion of false to array is deprecated in /var/www/html/radicore/includes/language_detection.inc on line 279

Call Stack:
0.0001 392976 1. {main}() /var/www/html/radicore/mysubsys/mybatch(batch).php:0
0.0005 443864 2. batchInit($batchfile = '/var/www/html/radicore/mysubsys/mybatch(batch).php') /var/www/html/radicore/mysubsys/mybatch(batch).php:12
0.0533 4015656 3. initSession($save_session_data = ???, $argv = ???) /var/www/html/radicore/mysubsys/std.batch.inc:173
0.0662 4681272 4. trigger_error($message = 'strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated', $error_level = 256) /var/www/html/radicore/includes/include.session.inc:993
0.0662 4681600 5. errorHandler($errno = 256, $errstr = 'strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated', $errfile = '/var/www/html/radicore/includes/include.session.inc', $errline = 993) /var/www/html/radicore/includes/include.session.inc:993
0.0662 4684712 6. getLanguageText($id = 'sys0063', $arg1 = 'strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated', $arg2 = ???, $arg3 = ???, $arg4 = ???, $arg5 = ???) /var/www/html/radicore/includes/error.inc:185
0.0662 4685424 7. getLanguageFile($filename = 'sys.language_text.inc', $directory = '/var/www/html/radicore/menu/text', $ignore_if_not_found = TRUE) /var/www/html/radicore/includes/include.library.inc:4160
0.0662 4685424 8. getBrowserLanguage($directory = '/var/www/html/radicore/menu/text') /var/www/html/radicore/includes/include.library.inc:4068

This is where I am at now.

Can you have a look at those issues?
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Frequent file juggling woes
Next Topic: PHP 8 - ListViewPrintAfter()
Goto Forum:
  


Current Time: Fri Nov 22 00:25:56 EST 2024

Total time taken to generate the page: 0.00951 seconds