Originally Posted by pitchinnate
Just to experiement I modified my php file that ran an exec command from a ping
There is no point in that I think - what you want is to repair your system.
I am no expert but from your output it would appear that there is something wrong with your PHP5.
G_BROKEN_FILENAMES => 1
_ => /usr/bin/php
Like till said you need to fix your php.ini files - something is not working as it should be.
Which one did you edit?
Commonly they can be is /etc/php5/ ... subdirectories.
Did you edit all of them?
If I was stuck like this, I would to get a new php.ini from your version in /var/cache/apt/archives.
Then I would compare all uncommented and decide which changes you have made and repair your working config like that.
Just as some advise for the future which I have learned the hard way - after you have installed your system as per one of the supported setups - try to stay away from the command line as much as possible.