List Info

Thread: problems after upgrading to php5




problems after upgrading to php5
user name
2007-10-19 13:25:01
I have a website that uses smarty that I've inherited.

I just moved it to a new server with PHP5 (up from PHP4 on
the old server).
I upgraded smarty to the latest thinking there may be an
issue running an
old ver of smarty with PHP5 but no luck.

Now I'm getting weird behavior from Smarty when it creates
the pages.

Codes like this:

<table width="100%" cellpadding="0"
cellspacing="0"
class="loggedin"><tr><td>
{if $employee}
{assign var="en" value=$employee->name|escape}
{$lng.logged|string_format:$en}  <---- PROBLEM IS HERE
[<a href="messages.php"><b>{if
$unread}<font
color="red">{/if}{$lng.unread_messages}{$unread
}{if
$unread}</font>{/if}</b></a>]
</td><td align="right"><a
href="logout.php"><b>{$lng.logout}</b&
gt;</a>

{if $new_pass}
{$lng.enter_new_password}

{$lng.not_logged}
{/if}
{/if}
</td></tr></table>

No longer seems to work.  I'm very new to Smarty but I think
it has to do
with the 'string_format:' part.

The $lng.logged variable is coming from an ini file parsed
by the PHP
parse_ini_file() function.
In that file $lng.logged = "<b>%s</b>, is
currently logged on"

Error reporting is turned on in php.ini but no errors are
reported.

Any ideas where things are going wrong or where I should
look? 

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


Re: problems after upgrading to php5
user name
2007-10-23 09:19:49
Jeff Mckeon wrote:
> I have a website that uses smarty that I've inherited.
> 
> I just moved it to a new server with PHP5 (up from PHP4
on the old server).
> I upgraded smarty to the latest thinking there may be
an issue running an
> old ver of smarty with PHP5 but no luck.
> 
> Now I'm getting weird behavior from Smarty when it
creates the pages.
> [snip]
> Any ideas where things are going wrong or where I
should look? 

Are you sure the errors are coming from smarty? One
frustrating error I
found in when migrating php4 to php5 involved class files.
If you define
the same class variable twice under php5, the script fails
without
error. PHP4 forgives this error so you wouldn't see any
problem before
migration.

Roberto

-- 
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )