I encountered a bunch of problems getting drupal going on a FreeBSD box today and wanted to share with everyone the information I found. The problems weren't with drupal, but, were with php and mysql.
I built a new FreeBSD 5.4-RELEASE based webserver and installed apache2, php5, and mysql4 and drupal using the tarball from the drupal.org website (they haven't revved to 4.6.1 in the ports collection yet). I started getting all kinds of PHP errors, blank pages, etc.
Here are the items I had to install to get Drupal to work correctly:
www/apache-2.0.54
databases/mysql-server-4.1.12
www/mod_php5-5.0.4_2,1
www/php5-session-5.0.4_2
devel/php5-pcre-5.0.4_2 (this might rely on devel/pcre)
Once I got all of those pieces installed and up and running without error, drupal started working. Most "normal" php installations include the session and pcre pieces apparently... but FreeBSD has split them out. If you start getting random white pages or these errors either on your browser or in your http error logs...
Call to undefined function session_set_save_handler() in /usr/local/www/recompiled/includes/session.inc on line 9
Call to undefined function: preg_replace() in /usr/local/www/(...)Good luck everyone!
Comments
FreeBSD and AMP
I run the same as you but I haven't switched to php5 yet. That probably saves me a lot of problem with other php-apps which I need.
Maybe it is easier to get Drupal running with php4. Just remember to also install php4-extensions.
Everything can be found in the ports collection which together with some nifty tools make it a breeze to keep all your apps updated. I used RH earlier and the dependencies drove me sometimes up the walls.
php4
For my install I added :
php4-session-4.4.0
php4-xml-4.4.0
Thanks for sharing...
I was breaking my head to make it work, till I found this page with the info you guys posted.
THANK YOU!!!!!!!
Now drupal is up and running on my FreeBSD box! :D
Thank you!
I just wanted to mention that Suse also has the php sessions broken out from the main php package. When I installed both packages, everything (finally) worked. Thank you for posting this!
Blank pages "sometimes"?
Hi
I run php4 with apache2 on bsd 5.1. Lot's of ram free, php limit set to 30, the correct php extensions (like for ex session, iconv, mbstring,pcre,mysql and others).
If i open drupal pages, they mostly work but often come up blank. Hence refreshing that blank page 2 or 3 times and the page shows up correctly...
Any idea what could caus this?
thx in advance
What theme do you use?
What theme do you use?
installation tips for FreeBSD
Very Nice Post. You've saved me hours of searching.
One slight note that I failed to realize after a late night of code.
After installing the updates suggested above. Restart Apache first before testing scripts.
I installed the session and pcre and session for php5 and my script would run off the command line but fail
in apache for the original fatal error. It took me a bit to realize I failed to restart apache and then everything works fine.
Thanks again for this post it saved me.