blank page after successful install ... due to short tags?

Help with getting the CMS CORE package up and running. This does not include 3rd party modules, PHP scripts, anything downloaded via module manager or from any external source.
Locked
Frank H

blank page after successful install ... due to short tags?

Post by Frank H »

Well ... I decided to try this out (the 'stable' 0.9.2) ... and the setup ran well (except that the zip must have failed when downloading ... some directories weren't there, but I think the tar was ok)

But as soon as I tried to use it I got a blank page ... after 1 reinstallation and getting pretty sick of it ... I decided to take one more look ... admin/login.php works, but as soon as one gets logged in ... I get this as source (debug enabled)

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<__html>
<head>

<title>CMS Admin System</title>

<link rel="stylesheet" type="text/css" href="style.php" />
<link rel="stylesheet" type="text/css" href="tab.php" />

<__script__ type="text/javascript" src="../lib/helparea.js"></__script>



</head>

</__body >

<?
//CHANGED
require_once("../include.php");
$theme=get_preference(get_userid(),"admintheme");
if (file_exists(dirname(__FILE__)."/themes/$theme/header.php")) {
	include(dirname(__FILE__)."/themes/$theme/header.php");
} else {
	include(dirname(__FILE__)."/themes/default/header.php");
}
//STOP
?>
<?

<?
//CHANGED
require_once("../include.php");
$theme=get_preference(get_userid(),"admintheme");
//echo "theme:$theme";
if (file_exists(dirname(__FILE__)."/themes/$theme/footer.php")) {
	include(dirname(__FILE__)."/themes/$theme/footer.php");
} else {
	include(dirname(__FILE__)."/themes/default/footer.php");
}
//STOP
?>

<div id="debugfooter"><div><p>set datestyle='ISO'</p>
<p>SELECT sitepref_name, sitepref_value from test1siteprefs</p>
<p>SELECT * FROM test1modules ORDER BY module_name</p>
</div>
</div><__body>
</__html>
Hmm ... 'short tags' ("<?" instead of "<?php") ... and this server has those toggled off ... so I'm assuming this 'blank page' issue is related to the other ones that seems to be unsolved?
(might very well be that those has short tags off aswell?)

btw, from the php manual
Note:  Using short tags should be avoided when developing applications or libraries that are meant for redistribution, or deployment on PHP servers which are not under your control, because short tags may not be supported on the target server. For portable, redistributable code, be sure not to use short tags.
I'm not in the mood to go through unknown sourcecode to hunt out every short tag ... so I instead aska question...

Are there many places in the code that use short tags?
frquadrat

Re: blank page after successful install ... due to short tags?

Post by frquadrat »

I had the same problems when installing cmsms.
I just located any occurences of short tags and replaced them.
Works.

Still I think it should be corrected in the sources.
Frank H

Re: blank page after successful install ... due to short tags?

Post by Frank H »

you remember if there were many files, and where thay were?

(could be 'security' things that gets ignored if one's unlucky and miss some short tags :P)


Edit: ok, I grepped all files ... and replaced the proper tags ... so now I can figure out what files has the short tags ... was a few places unfortunately
(or, some are xml ... but we'll see how many it gets to...)

Edit2: These files has short tags...
admin/footer.php
admin/siteprefs.php (lots of places ... and also with )
admin/header.php
admin/editprefs.php (lots of places ... and also with )

Some more pages work now ... but I'm not going to waste more time on it now ... content management and plugin management still fails ... looked promising ... but now I'm tired to search for things to fix...
Last edited by Frank H on Wed May 18, 2005 5:35 pm, edited 1 time in total.
Locked

Return to “[locked] Installation, Setup and Upgrade”