Problem with signup on clean install

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
vespina
Posts: 7
Joined: 20 Mar 2024, 02:10

Problem with signup on clean install

Post by vespina »

I just completed the installation of MantisBT on my company hosting and I am trying to register the first user, but I keep getting a 1904 error message. I followed the instructions from a post I found about how to activate extender error reporting and now I can see this:

Code: Select all

NTERNAL APPLICATION ERROR

Class "VBoctor\Email\DisposableEmailChecker" not found

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.
Detailed error information
Full path: /data/11/0/133/105/785920/user/804992/htdocs/mantis/core/error_api.php
Line number: 92
Stack trace
#	Filename	Line	Class	Type	Function	Args
0	/data/11/0/133/105/785920/user/804992/htdocs/mantis/core/email_api.php	226	-	-	email_is_disposable	<string>'vespinas@gmail.com'
1	/data/11/0/133/105/785920/user/804992/htdocs/mantis/core/user_api.php	736	-	-	email_ensure_not_disposable	<string>'vespinas@gmail.com'
2	/data/11/0/133/105/785920/user/804992/htdocs/mantis/signup.php	84	-	-	user_signup	<string>'victorespina', <string>'vespinas@gmail.com'
This is my config_inc.php:

Code: Select all

<?php


# --- Database Configuration ---
$g_hostname      = 'vuxmysql11';
$g_db_username   = 'mantis';
$g_db_password   = '*****';
$g_database_name = 'tmi_mantisdb';
$g_db_type       = 'mysqli';

# --- Security ---
$g_crypto_master_salt = '87879hinijijij8798'';	#  Random string of at least 16 chars, unique to the installation

# --- Anonymous Access / Signup ---
$g_allow_signup				= ON;
$g_allow_anonymous_login	= OFF;
$g_anonymous_account		= '';

# --- Email Configuration ---
$g_phpMailer_method		= PHPMAILER_METHOD_MAIL; # or PHPMAILER_METHOD_SMTP, PHPMAILER_METHOD_SENDMAIL
$g_smtp_host			= 'localhost';			# used with PHPMAILER_METHOD_SMTP
$g_smtp_username		= '';					# used with PHPMAILER_METHOD_SMTP
$g_smtp_password		= '';					# used with PHPMAILER_METHOD_SMTP
$g_webmaster_email      = 'webmaster@tercermedio.com';
$g_from_email           = 'noreply@tercermedio.com';	# the "From: " field in emails
$g_return_path_email    = 'webmaster@tercermedio.com';	# the return address for bounced mail
$g_from_name			= 'TMI/Mantis';
$g_email_receive_own    = OFF;
$g_email_send_using_cronjob = OFF;

# --- Attachments / File Uploads ---
$g_allow_file_upload	= ON;
$g_file_upload_method	= DISK; # DATABASE or DISK
$g_absolute_path_default_upload_folder = '/mantis/uploads/'; # used with DISK, must contain trailing \ or /.
$g_max_file_size		= 531628032;	# in bytes
# $g_preview_attachments_inline_max_size = 256 * 1024;
$g_allowed_files		= 'pdf,xls,xlsx,png,jpg,jpeg,txt,csv,doc,docx,dbf,fpt,zip,rar';		# extensions comma separated, e.g. 'php,html,java,exe,pl'
# $g_disallowed_files		= '';		# extensions comma separated

# --- Branding ---
$g_window_title			= 'TMI/Mantis';
# $g_logo_image			= 'images/mantis_logo.png';
# $g_favicon_image		= 'images/favicon.ico';

# --- Real names ---
# $g_show_realname = OFF;
# $g_show_user_realname_threshold = NOBODY;	# Set to access level (e.g. VIEWER, REPORTER, DEVELOPER, MANAGER, etc)

# --- Others ---
# $g_default_home_page = 'my_view_page.php';	# Set to name of page to go to after login

$g_display_errors = array(
E_WARNING => 'halt',
E_NOTICE => 'halt',
E_USER_ERROR => 'halt',
E_USER_WARNING => 'halt',
E_USER_NOTICE => 'halt'
);
$g_show_detailed_errors = ON;
Any ideas about what the problem may be solved ?

TIA

Victor Espina
vespina
Posts: 7
Joined: 20 Mar 2024, 02:10

Re: Problem with signup on clean install

Post by vespina »

