white page in browser after changing permissions for config.php

Get help with installation and running phpBB 3.2.x here. Please do not post bug reports, feature requests, or extension related questions here.
Post Reply
nickdc
Registered User
Posts: 8
Joined: Fri Aug 10, 2018 7:40 am

white page in browser after changing permissions for config.php

Post by nickdc » Fri Aug 10, 2018 8:16 am

Support Request Template
What version of phpBB are you using? phpBB 3.2.1
What is your board's URL? http://elective-affinities.net
Who do you host your board with? locally on a QNAP HS-251+ NAS
How did you install your board? I used the download package from phpBB.com
What is the most recent action performed on your board? Fresh Install
Is registration required to reproduce this issue? No
Do you have any MODs installed? No
Do you have any extensions installed? Yes
What extensions do you have installed? Two or three, which I can't remember accurately and can't check because I can't get into the board - that's the problem!
What styles do you currently have installed? Unsure
What language(s) is your board currently using? English UK
Which database type/version are you using? I Don't Know
What is your level of experience? New to PHP and phpBB
What actions did you take (updating your board; installing a MOD, style or extension; etc.) prior to this problem becoming noticeable? Responding to the notice that my config.php file was globally writeable, I changed the permissions* for that file as advised. Since then I have not been able to access the board/site in a browser.

* the QNAP has a "File Station" application, accessible through its web interface, which gives access to all the folders and files on the NAS. I was able to find the config.php file in the phpbb3 folder and use the tools menu to show its properties and change the permissions.
Please describe your problem. See above re previous actions. After changing the permissions to read only for all except owner (me), I got an "Access denied - you don't have the relevant permissions" message when I tried to access the board from my browser as usual. I then changed the permissions back to global read and write as they were originally, expecting that to give me access again, but instead I now get a blank white page in the browser.
Generated by SRT Generator

nickdc
Registered User
Posts: 8
Joined: Fri Aug 10, 2018 7:40 am

Re: white page in browser after changing permissions for config.php

Post by nickdc » Fri Aug 10, 2018 8:58 am

Just a follow-up question, to put my mind at rest:
Before changing the file permissions for config.php I created a backup for the board using the facility in the ACP. That created a single file, backup_1533831057_c98671ea164cb8a9.sql (when extracted). Does that single file really contain the entire bulletin board as it was, and if necessary will I be able to do a fresh installation of phpBB3 and restore to the previous state using that file?

User avatar
Mick
Support Team Member
Support Team Member
Posts: 20352
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: white page in browser after changing permissions for config.php

Post by Mick » Fri Aug 10, 2018 9:01 am

I’m not certain what you’ve done but I’m seeing this:
Server unable to read htaccess file, denying access to be safe
Have you got a backup of your config.php? Can’t you change the setting back as it was?

The .sql file is a dB back up, the files are a separate thing.
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.

nickdc
Registered User
Posts: 8
Joined: Fri Aug 10, 2018 7:40 am

Re: white page in browser after changing permissions for config.php

Post by nickdc » Fri Aug 10, 2018 9:45 am

Thanks for coming to help, Mick.

Do you mean that's the message your browser gives when you try my url? I can't see an htaccess file - should that be in the phpBB3 folder?
I don't have a backup of the config.php file; I assumed (wrongly I now realise) that would be included in the backup I made from withing the ACP.
As I said in my post, I have changed the permissions back as they were, and that's when I got the white page rather than denied access.
I suspect a problem with the QNAP: I've seen complaints about their software being occasionally flakey, and specifically file permissions not always being retained. I'm inclined to do a fresh installation of phpBB3, but if I do, will that .sql file restore all board forums, postings etc?

User avatar
Mick
Support Team Member
Support Team Member
Posts: 20352
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: white page in browser after changing permissions for config.php

Post by Mick » Fri Aug 10, 2018 10:00 am

If everything is back as it was try a manual cache purge by deleting everything in the /cache folder except index.htm and .htaccess. It may be your server package hides files starting with a dot like .htaccess, you can change that view in your FTP client or whatever you’re using to browse the server files.
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.

nickdc
Registered User
Posts: 8
Joined: Fri Aug 10, 2018 7:40 am

Re: white page in browser after changing permissions for config.php

Post by nickdc » Fri Aug 10, 2018 12:11 pm

Yes, the hidden files were not shown by default. I've changed that and now found the .htaccess file and made sure it has global read and write permissions, but that hasn't solved the problem.

I'm wary of deleting most of the contents of the cache folder as it has a lot of important-looking stuff in it: see screenshot.
Screenshot from 2018-08-10 12-14-20.png

And what about that .sql backup file - should it contain all the BB contents, ie forums, topics and posts?

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51428
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: white page in browser after changing permissions for config.php

Post by Brf » Fri Aug 10, 2018 12:20 pm

The .htaccess file should not be writeable. The only files/folders that should be writeable are the cache and upload and store folders.
The cache folder is rebuilt as needed, so any of its contents, other than its htaccess and index.htm, should be deleted anytime a change is made.

nickdc
Registered User
Posts: 8
Joined: Fri Aug 10, 2018 7:40 am

Re: white page in browser after changing permissions for config.php

Post by nickdc » Fri Aug 10, 2018 1:48 pm

