LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   [OpenBSD 4.0] Mediawiki in chroot (https://www.linuxquestions.org/questions/%2Absd-17/%5Bopenbsd-4-0%5D-mediawiki-in-chroot-527414/)

noir911 02-10-2007 05:06 PM

[OpenBSD 4.0] Mediawiki in chroot
 
I'm getting this error & I understand that I need to symlink some file inside the chroot (/var/www) area but I'm not sure which file to be exact.


Quote:


Warning: dl() [function.dl]: Unable to load dynamic library '/var/www/lib/php/modules/mysql.so' - File not found in /mysite/mediawiki/install-utils.inc on line 17

Could not load MySQL driver! Please compile php --with-mysql or install the mysql.so module.


chort 02-10-2007 08:48 PM

It seems that you should be able to do:
Code:

# mkdir /var/www/var
# ln -s /var/www /var/www/var/www
# chgrp -R daemon /var/www/var


noir911 02-10-2007 10:39 PM

chort, thanks for your help.

I applied the changes but it doesn't work. My mediawiki is under /var/www/<mydomain>/mediawiki & "function.dl" is pointing to http://mydomain/mediawiki/config/function.dl.

I also don't have any entry for mediawiki in httpd.conf.

error_log shows nothing. access_log shows this -

Code:

[11/Feb/2007:15:38:15 +600] "GET /mediawiki/config/index.php HTTP/1.1" 200 2872

[11/Feb/2007:15:38:15 +600] "GET /mediawiki/skins/common/images/mediawiki.png HTTP/1.1" 304 -


chort 02-11-2007 01:23 AM

Well, to the point of the error message... are you sure that PHP is actually compiled with MySQL support?

Did you build PHP from Ports, or did you install the package? What's the output of
Code:

$ ls /var/db/pkg |grep php
?

noir911 02-11-2007 11:21 PM

php was build from packages at the time of installing mediawiki. Here's the output -

Quote:

# ls /var/db/pkg |grep php
php5-core-5.1.4p1
php5-gd-5.1.4
php5-mysql-5.1.4

# pkg_info | grep php
php5-core-5.1.4p1 server-side HTML-embedded scripting language
php5-gd-5.1.4 image manipulation extensions for php5
php5-mysql-5.1.4 mysql database access extensions for php5

what is noticed that if I get out of chroot mode mediawiki works fine. That is, if I do

apachectl stop
httpd -u
apachectl start

it works fine

chort 02-12-2007 12:58 PM

Actually, it occurred to me that symlinking may not work, since it's essentially rewriting the directory being looked for (which isn't going to exists inside the chroot). Or at least, I don't think it will work the way I posted it... It might work by making /var/www/var/www a symlink to / (since chroot is going to essentially make /var/www the new /).

I think that might be the answer. Try either:
Code:

# cd /var/www
# mkdir var
# ln -s ../../ var/www
OR
# cd /var/www
# mkdir var
# ln -s / var/www

One of those two should work I think :)


All times are GMT -5. The time now is 03:42 PM.