Installation problem

Hi everyone,
I’m trying to install OJS 3.0 on Ubuntu 16.04(LTS) with a LAMP server. The problem is the missing OJS installation page, which should appear when I extracted OJS folders and archives into /var/www/ (this is how the official OJS system runs). When I replace /var/www/html/index.html with the OJS system, this is what I get:

Not Found

The requested URL / was not found on this server.

Thanks for any the help !!

Hi @Sokonosako,

The Ubuntu web root is probably /var/www/html, not /var/www (I don’t have an Ubuntu machine to check with).

Regards,
Alec Smecher
Public Knowledge Project Team

You were right, was the wrong folder ;D thanks
But there’s still a problem, the page is blank. This is the /var/log/apache/error.log

/var/log/apache/error.log

PHP Notice: Only variables should be passed by reference in /var/www/html/lib/pkp/classes/core/PKPApplication.inc.php on line 210

PHP Fatal error: Uncaught Error: Call to undefined function xml_parser_create() in /var/www/html/lib/pkp/classes/xml/XMLParser.inc.php:271\nStack trace:\n#0 /var/www/html/lib/pkp/classes/xml/XMLParser.inc.php(220): XMLParser->createParser()… this is a very long line

PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; DataObject has a deprecated constructor in /var/www/html/classes/core/DataObject.inc.php on line 17

PHP Parse error: syntax error, unexpected ‘new’ (T_NEW) in /var/www/html/classes/core/Handler.inc.php on line 69

PHP Notice: Only variables should be passed by reference in /var/www/html/lib/pkp/classes/core/PKPApplication.inc.php on line 210

PHP Fatal error: Uncaught Error: Call to undefined function xml_parser_create() in /var/www/html/lib/pkp/classes/xml/XMLParser.inc.php:271\nStack trace:\n#0 /var/www/html/lib/pkp/classes/xml/XMLParser.inc.php(220): XMLParser->createParser()\n#1… another very long line

It seems to be a database problem. I tried to install other versions but it’s the same.

Hi @Sokonosako,

Looking e.g. at…

PHP Parse error: syntax error, unexpected 'new' (T_NEW) in /var/www/html/classes/core/Handler.inc.php on line 69

What do you see on line 69 of that file? It doesn’t look like the stock version from OJS 3.0.

Regards,
Alec Smecher
Public Knowledge Project Team

There is no /var/www/html/classes/core/Handler.inc.php, this file is at /var/www/html/classes/handler/Handler.inc.php and it have only 65 lines… o_O wtf

Hi @Sokonosako,

Is this perhaps an old log entry from an older installation?

Regards,
Alec Smecher
Public Knowledge Project Team

I don’t know about that error log.
This is the error log from today:

[:error]: Only variables should be passed by reference in /var/www/html/lib/pkp/classes/core/PKPApplication.inc.php on line 210

PHP Fatal error: Uncaught Error: Call to undefined function xml_parser_create() in /var/www/html/lib/pkp/classes/xml/XMLParser.inc.php:271\nStack trace:\n#0 /var/www/html/lib/pkp/classes/xml/XMLParser.inc.php(220): XMLParser->createParser()\n#1 /var/www/html/lib/pkp/classes/xml/XMLParser.inc.php(262): XMLParser->parseTextStruct(’<?xml version="…’, Array)\n#2 /var/www/html/lib/pkp/classes/db/XMLDAO.inc.php(60): XMLParser->parseStruct(‘lib/pkp/registr…’, Array)\n#3 /var/www/html/lib/pkp/classes/i18n/TimeZoneDAO.inc.php(57): XMLDAO->parseStruct(‘lib/pkp/registr…’, Array)\n#4 /var/www/html/lib/pkp/classes/cache/GenericCache.inc.php(63): TimeZoneDAO->_timeZoneCacheMiss(Object(FileCache), NULL)\n#5 /var/www/html/lib/pkp/classes/cache/FileCache.inc.php(114): GenericCache->get(NULL)\n#6 /var/www/html/lib/pkp/classes/i18n/TimeZoneDAO.inc.php(76): FileCache->getContents()\n#7 /var/www/html/lib/pkp/classes/i18n/PKPLocale.inc.php(691): TimeZoneDAO->getTimeZones()\n#8 /var/www/html/lib/pkp/classes/i18n/PKPLocale.inc.php(143): PKPLocale::getTi in /var/www/html/lib/pkp/classes/xml/XMLParser.inc.php on line 271

At least it have problematic lines that we can find now :stuck_out_tongue:

Hi @Sokonosako,

