HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   Problems installing suPHP on centos 5.2 ISPconfig (http://www.howtoforge.com/forums/showthread.php?t=30045)

usul 6th January 2009 15:25

Problems installing suPHP 0.7.0 on centos 5.2 ISPconfig
 
Hello World:)

I apologize for my Google English!:rolleyes:

I'm trying to install suPHP for the management of permits for Joomla and magenta.

I installed on Server:
Centos 5.2 updated with php 5.2.8, Apache 2.0 API Handler
ISPConfig 2.2.29

I tried to run your post:

http://www.howtoforge.com/install-su...2.20-and-above

http://www.howtoforge.org/suphp_fedo...with_ispconfig


with both when I run the command:
Quote:

./configure --prefix=/usr --sysconfdir=/etc --with-apr=/usr/bin/apr-1-config --with-apxs=/usr/sbin/apxs --with-apache-user=apache --with-setid-mode=paranoid --with-php=/usr/bin/php-cgi --with-logfile=/var/log/httpd/suphp_log --enable-SUPHP_USE_USERGROUP=yes
After a series of controls the operation concludes with the following error

Quote:

checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for APR... configure: error: the --with-apr parameter is incorrect. It must specify an install prefix, a
build directory, or an apr-config file.
to control the path of APR I launched:
Quote:

> locate apr-
/usr/lib/libapr-1.so.0
/usr/lib/libapr-1.so.0.2.7
/usr/share/doc/apr-1.2.7
/usr/share/doc/apr-util-1.2.7
/usr/share/doc/apr-1.2.7/CHANGES
/usr/share/doc/apr-1.2.7/LICENSE
/usr/share/doc/apr-1.2.7/NOTICE
/usr/share/doc/apr-util-1.2.7/CHANGES
/usr/share/doc/apr-util-1.2.7/LICENSE
/usr/share/doc/apr-util-1.2.7/NOTICE
after checking on http://man.root.cz/1/apr-1-config/ I think I have understood that there is no parameter, but what?:confused:


Additional questions, I will have to install APC cache, get the best magenta and beyond, given me advice on this? perhaps some links.

They told me that it would be better suexec + fast-cgi php-cgi instead of suPHP, but with APC suexec works?


Thank you in advance.


Problem-dependent configuration suphp.conf, see last post.

till 6th January 2009 18:45

Which ISPConfig version?

usul 7th January 2009 11:05

internal error 500
 
ISPCONFIG version 2.2.29 and the problem described above is passed ..
I had installed APR.!:mad::(:p

However, I proceeded with the installation of suphp-0.7.0 without errors.

When you restart Aapache showed a bug in Vhosts_ispconfig.conf, precisely where it was stated 'php_admin_flag'.
Off functions ISPconfig PHP, and Apache is divided reactivated the PHP Apache has restarted several times without error.

Now received internal error 500, even the simple file info.php.

I checked the logs and I did not find any errors you enclosed a few lines

error.log

Quote:

[Tue Jan 06 20:55:24 2009] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Tue Jan 06 20:55:25 2009] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Tue Jan 06 20:55:43 2009] [notice] caught SIGTERM, shutting down
[Tue Jan 06 20:55:43 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Jan 06 20:55:43 2009] [notice] Digest: generating secret for digest authentication ...
[Tue Jan 06 20:55:43 2009] [notice] Digest: done
[Tue Jan 06 20:55:43 2009] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Tue Jan 06 20:55:43 2009] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Tue Jan 06 20:58:29 2009] [notice] caught SIGTERM, shutting down
[Tue Jan 06 21:00:15 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Jan 06 21:00:16 2009] [notice] Digest: generating secret for digest authentication ...
[Tue Jan 06 21:00:16 2009] [notice] Digest: done
[Tue Jan 06 21:00:16 2009] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Tue Jan 06 21:00:16 2009] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
[Tue Jan 06 21:00:36 2009] [notice] caught SIGTERM, shutting down
[Tue Jan 06 21:00:36 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Tue Jan 06 21:00:36 2009] [notice] Digest: generating secret for digest authentication ...
[Tue Jan 06 21:00:36 2009] [notice] Digest: done
[Tue Jan 06 21:00:36 2009] [notice] mod_python: Creating 4 session mutexes based on 256 max processes and 0 max threads.
[Tue Jan 06 21:00:36 2009] [notice] Apache/2.2.3 (CentOS) configured -- resuming normal operations
suphp.log is empty!


