You should copy the php.ini used by Apache mod_php then add the eaccelerator configuration.
From command line do "./lsphp4 -v" to make sure there is no error message complaining failed to load eaccelerator.so
You can try removing "extension_dir" configuration in php.ini.