users cannot register

Support for the IM Portal Project

Moderator: Integra Moderator

users cannot register

PostAuthor: xblade824 » Sat Mar 03, 2007 6:21 pm

Your phpBB Version: 2.0.
phpBB Type: Integramod 141
MODs: No
Your knowledge: Basic Knowledge
Board URL: http://www.gamersedgecafe.com/forums

PHP Version:
MySQL Version:


What was done before the problem appeared?
I'm not sure how long this has been happening, actually


What was done to try to solve the problem?
search this forum =P



De.scription and Message

After a user registers, it displays this message (which it seems to be linked to the welcome message, but why would it give this error and how would i fix it?):

"
Could not insert private message sent info.

DEBUG MODE

INSERT INTO phpbb_privmsgs (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip, privmsgs_enable_html, privmsgs_enable_bbcode, privmsgs_enable_smilies, privmsgs_attach_sig) VALUES (1, 'Welcome to Gamer's Edge!', 2, 20, 1172974510, '', 0, 1, 1, 1)

Line : 95
File : functions_post.php
"

Thanks

EDIT: I tried disabling the welcome message and it works perfectly. Anyone know what I can do differently to enable this without getting that error? I really want this turned on!
Last edited by xblade824 on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

xblade824
Newbie
Newbie
 
Posts: 7
Likes: 0 post
Liked in: 0 post
Joined: Sat Mar 03, 2007 6:16 pm
Cash on hand: 0.00

Re: users cannot register

PostAuthor: Frost » Thu Mar 08, 2007 9:11 pm

What is the chmod on includes/functions_post.php?

Make sure it's 644

If it is, have you done any edits to the file lately?
Last edited by Frost on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[size=99px]PhpBB3 Themes[/url] ]PhpBB3 Development Center[/url] [/size]

Frost
Sr Integra Member
Sr Integra Member
 
Posts: 776
Likes: 0 post
Liked in: 0 post
Joined: Wed Sep 13, 2006 1:04 am
Cash on hand: 0.00
Location: Photoshop CS3

PostAuthor: xblade824 » Fri Mar 09, 2007 1:21 am

Nothing at all - I don't even have enough knowledge about php to change anything anyways. It is 644.
Last edited by xblade824 on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

xblade824
Newbie
Newbie
 
Posts: 7
Likes: 0 post
Liked in: 0 post
Joined: Sat Mar 03, 2007 6:16 pm
Cash on hand: 0.00

Re: users cannot register

PostAuthor: Frost » Fri Mar 09, 2007 2:04 am

Hmm <img>

I've seen this before but it was caused by adding a mod
Try reuploading a fresh file of includes/functions_post.php from the zip

if that doesnt work show me lines 180 through 195 of functions_post.php
Last edited by Frost on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
[size=99px]PhpBB3 Themes[/url] ]PhpBB3 Development Center[/url] [/size]

Frost
Sr Integra Member
Sr Integra Member
 
Posts: 776
Likes: 0 post
Liked in: 0 post
Joined: Wed Sep 13, 2006 1:04 am
Cash on hand: 0.00
Location: Photoshop CS3

Re: users cannot register

PostAuthor: rtanner83080 » Mon Jul 09, 2007 2:50 pm

I seem to be having the same problem. I have CHMOD the file to 644. I uploaded a new version of functions_post.php to the correct folder. I am still getting the same problem though.

Here is the error message:

Could not insert private message sent info.

DEBUG MODE

INSERT INTO phpbb_privmsgs (privmsgs_type, privmsgs_subject, privmsgs_from_userid, privmsgs_to_userid, privmsgs_date, privmsgs_ip, privmsgs_enable_html, privmsgs_enable_bbcode, privmsgs_enable_smilies, privmsgs_attach_sig) VALUES (1, 'Welcome to Gamer's Edge!', 2, 20, 1172974510, '', 0, 1, 1, 1)

Line : 96
File : functions_post.php


After seeing this error, here are the lines requested in previous posts.

Lines 180-195:

180 $tag = array(array_shift($matches[0]), array_shift($matches[1]), array_shift($matches[2]));
181 $message .= preg_replace($html_entities_match, $html_entities_replace, $part) . clean_html($tag);
182 }
183
184 $message = addslashes($message);
185 if ( strpos($message, '&quot;') !== false)
186 {
187 $message = str_replace('&quot;', '&quot;', $message);
188 }
189
190 // BUG beta Michaelo #3
191 // Note this code only replaces two characters
192 // $message = str_replace('&quot;', '"', $message);
193 // $message = str_replace('&', '&', $message);
194 }
195 else