I understand that suExe is active, so should I turn it off, but how?

If I wanted to return to its previous state of the installation suPHP, how do I delete what I have done?


Which if I'm doing the right thing:
I need a system that controls access to joomla and magenta, and both have to install an APC cache and I have not much experience of linux.
What to choose suPHP or suexec together with what else?

There is a guide that provides the optimal configuration for ISPconfig?

Thank you very much

Diary of the actions carried out
Quote:

nano /etc/httpd/conf.d/php.conf
I commented the line
#LoadModule php5_module modules/libphp5.so
yum install php-cli httpd-devel

cd /tmp
wget http://www.suphp.org/download/suphp-0.7.0.tar.gz
tar xvfz suphp-0.7.0.tar.gz
cd suphp-0.7.0/
./configure --prefix=/usr --sysconfdir=/etc --with-apr=/usr/bin/apr-1-config --with-apxs=/usr/sbin/apxs --with-apache-user=apache --with-setid-mode=paranoid
--with-php=/usr/bin/php-cgi --with-logfile=/var/log/httpd/suphp_log
--enable-SUPHP_USE_USERGROUP=yes

make
make install

I entered into /etc/httpd/conf.d/php.conf the line
LoadModule suphp_module modules/mod_suphp.so

changed the configuration files ISPConfig
nano /home/admispconfig/ispconfig/lib/config.inc.php
$go_info["server"]["apache2_php"] = 'suphp';


till 7th January 2009 11:10

You lokked in the wrong logfile. Please post the error from the error log of the website.

usul 7th January 2009 11:24

:o
file error Web site .. I had that check!:D

Quote:


[Tue Jan 06 19:33:10 2009] [error] [client 79.15.213.90] SecurityException in Application.cpp:511: Unknown Interpreter: php

[Tue Jan 06 19:33:10 2009] [error] [client 79.15.213.90] Premature end of script headers: info.php

[Tue Jan 06 19:34:16 2009] [error] [client 79.15.213.90] SecurityException in Application.cpp:511: Unknown Interpreter: php

[Tue Jan 06 19:34:16 2009] [error] [client 79.15.213.90] Premature end of script headers: magento-check.php

[Tue Jan 06 19:55:19 2009] [error] [client 79.15.213.90] SecurityException in Application.cpp:511: Unknown Interpreter: php

[Tue Jan 06 19:55:19 2009] [error] [client 79.15.213.90] Premature end of script headers: info.php

[Tue Jan 06 20:18:24 2009] [error] [client 79.15.213.90] SecurityException in Application.cpp:511: Unknown Interpreter: php

[Tue Jan 06 20:18:24 2009] [error] [client 79.15.213.90] Premature end of script headers: hisa.php

[Tue Jan 06 20:28:32 2009] [error] [client 79.15.213.90] SecurityException in Application.cpp:511: Unknown Interpreter: php

[Tue Jan 06 20:28:32 2009] [error] [client 79.15.213.90] Premature end of script headers: info.php

[Tue Jan 06 21:01:41 2009] [error] [client 79.15.213.90] SecurityException in Application.cpp:511: Unknown Interpreter: php

[Tue Jan 06 21:01:41 2009] [error] [client 79.15.213.90] Premature end of script headers: info.php

[Wed Jan 07 10:18:11 2009] [error] [client 79.15.213.90] SecurityException in Application.cpp:511: Unknown Interpreter: php

[Wed Jan 07 10:18:11 2009] [error] [client 79.15.213.90] Premature end of script headers: info.php

[Wed Jan 07 10:18:14 2009] [error] [client 79.15.213.90] File does not exist: /var/www/web14/web/favicon.ico

I found that I have the same error
http://www.howtoforge.com/forums/showthread.php?t=29801

falko 8th January 2009 14:56

What's the output of
Code:

updatedb
locate Application.cpp

?

usul 9th January 2009 11:19

I do not know, probably is part of the script called previously joomla_hisa_it_1_1.php type or magenta-check.php.

Repeated now required info.php me the following error

Quote:

