Jump to content

Blank screen after installation


BR2 Studio
 Share

Recommended Posts

Hi Everyone,

I made a site on localhost and after migrating I get blank screen on frontend and backend too. Tried with a fresh copy too and after installing it I got the same problem. During installation everything looks great.

- Debug mode is true

- Tried in subfolder and then in root too.

- There are no messages in error log.

- Sessions are created in site/assets/sessions/ -> I think it's not a permission related problem and processwire could be initialized

- .htaccess is working

Any hints what could be the problem? I've worked with several ProcessWire sites and I had no this issue before, but it's the first time installing on windows server with apache.

Link to comment
Share on other sites

   

but it's the first time installing on windows server.

Sorry you are having problems.  Here are a couple of weblinks that you should check out:  

http://windows.php.net/

http://php.iis.net/

http://php.net/manual/en/install.windows.php

http://www.microsoft.com/web/platform/phponwindows.aspx

https://processwire.com/talk/topic/268-processwire-on-windows72008-server-with-iis-webserver/

https://processwire.com/talk/topic/766-isapi-rewrite-3-on-iis/

Edited by cstevensjr
Added website dedicated to running PHP on Windows
  • Like 1
Link to comment
Share on other sites

If it's server configuration problem I think not an obvious one. We could run other systems like Concrete5 and Statamic properly on this system. But I couldn't find out what could be the problem. There is no error message, nothing more just blank pages.

Link to comment
Share on other sites

blank pages, - but with what HTTP response code?

Which profile has you installed?

I'm running PW on windows with apache2, too. No problems here.

Where do you have the .htaccess file placed when running PW from root? Is it combined with other rules, or is it only the PW distributed one?

  • Like 1
Link to comment
Share on other sites

1. It returns with 200 response code, so everything is fine there.

2. First time when I migrated from an another host I created with Blank profile. Then I tried to install a fresh copy of the latest PW with Classic profile. Each site had same issue. I tried to install in a subfolder and then in the root too. .htaccess was not combined.

If I print a $config variable or a $pages variable in index.php(!) it works well, but templates and nothing else is loaded. For example the $page variable doesn't even exist. I think the problem is not with the Rewrite, because the variables mentioned above are printed on every url. So routing works well.

When I add wrong database details, errors messages are shown correctly, so the site is connected to the database. (+ I can print for example $pages->get(1)->title in index.php)

The site I try to migrate works everywhere excluding this server.

I have never seen this problem before. I've already built several sites with PW. And it's really strange, no error messages. just plain pages. It looks nothing else is loaded after index.php and config.php.

Link to comment
Share on other sites

One more thing. When I run the following code:

$rootPath = dirname(__FILE__);
echo "RootPath:".$rootPath."</br>";
if(DIRECTORY_SEPARATOR != '/') $rootPath = str_replace(DIRECTORY_SEPARATOR, '/', $rootPath);
echo "NewRootPath:".$rootPath."</br>";
echo "HTTP_HOST:".$_SERVER['HTTP_HOST']."<br/>";
echo "DOCUMENT_ROOT:".$_SERVER['DOCUMENT_ROOT']."<br/>";
$rootURL = isset($_SERVER['HTTP_HOST']) ? substr($rootPath, strlen(rtrim($_SERVER['DOCUMENT_ROOT'], '/'))) . '/' : '/';
echo "RootURL:".$rootURL;

I got the following result:

RootPath:e:\sitename.hu
NewRootPath:e:/sitename.hu
HTTP_HOST:www.sitename.hu
DOCUMENT_ROOT:C:/webserver/html/sitename.hu
RootURL:/

Can't windows backslashes cause a problem like this?

I asked the php and apache error log from system administrator.

Link to comment
Share on other sites

It is solved. The problem was the different RootPath and DOCUMENT_ROOT. I can't exactly say why it happened because we have just reported the different paths to the server administrator. But now everything works well.

Thanks to everyone for tips.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...