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

Home » FUDforum » How To » Registration troubles (Users can't registrate (registration timeout))
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Registration troubles [message #165184] Sun, 08 May 2011 03:04 Go to next message
AlxChep is currently offline  AlxChep
Messages: 9
Registered: March 2011
Karma: 0
Junior Member
No-one can registrate on my forum, there is message "The limit of one registration per -1(or 60 by default) seconds has been reached. Please wait 18080677 seconds, and then try to register once again."

[Updated on: Sun, 08 May 2011 03:44]

Report message to a moderator

Re: Registration troubles [message #165187 is a reply to message #165184] Sun, 08 May 2011 11:14 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
msg file
The limit of one registration per {GVAR: REG_TIME_LIMIT} seconds has been reached. Please wait {PLURAL: reg_limit_reached|$1 second|$1 seconds}, and then try to register once again.


Fix your REG_TIME_LIMIT setting in the Global Settings Manager.
Re: Registration troubles [message #165188 is a reply to message #165187] Sun, 08 May 2011 15:33 Go to previous messageGo to next message
AlxChep is currently offline  AlxChep
Messages: 9
Registered: March 2011
Karma: 0
Junior Member
Цитата:
Registration Time Limit:
This limit allows you to define how often can a registration can occur (in seconds). Set the value of this field to -1 if you do not wish to limit registrations.

This one?
It's set to -1, and I have tried 60 -- the same result Sad
Re: Registration troubles [message #165191 is a reply to message #165188] Sun, 08 May 2011 17:08 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Strange! I'll look at it tomorrow.
Re: Registration troubles [message #165192 is a reply to message #165191] Sun, 08 May 2011 17:57 Go to previous messageGo to next message
AlxChep is currently offline  AlxChep
Messages: 9
Registered: March 2011
Karma: 0
Junior Member
Thanks!, maybe this could help:
FUDforum version: 	3.0.2
PHP version: 	5.2.17
PHP built on: 	FreeBSD 8.1-RELEASE FreeBSD 8.1-RELEASE #1: Sun Dec 26 16:08:20 UTC 2010 root /usr/obj/usr/src/sys/MyCONF i386
Database type: 	mysql (mysql)
Database version: 	5.5.11-log
Web server: 	lighttpd
Web Server load: 	0
Web server to PHP interface: 	cgi-fcgi
WebServer User/Group: 	80 / 80
Relevant PHP settings: 	
Safe mode: 	OFF
Open basedir: 	none
Display errors: 	OFF
File uploads: 	ON
Maximum file upload size: 	2M
Magic quotes: 	ON
Register globals: 	OFF
Output buffering: 	Yes
Disabled functions: 	none
PSpell support: 	No
Zlib support: 	Yes

PHP Version 5.2.17

System 	FreeBSD  8.1-RELEASE FreeBSD 8.1-RELEASE #1: Sun Dec 26 16:08:20 UTC 2010 .net:/usr/obj/usr/src/sys/MyCONF i386
Build Date 	Apr 30 2011 01:08:11
Configure Command 	'./configure' '--with-layout=GNU' '--with-config-file-scan-dir=/usr/local/etc/php' '--disable-all' '--enable-libxml' '--with-libxml-dir=/usr/local' '--enable-reflection' '--program-prefix=' '--enable-fastcgi' '--with-regex=php' '--with-zend-vm=CALL' '--prefix=/usr/local' '--mandir=/usr/local/man' '--infodir=/usr/local/info/' '--build=i386-portbld-freebsd8.1'
Server API 	CGI/FastCGI
Virtual Directory Support 	disabled
Configuration File (php.ini) Path 	/usr/local/etc
Loaded Configuration File 	/usr/local/etc/php.ini
Scan this dir for additional .ini files 	/usr/local/etc/php
additional .ini files parsed 	/usr/local/etc/php/extensions.ini
PHP API 	20041225
PHP Extension 	20060613
Zend Extension 	220060519
Debug Build 	no
Thread Safety 	disabled
Zend Memory Manager 	enabled
IPv6 Support 	enabled
Registered PHP Streams 	compress.bzip2, https, ftps, php, file, data, http, ftp, zip, compress.zlib
Registered Stream Socket Transports 	tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
Registered Stream Filters 	bzip2.*, convert.iconv.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, zlib.*

Suhosin logo This server is protected with the Suhosin Patch 0.9.7
Copyright (c) 2006 Hardened-PHP Project

Zend logo This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies

Configuration
PHP Core
Directive	Local Value	Master Value
allow_call_time_pass_reference	Off	Off
allow_url_fopen	On	On
allow_url_include	Off	Off
always_populate_raw_post_data	Off	Off
arg_separator.input	&	&
arg_separator.output	&	&
asp_tags	Off	Off
auto_append_file	no value	no value
auto_globals_jit	On	On
auto_prepend_file	no value	no value
browscap	no value	no value
default_charset	no value	no value
default_mimetype	text/html	text/html
define_syslog_variables	Off	Off
disable_classes	no value	no value
disable_functions	no value	no value
display_errors	Off	Off
display_startup_errors	Off	Off
doc_root	no value	no value
docref_ext	no value	no value
docref_root	no value	no value
enable_dl	On	On
error_append_string	no value	no value
error_log	/var/log/php	/var/log/php
error_prepend_string	no value	no value
error_reporting	6135	6135
expose_php	On	On
extension_dir	/usr/local/lib/php/20060613	/usr/local/lib/php/20060613
file_uploads	On	On
highlight.bg	#FFFFFF	#FFFFFF
highlight.comment	#FF8000	#FF8000
highlight.default	#0000BB	#0000BB
highlight.html	#000000	#000000
highlight.keyword	#007700	#007700
highlight.string	#DD0000	#DD0000
html_errors	On	On
ignore_repeated_errors	Off	Off
ignore_repeated_source	Off	Off
ignore_user_abort	On	Off
implicit_flush	Off	Off
include_path	.:/usr/local/share/pear	.:/usr/local/share/pear
log_errors	On	On
log_errors_max_len	1024	1024
magic_quotes_gpc	On	On
magic_quotes_runtime	Off	Off
magic_quotes_sybase	Off	Off
mail.force_extra_parameters	no value	no value
max_execution_time	30	30
max_file_uploads	20	20
max_input_nesting_level	64	64
max_input_time	60	60
memory_limit	128M	128M
open_basedir	no value	no value
output_buffering	4096	4096
output_handler	no value	no value
post_max_size	8M	8M
precision	14	14
realpath_cache_size	16K	16K
realpath_cache_ttl	120	120
register_argc_argv	Off	Off
register_globals	Off	Off
register_long_arrays	Off	Off
report_memleaks	On	On
report_zend_debug	On	On
safe_mode	Off	Off
safe_mode_exec_dir	no value	no value
safe_mode_gid	Off	Off
safe_mode_include_dir	no value	no value
sendmail_from	no value	no value
sendmail_path	/usr/sbin/sendmail -t -i 	/usr/sbin/sendmail -t -i 
serialize_precision	100	100
short_open_tag	On	On
SMTP	localhost	localhost
smtp_port	25	25
sql.safe_mode	Off	Off
suhosin.log.phpscript	0	0
suhosin.log.phpscript.is_safe	Off	Off
suhosin.log.phpscript.name	no value	no value
suhosin.log.sapi	no value	no value
suhosin.log.script	no value	no value
suhosin.log.script.name	no value	no value
suhosin.log.syslog	no value	no value
suhosin.log.syslog.facility	no value	no value
suhosin.log.syslog.priority	no value	no value
suhosin.log.use-x-forwarded-for	Off	Off
track_errors	Off	Off
unserialize_callback_func	no value	no value
upload_max_filesize	2M	2M
upload_tmp_dir	no value	no value
user_dir	no value	no value
variables_order	GPCS	GPCS
xmlrpc_error_number	0	0
xmlrpc_errors	Off	Off
y2k_compliance	On	On
zend.ze1_compatibility_mode	Off	Off

bz2
BZip2 Support 	Enabled
Stream Wrapper support 	compress.bz2://
Stream Filter support 	bzip2.decompress, bzip2.compress
BZip2 Version 	1.0.5, 10-Dec-2007

cgi-fcgi
Directive	Local Value	Master Value
cgi.check_shebang_line	1	1
cgi.fix_pathinfo	1	1
cgi.nph	0	0
cgi.rfc2616_headers	0	0
fastcgi.logging	1	1

ctype
ctype functions 	enabled

date
date/time support 	enabled
"Olson" Timezone Database Version 	2010.9
Timezone Database 	internal
Default timezone 	UTC

Directive	Local Value	Master Value
date.default_latitude	31.7667	31.7667
date.default_longitude	35.2333	35.2333
date.sunrise_zenith	90.583333	90.583333
date.sunset_zenith	90.583333	90.583333
date.timezone	no value	no value

dom
DOM/XML 	enabled
DOM/XML API Version 	20031129
libxml Version 	2.7.7
HTML Support 	enabled
XPath Support 	enabled
XPointer Support 	enabled
Schema Support 	enabled
RelaxNG Support 	enabled

fileinfo
fileinfo support	enabled

filter
Input Validation and Filtering 	enabled
Revision 	$Revision: 293051 $

Directive	Local Value	Master Value
filter.default	unsafe_raw	unsafe_raw
filter.default_flags	no value	no value

gd
GD Support 	enabled
GD Version 	bundled (2.0.34 compatible)
FreeType Support 	enabled
FreeType Linkage 	with freetype
FreeType Version 	2.4.4
T1Lib Support 	enabled
GIF Read Support 	enabled
GIF Create Support 	enabled
JPG Support 	enabled
PNG Support 	enabled
WBMP Support 	enabled
XPM Support 	enabled
XBM Support 	enabled

hash
hash support 	enabled
Hashing Engines 	md2 md4 md5 sha1 sha256 sha384 sha512 ripemd128 ripemd160 ripemd256 ripemd320 whirlpool tiger128,3 tiger160,3 tiger192,3 tiger128,4 tiger160,4 tiger192,4 snefru gost adler32 crc32 crc32b haval128,3 haval160,3 haval192,3 haval224,3 haval256,3 haval128,4 haval160,4 haval192,4 haval224,4 haval256,4 haval128,5 haval160,5 haval192,5 haval224,5 haval256,5

iconv
iconv support 	enabled
iconv implementation 	libiconv
iconv library version 	1.13

Directive	Local Value	Master Value
iconv.input_encoding	ISO-8859-1	ISO-8859-1
iconv.internal_encoding	ISO-8859-1	ISO-8859-1
iconv.output_encoding	ISO-8859-1	ISO-8859-1

json
json support 	enabled
json version 	1.2.1

libxml
libXML support 	active
libXML Version 	2.7.7
libXML streams 	enabled

mbstring
Multibyte Support 	enabled
Multibyte string engine 	libmbfl
Multibyte (japanese) regex support 	enabled
Multibyte regex (oniguruma) version 	4.4.4
Multibyte regex (oniguruma) backtrack check 	On

mbstring extension makes use of "streamable kanji code filter and converter", which is distributed under the GNU Lesser General Public License version 2.1.

Directive	Local Value	Master Value
mbstring.detect_order	no value	no value
mbstring.encoding_translation	Off	Off
mbstring.func_overload	0	0
mbstring.http_input	pass	pass
mbstring.http_output	pass	pass
mbstring.internal_encoding	no value	no value
mbstring.language	neutral	neutral
mbstring.strict_detection	Off	Off
mbstring.substitute_character	no value	no value

mcrypt
mcrypt support	enabled
Version 	2.5.8
Api No 	20021217
Supported ciphers 	cast-128 gost rijndael-128 twofish arcfour cast-256 loki97 rijndael-192 saferplus wake blowfish-compat des rijndael-256 serpent xtea blowfish enigma rc2 tripledes
Supported modes 	cbc cfb ctr ecb ncfb nofb ofb stream

Directive	Local Value	Master Value
mcrypt.algorithms_dir	no value	no value
mcrypt.modes_dir	no value	no value

mysql
MySQL Support	enabled
Active Persistent Links 	0
Active Links 	1
Client API version 	5.5.11
MYSQL_MODULE_TYPE 	no value
MYSQL_SOCKET 	/tmp/mysql.sock
MYSQL_INCLUDE 	no value
MYSQL_LIBS 	no value

Directive	Local Value	Master Value
mysql.allow_persistent	On	On
mysql.connect_timeout	60	60
mysql.default_host	no value	no value
mysql.default_password	no value	no value
mysql.default_port	no value	no value
mysql.default_socket	no value	no value
mysql.default_user	no value	no value
mysql.max_links	Unlimited	Unlimited
mysql.max_persistent	Unlimited	Unlimited
mysql.trace_mode	Off	Off

openssl
OpenSSL support 	enabled
OpenSSL Version 	OpenSSL 0.9.8n 24 Mar 2010

pcre
PCRE (Perl Compatible Regular Expressions) Support 	enabled
PCRE Library Version 	8.02 2010-03-19

Directive	Local Value	Master Value
pcre.backtrack_limit	100000	100000
pcre.recursion_limit	100000	100000

pdf
PDF Support	enabled
PDFlib GmbH Version 	7.0.4p4
PECL Version 	2.1.8
Revision 	$Revision: 1.5.2.18 $

PDO
PDO support	enabled
PDO drivers 	sqlite, mysql

pdo_mysql
PDO Driver for MySQL, client library version	5.5.11

pdo_sqlite
PDO Driver for SQLite 3.x	enabled
PECL Module version 	(bundled) 1.0.1 $Id: pdo_sqlite.c 293036 2010-01-03 09:23:27Z sebastian $
SQLite Library 	3.3.7

posix
Revision 	$Revision: 293036 $

Reflection
Reflection	enabled
Version 	$Id: php_reflection.c 300129 2010-06-03 00:43:37Z felipe $

session
Session Support 	enabled
Registered save handlers 	files user
Registered serializer handlers 	php php_binary

Directive	Local Value	Master Value
session.auto_start	Off	Off
session.bug_compat_42	Off	Off
session.bug_compat_warn	On	On
session.cache_expire	180	180
session.cache_limiter	nocache	nocache
session.cookie_domain	no value	no value
session.cookie_httponly	Off	Off
session.cookie_lifetime	0	0
session.cookie_path	/	/
session.cookie_secure	Off	Off
session.entropy_file	no value	no value
session.entropy_length	0	0
session.gc_divisor	1000	1000
session.gc_maxlifetime	1440	1440
session.gc_probability	1	1
session.hash_bits_per_character	5	5
session.hash_function	0	0
session.name	PHPSESSID	PHPSESSID
session.referer_check	no value	no value
session.save_handler	files	files
session.save_path	no value	no value
session.serialize_handler	php	php
session.use_cookies	On	On
session.use_only_cookies	Off	Off
session.use_trans_sid	0	0

SimpleXML
Simplexml support	enabled
Revision 	$Revision: 293036 $
Schema support 	enabled

sockets
Sockets Support 	enabled

SPL
SPL support	enabled
Interfaces 	Countable, OuterIterator, RecursiveIterator, SeekableIterator, SplObserver, SplSubject
Classes 	AppendIterator, ArrayIterator, ArrayObject, BadFunctionCallException, BadMethodCallException, CachingIterator, DirectoryIterator, DomainException, EmptyIterator, FilterIterator, InfiniteIterator, InvalidArgumentException, IteratorIterator, LengthException, LimitIterator, LogicException, NoRewindIterator, OutOfBoundsException, OutOfRangeException, OverflowException, ParentIterator, RangeException, RecursiveArrayIterator, RecursiveCachingIterator, RecursiveDirectoryIterator, RecursiveFilterIterator, RecursiveIteratorIterator, RecursiveRegexIterator, RegexIterator, RuntimeException, SimpleXMLIterator, SplFileInfo, SplFileObject, SplObjectStorage, SplTempFileObject, UnderflowException, UnexpectedValueException

SQLite
SQLite support	enabled
PECL Module version 	2.0-dev $Id: sqlite.c 293036 2010-01-03 09:23:27Z sebastian $
SQLite Library 	2.8.17
SQLite Encoding 	UTF-8

Directive	Local Value	Master Value
sqlite.assoc_case	0	0

standard
Regex Library 	Bundled library enabled
Dynamic Library Support 	enabled
Path to sendmail 	/usr/sbin/sendmail -t -i

Directive	Local Value	Master Value
assert.active	1	1
assert.bail	0	0
assert.callback	no value	no value
assert.quiet_eval	0	0
assert.warning	1	1
auto_detect_line_endings	0	0
default_socket_timeout	60	60
safe_mode_allowed_env_vars	PHP_	PHP_
safe_mode_protected_env_vars	LD_LIBRARY_PATH	LD_LIBRARY_PATH
url_rewriter.tags	a=href,area=href,frame=src,input=src,form=fakeentry	a=href,area=href,frame=src,input=src,form=fakeentry
user_agent	no value	no value

tokenizer
Tokenizer Support 	enabled

xml
XML Support 	active
XML Namespace Support 	active
libxml2 Version 	2.7.7

xmlreader
XMLReader 	enabled

xmlwriter
XMLWriter 	enabled

zip
Zip 	enabled
Extension Version 	$Id: php_zip.c 293036 2010-01-03 09:23:27Z sebastian $
Zip version 	1.8.11
Libzip version 	0.9.0

zlib
ZLib Support 	enabled
Stream Wrapper support 	compress.zlib://
Stream Filter support 	zlib.inflate, zlib.deflate
Compiled Version 	1.2.3
Linked Version 	1.2.3

Directive	Local Value	Master Value
zlib.output_compression	Off	Off
zlib.output_compression_level	-1	-1
zlib.output_handler	no value	no value

Additional Modules
Module Name

Environment
Variable	Value
MACHTYPE 	i386
SSH_CLIENT 	192.168.1.123 35954 22
USER 	root
MAIL 	/var/mail/root
SHLVL 	2
VENDOR 	intel
HOME 	/root
SSH_TTY 	/dev/pts/1
PAGER 	more
GROUP 	wheel
LOGNAME 	root
BLOCKSIZE 	K
TERM 	xterm
MC_CONTROL_FILE 	/tmp/mc.5369.control
PATH 	/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin
RC_PID 	5372
REMOTEHOST 	192.168.1.123
HOST 	.net
SHELL 	/bin/csh
MC_CONTROL_PID 	5369
OSTYPE 	FreeBSD
PWD 	/usr/local/etc/rc.d
SSH_CONNECTION 	192.168.1.123 35954 192.168.1.124 22
FTP_PASSIVE_MODE 	YES
HOSTTYPE 	FreeBSD
EDITOR 	vi
PHP_FCGI_CHILDREN 	1

PHP Variables
Variable	Value
_REQUEST["S"]	f3abda9f01aa4cd87e212e79dcc3bd2c
_REQUEST["SQ"]	4adc2b85863ed201b607243a35bc2db0
_REQUEST["fud_session_1322932942"]	f3abda9f01aa4cd87e212e79dcc3bd2c
_GET["S"]	f3abda9f01aa4cd87e212e79dcc3bd2c
_GET["SQ"]	cb7b30b45ba675e1b2208a7066af712f
_COOKIE["fud_session_1322932942"]	f3abda9f01aa4cd87e212e79dcc3bd2c
_SERVER["MACHTYPE"]	i386
_SERVER["SSH_CLIENT"]	192.168.1.123 35954 22
_SERVER["USER"]	root
_SERVER["MAIL"]	/var/mail/root
_SERVER["SHLVL"]	2
_SERVER["VENDOR"]	intel
_SERVER["HOME"]	/root
_SERVER["SSH_TTY"]	/dev/pts/1
_SERVER["PAGER"]	more
_SERVER["GROUP"]	wheel
_SERVER["LOGNAME"]	root
_SERVER["BLOCKSIZE"]	K
_SERVER["TERM"]	xterm
_SERVER["MC_CONTROL_FILE"]	/tmp/mc.5369.control
_SERVER["PATH"]	/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/root/bin
_SERVER["RC_PID"]	5372
_SERVER["REMOTEHOST"]	192.168.1.123
_SERVER["HOST"]	 .net
_SERVER["SHELL"]	/bin/csh
_SERVER["MC_CONTROL_PID"]	5369
_SERVER["OSTYPE"]	FreeBSD
_SERVER["PWD"]	/usr/local/etc/rc.d
_SERVER["SSH_CONNECTION"]	192.168.1.123 35954 192.168.1.124 22
_SERVER["FTP_PASSIVE_MODE"]	YES
_SERVER["HOSTTYPE"]	FreeBSD
_SERVER["EDITOR"]	vi
_SERVER["PHP_FCGI_CHILDREN"]	1
_SERVER["FCGI_ROLE"]	RESPONDER
_SERVER["SERVER_SOFTWARE"]	lighttpd
_SERVER["SERVER_NAME"]	forum..net
_SERVER["GATEWAY_INTERFACE"]	CGI/1.1
_SERVER["SERVER_PORT"]	80
_SERVER["SERVER_ADDR"]	192.168.1.124
_SERVER["REMOTE_PORT"]	27615
_SERVER["REMOTE_ADDR"]	192.168.1.123
_SERVER["SCRIPT_NAME"]	/adm/admphpinfo.php
_SERVER["PATH_INFO"]	no value
_SERVER["SCRIPT_FILENAME"]	/usr/local/www/fudforum/adm/admphpinfo.php
_SERVER["DOCUMENT_ROOT"]	/usr/local/www/fudforum/
_SERVER["REQUEST_URI"]	/adm/admphpinfo.php?S=f3abda9f01aa4cd87e212e79dcc3bd2c&SQ=4adc2b85863ed201b607243a35bc2db0
_SERVER["QUERY_STRING"]	S=f3abda9f01aa4cd87e212e79dcc3bd2c&SQ=4adc2b85863ed201b607243a35bc2db0
_SERVER["REQUEST_METHOD"]	GET
_SERVER["REDIRECT_STATUS"]	200
_SERVER["SERVER_PROTOCOL"]	HTTP/1.1
_SERVER["HTTP_HOST"]	forum..net
_SERVER["HTTP_USER_AGENT"]	Mozilla/5.0 (X11; U; Linux x86_64; ru; rv:1.9.2.17) Gecko/20110422 Ubuntu/10.04 (lucid) Firefox/3.6.17
_SERVER["HTTP_ACCEPT"]	text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
_SERVER["HTTP_ACCEPT_LANGUAGE"]	ru,en-us;q=0.7,en;q=0.3
_SERVER["HTTP_ACCEPT_ENCODING"]	gzip,deflate
_SERVER["HTTP_ACCEPT_CHARSET"]	windows-1251,utf-8;q=0.7,*;q=0.7
_SERVER["HTTP_KEEP_ALIVE"]	115
_SERVER["HTTP_CONNECTION"]	keep-alive
_SERVER["HTTP_REFERER"]	forum..net/adm/admsysinfo.php?S=f3abda9f01aa4cd87e212e79dcc3bd2c&SQ=4adc2b85863ed201b607243a35bc2db0
_SERVER["HTTP_COOKIE"]	fud_session_1322932942=f3abda9f01aa4cd87e212e79dcc3bd2c
_SERVER["PHP_SELF"]	/adm/admphpinfo.php
_SERVER["REQUEST_TIME"]	1304904051



Цитата:
_SERVER["REQUEST_TIME"] 1304904051

This seems a little strange?....

and maybe this also could help:
mysql> select join_date from fud30_users;
+------------+
| join_date  |
+------------+
| 1322933496 |
| 1322933496 |
+------------+
2 rows in set (0.00 sec)


Seems, that system date was incorrect setup-ed, when I was installing the forum Sad, and then it was corrected Sad((

Is it possible to solve the trouble without reinstalling the forum?

[Updated on: Sun, 08 May 2011 21:06]

Report message to a moderator

Re: Registration troubles [message #165198 is a reply to message #165192] Mon, 09 May 2011 10:33 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
That explains it!

You need to:
UPDATE fud30_users SET join_date = (a date in the past);
Re: Registration troubles [message #165215 is a reply to message #165198] Thu, 12 May 2011 08:46 Go to previous messageGo to next message
AlxChep is currently offline  AlxChep
Messages: 9
Registered: March 2011
Karma: 0
Junior Member
and why FudForum doesn't auto-convert php-date to mysql-date?
it could be done via:
Цитата:
$query = "UPDATE table SET
datetimefield = FROM_UNIXTIME($phpdate)
WHERE...";
$query = "SELECT UNIX_TIMESTAMP(datetimefield)
FROM table WHERE...";
from http://www.richardlord.net/blog/dates-in-php-and-mysql
Re: Registration troubles [message #165216 is a reply to message #165215] Thu, 12 May 2011 10:24 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Probably because we support other databases as well?
Re: Registration troubles [message #165218 is a reply to message #165216] Thu, 12 May 2011 14:49 Go to previous messageGo to next message
AlxChep is currently offline  AlxChep
Messages: 9
Registered: March 2011
Karma: 0
Junior Member
Цитата:
Probably because we support other databases as well?

maybe make a database relative configurable requests?
Re: Registration troubles [message #165219 is a reply to message #165218] Thu, 12 May 2011 15:45 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
I don't know. Can you prepare a patch for us?
Re: Registration troubles [message #165220 is a reply to message #165219] Thu, 12 May 2011 16:56 Go to previous messageGo to next message
AlxChep is currently offline  AlxChep
Messages: 9
Registered: March 2011
Karma: 0
Junior Member
I am newbie in SQL, but after a cup of googlig I have find that build-in mysql functions could be import to other SQL-databases, here are some samples:

for PostgreSQL it could be done via adding:

CREATE OR REPLACE FUNCTION from_unixtime(integer) RETURNS timestamp AS '
SELECT
$1::abstime::timestamp without time zone AS result
' LANGUAGE 'SQL';

CREATE OR REPLACE FUNCTION unix_timestamp() RETURNS integer AS '
SELECT
ROUND(EXTRACT( EPOCH FROM abstime(now()) ))::int4 AS result;
' LANGUAGE 'SQL';

CREATE OR REPLACE FUNCTION unix_timestamp(timestamp with time zone) RETURNS integer AS '
SELECT
ROUND(EXTRACT( EPOCH FROM ABSTIME($1) ))::int4 AS result;
' LANGUAGE 'SQL';


MS SQL:
CREATE FUNCTION UNIX_TIMESTAMP (
@ctimestamp datetime
)
RETURNS integer
AS
BEGIN
  /* Function body */
  declare @return integer

  SELECT @return = DATEDIFF(SECOND,{d '1970-01-01'}, @ctimestamp)

  return @return
END


CREATE FUNCTION FROM_UNIXTIME (
@timestamp integer
)
RETURNS datetime
AS
BEGIN
  /* Function body */
  DECLARE @return datetime

  SELECT @return = DATEADD(second, @timestamp,{d '1970-01-01'});

  RETURN @return
END



[Updated on: Thu, 12 May 2011 19:56]

Report message to a moderator

Re: Registration troubles [message #165225 is a reply to message #165220] Fri, 13 May 2011 02:51 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Good, now we need the same for SQLite, Oracle, Fireird and DB2.

We also need to know if there are variations in how these functions are called and if there are any version dependencies.
Re: Registration troubles [message #165227 is a reply to message #165225] Fri, 13 May 2011 05:07 Go to previous messageGo to next message
AlxChep is currently offline  AlxChep
Messages: 9
Registered: March 2011
Karma: 0
Junior Member
I am stupid, there is a real much easier way, that is supported by any SQL/PHP, and it is mentioned in my upper link:
Цитата:
There's three common solutions...

1.

One common solution is to store the dates in DATETIME fields and use PHPs date() and strtotime() functions to convert between PHP timestamps and MySQL DATETIMEs. The methods would be used as follows -

$mysqldate = date( 'Y-m-d H:i:s', $phpdate );
$phpdate = strtotime( $mysqldate );
Re: Registration troubles [message #165228 is a reply to message #165227] Fri, 13 May 2011 07:12 Go to previous messageGo to next message
naudefj is currently offline  naudefj   South Africa
Messages: 3772
Registered: December 2004
Karma: 28
Senior Member
Administrator
Core Developer
Yes, that would be much easier Razz

So, we don't need to make any change to FUDforum's code any more?
Re: Registration troubles [message #165231 is a reply to message #165228] Fri, 13 May 2011 11:36 Go to previous messageGo to next message
AlxChep is currently offline  AlxChep
Messages: 9
Registered: March 2011
Karma: 0
Junior Member
IMHO, it will be good to change unixtimestamp date format to human-readable SQL DATETIME format, I'll try to make a patch...

[Updated on: Fri, 13 May 2011 11:37]

Report message to a moderator

Re: Registration troubles [message #165248 is a reply to message #165231] Tue, 17 May 2011 02:47 Go to previous message
Ernesto is currently offline  Ernesto   Sweden
Messages: 413
Registered: August 2005
Karma: 0
Senior Member
Changing the unixtimestamps would be a tremendeous amount of work and I just don't see a good enough reason to put down so many hours, not only to convert everything, but to convert the scripts and to make patches for older forums, etc etc. It would be a HUGE undertaking. And all that because you want to read date in cleartext in the database?

  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Moderated forum?
Next Topic: Remove Registration Link
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Dec 27 16:35:27 GMT 2024

Total time taken to generate the page: 0.02784 seconds