Re: [Postfixadmin-devel] Blank domain.tld/setup.php page nothing in logs
Brought to you by:
christian_boltz,
gingerdog
From: Christian B. <pos...@cb...> - 2019-03-11 22:10:31
|
Hello, Am Montag, 11. März 2019, 01:15:31 CET schrieb Danny Houtworm: > I have tried everything to the best of my knowledge and ability to > look for solutions on the internet, But i can not seem to figure this > one out > > [houtworm@server ~]$ sudo -u http php > /usr/share/webapps/postfixAdmin/public/setup.php > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ... > <li><b>Error: Depends on: presence config.inc.php - NOT FOUND That's... interesting[tm]. It's especially interesting because setup.php starts with require_once(dirname(__FILE__).'/common.php'); which has require_once(dirname(__FILE__) . '/../common.php'); and that one has $incpath = dirname(__FILE__); if (!is_file("$incpath/config.inc.php")) { die("config.inc.php is missing!"); } require_once("$incpath/config.inc.php"); so setup.php should fail _before_ printing the header, and before printing the failure about finding config.inc.php. This indicates that require_once() can read config.inc.php. To confirm that, please introduce a syntax error in config.inc.php, and then run setup.php on the commandline again. You should see a message about that syntax error. > The location in setup.php is set to /../config.local.php also the inc > one > The files are there 100% they are owned by http:http and the > permissions are 644 > > [houtworm@server ~]$ cd /usr/share/webapps/postfixAdmin/ > [houtworm@server postfixAdmin]$ ls > common.php config.local.php languages public templates_c > composer.json configs lib README.md > composer.lock functions.inc.php model scripts > config.inc.php index.php phpunit.xml templates > [houtworm@server postfixAdmin]$ Looks good. One idea I have is the way how setup.php checks for config.local.php: $file_config = file_exists(realpath("./../config.inc.php")); $file_local_config = file_exists(realpath("./../config.local.php")); Note the realpath() call, which means resolving all symlinks. Does the path /usr/share/webapps/postfixAdmin/public/ include any symlinked part? If in doubt, add echo "\n\n file_config: $file_config local $file_local_config \n\n" to setup.php (directly under the lines quoted above) and check the result. Also note that there's a fallback check for config.local.php: // Fall back to looking in /etc/postfixadmin for config.local.php // (Debian etc) if (!$file_local_config && is_dir('/etc/postfixadmin')) { $file_local_config = file_exists( '/etc/postfixadmin/config.local.php'); } which can mean a) try to create a /etc/postfixadmin/config.local.php and check if setup.php finds it b) make sure your PHP open_basedir allows access to /etc/postfixadmin/ > My Database is ... irrelevant, at least until the problems with config.inc.php and config.local.php are solved ;-) > Nginx Setup: https://paste.ee/p/IE2na > Local and Inc config: https://paste.ee/p/VcMUQ > > I hope there is an obvious mistake here somewhere I checked them, and didn't see an obvious error. That's not surprising because the syntax check already confirmed that your config.*.php is ok, at least the first half of setup.php worked, and the nginx config is irrelevant when running php on the command line. Regards, Christian Boltz -- Es wird also sehr wohl gemountet, wie soll denn yast sonst auf die CD zugreifen? Per dd erstmal alles auf die HD kopieren? Oder lässt es sich die Pakete vielleicht als .wav vorsingen? [Jan Trippler in suse-linux] |