500 Error After Moving Code To New Server

46 views Asked by At

I recently moved my code to a new server with Debian 10 and PHP 7.3.19. The old server had Ubuntu 16.04.15 and PHP 7.0.33. As a result, I am now getting a 500 error on my index.php page. However, if I comment out part of the TinyButStrong template code, the error goes away and loads. Below is a snippet of the code and the commented out section.

$tbs_source = ($DBConn===false) ? 'clear' : $DBConn;
// Merge data and close connection
$TBS->MergeBlock('songblock', $tbs_source, $sql);

/*$TBS->MergeBlock('titleblock', $tbs_source,
'SELECT t.*, stt.sortID FROM titles t 
        INNER JOIN songlist_titles_tunes stt ON t.ID = stt.titlesID 
        WHERE stt.songlistID = %p1% GROUP BY t.ID ORDER BY stt.sortID');
$TBS->MergeBlock('tuneblock', $tbs_source,
'SELECT tunes.*, stt.sortID FROM tunes 
        INNER JOIN songlist_titles_tunes stt ON tunes.id = stt.tunesID
        WHERE songlistID = %p1% AND titlesID = %p2% ORDER BY stt.sortID'); // */

$DBConn = null; // this is the method to close PDO connection

The version of TBS is:

 * TinyButStrong - Template Engine for Pro and Beginners
 *
 * @version 3.11.0 for PHP 5 and 7
 * @date    2019-02-10

Any thoughts on why just that section is raising a 500 error?

1

There are 1 answers

1
Meraj-Ul Islam On BEST ANSWER

Check your htaccess file. Maybe some features of your old server is not enabled in your new server. Also check the file's permission. chmod it to 755.