Page 1 of 1

Odd bug with php script admin interface

Posted: Fri Oct 18, 2013 1:17 pm
by techgal128
I'm not sure if this is a Sonic issue or not, but I'd figure I should ask anyways.

I'm customizing a custom php script that I currently have published using mini hosting. The admin interface that was included with the script has an odd bug that causes words like "you're" to show up as "you'/re". Also, the change font color and size doesn't work. I figured it was a problem with the script but when someone copied the files over to their own mysql server, the bugs disappeared. I confirmed that both databases use php 5.

Anyone have an idea what is causing this? If I need to include a piece of code, please let me know.

Re: Odd bug with php script admin interface

Posted: Fri Oct 18, 2013 4:28 pm
by kgc
If I was guessing; this sounds like a problem with "magic quotes" - this setting may not be consistent between servers. It is also a deprecated feature but I think is still available in the php running on our cluster.

Re: Odd bug with php script admin interface

Posted: Fri Oct 18, 2013 4:37 pm
by techgal128
That sounds like a good guess. How would I go about turning that feature off?

Oh, and would magic quotes cause features such as changing the text color and size not to work? That's another issue I'm having. I press save on the interface and it reverts to the regular text. Bold and italics works though.

Re: Odd bug with php script admin interface

Posted: Thu Jan 02, 2014 4:40 pm
by techgal128
For those of you that are interested, I have an update. To fix this issue, you need to create a custom php.ini file. The instructions are found here:

https://wiki.sonic.net/wiki/Php5

When the php.ini file is created, just add the code to turn magic quotes off and it will work great.