The MU forums have moved to WordPress.org

problem with WP MU and safe mode, PHP 5.2.5 (3 posts)

  1. Radja
    Member
    Posted 16 years ago #

    Hello, I came across one bug (problem) in WP MU 1.2.3 and it is still present in WP MU 1.3.

    When my hosting provider upgraded to PHP 5.2.5 (and has safe mod ON) WP MU stopped to create new directoris for blog users.
    the problem is that PHP function mkdir will create directory: '/home/benge/photos/gallery1/extra_large' but won't create '/home/benge/photos/gallery1/extra_large/' because of the trailing slash ('/') at the end.

    unfortunetelly WP MU has defined UPLOADS (upload director for users) as this in file (/wp-settings.php):

    if( !defined( "UPLOADS" ) )
    	define( "UPLOADS", "wp-content/blogs.dir/{$wpdb->blogid}/files/" );

    see the trailing slash at the end - this cause that with safe mode WP MU refuse to create new directories.

    Is this problem of WP MU only, or is it problem of WP single user generally? Should I post it to the TRAC of WP of WP MU?

  2. theapparatus
    Member
    Posted 16 years ago #

    Considering that the trailing slash is the correct method of defining a directory, I'd call it more of a problem with safe mode. Technically without the trailing slash, it should be a file.

    You're going to have other problems with safe mode. It's actually recommended turning it off.

  3. Radja
    Member
    Posted 16 years ago #

    I would not agree. I was running WP MU 1.2.3 on 32 system with safe mode ON and without problems.
    Problem appeared right after upgrade. I forgot to say, it is 64 bit system that with php 5.2.5 and safe mode this probably cause that DIRs are not creating.....

    but I think that WP MU (or WP) code should be written as far as possible to be compatible with almost all possible configurations of server, php etc.

    on some webhosting services you do not have possibility to turn safe mode OFF

About this Topic