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?


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/
Stack trace:
#0 /home/phainome/public_html/lib/pkp/lib/adodb/ ADODB_mysql->_connect(‘localhost’, ‘phainome_ojs412’, ‘oKS472[3@p’, ‘phainome_ojs412’)
#1 /home/phainome/public_html/lib/pkp/classes/db/ ADOConnection->Connect(‘localhost’, ‘phainome_ojs412’, ‘oKS472[3@p’, ‘phainome_ojs412’, false)
#2 /home/phainome/public_html/lib/pkp/classes/db/ DBConnection->connect()
#3 /home/phainome/public_html/lib/pkp/classes/db/ DBConnection->initConn()
#4 /home/phainome/public_html/lib/pkp/classes/db/ DBConnection->initDefaultDBConnection()
#5 /home/phainome/public_html/lib/pkp/classes/db/ DBConnection->__construct()
#6 /home/phainome/public_html/lib/pkp/classes/core/ DBConnection::getInstance()
#7 /home/phainome/p in /home/phainome/public_html/lib/pkp/lib/adodb/drivers/ on line 456

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

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


Now it works!
Thanks @jnugent!

1 Like