“submissions” and "Articles", error 500

Hello,
I have the problem when I go to “submissions” and “Articles”, error 500 in front and admin panel?
after upgrade 3.1.1.0 to 3.1.2.0
And I have (No file uploaded or invalid file type!) error?
And this is error_log :

[28-May-2019 21:15:04 UTC] PHP Strict Standards: Declaration of DRIVERDAO::setOAI() should be compatible with PKPOAIDAO::setOAI($oai) in /home/edbs/public_html/plugins/generic/driver/DRIVERDAO.inc.php on line 19
[28-May-2019 21:15:05 UTC] PHP Strict Standards: Declaration of DRIVERDAO::setOAI() should be compatible with PKPOAIDAO::setOAI($oai) in /home/edbs/public_html/plugins/generic/driver/DRIVERDAO.inc.php on line 19
[28-May-2019 21:15:05 UTC] PHP Strict Standards: Declaration of DRIVERDAO::setOAI() should be compatible with PKPOAIDAO::setOAI($oai) in /home/edbs/public_html/plugins/generic/driver/DRIVERDAO.inc.php on line 19
[28-May-2019 21:15:05 UTC] PHP Strict Standards: Declaration of DRIVERDAO::setOAI() should be compatible with PKPOAIDAO::setOAI($oai) in /home/edbs/public_html/plugins/generic/driver/DRIVERDAO.inc.php on line 19
[28-May-2019 21:15:05 UTC] PHP Strict Standards: Declaration of DRIVERDAO::setOAI() should be compatible with PKPOAIDAO::setOAI($oai) in /home/edbs/public_html/plugins/generic/driver/DRIVERDAO.inc.php on line 19
[28-May-2019 21:15:06 UTC] PHP Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set ‘always_populate_raw_post_data’ to ‘-1’ in php.ini and use the php://input stream instead. in Unknown on line 0
[28-May-2019 21:15:06 UTC] PHP Strict Standards: Declaration of DRIVERDAO::setOAI() should be compatible with PKPOAIDAO::setOAI($oai) in /home/edbs/public_html/plugins/generic/driver/DRIVERDAO.inc.php on line 19
[28-May-2019 21:15:06 UTC] PHP Strict Standards: Declaration of DRIVERDAO::setOAI() should be compatible with PKPOAIDAO::setOAI($oai) in /home/edbs/public_html/plugins/generic/driver/DRIVERDAO.inc.php on line 19
[28-May-2019 21:15:07 UTC] PHP Strict Standards: Declaration of DRIVERDAO::setOAI() should be compatible with PKPOAIDAO::setOAI($oai) in /home/edbs/public_html/plugins/generic/driver/DRIVERDAO.inc.php on line 19
[28-May-2019 21:15:08 UTC] PHP Strict Standards: Declaration of DRIVERDAO::setOAI() should be compatible with PKPOAIDAO::setOAI($oai) in /home/edbs/public_html/plugins/generic/driver/DRIVERDAO.inc.php on line 19
[28-May-2019 21:15:08 UTC] PHP Strict Standards: Declaration of DRIVERDAO::setOAI() should be compatible with PKPOAIDAO::setOAI($oai) in /home/edbs/public_html/plugins/generic/driver/DRIVERDAO.inc.php on line 19
[28-May-2019 21:15:15 UTC] PHP Strict Standards: Declaration of DRIVERDAO::setOAI() should be compatible with PKPOAIDAO::setOAI($oai) in /home/edbs/public_html/plugins/generic/driver/DRIVERDAO.inc.php on line 19
[28-May-2019 21:15:15 UTC] PHP Parse error: syntax error, unexpected ‘?’ in /home/edbs/public_html/lib/pkp/lib/vendor/illuminate/database/Connection.php on line 1236

Please help to solve it.
Regards,
Nasseer

Hi Nasseer,

The ?? operator being used on that line of code became available in PHP 7. You need PHP 7 to use OJS 3.1.2.

Regards,
Jason

