HTTP Error 500 in installing OJS 3.3.0-4

Hi,
I am trying to install OJS 3.3.0-4 on a shared hosting server (IONOS, formerly 1&1). I downloaded the .tar files from your “Download” page, uploaded via FTPS (FileZilla), extracted, followed the instructions to make some files and folders writable. When I open the page on the browser I get an HTTP error 500, so I tried installing from the command line (SSH) with php tools/install.php. This is the error message I get from the terminal

X-Powered-By: PHP/4.4.9
Content-type: text/html

<br />
<b>Parse error</b>:  syntax error, unexpected T_NEW in <b>/homepages/2/d859838118/htdocs/ojs/lib/pkp/includes/functions.inc.php</b> on line <b>199</b><br />

If I enable error messages, I find this message on path/to/ojs:

Warning : session_start(): Failed to read session data: user (path: ) in /homepages/2/d859838118/htdocs/ojs/lib/pkp/classes/session/SessionManager.inc.php on line 58

Fatal error : Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘dbs1757700.sessions’ doesn’t exist in /homepages/2/d859838118/htdocs/ojs/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:78 Stack trace: #0 /homepages/2/d859838118/htdocs/ojs/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(78): PDO->prepare(‘SELECT * FROM s…’, Array) #1 /homepages/2/d859838118/htdocs/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(361): Doctrine\DBAL\Driver\PDOConnection->prepare(Object(Illuminate\Database\Query\Expression)) #2 /homepages/2/d859838118/htdocs/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(664): Illuminate\Database\Connection->Illuminate\Database{closure}(Object(Illuminate\Database\Query\Expression), Array) #3 /homepages/2/d859838118/htdocs/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php(631): Illuminate\Database\Connection->runQueryCallback(Ob in /homepages/2/d859838118/htdocs/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Connection.php on line 671

Could someone please help me? Thanks!

Hi @msartorair

Looking at your original message, it seems that you’re using PHP/4.4.9 which is far too old to work with OJS 3.3.0.4. You’ll need to update that to at least PHP 7.3.

Best
Jason

Hi @jnugent,
actually I don’t know why the SSH shows PHP 4.4.9, but I can assure you that I’m using PHP 7.4. I created a script to test the PHP version and it confirms this for me: you can see it in the screesnhot attached.
Best,
Marco

Schermata 2021-04-07 alle 21.10.39

Hi Marco,

Yes, but that’s via the web, and you tried via the CLI. Getting an error of

 syntax error, unexpected T_NEW

implies a version of PHP that cannot parse the OJS code. What happens when you run:

php --version

on the command line?

Best
Jason

Dear @jnugent,
I checked and… the PHP version of the CLI is 4.4.9, while the PHP version of the web project is 7.4.16. I called the support of my provider, i.e. 1&1 by IONOS, and they advised me to either do the OJS installation via web (but it doesn’t work via web!) or to change the PHP version only for that specific command in the terminal, but I don’t know how to do.
Best,
Marco

So, I’m not sure how you attempted the original installation via web but generally, the error of:

**Fatal error** : Uncaught PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘dbs1757700.sessions’ doesn’t exist

would to me indicate that OJS thinks it is already installed when in fact it is not. You’d normally make sure that Installed was set to Off in the config.inc.php file first. If so, the installer should redirect you to the install page, rather than showing an error.

Best,
Jason

I just checked the config.inc.php file: Installed was set to On, now I put Off, but these are the errors in the path/to/ojs:

Notice : Deprecated call without request object. in /homepages/2/d859838118/htdocs/ojs/lib/pkp/classes/template/PKPTemplateManager.inc.php on line 1235
Fatal error : Uncaught Error: Call to a member function getConnection() on null in /homepages/2/d859838118/htdocs/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php:74 Stack trace: #0 /homepages/2/d859838118/htdocs/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php(200): Illuminate\Database\Capsule\Manager::connection() #1 /homepages/2/d859838118/htdocs/ojs/lib/pkp/classes/db/DAO.inc.php(65): Illuminate\Database\Capsule\Manager::__callStatic(‘raw’, Array) #2 /homepages/2/d859838118/htdocs/ojs/lib/pkp/classes/context/ContextDAO.inc.php(63): DAO->retrieve(‘SELECT * FROM j…’, Array) #3 /homepages/2/d859838118/htdocs/ojs/lib/pkp/classes/core/PKPRouter.inc.php(252): ContextDAO->getByPath(‘indexphp’) #4 /homepages/2/d859838118/htdocs/ojs/lib/pkp/classes/core/PKPRequest.inc.php(760): PKPRouter->getContext(Object(Request), 1) #5 /homepages/2/d859838118/htdocs/ojs/classes/core/Request.inc.php(64): PKPRequest->_delegateToRouter(‘getContext’, 1) #6 /homepages/2/d85 in /homepages/2/d859838118/htdocs/ojs/lib/pkp/lib/vendor/laravel/framework/src/Illuminate/Database/Capsule/Manager.php on line 74

Best,
Marco

Hi Marco,

I suggest you start over, honestly. I would also recommend cleaning out the cache folder as well since OJS will store things there as well.

If you leave the config file completely stock, OJS will tell you what to change it to once the installation is complete. During the initial installation step it will even tell you if the directory permissions are incorrect so there’s no need to touch those unless it tells you to. Because I don’t know what else you may have changed, it’s hard to suggest a next step. I do know for a fact that the 3.3.0.4 installer works with PHP 7.4.

Best,
Jason

Hi @jnugent,
I was working on the config.inc.php via CLI because I had problems with the installation via web. Now I deleted everything and did it all over again. I extracted the .tar folder, made some files and folders writable and created the submission folder.
When I open the web page on path/to/ojs I get a message: “The page doesn’t work” (ERR_TOO_MANY_REDIRECTS) on Opera, even deleting cookies and cache, and on Safari "too many redirects occurred trying to open ...index.php/index/install".
Best,
Marco

Hi @marco

I’m not really sure. This might be a web host thing. I don’t have a ton of time but if you send me a URL in a private message I can see if it’s something obvious.

Best,
Jason

Thanks for the link. You know what? I searched our forums for “not redirecting properly” and one hit that comes up is:

And they are also on 1and1. This may be related to their hosting service. I also found this:

You haven’t set force_ssl to On, have you?

Cheers,
Jason

force_ssl is set to Off. I am happy to know that I’ve got the same problem of this thread Redirection problem during Installation, but seems the author was not able to solve it…