Getting the dependancies right:
$ yum install libxml2-devel openssl-devel curl-devel \
bzip2-devel libmcrypt-devel readline-devel \
libxslt-devel httpd-devel
Compiling a new PHP version:
$ phpbrew update
$ phpbrew known
$ phpbrew install 5.4.38 +default +mysql +pdo +mcrypt +pcre \
+soap +sockets +xmlrpc +zlib +apxs2=/usr/bin/apxs +openssl=/usr \
-- --with-libdir=lib64
Works like a charm! What Fedora version are you on?
Thanks a lot for publishing your method, it saved me plenty of time :).