Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
PHP error without warning when logging is enabled - SOLVED
05-06-2022, 12:44 AM, (This post was last modified: 05-18-2022, 05:15 AM by dalescott.)
#1
PHP error without warning when logging is enabled - SOLVED
Hi all, I tried unsuccessfully to delete an old user from my demo system this morning and found a PHP Fatal error in the Apache log, which I presume to be why the user was not deleted (but admit I am more a user than a dev ;-))

I clicked Delete for the user in the Users Maintenance page, then OK in the "Are you sure you wish to delete this user?" pop-up), but the user was not removed from the list.

The Apache error log entry is:

Code:
[Thu May 05 08:22:58.831791 2022] [php:error] [pid 81441] [client 174.0.43.39:52418] PHP Fatal error:  Uncaught TypeError: fwrite(): Argument #1 ($stream) must be of type resource, null given in /usr/local/www/weberp/includes/footer.php:21\nStack trace:\n#0 /usr/local/www/weberp/includes/footer.php(21): fwrite()\n#1 /usr/local/www/weberp/WWW_Users.php(842): include('...')\n#2 {main}\n  thrown in /usr/local/www/weberp/includes/footer.php on line 21, referer: https://weberp.dalescott.net/WWW_Users.php?&SelectedUser=glennhughes&delete=1

The code is the head of the master branch from https://github.com/webERP-team/webERP. I had performed a git pull prior to attempting to delete the old user, but the only update was to doc/CHANGELOG (Tim's update indicating the link from the dashboard to the manual had been corrected). I'm using PHP v8.0.18, MariaDb 10.5.15 and Apache 2.4.53.  

Unfortunately I cannot say when I was last able to delete a user, but it was likely before I upgraded from PHP 7 to PHP8 at Christmas (thereabouts).

Can anyone shed some light on this? Could this be a PHP v8 problem that was unknown until now? Should I be using the weberp_version5 branch now? 

Thanks,
Dale


PHP Version

Code:
dale@whizzer:/usr/local/www/weberp % php --version
PHP 8.0.18 (cli) (built: Apr 16 2022 01:20:15) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.18, Copyright (c) Zend Technologies
dale@whizzer:/usr/local/www/weberp % php -m
[PHP Modules]
bcmath
bz2
Core
ctype
curl
date
dom
exif
fileinfo
filter
gd
gettext
gmp
hash
iconv
imagick
intl
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcre
PDO
pdo_mysql
posix
Reflection
session
SimpleXML
soap
SPL
standard
tokenizer
xml
xmlreader
xmlwriter
zip
zlib

[Zend Modules]

dale@whizzer:/usr/local/www/weberp %


MariaDb Version

Code:
dale@whizzer:/usr/local/www/weberp % pkg info | grep -i maria
mariadb105-client-10.5.15_3    Multithreaded SQL database (client)
mariadb105-server-10.5.15_3    Multithreaded SQL database (server)


Apache Version


Code:
dale@whizzer:/usr/local/www/weberp % pkg info | grep -i apache
apache24-2.4.53_1              Version 2.4.x of Apache web server
http://www.dalescott.net
Reply


Messages In This Thread
PHP error without warning when logging is enabled - SOLVED - by dalescott - 05-06-2022, 12:44 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)