Web admin page won't show up, index.php error

Please follow the below template, it will help us to help you!

Expected Behaviour:

After pihole started, should be able to load the admin page.

Actual Behaviour:

admin page wont load up, internal error 500

Debug Token:

6pbs5tquh5

I thought it would be simple problem/fix. The error log file says that there is a syntax error, unexpected ')' in /var/www/html/admin/index.php on line 12.

I looked at that file, it seems to be fine to me. On line 12, it says
function getinterval()

It does have a ')' at the end. but it seems to be fine, right?

Hi jfb,

Thanks for quick reply. I added a little bit more information. I am new, and I do not know what that is. Thanks for being patient for me.

pihole itself runs fine. I can access all information, it is doing its job. pihole -c is working as well. Just the php page wont load.

You guys might have seen this before, I did some research but could not find any answers.

Thanks for your help.

Best,

dude, I know what you mean now .It is a dump some sort. I just did it. I have about 1M block list. Hope this wont be a trouble for you guys.

Debug Token
6pbs5tquh5

I have other two web service running, one for printer server, the other for plex. They are all fine. Just for your information.

Again, thanks for taking a look.

We didn't get much value from your debug log, since it ran out of space while printing your lengthy list of regex filters (12,698 lines in the debug log). A few examples below. Did you mistakenly enter some blacklisted domains as wildcards? Are you running a script of any kind that automatically imports this?

*** [ DIAGNOSING ]: Domainlist (0/1 = exact white-/blacklist, 2/3 = regex white-/blacklist)
   id    type  enabled  group_ids     domain                                                                                                date_added           date_modified        comment                                           
   ----  ----  -------  ------------  ----------------------------------------------------------------------------------------------------  -------------------  -------------------  --------------------------------------------------
...
   1723     3        1  0             (\.|^)account-restro-info\.cf$                                                                        2020-10-16 20:29:17  2020-10-16 20:29:17                                                    
   1724     3        1  0             (\.|^)account-restro-limted\.cf$                                                                      2020-10-16 20:29:17  2020-10-16 20:29:17                                                    
   1725     3        1  0             (\.|^)account-restro-limted\.ml$                                                                      2020-10-16 20:29:17  2020-10-16 20:29:17

Hi jfb,

Yes, you are correct. I probably should not have used wildcards for those blacklist. No, I do not have script running to get those. I got those to block youtube ads.

Do you want me to clean up a little bit and dump again?

For the problem, I somehow think it is just a little glitch somwhere, because everything is running fine. Just the php page wont load up. As I mentioned, the system thought there is a syntax error in the index.php file, and thus refused to load it up.

None of these are going to block YouTube ads.

Yes. These commands from the Pi terminal will quickly remove all your regex blacklist entries.

sudo sqlite3 /etc/pihole/gravity.db "delete from domainlist where type=3"

pihole restartdns

I have to agree with you. Youtube ads still pop up, not as often though. Do we have better way to deal with Youtube?

Yes, I deleted all the with type=3. restarted dns. Here is the new Debug Token:
dbs4k2eb3j

Thanks for being patient with me.

Yes. Do one of the following:

(1) Use YouTube from a browser and use a browser based blocker like uBlock Origin.
(2) Subscribe to YouTube Premium.
(3) Don't use YouTube.

2 Likes

dude... I like your humor.

Yes, have been using ublock myself .however, all other devices still plagued by ads.

Those are the only reliable ways I know of to block YouTube ads, at least on devices I own. On Android there is YouTube Vanced, and there may be others for other platforms as well.

To address the line 12 error:

2020-10-30 23:56:17: (mod_fastcgi.c.421) FastCGI-stderr: PHP Parse error: syntax error, unexpected ')' in /var/www/html/admin/index.php on line 12

Run pihole -r and select the repair option and see if this clears it.

have done that either repair or complete reconfig. none worked. that amazed me... because I thought it would be an easy and quick fix....however....

also, since you are on this. what does this do?
brwb068e66b532a.callard.local
it is the top domain that my system hits the most...

Looks like a brother printer.

nice. it makes sense. glad that I asked an expert. Thanks.

Hi deHakkelaar,

I finished reading the thread. It did not really bother me too much with the brother printer. We have two brother printers, which probably will make it worse. I tried nslookup, which could not even locate the ipaddress of the printer. I think the query probably coming from CUSIP server? Does it make sense?

Thanks.

Those queries are coming from the PC right ?
You can stop them from querying Pi-hole by editing the local hosts file on the PC and add a new line with the IP of the printer/PC and the brwb068e66b532a.callard.local name:

EDIT: I turned some around to better reflect what needs to go in the hosts file in what order.
And as the traffic (if any) needs to go to the local host anyway, you could use the localhost address 127.0.0.1 instead of the PC IP.
Is the printer connected to the PC or does it have its own network interface with IP ?

Hi,

we have to brother printers. One is connected raspberry pi, which is hosting a CUSIP server to share the printer. The other is a wifi printer with its own IP. Does that make sense?

Thanks,