Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-04-28, 22:17:53

Author Topic: A quick fix for php 5.2.17 as secondary php !  (Read 14594 times)

0 Members and 1 Guest are viewing this topic.

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
A quick fix for php 5.2.17 as secondary php !
« on: 2013-05-05, 03:12:12 »
Rename in /etc/suphp.conf from:

Code: [Select]
errors_to_browser=false
to

Code: [Select]
errors_to_browser=true
and then check affected domain. It seems I got /home directory writable by others !

So it's worth to add

Code: [Select]
chmod 750 /home
to /script/fixweb !
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: A quick fix for php 5.2.17 as secondary php !
« Reply #1 on: 2013-05-05, 03:14:14 »
On my production system I got this error:

Code: [Select]
Directory / is not owned by admin
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: A quick fix for php 5.2.17 as secondary php !
« Reply #2 on: 2013-05-05, 03:17:57 »
I don't know what's you mean ' /home directory writable by others'?
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: A quick fix for php 5.2.17 as secondary php !
« Reply #3 on: 2013-05-05, 03:22:06 »
Quote from: "MRatWork"
I don't know what's you mean ' /home directory writable by others'?

I got chmod 777 on /home on my test system which is very bad.

On my production system it was ok, but getting this:

Code: [Select]
Directory / is not owned by admin
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: A quick fix for php 5.2.17 as secondary php !
« Reply #4 on: 2013-05-05, 03:23:54 »
My /etc/suphp.conf:

Code: [Select]
[global]
logfile=/var/log/httpd/suphp_log
loglevel=info
webserver_user=apache
docroot=/
env_path=/bin:/usr/bin
umask=0022
min_uid=500
min_gid=48

; 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=false

;Send minor error messages to browser
errors_to_browser=true

[handlers]
;Handler for php-scripts
x-httpd-php="php:/usr/bin/php-cgi"
; x-httpd-php52="php:/usr/local/lxlabs/ext/php/bin/php_cgi"
x-httpd-php52="php:/usr/local/lxlabs/ext/php/etc/lxphpcgi.sh"

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

;;; MR -- for using php52 just enough add 'AddHandler x-httpd-php52 .php' on .htaccess.
;;; it's make possible running 'dual php' on server!
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: A quick fix for php 5.2.17 as secondary php !
« Reply #5 on: 2013-05-05, 03:30:53 »
The same happens on all customers :/
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: A quick fix for php 5.2.17 as secondary php !
« Reply #6 on: 2013-05-05, 04:43:39 »
Immediately release bug-fix. Change using from '/usr/local/lxlabs/ext/php/etc/lxphpcgi.sh' (it's possible security issue because using php.ini of lxphp where without disable_functions) to '/home/apache/etc/suphp/phpcgi.sh'.

Need re-click 'enable secondary php' on 'webserver configs' and 'sh /script/fix-chownchmod' (because need 755 permissions for '/home/apache/etc/suphp/phpcgi.sh').
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: A quick fix for php 5.2.17 as secondary php !
« Reply #7 on: 2013-05-05, 04:54:39 »
Quote from: "MRatWork"
Immediately release bug-fix. Change using from '/usr/local/lxlabs/ext/php/etc/lxphpcgi.sh' (it's possible security issue because using php.ini of lxphp where without disable_functions) to '/home/apache/etc/suphp/phpcgi.sh'.

Need re-click 'enable secondary php' on 'webserver configs' and 'sh /script/fix-chownchmod' (because need 755 permissions for '/home/apache/etc/suphp/phpcgi.sh').

Ouch !
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: A quick fix for php 5.2.17 as secondary php !
« Reply #8 on: 2013-05-05, 05:06:47 »
Quote from: "Spacedust"
Quote from: "MRatWork"
Immediately release bug-fix. Change using from '/usr/local/lxlabs/ext/php/etc/lxphpcgi.sh' (it's possible security issue because using php.ini of lxphp where without disable_functions) to '/home/apache/etc/suphp/phpcgi.sh'.

Need re-click 'enable secondary php' on 'webserver configs' and 'sh /script/fix-chownchmod' (because need 755 permissions for '/home/apache/etc/suphp/phpcgi.sh').

Ouch !

cat: /home/apache/etc/suphp/phpcgi.sh: No such file or directory...
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: A quick fix for php 5.2.17 as secondary php !
« Reply #9 on: 2013-05-05, 05:10:21 »
Run 'sh /script/cleanup' or copy '/usr/local/lxlabs/kloxo/file/apache/' to '/home/apache'
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: A quick fix for php 5.2.17 as secondary php !
« Reply #10 on: 2013-05-05, 05:15:08 »
Quote from: "MRatWork"
Run 'sh /script/cleanup' or copy '/usr/local/lxlabs/kloxo/file/apache/' to '/home/apache'

Thank you. I've runned /script/cleanup-simple as always ;)
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: A quick fix for php 5.2.17 as secondary php !
« Reply #11 on: 2013-05-05, 05:17:23 »
You forgot to add:

/etc/rc.d/init.d/qmail stop
/etc/rc.d/init.d/qmail start

to cleanup-simple.

My monitoring is detecting IMAP error without this...
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: A quick fix for php 5.2.17 as secondary php !
« Reply #12 on: 2013-05-05, 05:22:25 »
Done - still getting this:

Code: [Select]
Directory / is not owned by admin
« Last Edit: 1970-01-01, 01:00:00 by Guest »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: A quick fix for php 5.2.17 as secondary php !
« Reply #13 on: 2013-05-05, 05:28:06 »
Quote from: "Spacedust"
Done - still getting this:

Code: [Select]
Directory / is not owned by admin
Inform here log file with content 'Directory / is not owned by admin'
« Last Edit: 1970-01-01, 01:00:00 by Guest »
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline Spacedust

  • Super Grand Master
  • ****
  • Posts: 4,050
  • Karma: +1/-0
    • View Profile
Re: A quick fix for php 5.2.17 as secondary php !
« Reply #14 on: 2013-05-06, 02:08:02 »
Quote from: "MRatWork"
Quote from: "Spacedust"
Done - still getting this:

Code: [Select]
Directory / is not owned by admin
Inform here log file with content 'Directory / is not owned by admin'

Which log file ?

Code: [Select]
ls -l /home/admin/test.domain.pl/
razem 12K
drwxr-xr-x 2 admin admin 4,0K maj  4 22:35 cgi-bin
drwxr-xr-x 2 admin admin 4,0K lut 12 05:10 images
-rw-r--r-- 1 admin admin 2,6K maj  4 22:35 index.html
-rw-r--r-- 1 admin admin    0 lut  4  2012 index.php
« Last Edit: 1970-01-01, 01:00:00 by Guest »

 


Top 4 Global Search Engines:    Google    Bing    Baidu    Yahoo
Click Here

Page created in 0.039 seconds with 18 queries.

web stats analysis