[3115] A bug in Subs-List.php?

Started by Keeper, June 11, 2008, 05:29:53 AM

Previous topic - Next topic

Keeper

Every time I try to access my SMF 2.0 beta 3.1 admin panel's Edit Membergroups page, I receive a white blank page and error log reports these errors;
Quote
http://www..../forums/smf2beta/index.php?action=admin;area=membergroups;sesc
Apply Filter: Only show the errors with the same message
2: createList(Subs-Membergroups.php) [<a href='function.createList'>function.createList</a>]: failed to open stream: Operation not permitted
Apply Filter: Only show the errors from this file
File: /var/www/.../httpdocs/forums/smf2beta/Sources/Subs-List.php
Line: 113
Quote
http://www.../forums/smf2beta/index.php?action=admin;area=membergroups;sesc
Apply Filter: Only show the errors with the same message
2: createList() [<a href='function.createList'>function.createList</a>]: open_basedir restriction in effect. File(/Subs-Membergroups.php) is not within the allowed path(s): (/var/www/.../httpdocs:/tmp)
Apply Filter: Only show the errors from this file
File: /var/www/.../httpdocs/forums/smf2beta/Sources/Subs-List.php
Line: 113

Edit Membergroups page is the only page that doesn't work. PHP safemode is indeed enabled as you probably figured out from the open basedir error. SMF 2.0 beta 3.1 sources have not been modified.

Oldiesmann

Double-check the permissions of Subs-Membergroups.php. There seems to be a problem with that specific file.

Keeper

The file's permissions are set to 644, same as (almost) everything else. It makes no difference if I set it to 777.

H

Hi Keeper, I'm going through some old topics. Did you manage to resolve this?

Certainly looks to me like something safe mode may be causing although I'm unsure what the best way of getting around it would be.
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

Keeper

Safe mode has since been disabled and it didn't solve the problem. Error message however remains identical.

Juan Carlos

I have exactly the same error, any help?
Juan Carlos

H

What is the open_basedir setting? You can find out with phpmyadmin. See: What is phpMyAdmin?
-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

metallica48423

i thought open_basedir was a PHP directive and was on phpinfo.php (What is phpinfo.php?)?
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

H

-H
Former Support Team Lead
                              I recommend:
Namecheap (domains)
Fastmail (e-mail)
Linode (VPS)
                             

Keeper

The basedir setting was in the second error message, not whole but should be enough.
Quote
(/var/www/.../httpdocs:/tmp)

Rumbaar

I notice you server path is /var/www/.../httpdocs/forums/ but the tmp path is /var/www/.../httpdocs:/tmp.  The httpdocs folder is different.  I'm not sure if this is the issue?
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Juan Carlos

some solution to this? I can not acces to group members
Juan Carlos

Rumbaar

So it wasn't an issue with the two different base paths?
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Juan Carlos

Sorry, maybe I do not understand.
Can you can explain how to solve it?

Attached is my error

Thank you
Juan Carlos

Rumbaar

See the open_basedir error is returning from:
/var/www/vhosts/cuatrocuatro.com/httpdocs:/usr/share/pear:/tmp
and your base folder is
/var/www/vhosts/cuatrocuatro.com/httpdocs/

You might have to alter your php.ini file to correct the issue.
This thread might help: Succesfully installed mods don\'t show up, "open_basedir restriction" error but there are number of search entries that might offer additional assistance.
"An important reward for a job well done is a personal sense of worthwhile achievement."

[ Themes ]

Juan Carlos

Juan Carlos

Keeper

#16
This bug still persists in SMF 2.0 RC1. Here's what our server admin had to say about it.

Quote
I couldn't get it working at all by manipulating open_basedir, except for disabling it completely.  I could only ever get it to work fully by adding smf2betapath/Sources/ to the include_path.  However, after looking at it all closer I am sure that it's a bug in the SMF code.  The file in question is the only one which is referenced that way, with all other similar loading using the full path to the file.  I just went ahead and changed to PHP to fix the problem and reverted all of the config changes to be like they were, since it is obvious that it's a bug in the forum code that's at fault.  Please check it over to be sure that it is all working though.

The PHP changes in question consisted of changing two instances of this:
'file' => 'Subs-Membergroups.php',
to this:
'file' => $sourcedir . '/Subs-Membergroups.php',
in ManageMembergroups.php.

This makes it match how it works everywhere else in the code that I could find.

Please fix this bug before SMF 2.0 goes final. Thanks.

metallica48423

Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you
Search
Settings Repair Tool

karlbenson

Indeed to me this appears to be an smf bug, and not openbase dir related.

Added to bugtracker with unified diff patch. (different fix from suggested above)
http://dev.simplemachines.org/mantis/view.php?id=3115

You might want to thank your server admin for doing all the debugging for us :) Always appreciated.

karlbenson

Fixed in the svn, so will be in the next 2.0 release (rc2?)

! Sourcedir is needed before calling those files (ManageMembergroups.php) [Bug 3115]

Advertisement: