Categories > TinyButStrong general >

PHP 5 problems

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Preben
Date: 2009-10-01
Time: 23:17

PHP 5 problems

Hi

I have a site working with tbs and php4. Now I'm about to change to a php5 server and renamed the file tbs_class_php5.php to tbs_class.php and used that instead. However after loading the template it doesn't work.

Some of the sites work, but when loading the template with listings (Merge) of an array the site seem to fail. It's hard to say what causes the error. I set the php error_reporting value to 2047, and nothing is printed.

Is there anything I'm forgetting to get the site working in php5?


Best regards,
Preben
By: Skrol29
Date: 2009-10-02
Time: 14:01

Re: PHP 5 problems

Hi Preben,

Thta is strange, no problem has been reported yet for the PHP 5 version of TBS. The PHP 5 version is produced by an automatic conversion process.

When nothing is printed with TBS, it is often when an error has occurred during a subtemplate merging. Otherwise an error should be printed. Your error may be there.

Otherwise, can you precise which PHP version you have?




By: TomH
Date: 2009-10-02
Time: 20:54

Re: PHP 5 problems

Hi
That's a problem that happens to me once in a while also -- but it's not ever a PHP4/PHP5 problem (default error reporting for PHP5 is different though)

Usually it's my db connection or query. To suss it out, I do some exta code in the php page and use a simpler template to view my db results to be sure I'm getting the expected results

Something like (untested code)...
$query = mysql_query("select id,mfg_id,name,address,city,state,phone from mfgs");
$row = mysql_fetch_array($query);
// show a full row of db info and to check field names match template
echo $showme = print_r($row, true);
// and any mysql error info
echo Mysql_error();

Hope that gives some ideas for debugging,
TomH