This page is meant to serve as a collection point for information on maintaining the Ethnobotany Research and Applications journal website, the Open Journal Systems PHP and MySQL scripts that run the journal, upgrades, and any errors that we've encountered in the past, so that future journal managers have an easier time of site maintenance.
Most of these actions require you to be logged into the site as a journal manager (http://www.erajournal.org/ojs/index.php/era/manager) or into our hosting service's (currently InMotionHosting.com) cpanel website at http://erajournal.org/cpanel. Han Lau, Will McClatchey, and Nat Bletter have the login and password for these sites.
Trouble shooting
General trouble shooting and assistance can be found at the OJS support forums at http://pkp.sfu.ca/support/forum
They are your friends, use it early and often, post any problems as soon as they happen. The OJS authors usually respond within a day or so.
InMotion has it's own support forum at http://forum.inmotionhosting.com/ where you can post questions as well, but these are only for more general website problems. It is more likely that errors are coming from within the OJS software. Inmotion support can be emailed at support@inmotionhosting.com or called at 888-321-4678 ext. 2, 24 hrs/day, but they are fairly useless and blame most of the problems on individual software or installs. Since we are on a shared server (i.e. several websites running from 1 physical machine and IP address), they cannot reset the MySQL or http servers/daemons for us individually.
Some errors seem to be intermittent, perhaps based on the load at different times of day on our server and the other websites hosted on the same server. We've seen some "DB Error: MySQL has gone away" errors that appear during the day in Hawaii, but not late at night (3 AM). It is unclear why our relatively low access journal would overload the servers.
File transfer
Files can be managed, downloaded, uploaded, and edited either via an FTP client logged into ftp://erajournal.org site with TLS/SSL encryption, or the site cpanel file manager https://secure63.inmotionhosting.com:2083/frontend/x3/filemanager/index.html?dirselect=webroot&domainselect=erajournal.org&dir=%2Fhome2%2Ferajou5%2Fpublic_html&showhidden=1
Upgrades
The best upgrade method seems to be the patch method where it looks at all the customized files you have and just puts in the changes that have been made in the code between versions. But a remote upgrade can be done as well with a lot more tinkering. Both methods are outlined below.
Before any upgrades,
Upgrade
a. Patch method
This requires command line access which we do not have on our current provider, so the only way this could be accomplished is to do it on a local downloaded copy of journal site
b. Remote method
This does not require command line access, but a lot of individual modifications to files.
diff ojs_backup/config.inc.php ojs2.2.3/config.inc.php
<message key="about.erahistory">ERA History</message>
<message key="about.eraphilosophy">ERA Guiding Philosophies</message>
These all must be patched into the upgraded locale.xml file, and optimally into all the languages we support if possible.
After upgrade
Config files
The hidden file public_html/.htaccess (notice the period before the name that is the UNIX symbol for hiding a file. Some FTP clients need the "Show invisible files" option turned on to be able to see these files):
Be VERY careful with the .htaccess file and any modifications as these can easily make the entire site inaccesible to users and scripts and cause OJS to return many errors or completely stop functioning.
public_html/php.ini controls much of how php in general runs on the site, such as memory size limits, timeouts, and other parameters
public_html/ojs/config.inc.php controls the parameters of OJS, many of which change during upgrades.
Most configuration file setting changes go into effect immediately, thought I've seen a few that take 30-60 min (for some server to reset normally?) to go into effect.
Transferring to new hosts/providers
The the entire journal site can be successfully copied over to another web hosting server with some careful tweaks. I've gotten it working on http://nadabrahma.org/ojs/index.php/era (a SustainableWebsites.com site) with the following steps:
After some tweaking with the mysql settings it seemed to work smoothly, even sending email correctly, so we can relatively easily transfer over to another host.
Bandwidth and space seems to be our biggest issues/requirements with new hosts. Our bandwidth which is actually at 98 GB/month (!) for some reason which is well beyond what some hosts like http://SustainableWebsites.com allow (between 10-20 GB for the packages we were looking at), so we'd wind up paying about $40/month extra or $800/year on http:/sustainablehosting.com for the additional storage and bandwidth.
This is so high due to the videos being downloaded:
as the journal only take ~1 GB/month. I'm not sure who's downloading all these videos and where they are announced beside WiserEarth (http://www.wiserearth.org/article/624e79537b4e34a2e8654068314b79d7), as they do not show up in a Google video search:
it seems like one user IP is the bulk of our bandwidth demands:
This is probably one of us in Hawaii connecting as an editor, so maybe by keeping the videos elsewhere or hosting them at Hawaii.edu we could still fit into their smaller storage & bandwidth limits.
This is higher than most months which are more in the 10-20 GB range, but some previous months have gone over 100 GB bandwidth:
Sep 2009
Aug 2009
Jul 2009
Jun 2009
May 2009
Apr 2009
Mar 2009
Feb 2009
Jan 2009
Dec 2008
Nov 2008
Oct 2008
Sep 2008
The great crash of late 2009
On Aug 19, 20, or 21 something was changed on inmotionhostings servers, in one of our config files, or the MySQL database was corrupted in such a way that review request and response emails sent through OJS were sent but always caused a DB error to show up. This is documented in the support forum http://pkp.sfu.ca/support/forum/viewtopic.php?f=8&t=3981 and is copied here. It's not clear what finally solved this issue but probably a combination of time, fixing the .htaccess file back to it's default, and turning of the allow_envelope_sender option in the config.inc.php file, though since this has been an intermittent problem, it's hard to know what changes fixed which errors, though it seems like the envelope_sender, upgrading all the files at once, and time have healed most wounds!
by ephramz » Wed Sep 02, 2009 12:20 am
everytime I do something on our OJS system (http://www.erajournal.org/ojs/index.php/era ) that involves sending email (review invite, review accept, etc.), when I hit send, it takes 1-2 minutes to come back with a page and then I get the following error:
DB Error: MySQL server has gone away
DB Error: MySQL server has gone away
repeated twice like that.
I've been talking to our host InMotion hosting and they have no ideas. I've upgraded from 2.2.0 to 2.2.3, increased PHP memory size to 1 GB, increased max_timeout to 300 sec, deleted the 16 MB counter plugin file, and turned off persistent connections, none of which helped. We're getting desperate as no one can use our system for the last week because of this. It started about 10 days ago with no apparent setting changes from our side.
If any one has any ideas or seen a similar problem, please let us know. Thanks!
by ephramz » Wed Sep 02, 2009 4:52 am
I now realize that our .htaccess file was causing part of the problem, though we have a new problem now.
Our .htaccess file was as follows:
<IfModule mod_php5.c>
# mod_suPHP is active - php.ini overrides must be within these tags or in your local php.ini
</IfModule>
suPHP_ConfigPath /home2/erajou5/public_html
Options All Indexes
IndexOptions FancyIndexing
but i have commented out the last 3 lines. What would cause those 3 lines to cause the mySql errors we've been having?
now after sending an email, a series of php errors will show up, though the email is recorded in the mysql database properly now.
Any ideas what might be causing this php dump?
What is required for changes in the .htaccess file to take effect? A restart of the httpd on our server, or is it automatic?
by ephramz » Wed Sep 02, 2009 8:22 pm
Now, in an attempt to get back a functional journal I reverted to the backup of the 2.2.0 OJS that I had from 2 days ago, but now on most pages I get errors like
Notice: Undefined index: discipline in /home2/erajou5/public_html/ojs/classes/user/UserDAO.inc.php on line 139
Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home2/erajou5/public_html/ojs/classes/user/UserDAO.inc.php:139) in /home2/erajou5/public_html/ojs/classes/session/SessionManager.inc.php on line 57
Notice: Undefined index: abstracts_disabled in /home2/erajou5/public_html/ojs/classes/journal/SectionDAO.inc.php on line 140
Notice: Undefined index: abstracts_disabled in /home2/erajou5/public_html/ojs/classes/journal/SectionDAO.inc.php on line 140
Notice: Undefined index: abstracts_disabled in /home2/erajou5/public_html/ojs/classes/journal/SectionDAO.inc.php on line 140
Notice: Undefined index: abstracts_disabled in /home2/erajou5/public_html/ojs/classes/journal/SectionDAO.inc.php on line 140
Notice: Undefined index: abstracts_disabled in /home2/erajou5/public_html/ojs/classes/journal/SectionDAO.inc.php on line 140
Notice: Undefined index: abstracts_disabled in /home2/erajou5/public_html/ojs/classes/journal/SectionDAO.inc.php on line 140
Notice: Undefined index: abstracts_disabled in /home2/erajou5/public_html/ojs/classes/journal/SectionDAO.inc.php on line 140
Warning: Cannot modify header information - headers already sent by (output started at /home2/erajou5/public_html/ojs/classes/user/UserDAO.inc.php:139) in /home2/erajou5/public_html/ojs/classes/template/TemplateManager.inc.php on line 233
Warning: Cannot modify header information - headers already sent by (output started at /home2/erajou5/public_html/ojs/classes/user/UserDAO.inc.php:139) in /home2/erajou5/public_html/ojs/classes/template/TemplateManager.inc.php on line 236
above the actual functional web page (on the review submissions list page). Are these new fields that have been entered in the mySQL DB by the 2.2.3 upgrade that 2.2.0 doesn't understand?
Any graceful way to downgrade, or get the former pages and errors in 2.2.3 working again?
Thanks for the help!
by jmacgreg » Thu Sep 03, 2009 12:53 pm
Hi ephramz,
How exactly did you downgrade -- did you restore the original database from backup, or did you just try reverting the files? You'll have to do both to successfully restore your previous version.
Cheers,
James
James MacGregor
PKP Support Team
--
Questions? Before posting, please try:
by ephramz » Fri Sep 04, 2009 6:49 am
Thanks for the response, James. I had neglected to do a MySQL backup so that was probably causing the problem.
Now I've tried to do the 2.2.3 upgrade again since it seems there's no going back without a DB backup. But when confirming or declining a review seems to spew out a stream of gibberish starting with
NQ.�G�.�G�.ȇ2.�M9�G�.�G�.�*.at requires the system to be installed. * Any pages that can be accessed from an uninstalled system should be allowed here. * @return boolean */��/** * This is the number of seconds cached content will persist. *
*
0 = always regenerate cache
*
-1 = never expires
*
* * @var integer */���h&.���.PK�.PK�.�d�.0e�.�.l.`Y0n�. ('.A /home2/erajou5/public_html/ojs/index.php)p.X-Powered-By: PHP/5.2.9PK)`��.`��.(J�..\4.��$.�J�.�J�..��.!PCGI/1.1_ROOT..!�q�.�q�..i(�5�o�]p�.hK�.(K�..L�..L�.CONTENT_LENGTH9�application/x-www-form-urlencoded)��K�.!.i��..˜.!�
Anyone read Klingon? Or more seriously know what's causing this? A UTF-8 to ASCII problem? Does the cache need to be erased? If so what files? I tried to delete the entire cache (or moved it to another location) and that caused more problems.
by asmecher » Fri Sep 04, 2009 9:05 am
Hi ephramz,
I have no idea what would've caused this, but it looks like at least one file in your installation is corrupted. Look at includes/functions.inc.php on your system and make sure it matches the stock version.
Regards,
Alec Smecher
Public Knowledge Project Team
by ephramz » Fri Sep 04, 2009 6:56 pm
Hi Alec,
Thanks for the tip. I did a diff of the stock includes/functions.inc.php and the one online and there's no difference that I can see. We are also getting the uninformative error
Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 469014416 bytes) in Unknown on line 0
at the bottom of most pages where the two #'s vary from page to page. This hard to decipher and strange since our PHP memory limit is set at 1 GB, well above either of these numbers.
Another strange effect is that the full page of klingon errors will sometimes go away after 10 secs and the proper page will load. Sometimes for other pages if my connection is really slow I'll see "Made in PHP 5.4" (or something to that effect, it's so quick I can't quite read it) flash on the screen, and then the proper page loads. What might be making it load this temporary pages?
Is there any good way to get back the customizations we had in 2.2.0? Are those stored in the DB or the files directory? I've copied the 2.2.0 files directory into the 2.2.3 running version directory and done the web OJS upgrade, but our customizations (an extra page and a modification of the journal history/about page) lead to nowhere, though the headers are still there. I've seen on some other posts on here that 2.2.x uses a new block structure for page layout that won't be compatible with older versions, but is that true between 2.2.0 and 2.2.3 as well?
Thanks for all the help!