PLN plugin and php error

Hi ctgraham,

You asked me whether my server was firewalled or proxied for outgoing web requests. I just know that Mod Security is enabled and I don’t know whether is related to the errors because I’m not a programer.

I can give you access to the server where the ojs and sql are hosted. I just need your email to send you the login details and you can check the issues. I have a backup of everything.

The errors that I’m still getting are the following ones:

[09-Dec-2015 15:28:51] ojs2: 404 Not Found
[09-Dec-2015 20:55:21] PHP Fatal error: Call to a member function getQualifiedDAOName() on a non-object in /home9/revistj8/public_html/lib/pkp/classes/db/DAORegistry.inc.php on line 63
[10-Dec-2015 00:20:05] ojs2: 404 Not Found

I don’t know if I should worry about the getQualifiedDAOName() error.

Regards

Do the stacktraces remain the same since disabling show_upgrade_warning, or have they changed?

The stacktraces remain the same. There is no change. I just can see the ojs2:404 not found and the getQualifiedDAOName errors

Clarification: The first error has a stacktrace:

[07-Dec-2015 08:08:35] ojs2 has produced an error
Message: WARNING: fsockopen() [function.fsockopen]: unable to connect to pkp.sfu.ca:80 (php_network_getaddresses: getaddrinfo failed: Fallo temporal en la resolución del nombre)
In file: /home9/revistj8/public_html/lib/pkp/classes/file/wrappers/HTTPFileWrapper.inc.php
At line: 77
Stacktrace:
File: (unknown) line (unknown)
Function: PKPApplication->errorHandler(2, "fsockopen() [<a href='function.fsockopen'>function.fsockopen</a>]: unable to connect to pkp.sfu.ca:80 (php_network_getaddresses: getaddrinfo failed: Fallo temporal en la resolución del nombre)", "/home9/revistj8/public_html/lib/pkp/classes/file/wrappers/HTTPFileWrapper.inc.php", 77, Array(7))
File: /home9/revistj8/public_html/lib/pkp/classes/file/wrappers/HTTPFileWrapper.inc.php line 77
Function: fsockopen("pkp.sfu.ca", 80, 0, "")

The errors:

[07-Dec-2015 14:46:51] PHP Fatal error: Call to a member function getQualifiedDAOName() on a non-object in /home9/revistj8/public_html/lib/pkp/classes/db/DAORegistry.inc.php on line 63
[07-Dec-2015 16:26:11] ojs2: 404 Not Found

don’t have stacktraces attached.

To be sure I understand you, do new errors come with a stacktrace, or are you only seeing the two errors without stacktraces now?

Does this occur on every page, or only certain pages?

The following errors don’t have stacktraces
[07-Dec-2015 14:46:51] PHP Fatal error: Call to a member function getQualifiedDAOName() on a non-object in /home9/revistj8/public_html/lib/pkp/classes/db/DAORegistry.inc.php on line 63
[07-Dec-2015 16:26:11] ojs2: 404 Not Found

I did the following in order to check what I’m doing wrong:

  1. I deleted all the files except the following folders: public and files. I’m using the correct config.inc.php
  2. I download the ojs files and I unziped them in the server
  3. I did an update of the ojs, I updated the sql database with no errors reported in the website. However, I’ve got the following errors in the error log that you can find here: http://revistapsicologia.org/error_log

Everything works. However, when I click on the Unassigned submissions as the editor, I get the following error which I mentioned Alec that I fixed it adding $this->dbconn->Execute(“SET OPTION SQL_BIG_SELECTS=1”); to the DBConnection.inc.php file. I’m not going to add this line till you tell me what to do.


[11-Dec-2015 12:13:51] ojs2: DB Error: The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
Stack Trace:
File: /home9/revistj8/public_html/classes/submission/editor/EditorSubmissionDAO.inc.php line 356
Function: DAO->retrieveRange(“SELECT DISTINCT a.*, scf.date_completed as copyedit_comp…”, Array(21), Object(DBResultRange))

File: /home9/revistj8/public_html/classes/submission/editor/EditorSubmissionDAO.inc.php line 402
Function: EditorSubmissionDAO->_getUnfilteredEditorSubmissions(“1”, 0, 0, Null, Null, Null, Null, Null, Null, “a.status = 1 AND ea.edit_id IS NULL”, Object(DBResultRange), “id”, 1)