Hi,
When I try to use PHP 7.1 I get HTTP ERROR 500 for all pages of the site?
with error_log :
[29-May-2019 17:02:07 UTC] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/edbs/public_html/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php:456
Stack trace:
#0 /home/edbs/public_html/lib/pkp/lib/adodb/adodb.inc.php(558): ADODB_mysql->_connect(‘localhost’, ‘(removed)’, ‘(removed)’, ‘(removed)’)
#1 /home/edbs/public_html/lib/pkp/classes/db/DBConnection.inc.php(151): ADOConnection->Connect(‘localhost’, ‘(removed)’, ‘(removed)’, ‘(removed)’, false)
#2 /home/edbs/public_html/lib/pkp/classes/db/DBConnection.inc.php(126): DBConnection->connect()
#3 /home/edbs/public_html/lib/pkp/classes/db/DBConnection.inc.php(83): DBConnection->initConn()
#4 /home/edbs/public_html/lib/pkp/classes/db/DBConnection.inc.php(52): DBConnection->initDefaultDBConnection()
#5 /home/edbs/public_html/lib/pkp/classes/db/DBConnection.inc.php(227): DBConnection->__construct()
#6 /home/edbs/public_html/lib/pkp/classes/core/PKPApplication.inc.php(175): DBConnection::getInstance()
#7 /home/edbs/public_html/classes/core/Application.inc.php(36): in /home/edbs/public_html/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php on line 456
[29-May-2019 17:02:19 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADODB_Cache_File has a deprecated constructor in /home/edbs/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 263
[29-May-2019 17:02:19 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADOConnection has a deprecated constructor in /home/edbs/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 359
[29-May-2019 17:02:19 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet has a deprecated constructor in /home/edbs/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 2921
[29-May-2019 17:02:19 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet_array has a deprecated constructor in /home/edbs/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 3939
[29-May-2019 17:02:19 UTC] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/edbs/public_html/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php:456
Stack trace:
#0 /home/edbs/public_html/lib/pkp/lib/adodb/adodb.inc.php(558): ADODB_mysql->_connect(‘localhost’, ‘(removed)’, ‘(removed)’, ‘(removed)’)
#1 /home/edbs/public_html/lib/pkp/classes/db/DBConnection.inc.php(151): ADOConnection->Connect(‘localhost’, ‘(removed)’, ‘(removed)’, ‘(removed)’, false)
#2 /home/edbs/public_html/lib/pkp/classes/db/DBConnection.inc.php(126): DBConnection->connect()
#3 /home/edbs/public_html/lib/pkp/classes/db/DBConnection.inc.php(83): DBConnection->initConn()
#4 /home/edbs/public_html/lib/pkp/classes/db/DBConnection.inc.php(52): DBConnection->initDefaultDBConnection()
#5 /home/edbs/public_html/lib/pkp/classes/db/DBConnection.inc.php(227): DBConnection->__construct()
#6 /home/edbs/public_html/lib/pkp/classes/core/PKPApplication.inc.php(175): DBConnection::getInstance()
#7 /home/edbs/public_html/classes/core/Application.inc.php(36): in /home/edbs/public_html/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php on line 456
[29-May-2019 17:02:31 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADODB_Cache_File has a deprecated constructor in /home/edbs/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 263
[29-May-2019 17:02:31 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADOConnection has a deprecated constructor in /home/edbs/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 359
[29-May-2019 17:02:31 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet has a deprecated constructor in /home/edbs/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 2921
[29-May-2019 17:02:31 UTC] PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; ADORecordSet_array has a deprecated constructor in /home/edbs/public_html/lib/pkp/lib/adodb/adodb.inc.php on line 3939
[29-May-2019 17:02:31 UTC] PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /home/edbs/public_html/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php:456
Stack trace:
#0 /home/edbs/public_html/lib/pkp/lib/adodb/adodb.inc.php(558): ADODB_mysql->_connect(‘localhost’, ‘(removed)’, ‘(removed)’, ‘(removed)’)
#1 /home/edbs/public_html/lib/pkp/classes/db/DBConnection.inc.php(151): ADOConnection->Connect(‘localhost’, ‘(removed)’, ‘(removed)’, ‘(removed)’, false)
#2 /home/edbs/public_html/lib/pkp/classes/db/DBConnection.inc.php(126): DBConnection->connect()
#3 /home/edbs/public_html/lib/pkp/classes/db/DBConnection.inc.php(83): DBConnection->initConn()
#4 /home/edbs/public_html/lib/pkp/classes/db/DBConnection.inc.php(52): DBConnection->initDefaultDBConnection()
#5 /home/edbs/public_html/lib/pkp/classes/db/DBConnection.inc.php(227): DBConnection->__construct()
#6 /home/edbs/public_html/lib/pkp/classes/core/PKPApplication.inc.php(175): DBConnection::getInstance()
#7 /home/edbs/public_html/classes/core/Application.inc.php(36): in /home/edbs/public_html/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php on line 456

Regards,
Nasseer

and When I change Database Settings from
driver = mysql To driver = mysqli
I have this error
Database connection failed!

Regards,
Nasseer

Hi @Nasseer,

Your post included database credentials! I’ve removed them. Please change them immediately on your server (and anywhere else you might share those credentials).

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Thank you very much for this note and sorry I did not pay attention to this error.
Can you help me find a solution?

Regards,
Nasseer

Hi @Nasseer,

Are you using PHP7? You should set driver to mysqli; if you are getting Database connection failed! then it suggests your database credentials aren’t correct, or that you haven’t run the appropriate GRANT statement in your database. You can verify whether your credentials work or not by connecting to the database via the command-line mysql client.

Regards,
Alec Smecher
Public Knowledge Project Team

Can you give me some feedback about " run the appropriate GRANT statement in your database"?
I searched the forum and via Google did not find anything clear?

Regards,
Nasseer

Hi @Nasseer,

That’s more a MySQL question than an OJS question, but there’s some documentation about that here: https://pkp.sfu.ca/ojs/docs/userguide/2.3.3/systemCreateDatabase.html

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher
After repairing the pages (“submissions” and “Articles”) by uploading a new version(OJS 3.1.2-1) it works,
The problem now is in the upload process? Can not upload photos and files with this message(The file could not be uploaded or revised)?
I looked at the forum for solutions and tried them but remained the same problem?
Note: When using upload in ( WYSIWYG editing) like Website Settings ->Appearance ->Page Footer, the image is uploaded correctly?
Did I check my file upload permissions and subfolders is true 755?
but with the Logo in Website Settings the site you receive the error message?
In addition to not responding in the case of deleting the image logo with any message?
The same with the upgrade in Plugin Gallery?

Regards,
Nasseer

Hi @Nasseer,

Next time, it’s best to start a new topic (or find an existing relevant one) – those questions aren’t related to this topic. But I think the problem is probably still to do with file permissions in your files_dir. It’s not enough to work with just the numeric permissions (e.g. 755), you’ll also need to work with the file ownership. See How should file permissions be set? for details.

Regards,
Alec Smecher
Public Knowledge Project Team