I think the file you downloaded and tried to install was a gzipped tar file and not actually a Slackware package. Slackware packages do have the extension .tgz but have a specific structure and don't generally install to the root directory.
This will happen if you try to installpkg a file that is not a Slackware package and it
will mess your system up. All Slackware packages are .tgz's but not all .tgz's are Slackware packages !
You have a source tarball that you need to extract and install following the instructions
on the PHP site here.
I'm afraid I know nothing of Pear/PHP but the instructions seem explanatory.
Just be sure a package is a Slackware package before installing it !