vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Help! Users cant register (https://vborg.vbsupport.ru/showthread.php?t=61851)

razorownz 02-24-2004 11:51 AM

Help! Users cant register
 
Error:
Parse error: parse error in /home/w/worldofc/www/forum/register.php on line 504

Code:
$homepage = trim($homepage);
if ($homepage) {
if (preg_match('#^www\.#si', $homepage)) {
$homepage = "http://$homepage";
} else if (!preg_match('#^[a-z0-9]+://#si', $homepage)) {
// homepage doesn't match the http://-style format in the beginning -- possible attempted exploit
$homepage = '';

Line 504:
if (preg_match('#^www\.#si', $homepage)) {

Andreas 02-24-2004 12:04 PM

Seems to be correct.
Are there two } after $homepage = ''; ?

Did you make any changes to register.php ?
If so: Check those changes again or reload the original.

razorownz 02-24-2004 12:08 PM

Yeah its like this:

PHP Code:

$homepage trim($homepage);
  if (
$homepage) {
    if (
preg_match('#^www\.#si'$homepage)) {
      
$homepage "http://$homepage";
    } else if (!
preg_match('#^[a-z0-9]+://#si'$homepage)) {
      
// homepage doesn't match the [url]http://-style[/url] format in the beginning -- possible attempted exploit
      
$homepage '';
    }
  }
  
$DB_site->query("INSERT INTO user (userid,username,password,email,".
$userid=$DB_site->insert_id();
$DB_site->query("INSERT INTO items_user (userid) VALUES ($userid)");
$DB_site->query("INSERT INTO battle_stats (userid) VALUES ($userid)");
$newstylefield."parentemail,coppauser,homepage,icq,aim,yahoo,signature,adminemail,showemail,invisible,usertitle,joindate,cookieuser,daysprune,lastvisit,lastactivity,usergroupid,timezoneoffset,emailnotification,receivepm,emailonpm,options,birthday,maxposts,startofweek,ipaddress,pmpopup,referrerid,nosessionhash,avatarid,regthread) VALUES (NULL,'".addslashes(htmlspecialchars($username))."','".addslashes(md5($password))."','".addslashes(htmlspecialchars($email))."',".$newstyleval."'".addslashes(htmlspecialchars($parentemail))."','$coppauser','".addslashes(htmlspecialchars($homepage))."','".addslashes(htmlspecialchars($icq))."','".addslashes(htmlspecialchars($aim))."','".addslashes(htmlspecialchars($yahoo))."','".addslashes($signature)."','$adminemail','$showemail','$invisible','".addslashes($usertitle)."','".time()."','$cookieuser','".addslashes($prunedays)."','".time()."','".time()."','$newusergroupid','".addslashes($timezoneoffset)."','$emailnotification','$receivepm','$emailonpm','$options','".addslashes($birthday)."','".addslashes($umaxposts)."','".addslashes($startofweek)."','".addslashes($ipaddress)."','$pmpopup','".addslashes($testreferrerid['userid'])."','$nosessionhash','$avatarid','".addslashes($regthread)."')"); 


Andreas 02-24-2004 12:32 PM

PHP Code:

$DB_site->query("INSERT INTO user (userid,username,password,email,"

That doesn't seem to be correct.

razorownz 02-24-2004 12:37 PM

any ideas how i can correct this problem ?

Andreas 02-24-2004 12:51 PM

Yes - take the original and compare it with the current version.
Then only make the correct/necessary changes.

AN-net 02-24-2004 05:32 PM

best idea would be just to reupload the original file;)

razorownz 02-25-2004 04:58 AM

Quote:

Originally Posted by AN-net
best idea would be just to reupload the original file;)

yeah i suppose, im at work and dont have access to the original files here, could someone attach register.php original so i could compare those ?


All times are GMT. The time now is 08:38 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02419 seconds
  • Memory Usage 1,745KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete