You do have Magic Quotes set to On as the output is ‘1’. And the code in FreePBX use the function get_magic_quotes_gpc(). So the error is in your setup, not in FreePBX.
And, you have an error on your php.ini file at line 233, please check that. What do you have on line 233?
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing $
memory_limit = 64M ; Maximum amount of memory a script may consume (8MB)
What editor do you use?
First do a backup of the file (cp php.ini php.ini.org), then open php.ini with your editor, go to line 233 and press the key “end” to see how long the row is.
On your Linux, try to run the command ‘mc’, it should start Midnight Commander. If it does not, install it with ‘yum install mc’ (if you are using Centos).
Find your php.ini and press F4, this opens up an editor that you can use to go to line 233 and look for strange characters. Edit your file, press F2 to save then F10 to exit. ‘/etc/init.d/httpd restart’ then do the php --version and php testm.php to see it you have fixed the issue.
Then you must have an other error in your php.ini, look carefully for any missing’;’ or other errors.
Try to just save the file from within mc to see if that solves the issue. Not until the error in your php.ini goes away you will have a functional installation.
Test with the testm.php until you get your Magic Quotes = 0, when you get a 0 your magic quotes will work with FreePBX as the function get_magic_quotes_gpc() is what is used in FreePBX.
On the other php file, /etc/php.ini, this is on line 233: (8MB)
I commented it out and the magic quotes message went away!
Will commenting out that line affect anything?
Here is what it says above this line:
;;;;;;;;;;;;;;;;;;;
; Resource Limits ;
;;;;;;;;;;;;;;;;;;;
max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend
memory_limit = 100M ; Maximum amount of memory a script may consume
;(8MB)
I did not touch the php.ini file ever in my life for this to happen, because I can see that on a working php file, the (8MB) is on the same line as a commented out sentence. If this isn’t supposed to happen, and commenting out that line wont affect anything, then this can be a FreePBX bug since this happened both on a trixbox and elastix system. I realized it happen on the 2nd trixbox system once I changed the memory_limit from 64M to 100M when I was prompted to.
Philippe, if that is so, how did the “(8MB)” word get added to its own line just out of nowwhere? I am looking at other trixbox and Elastix installs of mine, and they are connected with the previous line. Note that these were all versions that were upgraded from 2.4 or younger to 2.5 and this is when the problem started to happen. Are you able to duplicate this?
Remember, the “8MB” line just decided to use up its own line and that’s probably what caused magic quotes to enable itself. How did that happen without me touching php.ini unless it was to change the memory limit from 64 to 100M?
FreePBX NEVER touches the php.ini!
The only explanation of this error is your skill in editing the php.ini. You said that you used WinSCP, you did not by any chance copied the file from your Linux to Windows, edited the file and copied it back with the use of WinSCP?
ja133,
as already mentioned, we don’t touch that file, ever. The issue may have been there and probably was for a long time. We only started making this check in 2.5 which is why you were never notified prior to 2.5.