miniBB ® miniBB®
miniBB Support Forums
 | Forums | Register | Reply | Search | Statistics | Manual |
The Other miniBB Support Forums / The Other /   

Set magic_quotes_sybase to OFF when running miniBB on a server

Author acidsneaker
Registered
#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
Registered
#2 | Posted: 17 Oct 2010 23:00 
I found the wrong script by right click and view source.

Author acidsneaker
Registered
#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
Registered
#4 | Posted: 18 Oct 2010 04:23 | Edited by: juminosy 
acidsneaker
Thanks for the info. I don't know about others but it definitely benefited me :)

Author acidsneaker
Registered
#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
Registered
#7 | Posted: 29 Oct 2010 07:14 
acidsneaker:
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 Top

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

 Short link for this topic:

 ?
Only registered users are allowed to post here. Please, enter your username/password details upon posting a message, or register first.


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 ® Features  Requirements  Demo  Download  Showcase  Gallery of Arts
Compiler  Premium Extensions  Premium Support  License  Contacts
Check out the Captcha add-on: protect your miniBB-forums from the automated spam and flood.
Captcha Addon for miniBB