Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: [SMARTY] PHP5 oddity
On Tue, Aug 24, 2004 at 05:53:44PM +0100, Marcus Bointon wrote:
> This is probably down to configuration, but I'm having an odd problem that
 I
> can't explain.
>
> When I run a script that's extremely simple (creates a smarty instance,
> assigns 4 vars with immediate data, and displays a fixed template with 1
> smarty tag that's using a plugin I'm working on), I get these errors:
>
> Warning: preg_match() [function.preg-match]: Compilation failed: nothing t
o
> repeat at offset 16 in /var/www/php/includes/Smarty_Compiler.class.php on
> line 402
>
> Fatal error: Smarty error: [in t.tpl line 8]: syntax error: unrecognized
> tag: translation id="abc" t="hello" (Smarty_Compiler.class.php, line 403) 
in
> /var/www/php/includes/Smarty.class.php on line 1102
>
> translation is the plugin I'm working on, it's in the plugins folder,
> amongst all the others, with identical permissions and ownership.
>
> At this point it sounds like something simple like my include path is set
> wrong (which is isn't), but here comes the twist: it works perfectly if I
> run it from a command line, using the same compiled version of PHP 5.0.1. 
It
> also works fine on a different server with PHP 4.3.8. It's not just the
> fatal error that doesn't appear, the warning doesn't either, which makes m
e
> suspect it.
>
> Any ideas?

to me it looks like the constructor of Smarty_Compiler doesn't get
called.

maybe there is some ini-setting that tells ZE2 only to use the new
__construct() and not the old php4 constructor?


> Marcus
> --
> Marcus Bointon
> Synchromedia Limited: Putting you in the picture
> marcus@synchromedia.co.uk | http://www.synchromedia.co.uk
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php

Report this thread to moderator Post Follow-up to this message
Old Post
Messju Mohr
08-25-04 02:02 PM


Re: [SMARTY] PHP5 oddity
on 25/8/04 11:15, messju mohr at messju@lammfellpuschen.de wrote:

> to me it looks like the constructor of Smarty_Compiler doesn't get
> called.
>
> maybe there is some ini-setting that tells ZE2 only to use the new
> __construct() and not the old php4 constructor?

Then why would it work from CLI which is using the same ini file?

PHP5 is meant to fall back to using PHP4 constructors - it would be a major
BC break if they didn't.

Marcus
--
Marcus Bointon
Synchromedia Limited: Putting you in the picture
marcus@synchromedia.co.uk | http://www.synchromedia.co.uk

Report this thread to moderator Post Follow-up to this message
Old Post
Marcus Bointon
08-25-04 08:59 PM


Re: [SMARTY] PHP5 oddity
--- messju mohr <messju@lammfellpuschen.de> wrote:
> On Tue, Aug 24, 2004 at 05:53:44PM +0100, Marcus Bointon wrote: 
> problem that I 
> instance, 
> with 1 
> errors: 
> nothing to 
> /var/www/php/includes/Smarty_Compiler.class.php on 
> unrecognized 
> line 403) in 
> folder, 
> is set 
> perfectly if I 
> 5.0.1. It 
> the 
> makes me 

It sounds to me like the PHP binary is borked or that you haven't
installed PHP5 correctly. Note that running in CLI/CGI/SAPI does not
equate to the same PHP binary (and further, running in CLI vs CGI/SAPI
also has different effects on your CWD -- try absolute paths when
testing your setup). Either that or your webserver just hates PHP5.

xo boots

Report this thread to moderator Post Follow-up to this message
Old Post
Boots
08-25-04 08:59 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

PHP Smarty Templates archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 04:55 PM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.