Skip to content

Remove .php from URL

Ubuntu 14.04LTS 32bit LAMP I know it’s an old question but.. I need it to remove .php anywhere it finds it from the visible url. It needs to work with /showthread.php?id=XX —> /showthread?id=XX …

ZF2 Doctrine2 repository result as array

I have the problem, that I have two controllers. One is a restful controller which only handles json data and returns a JsonModel, and the other one is a default controller which returns a ViewModel Now I have the problem, that my method only returns an array of entities, which is correct for the default cont…

SQLite3 (PHP Fatal error: Call to a member function exec())

I’ve been innstall and add conf: I have installed the necessary components and added to the configuration file line, maybe in php.ini need to add something? Answer Unless Im missing something your protected $_db may never get set so you cannot call exec() on null. It will never get set if this does not …

Decode JSON after POST in textarea

I am having an issue decoding a JSON string with PHP and I’m pretty sure I know what is causing it, but not sure how to fix it. I am putting an array that I convert to JSON into a hidden textarea and …

Laravel 5 and PHPMailer

Does anybody have a working example how I can work with PHPMailer in Laravel 5? In Laravel 4 it was quiet simple to use but the same method doesn’t work in L5. Here it is what I did in L4: Added in …

How to get Doctrine to log queries in Symfony2

I’m pretty new to Symfony2, and I’m looking for a way to log SQL queries (including timings) to the same log file as the rest of my application. From what I can determine from the documentation this should all work out of the box, but after a few hours of trying I can’t figure out what I&#82…