|
View:
New views
3 Messages
—
Rating Filter:
Alert me
|
|
|
problems after upgrading to php5I 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></a> {else} {if $new_pass} {$lng.enter_new_password} {else} {$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 php5Jeff 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 |
|
|
Re: problems after upgrading to php5Jeff Mckeon wrote:
> Error reporting is turned on in php.ini but no errors are reported. In addition to what Roberto writes: What do you see? Something or nothing (white page, with nothing in 'page source')? The Smarty people insist that Smarty has proper error reporting, however I experience white page without 'page source' in several situation - a) Check the permissions of the template folder/files and the permissions of the templates_c/cache folders, the web server should be able to read/write there. b) It helps sometimes to clean up cache/templates_c. c) Not properly closing certain Smarty tags, like {strip}, {if} - your example has several {if}s. Perhaps if you are more specific with what exactly happens, you will get more help. Iv -- Smarty General Mailing List (http://smarty.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php |
| Free Forum Powered by Nabble | Forum Help |