Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Email attachment error
  • Hi I'm generating a PDF invoice and attaching it to an email. It all works fine locally, but when I put it on the staging server it's getting corrupted. The PDF is being generated correctly (it saves to a temp folder for me to check), but when it gets attached it looks like slashes are being added to it when it gets attached. Is this a server config I can overwrite in the email config settings? Or does anyone have any other solutions? Thanks
    Steve
  • You server doesn't have magic quotes activated? It should always be off on aPHP 5.3+ install.
  • Yes, it's on shared server and I can't overwrite with a htaccess either :( Thanks, sometimes the simplest things right before your eyes get missed!
  • Shoot your hoster...
    This feature has been DEPRECATED as of PHP 5.3.0 and REMOVED as of PHP 5.4.0.
    http://php.net/manual/en/security.magicquotes.php There is no reason to use magic quotes because they are no longer a supported part of PHP. However, they did exist and did help a few beginners blissfully and unknowingly write better (more secure) code. But, when dealing with code that relies upon this behavior it's better to update the code instead of turning magic quotes on. So why did this feature exist? Simple, to help prevent SQL Injection. Today developers are better aware of security and end up using database specific escaping mechanisms and/or prepared statements instead of relying upon features like magical quotes.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion