Moving C5 from CentOS to FreeBSD. Homepage incorrectly rendered

Permalink
Hi,

I am attempting to move my c5 site from CentOS to FreeBSD.

Current site (CentOS) bimagazine.org
New site (FreeBSD) aib1.bisexual.org/bimag/

Here's what I've done:
Cleared and disabled the cache
Disabled pretty URL's
Fixed the stie.php file
Corrected the permissions on the necessary folders

Everything works except for the home page for some reason it is rendered incorrectly but all the other pages are rendered just fine.

Also when I try to make edits to the Home page the site locks up and the beach ball just spins. When I make changes to other pages they save just fine.

Here's my setup:
C5 version 5.4.2.2.

Server version: Apache/2.2.23 (FreeBSD)
Server built:   Jan 23 2013 20:41:53
Server's Module Magic Number: 20051115:31
Server loaded:  APR 1.4.6, APR-Util 1.4.1
Compiled using: APR 1.4.6, APR-Util 1.4.1
Architecture:   64-bit
Server MPM:     Prefork
  threaded:     no
    forked:     yes (variable process count)
Server compiled with....
 -D APACHE_MPM_DIR="server/mpm/prefork"
 -D APR_HAS_SENDFILE
 -D APR_HAS_MMAP
 -D APR_HAVE_IPV6 (IPv4-mapped addresses disabled)
 -D APR_USE_FLOCK_SERIALIZE


PHP Version 5.4.10
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dav
dba
dom
ereg
exif
fileinfo


Mysql version 5.5.29

I am really confused as far as I can tell everything should be working correctly.

Any help is greatly appreciated

uclageek
 
jvansanten replied on at Permalink Reply
I'd validate the HTML of your home page. Looking at pagesource, the HTML on the 2nd site ends without closing tags on body, html, and others. There may be an issue with earlier, unclosed tags. It's possible that different versions of Apache may render that differently.

If the issue isn't in your HTML structure, you might take a look at pathing to Javascript libraries, and perhaps permissions on those.

Just a couple thoughts.
uclageek replied on at Permalink Reply
uclageek
Hi jvansanten,

You are correct and you are awesome! The new site seems to not be able to fully load the wrapper tag.

I'm not sure exactly how to fix this though.

I did notice in the apache log

PHP Parse error:  syntax error, unexpected end of file in /usr/local/www/apache22/data/bimag/blocks/page_list/templates/most_read.php on line 22, referer: http://aib1.bisexual.org/bimag/
File does not exist: /usr/local/www/apache22/data/bimag/blocks/page_list/view.css, referer: http://aib1.bisexual.org/bimag/


The view.css error actually occurs on both servers so I don't think this is the issue.

Current server

File does not exist: /var/www/html/bimag/blocks/page_list/view.css, referer: http://bimagazine.org/


I'm confused about the most_read.php error cause the file is only 21 lines long

<?php
defined('C5_EXECUTE') or die(_("Access Denied."));
$limit = $num ? $num : 6;
$mrSql = "SELECT cv.cID, COUNT(*) Visits
          FROM CollectionVersions cv
          JOIN Pages p ON cv.cID = p.cID
          JOIN PageStatistics ps ON cv.cID = ps.cID
          WHERE cParentID >= 85 AND cParentID <= 90 AND cChildren = 0
          GROUP BY ps.cID
          ORDER BY Visits DESC
          LIMIT $num";
Loader::model('page_list');
$db = Loader::db();
$pageList = $db->execute($mrSql);
while ($pg = $pageList->fetchRow()) {


Am I missing a closing tag?
mkly replied on at Permalink Reply
mkly
What version number of PHP did your old site use?

Best Wishes,
Mike
uclageek replied on at Permalink Reply
uclageek
Hi Mike,

It's using:

-bash-3.2$ php -v
PHP 5.2.17 (cli) (built: Sep  1 2011 17:22:41) 
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
-bash-3.2$ php -m
[PHP Modules]
bz2
calendar
ctype
curl
date
dbase
dom
exif
filter
uclageek replied on at Permalink Best Answer Reply
uclageek
Found the problem, turns out short_open_tag was turned off.

Turning it on fixed the problem.
jvansanten replied on at Permalink Reply
Good catch. Glad all is well...

P.S. (short tags are deprecated, so for future compatibility it's best to have your code conform to long tags).