PHP Fatal Error Smarty

My site is in blank since a few days ago. The error log says:

PHP Fatal error: Smarty error: the $compile_dir ‘/home/phainome/public_html/cache/t_compile’ does not exist, or is not a directory. in /home/phainome/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty.class.php on line 1094

Any suggestion? By the way: I’m using OJS 3.0.1. Thanks in advance.

Hi @mendozric

It sounds like what the error says - did someone accidentally delete your cache/ directory? Can you check to see if it’s still there? If it is, is it writeable by the user that your web server runs as? Is there a sub directory called t_compile inside of it?

Best,
Jason

Hi @jnugent,
I updated the OJS to the latest version, but the site remains the same. Now the error log shows another problem, this time with the mysql:

[19-Mar-2021 21:25:45 UTC] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/phainome/public_html/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php:456
Stack trace:
#0 /home/phainome/public_html/lib/pkp/lib/adodb/adodb.inc.php(558): ADODB_mysql->_connect(‘localhost’, ‘phainome_ojs412’, ‘oKS472[3@p’, ‘phainome_ojs412’)
#1 /home/phainome/public_html/lib/pkp/classes/db/DBConnection.inc.php(144): ADOConnection->Connect(‘localhost’, ‘phainome_ojs412’, ‘oKS472[3@p’, ‘phainome_ojs412’, false)
#2 /home/phainome/public_html/lib/pkp/classes/db/DBConnection.inc.php(119): DBConnection->connect()
#3 /home/phainome/public_html/lib/pkp/classes/db/DBConnection.inc.php(76): DBConnection->initConn()
#4 /home/phainome/public_html/lib/pkp/classes/db/DBConnection.inc.php(52): DBConnection->initDefaultDBConnection()
#5 /home/phainome/public_html/lib/pkp/classes/db/DBConnection.inc.php(220): DBConnection->__construct()
#6 /home/phainome/public_html/lib/pkp/classes/core/PKPApplication.inc.php(158): DBConnection::getInstance()
#7 /home/phainome/p in /home/phainome/public_html/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php on line 456

As far I as know, the mysql is outdated. What should I modify?
Thanks in advance.
Best,
R.

You’ll need to edit your config.inc.php file and change your database driver from “mysql” to “mysqli”.

Best,
Jason

Now it works!
Thanks @jnugent!

1 Like