|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
andig Smarty Regular
Joined: 22 Apr 2004 Posts: 48
|
Posted: Thu Apr 22, 2004 2:57 pm Post subject: PHP5 & Apache2 crash with Smarty 2.6.2 on Windows |
|
|
I've found that asmarty crashes apache2, probably due to a php issue with the following code (WinXP):
<?php
include './\test.php';
?>
The problem is the filename in the include statement. In my case, the _get_auto_filename function produces a filename like './cache/smarty\list.tpl', as the DIR separator is \
I think that it is a php bug that such a filename leads to a crash, but I'd prefer if smarty could generate better filenames?
Appending / to the smarty config variable does not help, the filename is then './cache/smarty/\list.tpl', which still crashes apache...
Any ideas?
Thanks,
Andi
Cheers,
Andi |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Thu Apr 22, 2004 4:48 pm Post subject: |
|
|
When you define your directories, try using the usual windows separators. If you are writing portable scripts, then use DIRECTORY_SEPARATOR (I know it is ugly--but it is safe).
See if you can verify if this is a PHP bug (try it without Smarty) and if so, perhaps report it at http://bugs.php.net. |
|
Back to top |
|
andig Smarty Regular
Joined: 22 Apr 2004 Posts: 48
|
Posted: Fri Apr 23, 2004 12:42 pm Post subject: |
|
|
I'm pretty sure it's a php bug:
http://bugs.php.net/bug.php?id=28108
but thought the smarty code might work around this. But I think you're right- I should be using DIR_SEP.
Thanks,
Andi |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Fri Apr 23, 2004 8:11 pm Post subject: |
|
|
FWIW, DIR_SEP is deprecated, so you should consider using DIRECTORY_SEPARATOR. |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|