نمایش نتایج: از شماره 1 تا 8 , از مجموع 8

موضوع: نصب suhosin

Threaded View

پست قبلی پست قبلی   پست بعدی پست بعدی
  1. #2
    عضو انجمن
    تاریخ عضویت
    Aug 2008
    نوشته ها
    326
    تشکر تشکر کرده 
    159
    تشکر تشکر شده 
    580
    تشکر شده در
    192 پست

    پیش فرض پاسخ : نصب suhosin

    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



  2. تعداد تشکر ها ازPersianDOT به دلیل پست مفید


اطلاعات موضوع

کاربرانی که در حال مشاهده این موضوع هستند

در حال حاضر 1 کاربر در حال مشاهده این موضوع است. (0 کاربران و 1 مهمان ها)

موضوعات مشابه

  1. رو سروری ک suhosin نصب نیست ، خطای suhosin میگیرم !! :|
    توسط OmidX در انجمن سوالات و مشکلات
    پاسخ ها: 6
    آخرين نوشته: July 16th, 2014, 16:50
  2. خطای suhosin
    توسط reza63 در انجمن دايرکت ادمين DirectAdmin
    پاسخ ها: 9
    آخرين نوشته: May 16th, 2014, 01:02
  3. مشکل جدی با Suhosin
    توسط ertebat7 در انجمن سی پنل CPanel
    پاسخ ها: 3
    آخرين نوشته: August 25th, 2012, 11:55
  4. مشکل با suhosin
    توسط Arashdn در انجمن سی پنل CPanel
    پاسخ ها: 12
    آخرين نوشته: August 31st, 2009, 20:12
  5. چگونگی نصب Suhosin
    توسط Vahid در انجمن مباحث و منابع آموزشی
    پاسخ ها: 1
    آخرين نوشته: August 9th, 2008, 14:32

مجوز های ارسال و ویرایش

  • شما نمیتوانید موضوع جدیدی ارسال کنید
  • شما امکان ارسال پاسخ را ندارید
  • شما نمیتوانید فایل پیوست کنید.
  • شما نمیتوانید پست های خود را ویرایش کنید
  •