I got it fixed, thank you for the help and direction. I removed libjpeg version 8, and recompiled. This fixed my issue with WordPress. I can now upload and edit jpeg files in WordPress. However, vBulletin still gave me issues.
So I installed Imagemagick, and now vBulletin works great again.
I am now really sure if this was the correct way to really do it, but it works. Oh that example with the test.php now outputs correctly.
I think we are set. Again, thank you for your time.
I didn't recompile PHP after installing Imagemagic, but it works. I wasn't really sure if I had or should do that.