LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-02-2014, 08:35 PM   #1
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 565

Rep: Reputation: 30
postfixadmin blank setup.php page


Hi everybody,
i run debian stable and i'm setting up postfixadmin for "easier" postfix administration. When i connect to http://mydomain/postfixadmin i get the page chating about postfixadmin and its features and help links but when i click on the setup link which should take me to setup.php where i have to md5 hash the admin password to use in config.inc.php postfixadmin configuration file i get a blank page. Postfixadmin directory is in /usr/share owned by apache user and it's linked in /var/www .Apache has its conf.d/postfixadmin configuration file where it alias /postfixadmin in /usr/share/postfixadmin.
Apache error.log says:
Quote:
PHP Fatal error: require_once(): Failed opening required '/usr/share/postfixadmin/config.inc.php' (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/postfixadmin/common.php on line 37
Config.inc.php line 37 has this php code:
Quote:
require_once("$incpath/config.inc.php");
which has variable $incpath which points to postfixadmin path defined in config.inc.php /usr/share/postfixadmin .
Don't know what else do ... help !!!
Reagards
 
Old 08-04-2014, 10:10 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 19,253

Rep: Reputation: 4433Reputation: 4433Reputation: 4433Reputation: 4433Reputation: 4433Reputation: 4433Reputation: 4433Reputation: 4433Reputation: 4433Reputation: 4433Reputation: 4433
Quote:
Originally Posted by gabsik View Post
Hi everybody,
i run debian stable and i'm setting up postfixadmin for "easier" postfix administration. When i connect to http://mydomain/postfixadmin i get the page chating about postfixadmin and its features and help links but when i click on the setup link which should take me to setup.php where i have to md5 hash the admin password to use in config.inc.php postfixadmin configuration file i get a blank page. Postfixadmin directory is in /usr/share owned by apache user and it's linked in /var/www .Apache has its conf.d/postfixadmin configuration file where it alias /postfixadmin in /usr/share/postfixadmin.
Apache error.log says:

Config.inc.php line 37 has this php code:

which has variable $incpath which points to postfixadmin path defined in config.inc.php /usr/share/postfixadmin .
Don't know what else do ... help !!!
Reagards
The path may be there, but if the permissions on the directory/file aren't such to allow it to be opened, you'll get that error. What are the permissions on the file and directory, and what is the user ID of the web engine? If you su to that user ID, can you then cd into that directory?? Cat that file out?
 
Old 08-05-2014, 02:48 PM   #3
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 565

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by TB0ne View Post
The path may be there, but if the permissions on the directory/file aren't such to allow it to be opened, you'll get that error. What are the permissions on the file and directory, and what is the user ID of the web engine? If you su to that user ID, can you then cd into that directory?? Cat that file out?
Dir /usr/share/postfixadmin is aliased in /etc/apache2/conf.d/postfixadmin file

Quote:
Alias /postfixadmin /usr/share/postfixadmin
the above /usr/share/postfixadmin is linked in /var/www ,too and permissions are 644 for *.php files and 755 for direcories, all files and dirs are owned by apache user. Apache owner as security measure has no shell to login:

Quote:
Sorry apache our server does not accept shell logins.
So long and thanks for all the fish
I'm stucked !
 
Old 08-05-2014, 03:31 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 19,253

Rep: Reputation: 4433Reputation: 4433Reputation: 4433Reputation: 4433Reputation: 4433Reputation: 4433Reputation: 4433Reputation: 4433Reputation: 4433Reputation: 4433Reputation: 4433
Quote:
Originally Posted by gabsik View Post
Dir /usr/share/postfixadmin is aliased in /etc/apache2/conf.d/postfixadmin file

the above /usr/share/postfixadmin is linked in /var/www ,too and permissions are 644 for *.php files and 755 for direcories, all files and dirs are owned by apache user. Apache owner as security measure has no shell to login:

I'm stucked !
And in your Apache configuration, did you allow symlinks??? Also...644 on the PHP files??
 
Old 08-05-2014, 03:48 PM   #5
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 565

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by TB0ne View Post
And in your Apache configuration, did you allow symlinks??? Also...644 on the PHP files??
In fact because aliased there was no need of that simlink so i removed it ,but nothing changed yet .
644 on all *.php files .

Last edited by gabsik; 08-05-2014 at 03:49 PM.
 
Old 08-05-2014, 03:55 PM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 19,253

Rep: Reputation: 4433Reputation: 4433Reputation: 4433Reputation: 4433Reputation: 4433Reputation: 4433Reputation: 4433Reputation: 4433Reputation: 4433Reputation: 4433Reputation: 4433
Quote:
Originally Posted by gabsik View Post
In fact because aliased there was no need of that simlink so i removed it ,but nothing changed yet .
644 on all *.php files .
Did you understand what you just posted???

"aliased" IS a symbolic link. Unless you SPECIFICALLY TELL Apache to allow symlinks, things don't work, period. You have symbolic links to both the directory and files....
 
Old 08-05-2014, 04:11 PM   #7
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 565

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by TB0ne View Post
"aliased" IS a symbolic link. Unless you SPECIFICALLY TELL Apache to allow symlinks, things don't work, period. You have symbolic links to both the directory and files....
Do i have specifically said to apache to allow symlinks if i have this in the site-enabled file ?:

Quote:
<Directory />
Options FollowSymLinks
AllowOverride Indexes
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
But i see this in apache error logs:
Quote:
[error] [client 11.22.33.44] PHP Fatal error: Cannot redeclare hex2bin() in /usr/share/postfixadmin/functions.inc.php on line 1338

Last edited by gabsik; 08-05-2014 at 04:16 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mc4695MF prints test page fine, but application print are hazardous (OK/blank page) hardt68 Linux - Hardware 0 04-25-2014 08:44 PM
LXer: Setup Vacation Messages with PostfixAdmin LXer Syndicated Linux News 0 12-25-2009 02:30 AM
Postfixadmin PHP setup file - only displays PHP code davidmbecker Linux - Software 3 04-17-2008 11:33 AM
blank page in browser when viewing PHP baddah Programming 1 08-10-2006 08:03 AM
PHP & MySQL, working, and yet getting a blank results page linxtc Programming 5 08-24-2003 05:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration