Problems Installing Apache,PHP,MySQL on OpenBSD 4.2
11 02 2008I knew it, OpenBSD is sooooo not user-friendly. Installing and running Apache, PHP, and MySQL on it is such a pain in the ass. Here are some problems I encountered and the solution when I installed AMP on OpenBSD 4.2:
- When I installed MySQL using pkg_add mysql, the installation stopped with error can not find some libraries such as intl3.0. I found out that this errors were caused by the unmatched version of my OpenBSD and the package. I checked my system using “uname -a” and it showed that the version I used was OpenBSD 4.2-current. While the packages in the port tree is for the stable one. So you can do two things to fix this: 1. Install MySQL using port. 2. You search the library in your system that has the same name but different version with the one that is considered missing, then you link them using: “ln -s /usr/lib/somelibrary.42.so /usr/lib/somelibrary.needed-version.so”. For example, “ln -s /usr/local/lib/intl4.0.so /usr/local/lib/intl3.0.so”. (Note: it’s just an example, I forgot what library was missing :p )
- PhpMyAdmin can not connect to MySQL server even though all setting is right. Solution: Make sure your MySQL server is running, then try changing ‘localhost’ to ‘127.0.0.1′ in <PhpMyAdmin_directory>/config.inc.php.
- Error in PhpMyAdmin something about blowfish. Solution: fill the value of ” $cfg['blowfish_secret'] = ‘<WHAT_EVER_YOU_LIKE>’;” in <PhpMyAdmin_directory>/config.inc.php.
- Can not run cgi-script even though you have followed all directions you got from apache documentation. It keeps giving me errors: Premature end of script headers and Can not found the script. This could be cause by several things such as wrong syntax in cgi-script, uncomplete path, or Windows line-end (there is a different between line end in Windows system and Unix system), look for it on google to find more information
I have tried all the solutions but still didn’t work. But then I found out one more thing that can cause that error: My apache was running on chroot mode. So all you have to do is run apache without chroot mode using: “httpd -u”. Or, if you want you could try this or recompile the apache like this to run cgi-script under chroot mode. This f**king chroot has driven me crazy (pardon my language, it’s just that this goddamn chroot had wasted my precious holiday time)
Note: Someday I’ll edit this post again to mention the real complete error log ![]()
Comments : 1 Comment »
Categories : Unix, blast of expression!!, i just knew that...






Recent Comments