النتائج 1 إلى 2 من 2

الموضوع: برمجة php والمبرمج والأمنية

  1. #1
    عضو سوبر نشيط
    تاريخ التسجيل
    Mar 2002
    المشاركات
    889

    برمجة php والمبرمج والأمنية



    اخواني المبرمجون الأعزاء
    أريد من الاخوة المبرمجون يهتمون بهذا الموضوع وكل شخص يأتي بحيلة في برمجته أو أسلوب تعامله مع السيرفرات المختلفة لمراعاة الأمنية

    شاهدت في موقع php.net مقال وأردت أن أنقله هنا وأيضاً أنتظر الاخوة المصممين بأن يأتونا بحيلهم حين البرمجة والتصميم وطرق تعاملهم مع السيرفرات لتأمين الأمنية بأعلى درجته
    هذا وتقبلوا تحياتي

    The best way to store Database Passwords and other private information is to store it in a file -OUTSIDE- of the Document Root, and then include() or require() it from that location. PHP's include() and require() do not require to the files it's attempting to read to be in the document path. However for the Web Server to serve up a regular text/html document, it must be in the Document Path. Thus preventing anyone from intentionally or accidently reading your PHP source if the extension is not handled by your Web Server.

    It does however require whatever user the PHP Web Server is running as have read access to that directory/file. For added security, I suggest setting the permissions on the file to 700 and the user to whatever the Web Server is running as. This way only the web server itself can read this file, and no one else on the server can read it.

    For example, if your Document Path is /home/username/htdocs, create a directory called /home/username/private. Copy all of your files holding Database Passwords or anything you'd rather not have users stumbling apon into the private directory. Then on the directory and the files inside, set the bits to 700, and chown it to your Web Server's user.

    Then use

    require("/home/username/private/config.php")

    instead of

    require("/home/username/htdocs/config.php")





    haidar غير متواجد حالياً


  2. #2


    أنا لما أبغى أخلي الباسوردات على ملف

    أسوي متغير

    وأخليه لمجلد في مكان

    وأسوي متغير لهذا المجلد في ملف ثاني((علشان لا أحد يعرفه))

    مثلاً أخلي المجلد الي يتخزن فيه ملف الباسوردات images/vb/to/bn/fg/kj/s/
    وكذا يعني

    وبعدين أخلي الباسوردات تتسجل على ملف ولنفرض index.php

    وبعدين أخلي اللي يزور هذي الصفحه يطلع له أهلاً وو .. كذا يعني

    وإذا أبغى أعرض الباسوردات طبعاً أسوي داون لوود للملف من برنامج إف تي بي

    إنشاء الله فهمت قصدي

    هذا بالنسبه للبي إتش بي إذا أنا ما حبيت الباسوردات تتسجل على دايتا بايس





    __________________
    ArabBB ... SoooooN!
    Al Mobarmeg المبرمج غير متواجد حالياً





ضوابط المشاركة

  • لا تستطيع إضافة مواضيع جديدة
  • لا تستطيع الرد على المواضيع
  • لا تستطيع إرفاق ملفات
  • لا تستطيع تعديل مشاركاتك
  •  

أضف موقعك هنا| اخبار السيارات | حراج | شقق للايجار في الكويت | بيوت للبيع في الكويت | دليل الكويت العقاري | مقروء | شركة كشف تسربات المياه | شركة عزل اسطح بالرياض | عزل فوم بالرياض| عزل اسطح بالرياض | كشف تسربات المياة بالرياض | شركة عزل اسطح بالرياض