Ok, I've deleted the contents of the cache folder (except .htaccess and index.htm), rebooted the server, but have the same problem.

I think I'll try a fresh installation - but please answer my earlier question: provided the backup utility has worked properly, should the .sql backup file contain all the forums, topics and posts?

User avatar
Brf
Support Team Member
Support Team Member
Posts: 51428
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: white page in browser after changing permissions for config.php

Post by Brf » Fri Aug 10, 2018 1:54 pm

The backup should contain whatever you asked for when you ran it, assuming your browser did not timeout.

nickdc
Registered User
Posts: 8
Joined: Fri Aug 10, 2018 7:40 am

Re: white page in browser after changing permissions for config.php

Post by nickdc » Sat Aug 11, 2018 7:51 am

Thanks.

Before I do a fresh installation I'm going to double-check all the file and directory permissions, following these instructions:

https://www.phpbb.com/support/docs/en/3 ... ermissions

What follows is probably a dumb question, but I want to be absolutely sure of what I'm doing. When I select a folder and bring up the tab showing permissions, there's a box to check in order to "apply changes to folder(s), subfolder(s) and file(s)". I'm assuming I should check it so the changes are written recursively. However, the guide gives different chmod values for files and directories: "All other files - 644 All directories - 755" Again, I'm assuming "all other files" refers to the standalone files, not the files in directories, but I'd appreciate confirmation of both these assumptions.

nickdc
Registered User
Posts: 8
Joined: Fri Aug 10, 2018 7:40 am

Re: white page in browser after changing permissions for config.php

Post by nickdc » Sun Aug 12, 2018 11:18 am

Not sure if I should open a new topic or stay in this one, but deciding on the latter for now. While continuing to troubleshoot the inaccessible board, I'm thinking about installing a second instance of it on the same server. I'd appreciate advice on the specifics mentioned below

Support Request Template
What version of phpBB are you using? phpBB 3.2.1
What is your board's URL? http://elective-affinities.net
Who do you host your board with? locally on a QNAP HS-251+ NAS
How did you install your board? I used the download package from phpBB.com
What is the most recent action performed on your board? Fresh Install
Is registration required to reproduce this issue? No
Do you have any MODs installed? No
Do you have any extensions installed? Yes
What extensions do you have installed? Unsure because I have no access to check.
What styles do you currently have installed? Unsure
What language(s) is your board currently using? UK English
Which database type/version are you using? MariaDB
What is your level of experience? New to PHP and phpBB
What actions did you take (updating your board; installing a MOD, style or extension; etc.) prior to this problem becoming noticeable? See my previous post. I've already posted re a "white screen" problem when trying to access my board. Being unable to resolve that issue, I now want to do a fresh installation of phpBB3 and am seeking advice/information on a specific aspect of that. I shall be attempting to install a second phpBB3 alongside the first, as shown here: https://www.qnap.com/en/how-to/tutorial ... al-hosting
My thinking is that if this is successful I may be able to compare the new working installation with the non-working one to find the problem with the latter. Failing that, I may be able to restore the inaccessible board to the new installation using the backup file from the former.
Please describe your problem. I have a backup file (.sql) of the database I can no longer access. I plan to follow this tutorial (which I used for the original installation):
https://www.qnap.com/en-au/how-to/tutor ... -php-mysql to install a second instance of phpBB3 on the QNAP.
When I reach the stage "Create a database for phpBB3 in phpMyAdmin" I intend to create a second database with a different name, eg "elec_affin" (thus leaving the original database, "phpbb3" intact for the moment) and I have two questions relating to that:
1. Will the phpBB3 package install correctly if its database is not named "phpbb3"?
2. If the answer to the above is "yes", then after I've installed a second instance of phpBB3, linked to a differently named database (eg "elec-affin") will I be able to restore the original database to it (or will the different names and/or paths for the two databases cause a problem)?
Generated by SRT Generator

User avatar
Mick
Support Team Member
Support Team Member
Posts: 20352
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: white page in browser after changing permissions for config.php

Post by Mick » Sun Aug 12, 2018 11:51 am

1 - Yes - phpBB doesn’t care where you install it or what the dB name is.
2 - Yes - it’s just a matter of pointing to the correct dB in config.php.
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.

nickdc
Registered User
Posts: 8
Joined: Fri Aug 10, 2018 7:40 am

Re: white page in browser after changing permissions for config.php

Post by nickdc » Sun Aug 12, 2018 12:45 pm

Brilliant! Thank you so much. I'll give it a go.

User avatar
Mick
Support Team Member
Support Team Member
Posts: 20352
Joined: Fri Aug 29, 2008 9:49 am
Location: Cardiff

Re: white page in browser after changing permissions for config.php

Post by Mick » Sun Aug 12, 2018 1:43 pm

A word of caution. Once you have the new install and dB working back up all the files & dB before you start doing anything else.
"The more connected we get the more alone we become" - Kyle Broflovski

There are no ‘threads’ in phpBB, they are topics.

Post Reply

Return to “[3.2.x] Support Forum”

Who is online

Users browsing this forum: Bermudez, canonknipser, EA117, elc79, jefmcg, KevC, Latrovia, mrix2000, topshot and 37 guests