solved Core update 500 error

sbhadauria
@sbhadauria
9 years ago
129 posts
I am getting 500 error after updating jrCore module. After debugging router.php file I found that jrCore_init() function giving 500 error.

I also tried to reset cache, restart apache and mysql.

Please suggest ?
updated by @sbhadauria: 02/16/16 01:45:02PM
alt=
DannyA
@dannya
9 years ago
584 posts
We are also getting seeing error in apache error log

PHP Parse error: syntax error, unexpected 'elseif' (T_ELSEIF) in /home
/dev/public_html/modules/jrCore/router.php on line 104

Causing 500 error
brian
@brian
9 years ago
10,148 posts
Not seeing any issues in router.php - double check the package has been downloaded and unzipped correctly.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
DannyA
@dannya
9 years ago
584 posts
This is the third time we tried to update. First time through marketplace, Second and third manual upload through ftp. Each time taking substantial time to roll back.
updated by @dannya: 11/15/15 03:14:15PM
brian
@brian
9 years ago
10,148 posts
Sorry you're having these issues - I'm just not sure what to recommend. If you're getting syntax errors in the script, just double check it has been downloaded correctly - I'm not sure what else it would be.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
DannyA
@dannya
9 years ago
584 posts
Well, what changes were made to router php in the last 3-4 releases? Did something change in the jrCore_init() function?
brian
@brian
9 years ago
10,148 posts
There are always changes between versions, but I'm certain there is not a syntax error in router.php - in fact I just updated this site:

http://testinstall.tdsdk.com/

to 5.2.41 without issue. I've also downloaded the 5.2.41 core from the site here, and there are no issues in router.php either:

>php -l router.php
No syntax errors detected in router.php

If you're seeing a problem in that script, then it means it is getting corrupted on your system sometime after being downloaded.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
alt=
DannyA
@dannya
9 years ago
584 posts
Just downloaded again. File sizes the same. File compare the same. Replace file again anyway. Still same problem.

I will wait for Sudhir to come back online. Maybe he can provide additinal information from earlier debugging efforts. This is beyond my paygrade.
sbhadauria
@sbhadauria
9 years ago
129 posts
I have no idea what's going on sometimes website working for couple of seconds.
sbhadauria
@sbhadauria
9 years ago
129 posts
I think there is file encoding issue with new updates. When I am opening files in notepad formatting removed that's why getting errors.
formating issue.jpg
formating issue.jpg  •  351KB


updated by @sbhadauria: 11/16/15 08:31:35AM
brian
@brian
9 years ago
10,148 posts
Windows Notepad is not going to properly show unix line endings to you. It is correct:

<?php
/**
 * Jamroom 5 System Core module
 *
 * copyright 2003 - 2015
 * by The Jamroom Network
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0.  Please see the included "license.html" file.
 *
 * This module may include works that are not developed by
 * The Jamroom Network
 * and are used under license - any licenses are included and
 * can be found in the "contrib" directory within this module.
 *
 * Jamroom may use modules and skins that are licensed by third party
 * developers, and licensed under a different license  - please
 * reference the individual module or skin license that is included
 * with your installation.
 *
 * This software is provided "as is" and any express or implied
 * warranties, including, but not limited to, the implied warranties
 * of merchantability and fitness for a particular purpose are
 * disclaimed.  In no event shall the Jamroom Network be liable for
 * any direct, indirect, incidental, special, exemplary or
 * consequential damages (including but not limited to, procurement
 * of substitute goods or services; loss of use, data or profits;
 * or business interruption) however caused and on any theory of
 * liability, whether in contract, strict liability, or tort
 * (including negligence or otherwise) arising from the use of this
 * software, even if advised of the possibility of such damage.
 * Some jurisdictions may not allow disclaimers of implied warranties
 * and certain statements in the above disclaimer may not apply to
 * you as regards implied warranties; the other terms and conditions
 * remain enforceable notwithstanding. In some jurisdictions it is
 * not permitted to limit liability and therefore such limitations
 * may not apply to you.
 *
 * @copyright 2012 Talldude Networks, LLC.
 * @author Brian Johnson <brian [at] jamroom [dot] net>
 */

// Define our base dir
define('APP_DIR', dirname(dirname(dirname($_SERVER['SCRIPT_FILENAME']))));

// prep our PHP environment
ini_set('session.auto_start', 0);
ini_set('session.use_trans_sid', 0);
ini_set('display_errors', 0);
ini_set('log_errors', 1);
ini_set('error_log', APP_DIR . '/data/logs/error_log');
error_reporting(E_ALL ^ (E_NOTICE | E_WARNING | E_DEPRECATED));



--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
sbhadauria
@sbhadauria
9 years ago
129 posts
But all other modules and previous version showing correctly.
brian
@brian
9 years ago
10,148 posts
sbhadauria:
But all other modules and previous version showing correctly.

I'm not sure what to tell you - all I know is the downloads from here are not corrupted, so if you see them corrupted on your end then somewhere in your download flow they are becoming corrupted.


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
sbhadauria
@sbhadauria
9 years ago
129 posts
Finally, I resolved my issue.

I am getting issue because of jrGeo module. I am including jrGeo module manually in my code, that is fine with old core updates. But in new updates jrGeo module is already including by jrCore. So jrGeo module including twice that's why error occurred.
brian
@brian
9 years ago
10,148 posts
sbhadauria:
Finally, I resolved my issue.

I am getting issue because of jrGeo module. I am including jrGeo module manually in my code, that is fine with old core updates. But in new updates jrGeo module is already including by jrCore. So jrGeo module including twice that's why error occurred.

Glad to hear you got it working. Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

Tags