I can't seem to figure out what is causing this problem.

Any help is much appreciated so I can turn the welcome PM's on again.
Last edited by rtanner83080 on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

rtanner83080
Newbie
Newbie
 
Posts: 19
Likes: 0 post
Liked in: 0 post
Joined: Mon Jul 09, 2007 1:20 pm
Cash on hand: 0.00

PostAuthor: tmotley » Mon Jul 09, 2007 7:03 pm

I do believe it is the apostrophe in the site name that is causing that. Don't know how to fix it other than changing the site name to NOT have the apostrophe.

In viewing your site, some Gamer's and others Gamers...

(Not to nitpick, but you left an e out of announcements...)
Last edited by tmotley on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
User avatar
tmotley
IntegraMODerators
IntegraMODerators
 
Posts: 524
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 2:56 am
Cash on hand: 0.00
Location: Missouri, USA

Re: users cannot register

PostAuthor: Coder » Tue Jul 10, 2007 12:17 am

I agree with tmotley - I think he hit it squarely on the head!

Here's your 'values' line:
VALUES (1, 'Welcome to Gamer's Edge!', 2, 20, 1172974510, '', 0, 1, 1, 1)

Now here it is again as a machine would read it:
VALUES (1, 'Welcome to Gamer's Edge!', 2, 20, 1172974510, '', 0, 1, 1, 1)
As you can see, the opening quote mark ' delimits the beginning of a string to be read, and ends at the first closing quote '

The text after that confuses the machine, then it hits another quote and treats everything after that as a string, followed by yet another string. The number of values don't match the number of fields you gave, so the insert fails.

One workaround might be to use double quotes instead of single (bit rusty on MySQL, but it should work) ...
VALUES (1, "Welcome to Gamer's Edge!", 2, 20, 1172974510, '', 0, 1, 1, 1)

Bear in mind that the ' only works if the function that does the replacement comes before the string is parsed ... from your post, the error is occurring in line 95 of your file functions_post.php but the replacement of the ' with ' isn't done until line 187 of the file

Hope that helps! <img>
Last edited by Coder on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

Coder
Newbie
Newbie
 
Posts: 16
Likes: 0 post
Liked in: 0 post
Joined: Tue Jun 26, 2007 7:43 am
Cash on hand: 0.00
Location: Phoenix, AZ

Re: users cannot register

PostAuthor: rtanner83080 » Tue Jul 10, 2007 5:09 am

[quote=""Coder";p="27143""]I agree with tmotley - I think he hit it squarely on the head!

Here's your 'values' line:
VALUES (1, 'Welcome to Gamer's Edge!', 2, 20, 1172974510, '', 0, 1, 1, 1)

Now here it is again as a machine would read it:
VALUES (1, 'Welcome to Gamer's Edge!', 2, 20, 1172974510, '', 0, 1, 1, 1)
As you can see, the opening quote mark ' delimits the beginning of a string to be read, and ends at the first closing quote '

The text after that confuses the machine, then it hits another quote and treats everything after that as a string, followed by yet another string. The number of values don't match the number of fields you gave, so the insert fails.

One workaround might be to use double quotes instead of single (bit rusty on MySQL, but it should work) ...
VALUES (1, "Welcome to Gamer's Edge!", 2, 20, 1172974510, '', 0, 1, 1, 1)

Bear in mind that the ' only works if the function that does the replacement comes before the string is parsed ... from your post, the error is occurring in line 95 of your file functions_post.php but the replacement of the ' with ' isn't done until line 187 of the file

Hope that helps! <!-- s]

Tmotley and Coder....


Thanks a bunch. This is definitely the cause of the problem. I just took out the apostrophe and everything works fine now.

Thanks a bunch!
Last edited by rtanner83080 on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.

rtanner83080
Newbie
Newbie
 
Posts: 19
Likes: 0 post
Liked in: 0 post
Joined: Mon Jul 09, 2007 1:20 pm
Cash on hand: 0.00

PostAuthor: tmotley » Tue Jul 10, 2007 5:35 am

Mark solved?
Last edited by tmotley on Wed Dec 31, 1969 4:00 pm, edited 1 time in total.
User avatar
tmotley
IntegraMODerators
IntegraMODerators
 
Posts: 524
Likes: 0 post
Liked in: 0 post
Joined: Mon Mar 27, 2006 2:56 am
Cash on hand: 0.00
Location: Missouri, USA


Return to IM Portal Support Forum

Who is online

Registered users: Bing [Bot], Majestic-12 [Bot]