Litecoin daemon is not responding to API calls
First add this line to litecoin.conf

rpcallowip=127.0.0.1


Then make sure you've added the litecoin command to your path

sudo cp litecoind /usr/bin/litecoind


and that your starting the litecoin daemon

litecoind -daemon


and test with 

litecoind getinfo


if all that works then JSON RPC should work fine. 

If none of that works try setting up the client by following this guide.

Also make sure your username and password are consistent across your PHP and litecoin.conf because they aren't in your example.