The command line PHP and PHP module for apache are independent. You need to upgrade the php module apache is using. Remember to restart Apache after upgrading the PHP module.
Just a note:
I have several ez3 site running with PHP 4.2.2.
They SEEM to work fine, but they are just used for testing, not in production.
There is at least one bug, that is related to PHP 4.2.2 (according to ezSystems): http://ez.no/developer/ez_publish_3/forum/general/class_edit_not_working_3_2_4_3_2_x_critical#msg42195
That means: For testing a bit and maybe developing, it might work for you, but you shouldnt set up a production site with it.