2.5.0 RCx - Atomic theme rebuilds [message #10866] |
Thu, 12 June 2003 15:39 |
|
Xodnizel
Messages: 73 Registered: May 2003
Karma: 0
|
Member |
|
|
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 16:48 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
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 #10891 is a reply to message #10889] |
Thu, 12 June 2003 17:36 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
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 #10897 is a reply to message #10895] |
Thu, 12 June 2003 17:50 |
Ilia
Messages: 13241 Registered: January 2002
Karma: 0
|
Senior Member Administrator Core Developer |
|
|
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 15:24 |
webmedic
Messages: 2 Registered: June 2003
Karma: 0
|
Junior Member |
|
|
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.
|
|
|