Forum: help

Monitor Forum | Start New Thread Start New Thread
RE: How to log php error messages from fusionforge [ Reply ]
By: Franck Villaume on 2017-06-01 22:47
[forum:1034]
Can you provide which version of Fusionforge you are using?

extract of master code of AuthLDAPPlugin.class.php

121 if (!$u->create ($user_data['unix_name'],
122 $user_data['firstname'],
123 $user_data['lastname'],
124 $user_data['password1'],
125 $user_data['password2'],
126 trim($user_data['email']),
127 $user_data['mail_site'],
128 $user_data['mail_va'],
129 $user_data['language_id'],
130 $user_data['timezone'],
131 $user_data['jabber_address'],
132 $user_data['jabber_only'],
133 $user_data['theme_id'],
134 $user_data['unix_box'],
135 $user_data['address'],
136 $user_data['address2'],
137 $user_data['phone'],
138 $user_data['fax'],
139 $user_data['title'],
140 $user_data['ccode'],
141 $send_mail)) {
142 error_log("LDAP: user::create() failed: ".$u->getErrorMessage());
143 return false;
144 }

Is your error happen before?
I mean before calling: u->create() function.

Best,
Franck

RE: How to log php error messages from fusionforge [ Reply ]
By: Henri Massias on 2017-06-01 17:48
[forum:1033]
Thanks a lot for your quick reply.

Yes, I confirm it is at first connection.

The error is not in the authldap module but when executing the file /usr/share/fusionforge/common/include/User.class.php on line 363.

I already checked my php.ini file and change the error_log settings, but it doesn't change anything, nothing more is logged. The error_log file specified in php.ini is not created.
I use a debian distribution with the package from fusionforge.

I will check other settings in php.ini and make other trials.
If you have any clue to help me (php.ini settings for example, or how to be sure which php.ini file is used), please tell me.


RE: How to log php error messages from fusionforge [ Reply ]
By: Franck Villaume on 2017-06-01 17:11
[forum:1032]
Hi,

can you confirm that the error is encounter at first connection?
Meaning, when the user does not exist in the fusionforge database.

authldap plugin syncs the user description from LDAP to fusionforge database.

authldap uses standard error_log php function if user cannot be created. Check your php.ini file for setting up error_log output file.

RE: How to log php error messages from fusionforge [ Reply ]
By: Henri Massias on 2017-06-01 14:24
[forum:1029]
I forgot to include my debug.ini config file.

[core]

; Switch to "production" to remove extra debugging
installation_environment = development
;installation_environment = production

; fine-grained control over debugging

; enable debugging at all (overlay the page with pink box)
;sysdebug_enable = false
sysdebug_enable = true

; enable the PHP Error Handler (default if sysdebug_enable)
sysdebug_phphandler = true
; show backtraces for those (can be VERY long, esp. in gf-p-mediawiki)
;sysdebug_backtraces = false
sysdebug_backtraces = true
; also report (display) ignored errors, e.g. from @call
;sysdebug_ignored = false
sysdebug_ignored = true

; report errors to pink-popup instead of syslog (if sysdebug_enable)
sysdebug_dberrors = true
; tracing (if sysdebug_enable); implies sysdebug_dberrors
sysdebug_dbquery = false
;sysdebug_dbquery = true

; output validation (if sysdebug_enable)

; XHTML/1.0 Transitional + RDFa validation using xmlstarlet and the DTD
sysdebug_xmlstarlet = false

How to log php error messages from fusionforge [ Reply ]
By: Henri Massias on 2017-06-01 14:18
[forum:1028]
Hello,

I had a problem when authenticating to a ldap server with AuthLDAP plugin because some of my user in the ldap database have an empty mail field.
To find the origin of the problem, I had to manually debug with the php echo command in the file
/usr/share/fusionforge/common/include/User.class.php

An error message is already included in the php code with the setError command :
$this->setError(_('Invalid Email Address')._(': ').$email);
line 363 of /usr/share/fusionforge/common/include/User.class.php

But I did not find this message in any of the log file.
Could someone explain to me, how to be able to log those error messages (raised by $this->setError) in a file?
I am also interested in being able to log fusionforge access messages and error messages in another file in addition to the syslog file.

Thank you in advance for any help.

Henri