Categories
WordPress

WordPress Multiuser 0.1

The very first release of WPMU, WordPress Multi User, is out now and is available for download!
It’s the software the runs this site. It’s a version of WordPress that uses Smarty for templating support and multiple blogs can be runs from the same install!
This version does not have any kind of registration page to create new blogs, but if you pay attention it should be relatively easy to create new blogs.
Play with it, break it, tell me about it!

Comments

comments

By Donncha

Donncha Ó Caoimh is a software developer at Automattic and WordPress plugin developer. He posts photos at In Photos and can also be found on Google+ and Twitter.

19 replies on “WordPress Multiuser 0.1”

WordPressμ

WordPressμ è la versione multi-utente di WordPress creata da Donncha O Caoimh per ospitare più weblog WP sulla stessa installazione.

La versione 0.1 di WordPressμ è funzionante, ma come dice il numero di versione è ancora sperimentale.

Thanks PerS – I have that fixed now, use “SCRIPT_NAME” instead of “REQUEST_URI”:
$url = "http://".$_SERVER["SERVER_NAME"] . dirname( $_SERVER[ "SCRIPT_NAME" ] );
$base = dirname( $_SERVER["SCRIPT_NAME"] );

(Don’t forget to rewrite the ” chacters above as real SHIFT-2 characters, otherwise you’ll get hi-ascii in your code!)

I haven’t managed to get it up and running yet. It might be an issue with my server config (a plesk 7 with RedHat 7). I get:

[Mon Oct 04 14:17:45 2004] [error] [client 80.212.232.178] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

Any idea what’s causing this?

I managed to fix that error earlier – add this to wpmu/.htaccess above line 17:
rewritecond %{REQUEST_URI} !index\.php
It should appear above the following two lines:
RewriteCond /var/www/wpmu/blogs/%{1} -d
RewriteRule ^(.+[^/])$ URL/$1/ [R,L]

Before you change the .htacess file, go to
http://yourdomain/wpmu/index.php and you’ll see it redirect to index.php/ – that’s what caused the redirection error. There’s still an error if you go to wpmu/wp-admin/ but if you go to wpmu/main/wp-admin/ it’s fine.
Version 0.1.1 is likely in a day or two!

That of course only solves for index.php – here’s a more detailed look at the problem but it’s not exactly what’s wrong.
I Just found out that the order of parameters to RewriteCond matters.
RewriteCond -d /realpath/htdocs/blogs/%{1}
is different to
RewriteCond /realpath/htdocs/blogs/%{1} -d
Putting in the former seems to have stopped all loops.

0.1.1 installed without any problems 🙂

The admin inferface works fine (so far), but when I try to access the site I get a some smarty errors:

Warning: Smarty error: problem writing temporary file './wp-blogs/main/smartycache/bd3ddb56dec42681717db83324ed6a5f/%%200/%%2001463753/4161e901cc327' in /PATH/httpdocs/wpmu/wp-inst/Smarty.class.php on line 1042

Warning: Smarty error: problem writing temporary file './wp-blogs/main/templates_c/%%200/%%2001463753/4161e901c74c9' in /PATH/httpdocs/wpmu/wp-inst/Smarty.class.php on line 1042

Warning: touch(): Unable to create file ./wp-blogs/main/templates_c/%%200/%%2001463753/index.html.php because No such file or directory in /PATH/httpdocs/wpmu/wp-inst/Smarty.class.php on line 1575

Warning: fetch(./wp-blogs/main/templates_c/%%200/%%2001463753/index.html.php): failed to open stream: No such file or directory in /PATH/httpdocs/wpmu/wp-inst/Smarty.class.php on line 1164

Warning: fetch(): Failed opening './wp-blogs/main/templates_c/%%200/%%2001463753/index.html.php' for inclusion (include_path='.:/usr/share/pear') in /PATH/httpdocs/wpmu/wp-inst/Smarty.class.php on line 1164

PerS – that’s a really strange error, obviously fixed by Jeff’s solution, just make them writeable. I never came across that because the installer creates those directories. Can you list those directories and email that to me at donncha_@_linux.ie – remove the underscores of course!

I found a “fix”, I modified Smarty.class.php, setting $use_sub_dirs to false:

/**
* This tells Smarty whether or not to use sub dirs in the cache/ and
* templates_c/ directories. sub directories better organized, but
* may not work well with PHP safe mode enabled.
*
* @var boolean
*
*/
var $use_sub_dirs = false;

I think I found the solution to the problem, it’s related to PHP open_basedir and Plesk. Here’s how I solved it:

Place this information in
/home/httpd/vhost/DOMAIN/conf/vhost.conf:


php_admin_value open_basedir none


Replace DOMAIN with your domain dir.

Now wpmu 0.1.1 works out ot the box 🙂

[repost, please ignore the privious one]

I think I found the solution to the problem, it’s related to PHP open_basedir and Plesk. Here’s how I solved it:

Place this information in
/home/httpd/vhost/DOMAIN/conf/vhost.conf:

<Directory /home/httpd/vhosts/DOMAIN/httpdocs>
php_admin_value open_basedir none
</Directory>

Replace DOMAIN with your domain dir.

Now wpmu 0.1.1 works out ot the box 🙂

Congrats on the release, Donncha. I don’t suppose you would like some help with the Smartification of WordPress. That’s how I first heard about your project, reading something (Photo)Matt wrote about Smarty. I started using WordPress recently, and I have been itching to add Smarty support since I first tried to hack the index.php.

‘Course I’d like help with the project! I’m waiting for it to be put into WordPress CVS first or I might spin it off as a seperate project – I don’t know yet, and this is the speculation of an idle mind at 7am in the morning!

Jeff – you just found one of the problems with tracking the bleeding edge .. bugs creep in. It’s been fixed since so posting comments should work again!
Just had to fix a minor bug actually, thanks for spotting it! 🙂

WordPress with Smarty, finally! But I’m having some problems installing it. After the install when accessing the yourwebsite/wpmu/ it gives a 403 forbidden on yoursite/wpmu/blogs/main/. What could be causing this?

Leave a Reply to Mark Cancel reply