miniBB Support Forums | 16 years on The Web
miniBB ® 


 | Begin | Register | Reply | Search | Statistics | File Bank | Manual |
The Other miniBB Support Forums / The Other /   

Set magic_quotes_sybase to OFF when running miniBB on a server

Author acidsneaker
#1 | Posted: 17 Oct 2010 22:58 
I have installed minibb in my locals and it's running fine. But when I moved it to the server, post message button is missing. Means that users cannot post messages and reply to messages in the forum. After doing some error checking on the javascript. This is what I found:

if(document.forms[''postMsg'']) document.forms[''postMsg''].elements[''subbut''].disabled=false;

it's supposed to be like this

if(document.forms['postMsg']) document.forms['postMsg'].elements['subbut'].disabled=false;

I have check the source file, its using single quotes.
Not sure why single quotes when open in the browser, it becomes double quotes.

can somebody please help me.

Thanks in advance.

Author acidsneaker
#2 | Posted: 17 Oct 2010 23:00 
I found the wrong script by right click and view source.

Author acidsneaker
#3 | Posted: 18 Oct 2010 02:02 | Edited by: acidsneaker 
Through thorough investigations, I found that any single quotes will be turn into double quotes. This will definitely disturb any coding especially javascript from the template files.
So I suspected this must be something to do with server settings. I differentiate my local phpinfo with the server phpinfo.
It's magic_quotes_sybase is on at the server but off in my locals. I already ask my admin to off the magic_quotes_sybase. Later I will reply with the results.

Why do I think that is the problem? Based on the php manuals:
Note: If the directive magic_quotes_sybase is ON it will completely override magic_quotes_gpc. So even when get_magic_quotes_gpc() returns TRUE neither double quotes, backslashes or NUL's will be escaped. Only single quotes will be escaped. In this case they'll look like: ''

So If magic_quotes_sybase is on, a single-quote is escaped with a single-quote instead of a backslash

I hope this info will benefits others.

Thank you.

Author juminosy
#4 | Posted: 18 Oct 2010 04:23 | Edited by: juminosy 
Thanks for the info. I don't know about others but it definitely benefited me :)

Author acidsneaker
#5 | Posted: 18 Oct 2010 04:27 
Need to off both magic_quotes_sybase and magic_quotes_runtime. Now minibb forum are running fine in the server.

Author Paul
Lead Developer
#6 | Posted: 18 Oct 2010 04:41 
Thanks for the info. As it's listed on miniBB's requirements page, The only requirement about PHP is that magic_qoutes_runtime setting must be set to OFF, which is set so by default.

So I guess we shall put there 'magic_quotes_sybase' as well. Thanks.

Author sumaniuot
#7 | Posted: 29 Oct 2010 07:14 
So If magic_quotes_sybase is on, a single-quote is escaped with a single-quote instead of a backslash

I hope this info will benefits others.

Thanks for the helpful tip. It helped me a lot. :)

The Other miniBB Support Forums / The Other /
 Set magic_quotes_sybase to OFF when running miniBB on a server
 Share Topic's Link

Your Reply Click this icon to move up to the quoted message

Post as a Guest, leaving the Password field blank. You could also enter a Guest name, if it's not taken by a member yet. Sign-in and post at once, or just sign-in, bypassing the message's text.

Before posting, make sure your message is compliant with our forum posting rules. If not, it may be locked or deleted with no explanation.


miniBB Support Forums Powered by Forum Software miniBB ® Home  Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contact Us
Install the Captcha add-on: protect your miniBB-forums from the automated spam and flood.