File: /home9/revistj8/public_html/pages/editor/EditorHandler.inc.php line 263
Function: EditorSubmissionDAO->getEditorSubmissionsUnassigned(“1”, 0, 0, Null, Null, Null, Null, Null, Null, Object(DBResultRange), “id”, 1)

File: (unknown) line (unknown)
Function: EditorHandler->submissions(Array(1), Object(Request))

File: /home9/revistj8/public_html/lib/pkp/classes/core/PKPRouter.inc.php line 362
Function: call_user_func(Array(2), Array(1), Object(Request))

File: /home9/revistj8/public_html/lib/pkp/classes/core/PKPPageRouter.inc.php line 220
Function: PKPRouter->_authorizeInitializeAndCallRequest(Array(2), Object(Request), Array(1), False)

File: /home9/revistj8/public_html/lib/pkp/classes/core/Dispatcher.inc.php line 134
Function: PKPPageRouter->route(Object(Request))

File: /home9/revistj8/public_html/lib/pkp/classes/core/PKPApplication.inc.php line 178
Function: Dispatcher->dispatch(Object(Request))

File: /home9/revistj8/public_html/index.php line 64
Function: PKPApplication->execute()


Alec suggested to tweak the MySQL configuration. I don’t know how to do tweak it. What should I do?

@asmecher’s suggestion of adding $this->dbconn->Execute("SET OPTION SQL_BIG_SELECTS=1") or of increasing the max_join_size in the mysql config should resolve the problem when clicking on Unassigned Submissions.

Your error log includes a number of references to: USER WARNING: Attribute '' in element 'em' not supported or similar. This makes it appear that some user-entered HTML is being cleaned for unrecognized content, but it looks like this is actually being caused by a (corrupt?) Unicode string: “Vol. 14, Núm. 01 (2015)”. This can probably be ignored; to research it further, you would want to track down and correct that string.

I’m not immediately seeing what is raising the error: USER ERROR: Smarty error ...: syntax error: unrecognized tag '/literal' Are you seeing broken functionality around the bibtex citations?

Are you seeing any “white screen” pages that align with the error message PHP Fatal error: Call to a member function getQualifiedDAOName() on a non-object in the logs?

Hi ctgraham,

I have been waiting in order to get more information in the error log. The error clicking on Unassigned Submissions dissapeared. I didn’t do anything and who knows what happened.

You are right, the bibtex citation in any article is broken.

I’m not getting white screens. I have no clue which page aligns with the error message PHP Fatal error: Call to a member function getQualifiedDAOName(). There is no stacktrace for this error in the errolog. Take a look at the errorlog here: www.revistapsicologia.org/error_log

Thank you for your help

To find out what is causing the unset $application variable which is causing the fatal error on the call to getQualifiedDAOName(), you could add a bit of code to explicitly look for this condition.

Just before the call at:

Add a bit of code like:

if (!is_object($application)) {
  error_log(var_export(debug_backtrace(), true));
}

The next time you see this error, you should also see a stack trace just before it.

Hi ctgraham,

This is the stack trace that I’m getting in the error log about the getQualifiedDAOName. What should I do? Thanks for you help

