Quick Login   
 
Register AdminFusion Tutorials
 
Featured Sponsors


One.com Domain and Hosting


Register
Forum of the Month
Australian Webmaster
fotm

A webmaster forum specifically catering for Australian site owners. We discuss site development, marketing and management issues.

Tag Cloud
Latest Threads
Forum Stats
8,073 Members
165,866 Posts
38 Users Online

Please welcome our newest member, masood!

Affiliates
Go Back AdminFusion » Getting Started » Software » Other Software » [MyBB] Strange error [Apostrophe shows up with slash]
Welcome to the AdminFusion. AdminFusion is the ultimate resource for forum administrators and moderators. With exclusive articles, interviews with the experts, free downloadable skins, and the revolutionary post exchange system - PostFusion, AdminFusion is the place to go for all of your forum needs.  By joining AdminFusion, you will become part of a thriving admin community and immediately gain access to all of these resources. Registration is fast, simple and absolutely free so please join us today!
Want more than our forums? Try these: Post Fusion Forum Matrix
Old 02-06-2007, 07:25 PM   #1

NJunkies's Avatar

Title: Apprentice

Points: 1,759, Level: 11Points: 1,759, Level: 11Points: 1,759, Level: 11
Level up: 12%, 91 Points neededLevel up: 12%, 91 Points neededLevel up: 12%, 91 Points needed
Activity: 0%Activity: 0%Activity: 0%

Join Date: Jan 2007

Posts: 150

Location: England

NJunkies has a spectacular aura aboutNJunkies has a spectacular aura about
 
 
[MyBB] Strange error [Apostrophe shows up with slash]

Hi, when someone posts a word with a ' in it it shows a slash to.

EG: haven't shows haven\'t when it's posted

Anyone know why?

PS: It seems when a slash is posted it adds more slashes after that aswell

If it helps, recently I restored my old database thorugh PHPMyAdmin onto my new server, but I don't think I disabled the plugins before the backup and now they aren't on the new server I can't disable them because they aren't there
__________________
N-Boards - Nintendo Community
Reply With Quote
Old 02-06-2007, 08:21 PM   #2

LarryB's Avatar

Title: AF Lead Developer

Points: 6,450, Level: 23Points: 6,450, Level: 23Points: 6,450, Level: 23
Level up: 24%, 100 Points neededLevel up: 24%, 100 Points neededLevel up: 24%, 100 Points needed
Activity: 0%Activity: 0%Activity: 0%

Join Date: Sep 2005

Posts: 1,186

Location: OHIO, US

LarryB has much to be proud ofLarryB has much to be proud ofLarryB has much to be proud ofLarryB has much to be proud ofLarryB has much to be proud ofLarryB has much to be proud ofLarryB has much to be proud ofLarryB has much to be proud of
Send a message via MSN to LarryB  
 
My guess is that MyBB is attempting to do the job of commenting out characters that are special to mysql and your server also has magic_quotes_gpc enabled. Is there possibly a configuration setting in MyBB that allows you to set whether magic_quotes_gpc is enabled on the server or not? Sorry. I don't know MyBB well enough to know if this is definitely the correct fix. But that would be my guess. Basically php would automatically escape an ' and make it like this \' and then MyBB may be adding it's own so it would look like this \\' when it is processed saved to the database it would lose one of the \ and just be \'.
__________________
Do not post your PF private key in public.

Did I help you with this post? If so, pls click the rep button or send money.
Reply With Quote
Old 02-07-2007, 10:52 PM   #3

NJunkies's Avatar

Title: Apprentice

Points: 1,759, Level: 11Points: 1,759, Level: 11Points: 1,759, Level: 11
Level up: 12%, 91 Points neededLevel up: 12%, 91 Points neededLevel up: 12%, 91 Points needed
Activity: 0%Activity: 0%Activity: 0%

Join Date: Jan 2007

Posts: 150

Location: England

NJunkies has a spectacular aura aboutNJunkies has a spectacular aura about
 
 
Thanks for the reply

Magic quotes is enabled on the served, I ran a test PHP file with stripslashes in and it worked fine.

I believe it's because I forgot to disable my plugins before backing up in PHPMyAdmin on my previous server, I guess some of the files that were using the plugins have some errors or something.

Could I just replace some of the forum files with fresh MyBB files?
__________________
N-Boards - Nintendo Community
Reply With Quote
Old 02-08-2007, 01:04 AM   #4

Title: Member

Points: 1,791, Level: 11Points: 1,791, Level: 11Points: 1,791, Level: 11
Level up: 12%, 59 Points neededLevel up: 12%, 59 Points neededLevel up: 12%, 59 Points needed
Activity: 0%Activity: 0%Activity: 0%

Join Date: Jun 2006

Posts: 108

Location: California, US

Tikitiki has a spectacular aura aboutTikitiki has a spectacular aura about
 
 
PHP Code:
// Determine Magic Quotes Status
        
