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

موضوع: open_basedir restriction in effec

  1. #1
    کاربر فعال حرفه ای tapesh آواتار ها
    تاریخ عضویت
    Nov 2013
    نوشته ها
    1,026
    تشکرها / پسندها

    پیش فرض open_basedir restriction in effec

    Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(...) is not within the allowed path(s): (/home/user_name:/usr/lib/php:/usr/local/lib/php:/tmp) in /... on line 226


    از وقتی سرور سایت را تغییر دادیم یک اسکریپت داریم که خطای بالا را می دهد
    راه حل چیست؟
    با تشکر

  2. # ADS
    Circuit advertisement
    تاریخ عضویت
    Always
    نوشته ها
    Many
     

  3. #2
    RezaBehroozi admin آواتار ها
    تاریخ عضویت
    Jan 1970
    محل سکونت
    Iran/Shiraz
    نوشته ها
    11,188
    تشکرها / پسندها

    پیش فرض

    There are two methods to solve this problem:

    1. The solution or workaround to open_basedir restriction problem is that disable the PHP open_basedir protection altogether, or to exclude the protection for certain privileged user accounts, or to allow access to the additional directory for PHP scripts.

      • If you’re using cPanel WebHost Manager (WHM), you can easily disable PHP open_basedir protection or exclude certain users from the protection with WHM. Simply go to “Tweak Security” under the “Security” section, then select “Configure” link for “Php open_basedir Tweak”. Inside it, you can enable or disable php open_basedir Protection, or exclude and include hosts from the protection.
      • If you’re using Plesk hosting control panel, you may need to manually edit Apache configuration file of vhost.conf and vhost_ssl.conf, and add in or edit the following php_admin_value open_basedir lines to the following:

        php_admin_value open_basedir none


        php_admin_value open_basedir /full/path/to/dir:/full/path/to/directory/httpdocs:/tmp

        The paths (above is example only and to be replaced with real path) that behind open_basedir are the directories that specifically allowed for the PHP scripts in the vhost domain account to access, so you can add in more directories that files are been stored and needed to be opened by PHP, each seperated by color “:”. But be careful as it might expose your system to security fraud.
        Once done, run the command below to make the changes effective, and then restart Apache httpd web server (apache2ctl restart or httpd restart)
      • If you have to manually edit the Apache configuration file to disable PHP open_basedir protection, simply open up the httpd.conf file, and search for the lines that starts with the following characters:
        php_admin_value open_basedir …..
        Replace the whole line under the virtual host for the domain user account that you want to disable protection with the following line to disable it:
        php_admin_value open_basedir none

    2. You can also opt to allow your PHP scripts to access additional directory instead without disabling the protection. Additional directory can be added to the line, separated with color “:”. For example, to add /new_directory to the allow list:
      php_admin_value open_basedir “/home/user_account/:/usr/lib/php:/usr/local/lib/php:/tmp”
      php_admin_value open_basedir “/home/user_account/:/usr/lib/php:/usr/local/lib/php:/tmp:/new_directory”
      Restart the Apache after finished editing. Note that the directory allowed list restriction above is actually a prefix, not a directory name. This means that “open_basedir = /dir/incl” also allows access to “/dir/include” and “/dir/incls” if they exist. When you want to restrict access to only the specified directory, end with a slash. For example: “open_basedir = /dir/incl/”.



    کد:
    http://www.templatemonster.com/help/open_basedir-restriction-in-effect-filex-is-not-within-the-allowed-paths-y.html
    [فقط اعضا می توانند لینک ها را مشاهده کنند برای ثبت نام اینجا را کلیک کنید]

  4. Thanks tapesh thanked for this post

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

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

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

علاقه مندی ها (Bookmarks)

علاقه مندی ها (Bookmarks)

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

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