21304 Posts in 5736 Topics by 2603 members
| Go to End | Next > | |
| Author | Topic: | 1895 Views |
-
all pages display blank?

29 October 2009 at 10:56pm Last edited: 31 October 2009 12:40pm
Hi,
I've been banging my head against my laptop screen for several hours now and would appreciate if anyone could help me diagnose the probem I'm having.
All of a sudden, any content page I attempt to view returns a blank page. I have had the site running successfully for some time now here:
http://www.kelf.co.nz/PHDEVV232/
And it's all running fine locally.
At the time he issue arose, i was modifying a template.ss file for the homepage but I've backed out of that change and other page types that I have not modified also display a blank page.
I've tried ?flush=all, and /dev/build and flushed the browser cache with no luck.
i am getting this in my server logs:
[Thu Oct 29 22:37:46 2009] [error] [client 222.154.189.145] client denied by server configuration: /var/www/vhosts/kelf.co.nz/httpdocs/PHDEVV232/.htaccess
[Thu Oct 29 22:38:22 2009] [error] [client 222.154.189.145] client denied by server configuration: /var/www/vhosts/kelf.co.nz/httpdocs/PHDEVV232/.htaccess
[Thu Oct 29 22:51:53 2009] [error] [client 222.154.189.145] Directory index forbidden by Options directive: /var/www/vhosts/kelf.co.nz/httpdocs/PHDEVV232/
[Thu Oct 29 22:51:58 2009] [error] [client 222.154.189.145] Directory index forbidden by Options directive: /var/www/vhosts/kelf.co.nz/httpdocs/PHDEVV232/My .htacccess file is this (and has not been changed recently):
### SILVERSTRIPE START ###
<IfModule mod_dir.c>
DirectorySlash Off
</IfModule>RewriteEngine On
RewriteBase /PHDEVV232RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)|(\.ico)$
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
### SILVERSTRIPE END #### Disable directory browsing
Options All -IndexesRunning the site in dev mode returns this error.
[Warning] mb_ereg_replace() [function.mb-ereg-replace]: mbregex compile err: unmatched close parenthesis
GET /PHDEVV232/?flush=allLine 493 in /var/www/vhosts/kelf.co.nz/httpdocs/PHDEVV232/sapphire/core/SSViewer.php
Source484 // CAUTION: No spaces allowed between arguments for all i18n calls!
485 ereg('.*[\/](.*)',$template,$path);
486
487 // i18n _t(...) - with entity only (no dots in namespace), meaning the current template filename will be added as a namespace
488 $content = ereg_replace('<' . '% +_t\((\'([^\.\']*)\'|"([^\."]*)")(([^)]|\)[^ ]|\) +[^% ])*)\) +%' . '>', '<?= _t(\''. $path[1] . '.\\2\\3\'\\4) ?>', $content);
489 // i18n _t(...)
490 $content = ereg_replace('<' . '% +_t\((\'([^\']*)\'|"([^"]*)")(([^)]|\)[^ ]|\) +[^% ])*)\) +%' . '>', '<?= _t(\'\\2\\3\'\\4) ?>', $content);
491
492 // i18n sprintf(_t(...),$argument) with entity only (no dots in namespace), meaning the current template filename will be added as a namespace
493 $content = ereg_replace('<' . '% +sprintf\(_t\((\'([^\.\']*)\'|"([^\."]*)")(([^)]|\)[^ ]|\) +[^% ])*)\),\<\?= +([^\?]*) +\?\>) +%' . '>', '<?= sprintf(_t(\''. $path[1] . '.\\2\\3\'\\4),\\6) ?>', $content);
494 // i18n sprintf(_t(...),$argument)
495 $content = ereg_replace('<' . '% +sprintf\(_t\((\'([^\']*)\'|"([^"]*)")(([^)]|\)[^ ]|\) +[^% ])*)\),\<\?= +([^\?]*) +\?\>) +%' . '>', '<?= sprintf(_t(\'\\2\\3\'\\4),\\6) ?>', $content);
496
497 // </base> isnt valid html? !?
498 $content = ereg_replace('<' . '% +base_tag +%' . '>', '<base href="<?= Director::absoluteBaseURL(); ?>" />', $content);
499Trace
* mb_ereg_replace(<% +sprintf\(_t\(('([^\.']*)'|"([^\."]*)")(([^)]|\)[^ ]|\) +[^% ])*)\),\<\?= +([^\?]*) +\?\>) +%>,<?= sprintf(_t('HomePage.ss.\2\3'\4),\6) ?>,<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" ><!-- template /var/www/vhosts/kelf.co.nz/httpdocs/PHDEVV232/themes/PeterHillary/templates/HomePage.ss --> <head> <% base_tag %> <script src="themes/PeterHillary/Scripts/AC_RunActiveContent.js" type="text/javascript"></script> <script type="text/javascript" src="themes/PeterHillary/Scripts/jquery.js"></script> <script type="text/javascript" src="themes/PeterHillary/Scripts/jcaption.js"></script> <script type="text/javascript" src="themes/PeterHillary/Scripts/custom.js"></script> <?= $item->XML_val("MetaTags",null,true) ?> <link rel="shortcut icon" href="themes/PeterHillary/images/favicon.ico" /> <link rel="stylesheet" media="screen" type="text/css" href="themes/PeterHillary/css/layout.css" > <link rel="stylesheet" media="print" type="text/css" href="themes/PeterHillary/css/print.css" > <script type="text/javascript"> $(document).ready(function(){ $('#mainSide img').jcaption(); ns_newsticker(".ticker span",8000); // Used to create newsticker, number defines the time between transitions in milliseconds }); </script> </head> <body> <div id="wrap"> <div id="top-bg"> <div id="header-text"> <img src="themes/PeterHillary/images/logo_text.jpg"> </div> <div id="header-links"> <a href="home">Home</a> | <a href="contact">Contact</a> </div> <div id="header-logo"> <img src="themes/PeterHillary/images/logo_hillary.jpg"> </div> </div> <div id="header-photo"> <div style="margin-top: 24px;"> <script type="text/javascript"> AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','946','height','166','loop', 'false', 'title','Home Page Transitions','src','themes/PeterHillary/images/Hometrans','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','themes/PeterHillary/images/Hometrans' ); //end AC code </script> <noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="946" height="166" title="Home Page Transitions"> <param name="movie" value="Hometrans.swf" /> <param name="quality" value="high" /> <embed src="themes/PeterHillary/images/Hometrans.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="946" height="166"></embed> </object> </noscript> </div> </div> <div id="nav_sub"> <!-- include /var/www/vhosts/kelf.co.nz/httpdocs/PHDEVV232/themes/PeterHillary/templates/Includes/Navigation.ss --> <ul> <? array_push($itemStack, $item); if($loop = $item->obj("Menu", array("1"))) foreach($loop as $key => $item) { ?> <li><a href="<?= $item->XML_val("Link",null,true) ?>" title="Go to the <?= $item->obj("Title",null,true)->XML_val("XML",null,true) ?> page" class="<?= $item->XML_val("LinkingMode",null,true) ?>"><span><?= $item->XML_val("MenuTitle",null,true) ?></span></a></li> <? } $item = array_pop($itemStack); ?> </ul> <!-- end include /var/www/vhosts/kelf.co.nz/httpdocs/PHDEVV232/themes/PeterHillary/templates/Includes/Navigation.ss --> </div> <div id="content-wrap"> <div id="mainSide"> <?= $item->XML_val("Layout",null,true) ?> </div> <!-- include /var/www/vhosts/kelf.co.nz/httpdocs/PHDEVV232/themes/PeterHillary/templates/Includes/HomeSideBar.ss --> <div id="sidebar" > <?= $item->XML_val("SidebarContent",null,true) ?> </div> <!-- end include /var/www/vhosts/kelf.co.nz/httpdocs/PHDEVV232/themes/PeterHillary/templates/Includes/HomeSideBar.ss --> </div> <!-- include /var/www/vhosts/kelf.co.nz/httpdocs/PHDEVV232/themes/PeterHillary/templates/Includes/Footer.ss --> <div id="footer-wrap"> <?= $item->XML_val("Footer",null,true) ?> <div id="footer-bottom"> <div id="footer-logo"> <div id="footer-links"> <a href="home">Home</a> | <a href="contact">Contact</a> </div> </div> </div> <!-- footer ends--> </div> <!-- end include /var/www/vhosts/kelf.co.nz/httpdocs/PHDEVV232/themes/PeterHillary/templates/Includes/Footer.ss --> <!-- footer ends--> </div> <!-- wrap ends here --> </div> </body> </html><!-- end template /var/www/vhosts/kelf.co.nz/httpdocs/PHDEVV232/themes/PeterHillary/templates/HomePage.ss -->)
Line 493 of SSViewer.php
* SSViewer::parseTemplateContent(<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" > <head> <% base_tag %> <script src="themes/PeterHillary/Scripts/AC_RunActiveContent.js" type="text/javascript"></script> <script type="text/javascript" src="themes/PeterHillary/Scripts/jquery.js"></script> <script type="text/javascript" src="themes/PeterHillary/Scripts/jcaption.js"></script> <script type="text/javascript" src="themes/PeterHillary/Scripts/custom.js"></script> $MetaTags <link rel="shortcut icon" href="themes/PeterHillary/images/favicon.ico" /> <link rel="stylesheet" media="screen" type="text/css" href="themes/PeterHillary/css/layout.css" > <link rel="stylesheet" media="print" type="text/css" href="themes/PeterHillary/css/print.css" > <script type="text/javascript"> $(document).ready(function(){ $('#mainSide img').jcaption(); ns_newsticker(".ticker span",8000); // Used to create newsticker, number defines the time between transitions in milliseconds }); </script> </head> <body> <div id="wrap"> <div id="top-bg"> <div id="header-text"> <img src="themes/PeterHillary/images/logo_text.jpg"> </div> <div id="header-links"> <a href="home">Home</a> | <a href="contact">Contact</a> </div> <div id="header-logo"> <img src="themes/PeterHillary/images/logo_hillary.jpg"> </div> </div> <div id="header-photo"> <div style="margin-top: 24px;"> <script type="text/javascript"> AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','946','height','166','loop', 'false', 'title','Home Page Transitions','src','themes/PeterHillary/images/Hometrans','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','themes/PeterHillary/images/Hometrans' ); //end AC code </script> <noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="946" height="166" title="Home Page Transitions"> <param name="movie" value="Hometrans.swf" /> <param name="quality" value="high" /> <embed src="themes/PeterHillary/images/Hometrans.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="946" height="166"></embed> </object> </noscript> </div> </div> <div id="nav_sub"> <% include Navigation %> </div> <div id="content-wrap"> <div id="mainSide"> $Layout </div> <% include HomeSideBar %> </div> <% include Footer %> <!-- footer ends--> </div> <!-- wrap ends here --> </div> </body> </html>,/var/www/vhosts/kelf.co.nz/httpdocs/PHDEVV232/themes/PeterHillary/templates/HomePage.ss)
Line 321 of SSViewer.php
* SSViewer->process(HomePage_Controller)
Line 175 of Controller.php
* Controller->handleAction(HTTPRequest)
Line 129 of RequestHandler.php
* RequestHandler->handleRequest(HTTPRequest)
Line 122 of Controller.php
* Controller->handleRequest(HTTPRequest)
Line 29 of ModelAsController.php
* ModelAsController->handleRequest(HTTPRequest)
Line 44 of RootURLController.php
* RootURLController->handleRequest(HTTPRequest)
Line 277 of Director.php
* Director::handleRequest(HTTPRequest,Session)
Line 121 of Director.php
* Director::direct(/)
Line 118 of main.php
Any ideas? Anyone?
Thanks
Brad -
Re: all pages display blank?

30 October 2009 at 4:28am
Looks like you may have written something badly in your template. Make sure you leave a space after '<%' and before '%>'
Are you using a custom theme or the default blackcandy one? Also what version of Silverstripe? Any additional modules?
-
Re: all pages display blank?

30 October 2009 at 12:43pm
thanks mo, I've checked for the right syntax for '<% ' and ' %>', and it looks fine in all my templates.
I'm running a custom theme, but have switched back to blackcandy with the same blank page results, However locally my theme and blackcandy runs fine.
I'm running the latest version of SS 2.3.3.
I've no additional modules running, i did have a blog module running but removed that some time ago.
I've attached a copy of my homepage.ss template as maybe someone will be able to spot something wrong in there.
Still no luck fixing this issue, i will probably have to decommision everything, and start to rebuild the site up bit by bit to ientify the problem
-
Re: all pages display blank?

31 October 2009 at 12:36am
Your syntax looks alright, but how about the included files. Also, I take it those includes exist, and have the correct name?
Also, does your HomePage class extend Page (and likewise HomePage_Controller extend Page_Controller)? If not I believe that can cause errors.
What I do is just use have Page.ss as my master template, then add HomePage.ss to my Layout folder. That way I don't have to worry about duplicating the majority of my html.
Also, have you customized your HTACCESS? It looks different to the default. Are you on a shared hosting account or your own server? Your server errors look like it could be something to do with that?
For reference, mine look like this:
### SILVERSTRIPE START ###
<Files *.ss>
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Files><IfModule mod_rewrite.c>
RewriteEngine OnRewriteCond %{REQUEST_URI} !(\.gif$)|(\.jpg$)|(\.png$)|(\.css$)|(\.js$)
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
</IfModule>
### SILVERSTRIPE END ###Sorry I couldn't be of more help, its a bit of an odd issue :s
-
Re: all pages display blank?

31 October 2009 at 4:30am
Well troubleshooting basics, if it works locally and doesn't work remotely that means it is a difference on your server.
1. Confirm the two files are the same and the remote one is intact. Like diff-returns-nothing the same.
2. Manually go into your ss cache directory and deleted the files, then flush and rebuild
3. Restart apache.
4. Continue inspecting your remote environment, it has to be something weird on there. Maybe there were recent apache/php upgrades? -
Re: all pages display blank?

31 October 2009 at 12:53pm
hi, thanks everyone for the advice. i have removed everything from my server, re-uploaded all files, and still the same problem, so it does suggest an issue with my host.
If anyone else is having this problem with 'openhost', please let me know. i noticed another thread here with someone having the same issue, but they abandoned SS for wordpress - (post - http://silverstripe.org/general-questions/show/270954#post27095)
My host is on holiday for the weekend, so this may have to wait.
When I run the site in dev mode, i am getting this error:
[Warning] mb_ereg_replace() [function.mb-ereg-replace]: mbregex compile err: unmatched close parenthesis
// i18n sprintf(_t(...),$argument) with entity only (no dots in namespace), meaning the current template filename will be added as a namespace
493 $content = ereg_replace('<' . '% +sprintf\(_t\((\'([^\.\']*)\'|"([^\."]*)")(([^)]|\)[^ ]|\) +[^% ])*)\),\<\?= +([^\?]*) +\?\>) +%' . '>', '<?= sprintf(_t(\''. $path[1] . '.\\2\\3\'\\4),\\6) ?>', $content);I’m not getting this error locally, can anyone interpret why this line would be throwing an error, and if this warning is the cause of my blank page issues? I know ereg_replace is depreciated as of PHP V5.3, but running phpinfo here shows I’m using php V5.2 which should be fine.
http://www.kelf.co.nz/PHDEVV232/PeterHillary/phpinfo.php
Anyone?
-
Re: all pages display blank?

31 October 2009 at 4:51pm
A quick spot of googling said try this;
mbstring.func_overload = No
But I'm betting you can't change your host's settings, maybe ini_set()
-
Re: all pages display blank?

2 November 2009 at 12:36pm
thanks again to both of you.
Dalesaurus, you were right, I needed to have this set:
"mbstring.func_overload = 0"
My host had changed this to 4 without notifying me.
So in short, if anyone is seeing blank pages and is getting the error described above, make sure mbstring.func_overload is set to 0 (no)
| 1895 Views | ||
| Go to Top | Next > |



