Mutil file Uploader Problem

by 4 replies
5
I,

I got this issue in wordpress, can any one help me out it.

I gWarning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(C:\Windows\Temp\phpBA5F.tmp) is not within the allowed path(s): (E:\inetpub\vhosts\tsmco.com.pk\httpdocs\) in E:\inetpub\vhosts\tsmco.com.pk\httpdocs\wp-includes\functions.php on line 1895
12
#programming #file #mutil #problem #uploader
  • your file system is trying to write to a file outside of the allowed path set in php.ini.

    You can either alter your php.ini file for your webserver to allow it to write to \Windows\Temp. OR

    You can remove the base_dir_restriction for php. OR

    You can set it to write to a path inside your allowed directories that are owned by your web server.

    in short: script is trying to write a file, webserver says "No".
    • [ 1 ] Thanks
    • [1] reply
    • Thank you for quick response;
      Can you please guide me how I can remove base_dir_restriction for php. ?
      and
      How can I set to write path in my allowed directories?
  • You will need to edit your php.ini file and look for 'open_basedir' and add your path to whatever is there

    PHP: open_basedir in php.ini to Restrict and Limit PHP File Accesses to a Certain Directory

    multiple paths are added by adding a ; between them.

    if you want to know what paths are allowed you can write a very small php script that looks like this

    <?php
    php_info();

    and run that. It will show you all the info about php when you look at it in a browser.
    • [ 1 ] Thanks
    • [1] reply

    • I use the code you have here on every website I have. I would just copy/paste that code to notepad and save it as info.php. Upload that file to the root of the domain. Then when needed you can just input the path to that file in your browser and get all the information for your server.

      I believe the php.ini file will need to be edited by the host support if you are using a shared server. In this case they may not want to make that change because it will affect the other people on the same server.
  • Banned
    [DELETED]

Next Topics on Trending Feed