500 Internal Server Error in Smarty?

1.9k views Asked by At

I got 500 Internal Server Error. I fetch the data from mysql using php file and assign a Smarty variable, and printing in tpl file.

There are 23k data records. If I echo (printing all value) in PHP file I get all data. but while loading in smarty it through 500 error. while loading the tpl file in Smarty.

I checked access.log, error.log files and does not show any error. I checked many solution but all are fails.

1

There are 1 answers

0
Ajmal PraveeN On

You have 23k data records in one folder?

While printing all values in PHP but while loading "500 internal server error "?

Solution: It's due to PHP's maximum execution timeout and memory usage. Just increase the values in your php.ini as you need.

Enable the Output buffering too...

max_execution_time = 300 ; //5mins max increase as per your need
memory_limit = 256M ; //Maximum amount of memory a script may consume (256MB)

That's all, if it shows the error again, increase the values.

But I recommend this method to output the 23k data records:
Just create a table in MySQL, insert all the 23k data, and retrieve it. This is the finest method and faster that avoids PHP variable stitching.