Empty page after installation and configuration

immanuel w Posted in Technical Support 4 years ago

Hi
I did a fresh installation of ossn version 5.2 with PHP 7.3 on Apache and Linux x64
I passed the initial configuration process (DB settings, new admin user) successfully but after that I see a blank page on the administrator page and on the main page. There is just nothing displayed.
I enabled PHP errors, I put the file DISPLAYERRORS to the home directory, and in the table ossnsitesettings I set displayerrors on. The file error_log is empty (I created it myself with permission -rwxrwx---) and I still see nothing.
Anyone got an idea?

Replies
ch Immanuel w Replied 4 years ago

Why not include the step of checking permissions and ownerships into the installation process?
It's a vital part and not everybody unzips an archive via console and ssh on the hosting server directly.

ch Immanuel w Replied 4 years ago

the first time I ran the installer it went through, before I saw the blank page. So somehow there must have been a different environment afterwards. Unfortunately I have no usable information in the error log. If we can ignore, the better.

German Michael Zülsdorff Replied 4 years ago

compilation error or so ...
Very strange.
If you still remember, of course 'or so' would be of real interest :)

Maybe you entered something this preg_match could not handle?
Allowed entries are either hostnames which would resolve to ips like
localhost or yourhost.com
or simply ips like
187.14.19.34
both in combination with a port number in case it differs from the default port 3306, like
localhost:3310
or
187.14.19.34:3310

ch Immanuel w Replied 4 years ago

yeah sure (sorry about being late)

installation/classes/OssnInstall.php line 192

PHP 7.3 couldn't compile the preg_match command (compilation error or so)
since I would not want to add a different port to the db-hostname I just hardcoded the port to 3306

so I ran this simplified function instead:

public function dbhost($dbhost) {
    if(!empty($dbhost)) {
            $this->dbhost = $dbhost;
    } else {
            $this->dbhost = 'localhost';
    }
    //set the port
    $port = 3306;
    $this->dbport($port);                   

}

German Michael Zülsdorff Replied 4 years ago

Thank you for your feedback, Immanuel.

I'm a little alarmed by your step 3a, though.
Could you please provide the exact warning/error from your error_log file?

ch Immanuel w Replied 4 years ago

Scenario:
I uploaded the unzipped files via ftp into the webdirectory as described in https://www.opensource-socialnetwork.org/wiki/view/706/how-to-install-open-source-social-network

Solution (that worked for me):
1) Sort out all file and directory ownerships and permissions: ownership always webserver, permission of directories 755, permission of files 644, don't forget the data-directory outside the webdirectory
2) Delete all previously created database tables
3) Rerun the installer on DOMAIN/installation/
3a) if you get a php error about preg match compilation, simplify the code in the file accordingly (sorry about that)
4) if you cannot continue, open DOMAIN/installation/?action=finish
5) open DOMAIN/administration/

ch Immanuel w Replied 4 years ago