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
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

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: 8
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: 10015
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: 8
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: 10015
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: 8
Joined: Mon Jul 23, 2012 3:58 am


Return to OJS Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 3 guests