That's bad. Looks more like a gcc incompatibility then anything else. Perhaps you are using one version of gcc which won't work with the program that you are trying to compile. I can see that you are using Slackware 9.0 as me. Get the pre-compiled packages from www.slackware.com/getslack
for Apache, ssl, php and mysql. I started learning php yesterday and everything is working in a perfect harmony with a painless installation. If you are willing to use a newer version of those packages, then you may want to use Slack 9.1 packages instead.
Side Note: I've tried to upgrade Apache, mysql and php with swaret, and they all got broken...