It looks like you’re missing an XML parsing library. See e.g. this thread:
https://laracasts.com/discuss/channels/general-discussion/call-to-undefined-function-xml-parser-create

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

It’s not that, I just installed whatever was missing from PHP 7. The problem is still the same u_u

Hi @Sokonosako,

Are you still getting the message…

 PHP Fatal error: Uncaught Error: Call to undefined function xml_parser_create()

…after installing that module? If so, then you probably need to restart your web server in order to get the change to take effect.

Regards,
Alec Smecher
Public Knowledge Project Team

No I’m not ;D but the error log is diferent now:

[:error] [pid 32553] [client 10.81.16.102:59920] PHP Notice: Only variables should be passed by reference in /var/www/html/lib/pkp/classes/core/PKPApplication.inc.php on line 210

and

PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /var/www/html/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php:456\nStack trace:\n#0 /var/www/html/lib/pkp/lib/adodb/adodb.inc.php(558): ADODB_mysql->_connect(‘localhost’, ‘ojs’, ‘ojs’, ‘ojs’)\n#1 /var/www/html/lib/pkp/classes/db/DBConnection.inc.php(144): ADOConnection->Connect(‘localhost’, ‘ojs’, ‘ojs’, ‘ojs’, false)\n#2 /var/www/html/lib/pkp/classes/db/DBConnection.inc.php(119): DBConnection->connect()\n#3 /var/www/html/lib/pkp/classes/db/DBConnection.inc.php(76): DBConnection->initConn()\n#4 /var/www/html/lib/pkp/classes/db/DBConnection.inc.php(52): DBConnection->initDefaultDBConnection()\n#5 /var/www/html/lib/pkp/classes/db/DBConnection.inc.php(220): DBConnection->DBConnection()\n#6 /var/www/html/lib/pkp/classes/i18n/PKPLocale.inc.php(156): DBConnection::getInstance()\n#7 /var/www/html/lib/pkp/classes/core/Dispatcher.inc.php(131): PKPLocale::initialize(Object(Request))\n#8 /var/www/html/lib/pkp/classes/core/PKPApplication.inc.php(227): Dispatcher->dispatch in /var/www/html/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php on line 456

Hi @Sokonosako,

You need to either install the mysql module, or if you’re using a PHP that supports mysqli, use the MySQLi driver instead of the MySQL one.

Regards,
Alec Smecher
Public Knowledge Project Team

I’m trying to switch between mysql and mysqli, and even though it’s all properly installed and on its latest version, I can’t get it done. This is what happens:

I don’t know how “root” does not have permission… not even if this is the problem…

Hi @Sokonosako,

The root MySQL password is not necessarily the same as the root server password. You’ll probably need to log into MySQL as root in order to grant access to whatever account you’ll be using with OJS, and then double-check that you can access that freshly-granted account from the MySQL command-line tool (as you’ve done above, but without getting in successfully). Then try the OJS installation.

Regards,
Alec Smecher
Public Knowledge Project Team

OK, I reinstalled PHPMYADMIN and MYSQL. Now I finally have access to the DB through address/phpmyadmin, but that blank page doesn’t go away. Doens’t make sense, I can access the database, but I can’t access the site o_O…
You said that I should use MySqli. I believe it’s ok, but just to be sure, here’s the print:

This is the error.log right now:
PHP Notice: Only variables should be passed by reference in /var/www/html/lib/pkp/classes/core/PKPApplication.inc.php on line 210

PHP Fatal error: Uncaught Error: Call to undefined function mysql_connect() in /var/www/html/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php:456\nStack trace:\n#0 /var/www/html/lib/pkp/lib/adodb/adodb.inc.php(558): ADODB_mysql->_connect(‘localhost’, ‘ojs’, ‘ojs’, ‘ojs’)\n#1 /var/www/html/lib/pkp/classes/db/DBConnection.inc.php(144): ADOConnection->Connect(‘localhost’, ‘ojs’, ‘ojs’, ‘ojs’, false)\n#2 /var/www/html/lib/pkp/classes/db/DBConnection.inc.php(119): DBConnection->connect()\n#3 /var/www/html/lib/pkp/classes/db/DBConnection.inc.php(76): DBConnection->initConn()\n#4 /var/www/html/lib/pkp/classes/db/DBConnection.inc.php(52): DBConnection->initDefaultDBConnection()\n#5 /var/www/html/lib/pkp/classes/db/DBConnection.inc.php(220): DBConnection->DBConnection()\n#6 /var/www/html/lib/pkp/classes/i18n/PKPLocale.inc.php(156): DBConnection::getInstance()\n#7 /var/www/html/lib/pkp/classes/core/Dispatcher.inc.php(131): PKPLocale::initialize(Object(Request))\n#8 /var/www/html/lib/pkp/classes/core/PKPApplication.inc.php(227): Dispatcher->dispatch in /var/www/html/lib/pkp/lib/adodb/drivers/adodb-mysql.inc.php on line 456