[06-Jan-2016 22:12:24] PHP Fatal error:  Call to a member function getQualifiedDAOName() on a non-object in /home9/revistj8/public_html/lib/pkp/classes/db/DAORegistry.inc.php on line 66
[06-Jan-2016 22:13:34] array (
  0 => 
  array (
    'file' => '/home9/revistj8/public_html/plugins/generic/acron/AcronPlugin.inc.php',
    'line' => 223,
    'function' => 'getDAO',
    'class' => 'DAORegistry',
    'type' => '->',
    'object' => 
    AcronPlugin::__set_state(array(
       '_workingDir' => '/home9/revistj8/public_html',
       '_tasksToRun' => 
      array (
        0 => 
        array (
          'className' => 'classes.tasks.ReviewReminder',
          'frequency' => 
          array (
            'hour' => 24,
          ),
          'args' => 
          array (
          ),
        ),
        1 => 
        array (
          'className' => 'classes.tasks.SubscriptionExpiryReminder',
          'frequency' => 
          array (
            'hour' => 24,
          ),
          'args' => 
          array (
          ),
        ),
        2 => 
        array (
          'className' => 'classes.tasks.OpenAccessNotification',
          'frequency' => 
          array (
            'hour' => 24,
          ),
          'args' => 
          array (
          ),
        ),
      ),
       'pluginPath' => 'plugins/generic/acron',
       'pluginCategory' => 'generic',
    )),
    'args' => 
    array (
      0 => 'ScheduledTaskDAO',
    ),
  ),
  1 => 
  array (
    'function' => 'shutdownFunction',
    'class' => 'AcronPlugin',
    'type' => '->',
    'object' => 
    AcronPlugin::__set_state(array(
       '_workingDir' => '/home9/revistj8/public_html',
       '_tasksToRun' => 
      array (
        0 => 
        array (
          'className' => 'classes.tasks.ReviewReminder',
          'frequency' => 
          array (
            'hour' => 24,
          ),
          'args' => 
          array (
          ),
        ),
        1 => 
        array (
          'className' => 'classes.tasks.SubscriptionExpiryReminder',
          'frequency' => 
          array (
            'hour' => 24,
          ),
          'args' => 
          array (
          ),
        ),
        2 => 
        array (
          'className' => 'classes.tasks.OpenAccessNotification',
          'frequency' => 
          array (
            'hour' => 24,
          ),
          'args' => 
          array (
          ),
        ),
      ),
       'pluginPath' => 'plugins/generic/acron',
       'pluginCategory' => 'generic',
    )),
    'args' => 
    array (
    ),
  ),
)
[06-Jan-2016 22:13:34] PHP Fatal error:  Call to a member function getQualifiedDAOName() on a non-object in /home9/revistj8/public_html/lib/pkp/classes/db/DAORegistry.inc.php on line 66

This indicates that the Acron plugin (scheduled task management) is failing when attempting to run after a page is viewed. This would prevent the scheduling of Open Access Notifications and of Review Reminders in your setup.

Specifically, it look like somehow the PKPApplication in the Registry is being unset before the Acron plugin is calling the shutdown function.

I’m not able to replicate this problem on my test install of 2.7.1.

Thanks ctgraham

Should I disable the Acron plugin in the Journal Management? Or should I ignore this error?

By the way, the hosting provides Cron Jobs. However, I have no idea how to use it. There are no current Cron jobs there.

I’m looking forward to your instructions.

For scheduled task management, you will generally want to either choose either Acron or cron.

If you want to try turning off Acron and using cron instead, there is a brief introduction here:

Note that you will probably also want to configure a cron job for “autostage” processing of the log files for Usage Statistics if you disable Acron.
https://pkp.sfu.ca/wiki/index.php?title=PKP_Statistics_Framework#Processing_Log_Files

Thanks ctgraham,

I turned off Acron and I enabled the scheduletasks and added the cron tasks in the server /home9/revistj8/public_html/tools/runScheduledTasks.php and /home9/revistj8/public_html/tools/runScheduledTasks.php plugins/generic/usageStats/scheduledTasksAutoStage.xml

I have another problem. There is an error from the UsageStatistics plugin
Call to a member function getRequest() on a non-object in /home9/revistj8/public_html/plugins/generic/usageStats/UsageStatsPlugin.inc.php on line 223
There is no stacktrace for this error

This is essentially the same error as before, but in a different context. Line 222 calls Application::getApplication() and then line 223 attempts to use that Application object.

I know you have previously verified that you used the “Full Package” upgrade, but can you double check your installation files against a clean copy from the tarball to verify that there aren’t any unintended local changes? I would use a recursive diff, or a tool such as git or WinMerge to verify that the installation files each match the unchanged version from the package.

Beyond that, there have been a recent change in the stable version of that file directly affects the lines causing the error in your instance:

This and a couple more enhancements and fixes will be released within OJS 2.4.8, which is due before the end of the month.

Thanks ctgraham,

I fixed the error in UsageStatsPlugin.inc.php changing the lines that were modified in github.com/pkp/ojs
Now everything seems to work.

Looking forward for OJS 2.4.8
Regards