I temporarily fixed the problem by editing core/mail_api.php and commenting out the offending class on line 82 and then forcing a false result on function email_is_disposable (line 213), but know I am getting this error:

Code: Select all

APPLICATION ERROR #401

Database query failed. Error received from database was #1292: Incorrect datetime value: '1710906367' for column 'date_created' at row 1 for the query: INSERT INTO mantis_user_table
( username, email, password, date_created, last_visit,
enabled, access_level, login_count, cookie_string, realname )
VALUES
( ?, ?, ?, ?, ?,
?,?,?,?, ?).

Please use the "Back" button in your web browser to return to the previous page. There you can correct whatever problems were identified in this error or select another action. You can also click an option from the menu bar to go directly to a new section.
Detailed error information
Full path: /data/11/0/133/105/785920/user/804992/htdocs/mantis/core/classes/DbQuery.class.php
Line number: 301
Stack trace
#	Filename	Line	Class	Type	Function	Args
0	/data/11/0/133/105/785920/user/804992/htdocs/mantis/core/classes/DbQuery.class.php	301	-	-	trigger_error	<string>'401', <integer>256
1	/data/11/0/133/105/785920/user/804992/htdocs/mantis/core/classes/DbQuery.class.php	796	DbQuery	->	db_execute	<integer>-1, <integer>-1
2	/data/11/0/133/105/785920/user/804992/htdocs/mantis/core/database_api.php	318	DbQuery	::	compat_db_query	<string>'INSERT INTO {user} ( username, email, password, date_created, last_visit, enabled, access_level, login_count, cookie_string, realname ) VALUES ( ?, ?, ?, ?, ?, ?,?,?,?, ?)', <array> { [0] => 'victorespina', [1] => 'vespinas@gmail.com', [2] => '8508d5e7c00720979aaf232c9846408b', [3] => 1710906367, [4] => 1710906367, [5] => true, [6] => 25, [7] => 0, [8] => 'Pyx_tA4o1Oxy62cOzpSxpRiyBQLX3K4XoAto7YkvkQBojW8PsnxrcYzR1oprRh0j', [9] => '' }, <integer>-1, <integer>-1, <boolean>true
3	/data/11/0/133/105/785920/user/804992/htdocs/mantis/core/user_api.php	675	-	-	db_query	<string>'INSERT INTO {user} ( username, email, password, date_created, last_visit, enabled, access_level, login_count, cookie_string, realname ) VALUES ( ?, ?, ?, ?, ?, ?,?,?,?, ?)', <array> { [0] => 'victorespina', [1] => 'vespinas@gmail.com', [2] => '8508d5e7c00720979aaf232c9846408b', [3] => 1710906367, [4] => 1710906367, [5] => true, [6] => 25, [7] => 0, [8] => 'Pyx_tA4o1Oxy62cOzpSxpRiyBQLX3K4XoAto7YkvkQBojW8PsnxrcYzR1oprRh0j', [9] => '' }
4	/data/11/0/133/105/785920/user/804992/htdocs/mantis/core/user_api.php	743	-	-	user_create	<string>'victorespina', <string>'aE8WjzeLE2IrDMo9', <string>'vespinas@gmail.com', <integer>25
5	/data/11/0/133/105/785920/user/804992/htdocs/mantis/signup.php	84	-	-	user_signup	<string>'victorespina', <string>'vespinas@gmail.com'

As I said in the original post, this is a clean install of MantisBT 2.26.1 on a hosting server with this environment:

PHP v8.0.28
Apache 2.4.6 (CentOS)
MySQL 8.0.26-17

The database used for the installation was a new one with no other tables present and the default timezone was set to Panama during installation. As far I can see the problem is being caused when trying to insert the result of php time() function as value for datatime columns, and it seems it may be related to the MySql version.

Any ideas?
atrol
Site Admin
Posts: 8378
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Problem with signup on clean install

Post by atrol »

Did you download 2.26.1 from SourceForge or GitHub?
Do you get any errors or warnings when running admin/check/index.php?
Please use Search before posting and read the Manual
vespina
Posts: 7
Joined: 20 Mar 2024, 02:10

Re: Problem with signup on clean install

Post by vespina »

I just got some warnings and an error related to the upload folder path being incorrect, but I don't believe is related to the problems in hand:

Code: Select all