if(get_magic_quotes_gpc())
        {
            
$this->magicquotes 1;
            
$this->strip_slashes_array($_POST);
            
$this->strip_slashes_array($_GET);
            
$this->strip_slashes_array($_COOKIE);
        }
        
set_magic_quotes_runtime(0);
        @
ini_set("magic_quotes_gpc"0);
        @
ini_set("magic_quotes_runtime"0); 
Code straight from class_core.php.

Question, does your host have ini_set function on?
Reply With Quote
Old 02-08-2007, 01:58 AM   #5

NJunkies's Avatar

Title: Apprentice

Points: 1,759, Level: 11Points: 1,759, Level: 11Points: 1,759, Level: 11
Level up: 12%, 91 Points neededLevel up: 12%, 91 Points neededLevel up: 12%, 91 Points needed
Activity: 0%Activity: 0%Activity: 0%

Join Date: Jan 2007

Posts: 150

Location: England

NJunkies has a spectacular aura aboutNJunkies has a spectacular aura about
 
 
Thanks for replying

I'm not sure about ini_set, I've just asked them so hopefully I will have a reply soon
__________________
N-Boards - Nintendo Community
Reply With Quote
Old 02-08-2007, 08:06 PM   #6

NJunkies's Avatar

Title: Apprentice

Points: 1,759, Level: 11Points: 1,759, Level: 11Points: 1,759, Level: 11
Level up: 12%, 91 Points neededLevel up: 12%, 91 Points neededLevel up: 12%, 91 Points needed
Activity: 0%Activity: 0%Activity: 0%

Join Date: Jan 2007

Posts: 150

Location: England

NJunkies has a spectacular aura aboutNJunkies has a spectacular aura about
 
 
Ok well I haven't heard from them yet and it's very annoying

Is there a way I can check myself?
__________________
N-Boards - Nintendo Community
Reply With Quote
Old 02-09-2007, 01:17 AM   #7

Title: Member

Points: 1,791, Level: 11Points: 1,791, Level: 11Points: 1,791, Level: 11
Level up: 12%, 59 Points neededLevel up: 12%, 59 Points neededLevel up: 12%, 59 Points needed
Activity: 0%Activity: 0%Activity: 0%

Join Date: Jun 2006

Posts: 108

Location: California, US

Tikitiki has a spectacular aura aboutTikitiki has a spectacular aura about
 
 
Yeh in a new php file put in the following code and run it from your server

PHP Code:
<?php

var_dump
(ini_set("magic_quotes_gpc"));

?>
Reply With Quote
Old 02-09-2007, 01:40 AM   #8

NJunkies's Avatar

Title: Apprentice

Points: 1,759, Level: 11Points: 1,759, Level: 11Points: 1,759, Level: 11
Level up: 12%, 91 Points neededLevel up: 12%, 91 Points neededLevel up: 12%, 91 Points needed
Activity: 0%Activity: 0%Activity: 0%

Join Date: Jan 2007

Posts: 150

Location: England

NJunkies has a spectacular aura aboutNJunkies has a spectacular aura about
 
 
I get the following error;

Quote:
Warning: Wrong parameter count for ini_set() in /home/njunkies/public_html/tester.php on line 3
NULL
__________________
N-Boards - Nintendo Community
Reply With Quote
Old 02-09-2007, 10:15 PM   #9

NJunkies's Avatar

Title: Apprentice

Points: 1,759, Level: 11Points: 1,759, Level: 11Points: 1,759, Level: 11
Level up: 12%, 91 Points neededLevel up: 12%, 91 Points neededLevel up: 12%, 91 Points needed
Activity: 0%Activity: 0%Activity: 0%

Join Date: Jan 2007

Posts: 150

Location: England

NJunkies has a spectacular aura aboutNJunkies has a spectacular aura about
 
 
Sorry for posting again but I just installed another MyBB on the same server, brand new database and everything to test stuff and it happens on there aswell so it's a server issue.

Embarassing that I didn't think of trying that before
__________________
N-Boards - Nintendo Community
Reply With Quote
Old 02-10-2007, 01:26 AM   #10

LarryB's Avatar

Title: AF Lead Developer

Points: 6,450, Level: 23Points: 6,450, Level: 23Points: 6,450, Level: 23
Level up: 24%, 100 Points neededLevel up: 24%, 100 Points neededLevel up: 24%, 100 Points needed
Activity: 0%Activity: 0%Activity: 0%

Join Date: Sep 2005

Posts: 1,186

Location: OHIO, US

LarryB has much to be proud ofLarryB has much to be proud ofLarryB has much to be proud ofLarryB has much to be proud ofLarryB has much to be proud ofLarryB has much to be proud ofLarryB has much to be proud ofLarryB has much to be proud of
Send a message via MSN to LarryB  
 
When you installed that forum did you do the modification that Tikitiki suggested?
__________________
Do not post your PF private key in public.

Did I help you with this post? If so, pls click the rep button or send money.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

 
Posting Rules

AdminFusion

All times are GMT +1. The time now is 04:43 AM. Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0 © 2005-2008 AdminFusion - All Rights Reserved


From:
Title:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72