PDA

توجه ! این یک نسخه آرشیو شده میباشد و در این حالت شما عکسی را مشاهده نمیکنید برای مشاهده کامل متن و عکسها بر روی لینک مقابل کلیک کنید : نصب suhosin



Arashdn
July 23rd, 2009, 23:09
سلام
چطور میشه تو سرور های دایرکت ادمین نصبش کرد؟
سی پنل easy apache داره از اونجا راحت میشه زد وی دایرکت ادیمن چیزی نداره
چطور اینو نصب کنم؟

PersianDOT
July 24th, 2009, 04:57
Installing Suhosin



Things to do before getting started and questions you probably have.

1) First off you need to create a phpinfo page on your web server, this is so you can see if Suhosin is installed and working or not.



EG: http://mysite.com/phpinfo.php

phpinfo();



That�s all it should contain. You should bring it up to make sure it works.



2) Check to make sure that PHP is NOT compiled with --enable-versioning



You will see this in the Configure Command section at the top, make sure you do not see


--enable-versioning



If it is, the extension will not work. Versioning breaks extensions. You will need to recompile PHP and make sure versioning is turned OFF.



3) This only applies if you are using Zend Optimizer. Make sure you are using at least version 3.2.1 or above of Zend Optimizer. If you are using anything below that there is a known bug in Zend Optimizer that gets caught up in Suhosin while reading zend encoded pages. So be sure to upgrade Optimizer to a more recent release before you install Suhosin to avoid issues.

You can check your version while in shell by doing:

php �v



If you have it installed you�ll see something like:

Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

with Zend Extension Manager v1.0.10, Copyright (c) 2003-2006, by Zend Technologies

with Zend Optimizer v3.0.1, Copyright (c) 1998-2006, by Zend Technologies



So this version is old and needs to be upgraded. See http://www.webhostgear.com/184.html our Zend Optimizer install guide for more details.







Suhosin works fine on cPanel/WHM servers, DirectAdmin, Plesk and any others. As long as the above mentioned items are met then you should be fine.





Installing Suhosin Extension

Download the source file for the Suhosin extension



cd /usr/local/
wget http://www.hardened-php.net/suhosin/_media/suhosin-0.9.18.tgz
tar -zxvf suhosin-0.9.18.tgz
cd suhosin-0.9.18
phpize


OUTPUT will be something like this:

# phpize

Configuring for:

PHP Api Version: 20020918

Zend Module Api No: 20020429

Zend Extension Api No: 20050606




./configure
make



OUTPUT will be something like this:

Libraries have been installed in:

/usr/local/suhosin-0.9.18/modules



make install



OUTPUT will be something like this:

Installing shared extensions: /usr/local/lib/php/extensions/no-debug-non-zts-20020429/

Make a note of the directory location and confirm it exists and has suhosin.so in it:



ls �lah /usr/local/lib/php/extensions/no-debug-non-zts-20020429/

-rwxr-xr-x 1 root root 334K Mar 19 09:17 suhosin.so*



Now copy suhosin.so to /usr/lib/php/extensions since our php.ini points to that directory and not the one the make install used



cp /usr/local/lib/php/extensions/no-debug-non-zts-20020429/suhosin.so /usr/lib/php/extensions/no-debug-non-zts-20020429



Checking PHP

Now we need to check PHP to ensure suhosin will be added in.



Find where your current PHP.ini is:


php -i |grep php.ini

Configuration File (php.ini) Path => /usr/local/Zend/etc/php.ini



Edit the php.ini


nano /usr/local/Zend/etc/php.ini



Step 1) Ensure the include path/extension is set properly.

Search for: extension_dir



You should see something like this:

;;;;;;;;;;;;;;;;;;;;;;;;;

; Paths and Directories ;

;;;;;;;;;;;;;;;;;;;;;;;;;

include_path = ".:/usr/lib/php:/usr/local/lib/php:/usr/lib/php/extensions:/usr/lib/php/extensions/no-debug-non-zts-20020429:" ;

extension_dir = /usr/lib/php/extensions/no-debug-non-zts-20020429/ ; directory in which the loadable extensions (modules) reside



Note the exact path is the same as what we wrote down when we did �make install�

If not, you will need to add it or COPY the file to the new location as mentioned above.



Step 2) Add the suhosin.so extension to php.ini

While still in php.ini search for Dynamic Extensions



/Dynamic Extensions



EG you should see:
;;;;;;;;;;;;;;;;;;;;;;

; Dynamic Extensions ;

;;;;;;;;;;;;;;;;;;;;;;



Add this below:



extension=suhosin.so

Arashdn
July 24th, 2009, 11:22
مممنون
ولی اینو دقیقا یا تو راهنمای نصب ساسین دیده بودم یا تو فروم دایرکت ادمین
در هر حال ممنون

PersianDOT
July 24th, 2009, 17:35
خب انتظار دارید روش دیگه ای پیدا بشه ؟ همینه روشش
موفق باشید

