OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Warnings and php code above header

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Warnings and php code above header

Postby jascanio » Wed Oct 10, 2012 2:54 pm

Hello,
I am getting the following warnings above my magazine header banner when accessing the Register section.
ord))); // Note: sha1 requres PHP >= 4.3.0 case 'ssha': $salt = pack('C*', mt_rand(), mt_rand(), mt_rand(), mt_rand(), mt_rand(), mt_rand()); return '{SSHA}' . base64_encode(pack('H*', sha1($password . $salt)) . $salt); case 'crypt': return '{CRYPT}' . crypt($password); default: //return '{CLEARTEXT}'. $password; return $password; } } } ?>
Warning: Cannot modify header information - headers already sent by (output started at /home/ajflorid/public_html/pasosonline/ojs/plugins/auth/ldap/LDAPAuthPlugin.inc.php:404) in /home/ajflorid/public_html/pasosonline/ojs/classes/template/TemplateManager.inc.php on line 240

Warning: Cannot modify header information - headers already sent by (output started at /home/ajflorid/public_html/pasosonline/ojs/plugins/auth/ldap/LDAPAuthPlugin.inc.php:404) in /home/ajflorid/public_html/pasosonline/ojs/classes/template/TemplateManager.inc.php on line 243


I'm running a 2.2.1 which I know is ancient. However, before considering any upgrade, can anyone help and tell me why I`m getting this errors and how could I fix them.
Thanks very much.
Regards,
Juan
jascanio
 
Posts: 6
Joined: Mon Jul 23, 2012 3:58 am

Re: Warnings and php code above header

Postby asmecher » Wed Oct 10, 2012 4:45 pm

Hi Juan,

What's in plugins/auth/ldap/LDAPAuthPlugin.inc.php around line 404? I suspect something has gone amiss with that file. (Are you using LDAP authentication? If not, I also suggest turning it off in your Site Administrator's authorization settings.)

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 7696
Joined: Wed Aug 10, 2005 12:56 pm

Re: Warnings and php code above header

Postby jascanio » Sat Oct 13, 2012 1:58 pm

Hi Alec,
Line 404 is empty, and nothing is further down. From 389 to 403 the file includes the following lines of code
}

?>
ord))); // Note: sha1 requres PHP >= 4.3.0
case 'ssha':
$salt = pack('C*', mt_rand(), mt_rand(), mt_rand(), mt_rand(), mt_rand(), mt_rand());
return '{SSHA}' . base64_encode(pack('H*', sha1($password . $salt)) . $salt);
case 'crypt':
return '{CRYPT}' . crypt($password);
default:
//return '{CLEARTEXT}'. $password;
return $password;
}
}
}

?>


My settings for authentication do not seem to be using LDAP. (Sorry i'm new to OJS). What I see in the site administration section for authentication is that LDAP is not selected. Instead, a radiobutton is selected next to "OJS User Database".
Thanks in advance.
Regards,
Juan
jascanio
 
Posts: 6
Joined: Mon Jul 23, 2012 3:58 am

Re: Warnings and php code above header

Postby asmecher » Sat Oct 13, 2012 3:07 pm

Hi Juan,

It looks like that file is garbled somehow; I would suggest restoring it from the OJS distribution package of the same version.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 7696
Joined: Wed Aug 10, 2005 12:56 pm

Re: Warnings and php code above header

Postby jascanio » Sat Oct 13, 2012 4:14 pm

Superb!! That has solved the issue.
thanks for all your help!
Regards,
Juan
jascanio
 
Posts: 6
Joined: Mon Jul 23, 2012 3:58 am


Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 6 guests