Re: [Postfixadmin-devel] Blank domain.tld/setup.php page nothing in logs
Brought to you by:
christian_boltz,
gingerdog
|
From: Danny H. <dho...@gm...> - 2019-03-09 19:35:43
|
Hello Christian,
Yes i was a little confused about the command.
I have now created a local config file (I just copied the inc config
file and named it config.local.php
The directory is /usr/share/webapps/postfixAdmin/config.local.php
But when i run the PHP file i get some errors, that it can not find
either config files.
I can not run as http because i have not set a password for it, i read
somewhere that it is not good, But i could do it if it is needed.
If i run it as root i get this output
[houtworm@server ~]$ sudo php
/usr/share/webapps/postfixAdmin/public/setup.php
[sudo] password for houtworm:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="css/default.css" />
<title>Postfix Admin - PHP Notice: Undefined index: HTTP_HOST in
/usr/share/webapps/postfixAdmin/templates/header.php on line 22
</title>
</head>
<body>
<div id="login_header">
<img id="login_header_logo" src="images/logo-default.png" />
</div>
<div class='setup'>
<h2>Postfix Admin Setup Checker</h2>
<p>Running software:
<ul>
<li>PHP version 7.3.3</li>
</ul><p>Checking for dependencies:
<ul>
<li>Magic Quotes: Disabled - OK</li>
<li><b>Error: Depends on: presence config.inc.php - NOT FOUND</b><br
/></li>
Create the file, and edit as appropriate (e.g. select database type
etc)<br />For example:<br />
<code><pre>cp config.inc.php.sample config.inc.php</pre></code>
<li><b>Warning: config.local.php - NOT FOUND</b><br /></li>
It's Recommended to store your own settings in config.local.php instead
of editing config.inc.php<br />Create the file, and edit as appropriate
(e.g. select database type etc)<br /><li>Depends on: MySQL 4.1 - OK
<br>(change the database_type to 'mysqli' in config.local.php if you
want to use MySQL)
</li><li>Depends on: PostgreSQL - OK
<br>(change the database_type to 'pgsql' in config.local.php if you
want to use PostgreSQL)
</li><li>Depends on: session - OK</li>
<li>Depends on: pcre - OK</li>
<li>Depends on: multibyte string - OK</li>
<li>Depends on: IMAP functions - OK</li>
</ul><p><b>Please fix the errors listed above.</b></p></div>
What is the location config.local.php should have?
Is /usr/share/webapps/postfixAdmin/config.local.php correct? The
config.inc.php is in the same folder. I have set the ownership to
http:http, And the permissions are 777, this was default, i imagine i
should set this a bit lower too.
Thanks, Greets :)
On Sat, 2019-03-09 at 19:20 +0100, Christian Boltz wrote:
> Hello,
>
> Am Samstag, 9. März 2019, 01:04:55 CET schrieb Danny Houtworm:
> > The output of
> > [houtworm@server ~]$ sudo php -l
> > /usr/share/webapps/postfixAdmin/config.inc.php
> > No syntax errors detected in
> > /usr/share/webapps/postfixAdmin/config.inc.php
>
> Do you also have a config.local.php? (Hint: you should, because it
> makes
> updates much easier.)
>
> > I tried to run setup.php, but also no errors there
>
> Actually there is an error - the command you used
>
> > [houtworm@server ~]$ sudo php -l run php
> > /usr/share/webapps/postfixAdmin/public/setup.php
>
> prints a nice error:
>
> > Could not open input file: run
>
> Can you please run
> php /usr/share/webapps/postfixAdmin/public/setup.php
>
> sudo shouldn't be needed, but trying as the webserver user (for
> example
> "wwwrun") might be a good idea.
>
> The expected output is HTML showing that the database was created or
> updated, and some more HTML for the form to create a superadmin.
>
>
> Regards,
>
> Christian Boltz
|