[Fri Jan 09 09:37:06 2009] [error] [client 79.15.213.90] SecurityException in Application.cpp:511: Unknown Interpreter: php
[Fri Jan 09 09:37:06 2009] [error] [client 79.15.213.90] Premature end of script headers: info.php
[Fri Jan 09 09:37:10 2009] [error] [client 79.15.213.90] File does not exist: /var/www/web14/web/favicon.ico
[Fri Jan 09 09:53:19 2009] [error] [client 79.15.213.90] SecurityException in Application.cpp:511: Unknown Interpreter: php
[Fri Jan 09 09:53:19 2009] [error] [client 79.15.213.90] Premature end of script headers: info.php

By reading some documents, I have the impression that there is a configuration problem on the site www.suphp.org cautions that we need to change the configuration has changed because of the way of writing code, such as the "" but I did not understand much, even making the changes required that highlights in green, nothing has changed.

I attach the configuration file

Quote:

[global]
;Path to logfile
logfile=/var/log/suphp.log

;Loglevel
loglevel=warninfo

;User Apache is running as
webserver_user=apache

;Path all scripts have to be in
docroot=/

;Path to chroot() to before executing script
;chroot=/mychroot

; Security options
allow_file_group_writeable=true
allow_file_others_writeable=false
allow_directory_group_writeable=true
allow_directory_others_writeable=false

;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=true

;Send minor error messages to browser
errors_to_browser=false

;PATH environment variable
env_path=/bin:/usr/bin

;Umask to set, specify in octal notation
umask=00220077

; Minimum UID
min_uid=100

; Minimum GID
min_gid=100

[handlers]
;Handler for php-scripts
x-httpd-php=php:/home/admispconfig/ispconfig/tools/suphp/usr/bin/php-wrapper should be / usr / bin / php-cgi?
also looking at php-wrapper footnote 1, I can not find the reference to php-cgi it is necessary to run suPHP.


;Handler for CGI-scripts
x-suphp-cgi=execute:!self

footnote 1
Quote:

#!/bin/sh
PATH="/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/libexec"

BASEDIR=`dirname ${DOCUMENT_ROOT}`
TMPDIR=${BASEDIR}/phptmp
SESSDIR=${TMPDIR}

if [ X"${php_safe_mode}" != X"On" ]; then
SAFE_MODE="Off"
else
SAFE_MODE="On"
fi

exec php-cgi -d open_basedir=${BASEDIR} -d upload_tmp_dir=${TMPDIR} -d session.save_path=${SESSDIR} -d safe_mode=${SAFE_MODE}
I wonder should I disable suEXEC? and how?

Thanks for your attention

usul 9th January 2009 12:31

hooray! It works.
 
hooray!
It works.

the error was determined by the configuration on suPHP with the file with the changes

Quote:

[global]
;Path to logfile
logfile=/var/log/httpd/suphp.log

;Loglevel
loglevel=info

;User Apache is running as
webserver_user=apache

;Path all scripts have to be in
docroot=/

;Path to chroot() to before executing script
;chroot=/mychroot

; Security options
allow_file_group_writeable=true
allow_file_others_writeable=false
allow_directory_group_writeable=true
allow_directory_others_writeable=false

;Check wheter script is within DOCUMENT_ROOT
check_vhost_docroot=true

;Send minor error messages to browser
errors_to_browser=false

;PATH environment variable
env_path=/bin:/usr/bin

;Umask to set, specify in octal notation
umask=0077

; Minimum UID
min_uid=100

; Minimum GID
min_gid=100

[handlers]
;Handler for php-scripts
x-httpd-php="php:/home/admispconfig/ispconfig/tools/suphp/usr/bin/php-wrapper"


;Handler for CGI-scripts
x-suphp-cgi="execute:!self"
important with the version 0.7.0 of suPHP insert "":D


thanks for your attention

falko 10th January 2009 13:37

What exactly did you change? Looks like the original file...

fryfrog 8th March 2009 03:49

The difference is the addition of " " around the options. I just dealt with this issue on my own ISPConfig server and this fixed it.

Old and Busted:
Code:

;Handler for php-scripts
x-httpd-php=php:/home/admispconfig/ispconfig/tools/suphp/usr/bin/php-wrapper

;Handler for CGI-scripts
x-suphp-cgi=execute:!self

New Hotness:
Code:

;Handler for php-scripts
x-httpd-php="php:/home/admispconfig/ispconfig/tools/suphp/usr/bin/php-wrapper"

;Handler for CGI-scripts
x-suphp-cgi="execute:!self"



All times are GMT +2. The time now is 10:46.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.