Hi @Sokonosako,

Can you clarify whether you’re trying to install OJS 3.0.0, or 3.0.1? We released OJS 3.0.1 just recently and it contains a number of small fixes and tweaks that might help.

It looks like your OJS is still trying to use the MySQL driver, and not MySQLi – make sure you choose the right selection from the dropdown when you fill in the form.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi asmecher,
I was trying to install 3.0.0 version, but I’m gonna install 3.0.1 now, it is looking better.
My problem now is this error:

Errors occurred during installation
A database error has occurred: php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution

any idea?

Hi @Sokonosako,

I’m not sure what would cause this – perhaps a temporary network hiccough? Have you tried it again?

Regards,
Alec Smecher
Public Knowledge Project Team

Man I tried again so many times u_u still no success.
On my research about this problem many people said that’s a DNS problem. I’m not sure if that’s it. Also, I’m on the installing page and all the configuration is correct.

This is the error.log on apache2:

php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution, referer: http://site.com/index.php/index/install/install

PHP Warning: Declaration of WebFeedPlugin::getTemplatePath() should be compatible with Plugin::getTemplatePath($inCore = false) in /var/www/html/plugins/generic/webFeed/WebFeedPlugin.inc.php on line 0, referer: http://site.com/index.php/index/install/install

PHP Warning: Declaration of LensGalleyPlugin::getTemplatePath() should be compatible with Plugin::getTemplatePath($inCore = false) in /var/www/html/plugins/generic/lensGalley/LensGalleyPlugin.inc.php on line 0, referer: http://site.com/index.php/index/install/install

PHP Warning: Declaration of OrcidProfilePlugin::getTemplatePath() should be compatible with Plugin::getTemplatePath($inCore = false) in /var/www/html/plugins/generic/orcidProfile/OrcidProfilePlugin.inc.php on line 0, referer: http://site.com/index.php/index/install/install

PHP Warning: Declaration of PdfJsViewerPlugin::getTemplatePath() should be compatible with Plugin::getTemplatePath($inCore = false) in /var/www/html/plugins/generic/pdfJsViewer/PdfJsViewerPlugin.inc.php on line 0, referer: http://site.com/index.php/index/install/install
PHP Warning: Declaration of BrowsePlugin::manage($verb, $args, &$message, &$messageParams, &$pluginModalContent = NULL) should be compatible with Plugin::manage($args, $request) in /var/www/html/plugins/generic/browse/BrowsePlugin.inc.php on line 0, referer: http://site.com/index.php/index/install/install
PHP Warning: Declaration of BrowsePlugin::getTemplatePath() should be compatible with Plugin::getTemplatePath($inCore = false) in /var/www/html/plugins/generic/browse/BrowsePlugin.inc.php on line 0, referer: http://site.com/index.php/index/install/install

PHP Warning: Declaration of GoogleAnalyticsPlugin::getTemplatePath() should be compatible with Plugin::getTemplatePath($inCore = false) in /var/www/html/plugins/generic/googleAnalytics/GoogleAnalyticsPlugin.inc.php on line 0, referer: http://site.com/index.php/index/install/install

PHP Warning: Declaration of RecommendByAuthorPlugin::getTemplatePath() should be compatible with Plugin::getTemplatePath($inCore = false) in /var/www/html/plugins/generic/recommendByAuthor/RecommendByAuthorPlugin.inc.php on line 0, referer: http://site.com/index.php/index/install/install

PHP Warning: Declaration of PageHandler::authorize($request, &$args, $roleAssignments) should be compatible with PKPHandler::authorize($request, &$args, $roleAssignments, $enforceRestrictedSite = true) in /var/www/html/lib/pkp/controllers/page/PageHandler.inc.php on line 19, referer: http://site.com/index.php/index/install/install

Hi @Sokonosako,

Is your server firewalled? It appears that PHP is having trouble accessing the Internet. (I assume you’ve traded out your actual site information for site.com to anonymize your post, correct?)

The warnings are cosmetic and can be suppressed by configuring your php.ini to disable strict reporting.

Regards,
Alec Smecher
Public Knowledge Project Team