PHP
register_argc_argv php.ini directive is disabled
This directive should be disabled to increase performance (it only affects PHP in CLI mode).	WARN
display_startup_errors php.ini directive is disabled
For security reasons this directive should be disabled on all production and Internet facing servers.	WARN
PHP errors are being logged or reported
PHP is not currently set to log or report errors and thus you may be unaware of PHP errors that occur.	WARN
shell_exec function is enabled
This function has been disabled by the disable_functions php.ini directive. MantisBT may not operate correctly with this function disabled.	WARN
passthru function is enabled
This function has been disabled by the disable_functions php.ini directive. MantisBT may not operate correctly with this function disabled.	WARN
exec function is enabled
This function has been disabled by the disable_functions php.ini directive. MantisBT may not operate correctly with this function disabled.	WARN
system function is enabled
This function has been disabled by the disable_functions php.ini directive. MantisBT may not operate correctly with this function disabled.	WARN
Database
Version of MySQL being used is within the Premier Support period (GA + 5 years)
Premier Support for the release of MySQL you are using (8.0.26) ended on 2023-04-19. The release is in its Extended support period, which ends on 2026-04-19. You should upgrade to a newer version of MySQL which is still within its Premier support period to benefit from bug fixes and security patches.	WARN
Configuration
Detailed errors should be OFF
Setting show_detailed_errors = ON is a potential security hazard as it can expose sensitive information.	WARN
Paths
absolute_path_default_upload_folder configuration option points to a valid directory
The path '/mantis/uploads/' is not a valid directory.	FAIL
absolute_path_default_upload_folder configuration option points to an accessible directory
The path '/mantis/uploads/' is not accessible.	FAIL
absolute_path_default_upload_folder configuration option points to a writable directory
The path '/mantis/uploads/' must be writable.	FAIL
vespina
Posts: 7
Joined: 20 Mar 2024, 02:10

Re: Problem with signup on clean install

Post by vespina »

atrol wrote: 20 Mar 2024, 06:51 Did you download 2.26.1 from SourceForge or GitHub?
Do you get any errors or warnings when running admin/check/index.php?
I did download it from SourceForge as its the official download link. Should I try cloning the github reposiory instead? I just checked the related sources in the repo (core/database_api.php and core/email_api.php) and its the same I am using now so I don't think it would make any difference.
cas
Posts: 1622
Joined: 11 Mar 2006, 16:08
Contact:

Re: Problem with signup on clean install

Post by cas »

Check in the vendor directory if you find an entry for VBoctor?
If not then one problem found, that needs to be there.
As for the upload folder, make sure ther webserver has full access, this seems to be missing. For testing you can set it to 777.
vespina
Posts: 7
Joined: 20 Mar 2024, 02:10

Re: Problem with signup on clean install

Post by vespina »

cas wrote: 20 Mar 2024, 16:55 Check in the vendor directory if you find an entry for VBoctor?
If not then one problem found, that needs to be there.
That's the first thing I checked. The class is defined in vendor/vboctor/disposable_email_checker/php/src/DisposableEmailChecker.php:

Code: Select all

<?php
# Disposable Email Checker - a static php based check for spam emails
# Copyright (C) 2007-2017 Victor Boctor

# This program is distributed under the terms and conditions of the MIT
# See the README and LICENSE files for details

namespace VBoctor\Email;

/**
 * A class that checks an email address to determine if it is a disposable
 * email address or not.  The data that is used to make such decision is
 * bundled with this library, hence, avoiding a round trip to a remote service.
 */
class DisposableEmailChecker
And as far as I can see, the namespace and class name matches the code that fires the "class not found" error in core/email_api.php (82). Its like composer is not loading that class for some reason. I checked the vendor/composer/installed.json and everything looks fine.
cas wrote: 20 Mar 2024, 16:55 As for the upload folder, make sure ther webserver has full access, this seems to be missing. For testing you can set it to 777.
I did granted 777 to the folder. The problem seems to be a wrong physical path. Anyway, I changed the setting to store files on the database and that fixed the problem.
cas
Posts: 1622
Joined: 11 Mar 2006, 16:08
Contact:

Re: Problem with signup on clean install

Post by cas »

On Centos the location normally would be "/var/www/html/mantis/uploads".
In your case would do another fresh install to detremine if the first time something went unexpectedly wrong.
atrol
Site Admin
Posts: 8378
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Problem with signup on clean install

Post by atrol »

Looks like this topic can be closed, as this is caused by missing files, see https://www.mantisbt.org/bugs/view.php?id=34142#c68682
Please use Search before posting and read the Manual
Post Reply