Yes , that is absolutely possible .just download php and curl from cydia and you're done .Instead of apache download lighttpd and lighttpd sbs toggle because you need a conf file and the toggle automatically creates it and the /var/www folder, and the log files .
Tested on iPad 1st gen running IOS 4.2.1 and iPhone 4th gen running IOS 4.2.1 .Both devices where jail broken with greenpois0n rc6
Hope this helps you
P.S I forgotten the most important step of all ... All the above won't work because you need libssh2 which can be found at this cydia repo : "http://boococky.hostei.com/cydia/"