Firefox PHP

NUUBI PANIC. HTTP 500 on trying /admin.php for the first time

Posted by Rhianne 
NUUBI PANIC. HTTP 500 on trying /admin.php for the first time
January 09, 2018 08:40AM
Hi everyone,

I'm a Phorum neophyte (and not quite a Linux messiah either, truth be told), and have run into issues soon after installation.

I have no idea where to start troubleshooting, so I'll list what I have and what I've done so far.

This is from phpMyadmin:

Server: Localhost via UNIX socket
Server type: MySQL
Server version: 5.5.58-0ubuntu0.14.04.1 - (Ubuntu)
Protocol version: 10
User: root@localhost
Server charset: UTF-8 Unicode (utf8)
Web server: Apache/2.4.7 (Ubuntu)
Database client version: libmysql - 5.5.58

phpMyAdmin works fine, so I know my Apache is running fine (doh).

I unpacked the phorum tarball into /usr/share/ so it is now

/usr
    /share
        /Core-phorum_5_2_23


I then created a symlink named 'phorum' in /var/www to point to this directory. The resulting file list as served up by Apache seems as expected:

Index of /
     	Name	Last modified	Size	Description

[DIR] phorum/ 2017-01-31 15:18 -
Apache/2.4.7 (Ubuntu) Server at 192.168.10.64 Port 80

Next, I created the database and database user as specified in the instructions:

CREATE DATABASE phorum;
GRANT ALL ON phorum.* TO 'phorumadmin'@'localhost' IDENTIFIED BY 'password';

(I had previously created a user using adduser --system phorumadmin)

Thereafter, accessing /admin.php gave an error message about connecting to the database (things were looking up!).

I then copied and edited /include/db/config.php and it looks like this:

// Database connection. See the end of this file for a detailed
// description of the configuration options.
'type'          => 'mysql',
'name'          => 'phorum5',
'server'        => 'localhost',
'user'          => 'phorumadmin'@'localhost'
'password'      => 'password'
'table_prefix'  => 'phorum',
'port'          => '3306',
'socket'        => NULL,

And this is where accessing anything started giving an HTTP 500 error.

Where to now? Any tips? File/Directory permissions? Log files? All files and folders belong to root, not phorumadmin, is that a problem?

Thanks in advance!
Rhianne



Edited 2 time(s). Last edit at 01/09/2018 08:48AM by Rhianne.
Re: NUUBI PANIC. HTTP 500 on trying /admin.php for the first time
January 09, 2018 09:54PM
In your config.php,you may have have a missing comma after

'user' => 'phorumadmin'@'localhost'
and
'password' => 'password'

Check your actual config.



If that doesn't work. Modify your config to simplify it or...

Create a database "keepitsimple"
User "testsimple" <remove the @, and localhost>
Password "passsimple"

I put the version used as a table_prefix.
There are no perfect answers, sometimes the server needs to be empty. This has worked on Win IIS (localhost setup) and Linux with Apache (public web site)..


Language: PHP
"type" => "mysql", "name" => "keepitsimple", "server" => "", "user" => "testsimple", "password" => "passsimple", "table_prefix" => "phorum5219", ';port'; => ';3306';, ';socket'; => NULL,



then go to localhost/phorum/admin.php
Re: NUUBI PANIC. HTTP 500 on trying /admin.php for the first time
January 10, 2018 12:56AM
Thanks, Mr. Finegan, you're a star. The punctuation was the culprit! The HTTP 500 error is gone and I'm back at the db connection message:

Quote
This bleedin machine
The database connection failed. Please check your database configuration in include/db/config.php. If the configuration is okay, check if the database server is running.

But now, I am unable to get past this no matter what I do.

In phpMyAdmin:

SET PASSWORD FOR  'root'@'localhost' = PASSWORD('rootpwd');

..and config.php:

Language: PHP
// Database connection. See the end of this file for a detailed // description of the configuration options. ';type'; => ';mysql';, ';name'; => ';phorum5';, ';server'; => ';localhost';, ';user'; => ';root';, ';password'; => ';rootpwd';, ';table_prefix'; => ';phorum';, ';port'; => ';3306';, ';socket'; => NULL,

It won't connect whether I specify 'root' or 'root@localhost' (it doesn't like 'root'@'localhost', that gives a 500).

Sad face.



Edited 1 time(s). Last edit at 01/10/2018 01:00AM by Rhianne.
Re: NUUBI PANIC. HTTP 500 on trying /admin.php for the first time
January 10, 2018 12:59AM
DOH! I forgot to change the db name from 'phorum5' to 'phorum'

IT VIRKS!!! I get lots of green 'All is OK' bits.

Happy face! Thank you so much for the help!



Edited 1 time(s). Last edit at 01/10/2018 01:00AM by Rhianne.
Sorry, only registered users may post in this forum.

Click here to login