Bug #1318

Safe Mode and Caching Stylesheets

Added by Jesse Labrocca over 1 year ago. Updated over 1 year ago.

Status:Rejected Start date:11/20/2010
Priority:Normal Due date:
Assignee:- % Done:

0%

Category:Admin Control Panel
Target version:-
Reproducibility:Always Database Type:
Reported In MyBB Version:1.6.0 Database Version:
PHP Version: SQA assignments:
Browser:

Description

FYI I started to use MyBB 1.6 today. I'll be reporting all the bugs I find. So please don't complain about my sudden burst of bug reports. I've found many in 1.4x and I'm sure to find many in 1.6x. I use MyBB more extensively than anyone else. So I tend to find more bugs. And this is just as frustrating for me as it might be for you.

So this bug is related to code changes for safe_mode and the function cache_stylesheet() in ROOT/admin/inc/functions_themes.php. In that file when the functions to update the style are run and checks for file there is no similar check.

I was the guy who reported in 1.4x a problem with safe mode and caching in the cache/themes directory not working. Well a similar bug still exists.

The cache files are written directly into the /ROOT/cache/themes/ folder in a format such as 1_global.css. That's apparently working fine. However the actual writing into the DB is still wrong and will place into the table mybb_themes as dynamic such as css.php?stylesheet=9.

So while the cache file is written and does exist. The database is wrong and still delivering the content as dynamic.

I've only begun to investigate why and making this report immediately as the bug is legit.

History

#1 Updated by Ryan Gordon over 1 year ago

Even though this is a legitimate bug, it will likely not be fixed. Safe mode is depreciated in the latest versions of PHP (since 5.3.0) and since MyBB still works just fine in the condition that safe mode is on there really isn't a reason to fix this bug.

I understand that in your case having it being sent from the filesystem might be less intensive, but using safe mode it's not a good/permanent solution. You'll have to figure out a different method anyway as PHP 5.3+ is adopted.

If you really really really wanted to, you can easily manually update the css files on the filesystem and keep the database recorded pointed to the local file while still keeping safe mode on

#2 Updated by Jesse Labrocca over 1 year ago

So this is not a bug in 5.2x? Once I have all my mybb's updated to 1.6x I'll upgrade my php to 5.3.x

I would think the fix is simple enough to also check wherever the update occurs to mybb_themes since the files are already written. If I take the time to find exact code to change will this get fixed?

Doesn't seem fair that 5.2x isn't supported for this feature.

#3 Updated by hans krentel over 1 year ago

You can disable safe_mode in PHP 5.2 as well, so you can run your site under php 5.2 w/o running into this bug.

#4 Updated by Polar Bear over 1 year ago

Forgive me if I'm wrong but isn't PHP 5.2 no longer actively supported? Quoting from PHP.net; "All users of PHP 5.2 are encouraged to upgrade to PHP 5.3.". So surely fixing this bug would be unnecessary work as 5.2 will eventually disappear?

#5 Updated by Ryan Gordon over 1 year ago

PHP 5.2 is pretty new, there's no way it's unsupported yet. PHP 5.2 is probably on 90% of all hosts but that is arbitrary to this whole bug report. The problem is safe_mode, which is depreciated in PHP 5.3

#6 Updated by Tom Moore over 1 year ago

  • Status changed from New to Rejected

I can't reproduce this on the latest SVN version with safe mode on.

Also available in: Atom PDF