Question: I'm trying to remove dollar signs and commas from my form input (for example, $1,000.00 => 1000.00)

I have the following following line in my before\_validation method in my model:

```
self.parents_mortgage = self.parents_mortgage.to_s.gsub!('$,','').to_i

```

This is causing any number to be put through to zero out. Is there something wrong with my syntax?

Answer: 
To ensure your error reporting level is the same across environments, you can set it in your application using [`error_reporting()`](http://php.net/manual/en/function.error-reporting.php) and [`ini_set('display_errors', 1)`](http://php.net/manual/en/function.ini-set.php)

Also check your .php files for any whitespace before the opening tag and after the closing tag.

In addition to the points mentioned above, ensure you are not outputting anything before the headers are set, for example the following code would produce an error similar to the one you are receiving:

```
echo 'Hello, World';
header('Location: http://www.somesite.com');

```
The error states: `output started at /path/to/geeklog/public_html/blabla.php:581`, so I would start there. You need to send all headers before outputting anything, this includes whitespace as mentioned by others here.