Doing a ubuntu release upgrade is possible as well, but it is a lot of work as ubuntu 12.04 comes with apache 2.4, which uses a different config syntax. so you might have to fix some website config after such an upgrade. So better try the option with the custom php version first.

i know that i have made the file because once that was done i was able to do the following

vi /de.archive.ubuntu.com_ubuntu_dists_karmic_main_source_Sources

and the file opened .. i then closed it

:q

then i changed directories
cd /usr/local/src/php5-build/php-5.6.0/

then run command

apt-get build-dep php5
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Could not open file /var/lib/apt/lists/de.archive.ubuntu.com_ubuntu_dists_karmic_restricted_source_Sources - open (2: No such file or directory)

i also tried to check the permissions of the file and it can not be found..
/var/lib/apt/lists# ls -l de.archive.ubuntu.com_ubuntu_dists_karmic_restricted_source_Sources
ls: cannot access de.archive.ubuntu.com_ubuntu_dists_karmic_restricted_source_Sources: No such file or directory