rockinwwf
August 30th, 2009, 17:05
من اینکارارو انجام دادم اما 25591938 -rw-r--r-- 1 root root 75391 Aug 30 08:30 acinclude.m4
25591944 -rw-r--r-- 1 root root 297133 Aug 30 08:30 aclocal.m4
25591863 -rw-r--r-- 1 root root 9647 Aug 17 2006 aes.c
25591933 drwxr-xr-x 2 root root 4096 Aug 26 08:25 build
25591862 -rw-r--r-- 1 root root 4998 Mar 6 2007 Changelog
25591864 -rw-r--r-- 1 root root 23910 Nov 20 2006 compat_snprintf.c
25591941 -rwxr-xr-x 1 root root 43499 Aug 30 08:30 config.guess
25591865 -rw-r--r-- 1 root root 475 Nov 20 2006 config.m4
25591940 -rwxr-xr-x 1 root root 31743 Aug 30 08:30 config.sub
25591945 -rwxrwxrwx 1 root root 4915 Aug 30 08:30 configure.in
25591866 -rw-r--r-- 1 root root 482 Sep 11 2006 config.w32
25591861 -rw-r--r-- 1 root root 21 Aug 13 2006 CREDITS
25591868 -rw-r--r-- 1 root root 24859 Aug 13 2006 crypt_blowfish.c
25591867 -rw-r--r-- 1 root root 4980 Aug 24 2006 crypt.c
25591869 -rw-r--r-- 1 root root 5217 Sep 11 2006 crypt_md5.c
25591870 -rw-r--r-- 1 root root 1463 Sep 11 2006 crypt_md5.h
25591871 -rw-r--r-- 1 root root 9113 Sep 11 2006 crypt_win32.c
25591872 -rw-r--r-- 1 root root 2466 Sep 11 2006 crypt_win32.h
25591874 -rw-r--r-- 1 root root 35071 Mar 4 2007 execute.c
25591873 -rw-r--r-- 1 root root 12678 Aug 14 2006 ex_imp.c
25591875 -rw-r--r-- 1 root root 10278 Nov 22 2006 header.c
25591876 -rw-r--r-- 1 root root 19399 Mar 4 2007 ifilter.c
25591946 -rw-r--r-- 1 root root 0 Aug 30 08:30 install-sh
25591877 -rw-r--r-- 1 root root 10858 Mar 4 2007 log.c
25591942 -rw-r--r-- 1 root root 186760 Aug 30 08:30 ltmain.sh
25591939 -rw-r--r-- 1 root root 5694 Aug 30 08:30 Makefile.global
25591892 drwxr-xr-x 2 root root 4096 Mar 6 2007 mbregex
25591878 -rw-r--r-- 1 root root 1247 Oct 8 2006 mbregex.h
25591879 -rw-r--r-- 1 root root 2792 Mar 4 2007 memory_limit.c
25591948 -rw-r--r-- 1 root root 0 Aug 30 08:30 missing
25591947 -rw-r--r-- 1 root root 0 Aug 30 08:30 mkinstalldirs
25591880 -rw-r--r-- 1 root root 8682 Mar 6 2007 php_suhosin.h
25591881 -rw-r--r-- 1 root root 3452 Mar 4 2007 post_handler.c
25591882 -rw-r--r-- 1 root root 35351 Oct 2 2006 rfc1867.c
25591943 -rw-r--r-- 1 root root 67697 Aug 30 08:30 run-tests.php
25591883 -rw-r--r-- 1 root root 19168 Mar 6 2007 session.c
25591884 -rw-r--r-- 1 root root 13183 Sep 2 2006 sha256.c
25591885 -rw-r--r-- 1 root root 1695 Aug 24 2006 sha256.h
25591886 -rw-r--r-- 1 root root 39279 Mar 4 2007 suhosin.c
25591887 -rw-r--r-- 1 root root 18844 Mar 4 2007 suhosin.ini
25591888 -rw-r--r-- 1 root root 12062 Sep 29 2006 suhosin_logo.h
25591889 -rw-r--r-- 1 root root 2853 Nov 14 2006 suhosin_rfc1867.h
25591895 drwxr-xr-x 6 root root 4096 Mar 6 2007 tests
25591890 -rw-r--r-- 1 root root 5815 Mar 4 2007 treat_data.c
25591891 -rw-r--r-- 1 root root 11175 Oct 25 2006 ufilter.c

می بینید که ./configure
توش وجود نداره حالا باید چه جوری نضبش کنم
یه سوال دیگه انیکه چه جوری به منابع Yum اضافه کنم
و سوال دیگه اینکه هر جا می خوام چیزی نصب کنم میگه به فلان چیز احتیاج دارم مثلآ libperl اینارو از کجا بیارم
شرمنده همه سوالامو یه جا برسیدم

Arashdn
August 30th, 2009, 19:01
والا اینم بگم نصب که میکنید خیلی از برنامه های پی اچ پی میریزه به هم
به نظر من بی خیالش شو

zoghal
August 31st, 2009, 10:32
يك سر بزن به اينجا از اين اسكريپت استفاده كن
http://www.directadmin.com/forum/showthread.php?t=22587

vPsPersia.COM
October 28th, 2009, 16:13
Suhosin یک مقادیری دارد که در php.ini باید درج شود و اگر شما مشکلی با اون دارید باید اون مقادیر را افزایش دهید تا اسکریپت مربوطه را اجرا کند