FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Plugins and Code Hacks » 2.5.0 RCx - Atomic theme rebuilds
Show: Today's Messages :: Unread Messages :: Show Polls :: Message Navigator
| Subscribe to topic | Bookmark topic 
Switch to threaded view of this topic Create a new topic Submit Reply
2.5.0 RCx - Atomic theme rebuilds [message #10866] Thu, 12 June 2003 11:39 Go to next message
Xodnizel   United States
Messages: 73
Registered: May 2003
Karma: 0
Member
add to buddy list
ignore all messages by this user
A diff file for compiler.inc. It's useful for me because I have to rebuild semi-often as I try out new designs, and the PHP cache I use will sometimes cache the page as it is being rebuilt(which also means someone has viewed the incomplete page), resulting in a truncated page.

362c362
< 	if (!($fp = fopen($dir.$dst, 'wb'))) {
---
> 	if (!($fp = fopen($dir.$dst."fudtmp", 'wb'))) {
366a367
> 	rename($dir.$dst."fudtmp",$dir.$dst);
467,468c468,470
< 	copy($GLOBALS['DATA_DIR'].'sql/'.__dbtype__.'/db.inc', $GLOBALS['DATA_DIR'].'src/db.inc.t');
< 	
---
> 	copy($GLOBALS['DATA_DIR'].'sql/'.__dbtype__.'/db.inc', $GLOBALS['DATA_DIR'].'src/db.inc.tfudtmp');
> 	rename($GLOBALS['DATA_DIR'].'src/db.inc.tfudtmp',$GLOBALS['DATA_DIR'].'src/db.inc.t');
> 
584,585c586,589
< 			if (!@copy($path, $nd) && !@file_exists($nd)) {
< 				echo 'cannot copy "'.$path.'" to "'.$nd.'"<br>';
---
> 			if(!@copy($path, $nd."fudtmp")) {
> 				echo 'cannot copy "'.$path.'" to "'.$nd.'fudtmp"<br>';
> 			} else if(!@rename($nd."fudtmp",$nd)) {
> 				echo 'cannot rename "'.$nd.'fudtmp" to "'.$nd.'"<br>';
Re: 2.5.0 RCx - Atomic theme rebuilds [message #10870 is a reply to message #10866] Thu, 12 June 2003 12:48 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
Using the rename() function until 4.3.3 is not entirely safe, because it'll fail to rename files across drives/partitions on linux. Therefor you must use copy + unlink.

FUDforum Core Developer
Re: 2.5.0 RCx - Atomic theme rebuilds [message #10885 is a reply to message #10870] Thu, 12 June 2003 13:21 Go to previous messageGo to next message
Xodnizel   United States
Messages: 73
Registered: May 2003
Karma: 0
Member
add to buddy list
ignore all messages by this user
It's just renaming files in the same directory, and not across different filesystems. I made a specific point to do it that way.
Re: 2.5.0 RCx - Atomic theme rebuilds [message #10887 is a reply to message #10885] Thu, 12 June 2003 13:22 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
Ok Smile Then you're safe, I just made a point to identify the issue for people who may be affected.

FUDforum Core Developer
Re: 2.5.0 RCx - Atomic theme rebuilds [message #10889 is a reply to message #10866] Thu, 12 June 2003 13:34 Go to previous messageGo to next message
Xodnizel   United States
Messages: 73
Registered: May 2003
Karma: 0
Member
add to buddy list
ignore all messages by this user
Hmm. I did some more testing, and that didn't fix my particular problem. There seems to be a bug in the cache software I'm using. It's truncating the output of the edit profile page near the time zone settings. The time zone variable(where it lists all time zones) is large, so maybe that's what's messing it up.
Re: 2.5.0 RCx - Atomic theme rebuilds [message #10891 is a reply to message #10889] Thu, 12 June 2003 13:36 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
I assume you are referring to PHP opcode cache? I am actually benchmarking the 4 prevalent php opcode caches atm so if you say that one may have issue please let me know. I would be quite interested at looking at the problem.

FUDforum Core Developer
Re: 2.5.0 RCx - Atomic theme rebuilds [message #10895 is a reply to message #10866] Thu, 12 June 2003 13:45 Go to previous messageGo to next message
Xodnizel   United States
Messages: 73
Registered: May 2003
Karma: 0
Member
add to buddy list
ignore all messages by this user
I was using PHP Accelerator 1.3.3r2, but it kept disabling itself and doing other bizarre things...

Right now I'm trying out turck mmcache 2.3.14. It seems to be a bit faster than PHP Accelerator(when PHPA was working), but...it's the one that's truncating the view/edit profile page. turck mmcache also provides some PHP functions that I had to edit the source code to disable(they interfaced with the internals of mmcache, and were available to all php scripts as far as I could see).
Re: 2.5.0 RCx - Atomic theme rebuilds [message #10897 is a reply to message #10895] Thu, 12 June 2003 13:50 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
add to buddy list
ignore all messages by this user
I use PHPA on this server and so far had no problems with it. Turks is a nice effort although I know of at least 2 crashes in the code and if you compile your PHP with --enable-debug you'd notice it leaks quite a bit of memory.

FUDforum Core Developer
Re: 2.5.0 RCx - Atomic theme rebuilds [message #11479 is a reply to message #10866] Mon, 30 June 2003 11:24 Go to previous message
webmedic is currently offline  webmedic   United States
Messages: 2
Registered: June 2003
Karma: 0
Junior Member
add to buddy list
ignore all messages by this user
Really I use mmcache locally. But also have apc. From what I had seen mmcache was by far the fastest of them. I have not had any issues that I know of. Have you checked the latest versions they may fix the issues you were having. It is up to 2.3.17 now.
Quick Reply
Formatting Tools:   
  Switch to threaded view of this topic Create a new topic
Previous Topic: Chinese(Japanese Korea.....) word segment
Next Topic: Postings - need to turn off posting count for one user
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Oct 21 08:21:31 EDT 2017

Total time taken to generate the page: 0.00747 seconds