White page when trying to access

Started by FindL, September 08, 2018, 06:42:24 AM

Previous topic - Next topic

FindL

Hello

I have a white page (or blank page) when I'm trying to access all pages of my forum...
Here are some informations:

php 5.6.35
apache 2.4.33
smf 2.0.15

No errors in php error logs...
No errors in apache error logs...

Do you have any ideas ?

Regards

SychO

Checkout My Themes:
-

Potato  •  Ackerman  •  SunRise  •  NightBreeze

Kindred

A blank white page MUST have an entry in the server error log....   it basically means that pho crapped out.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

d3vcho

Any recent changes you made? For example, installing a mod, or a theme...
"Greeting Death as an old friend, they departed this life as equals"

FindL

Quote from: SychO on September 08, 2018, 06:45:04 AM
Did you try contacting your host ?

It's on my computer directly. I'm using wamp server

Quote from: Kindred on September 08, 2018, 06:53:44 AM
A blank white page MUST have an entry in the server error log....   it basically means that pho crapped out.


Yes of course, but I have nothing in logs...

Quote from: d3vcho(void) on September 08, 2018, 06:53:56 AM
Any recent changes you made? For example, installing a mod, or a theme...

Nop. I just moved it from my server to my computer...

Illori

we dont recommend ever using your computer to host a website unless you know 100% what you are doing to keep it secure and keep hackers away.

FindL

I'm not hosting this website for the world, only for me to dev ;)

Illori

then you need to make sure the error log in your server is enabled and check it after it is.

FindL

Yes it is enabled.

I have this in:

Quote[08-Sep-2018 08:31:42 UTC] No error - Only to create the file

In php.ini:

Quotelog_errors = On

FindL

Ok, I just find why.

In index.php, this statement return false:

if (file_exists(dirname(dirname(__FILE__)) . '/Settings.php'))

Why ? because dirname(dirname(__FILE__)) return D:\wamp64\www but my website is in: D:\wamp64\www\forum\

I'm looking why...

Illori

that is something that should be logged in the error log. you really need to find out why the errors are not being logged.

FindL

How the error can be catch because.. it is programmatically not an error...
.
if (file_exists(dirname(dirname(__FILE__)) . '/Settings.php'))
{
// Found it!
require(dirname(dirname(__FILE__)) . '/Settings.php');
header('Location: ' . $boardurl);
}
// Can't find it... just forget it.
else
exit;


In my case, i'm directly going into the else statement and exit, so the white page appears...
But.. why does the path is not good .. I don't know.. maybe bad apache config ?


FindL


aegersz

if you just moved it (from your server to my computer) then it's prudent to check your directory paths again and/or fix it with repair_settings.php ... i would start there.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Shambles

Quote from: FindL on September 08, 2018, 01:10:07 PM
In index.php, this statement return false:

if (file_exists(dirname(dirname(__FILE__)) . '/Settings.php'))

That code doesn't appear in the issued root index.php for 2.0.15

Where did you find that version of index.php?

vbgamer45

If you are logging php errors make sure you have your php error log location set in your php.ini
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

feline

Quote from: FindL on September 08, 2018, 01:10:07 PM
if (file_exists(dirname(dirname(__FILE__)) . '/Settings.php'))

Why ? because dirname(dirname(__FILE__)) return D:\wamp64\www but my website is in: D:\wamp64\www\forum\
You have set the document_root correct in the php.ini of your server config?

Shambles

Quote from: Sh@mbles on September 09, 2018, 03:27:34 PM
Quote from: FindL on September 08, 2018, 01:10:07 PM
In index.php, this statement return false:

if (file_exists(dirname(dirname(__FILE__)) . '/Settings.php'))

That code doesn't appear in the issued root index.php for 2.0.15

Where did you find that version of index.php?

Kindred

something has altered your index.php

this is the correct SINGLE line from index.php

require_once(dirname(__FILE__) . '/Settings.php');


replace your if statement with this one line
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: