Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Feb 2004
    Location
    India
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PHP Error open_basedir restriction

    We are facing this error

    Warning: open_basedir restriction in effect. File is in wrong directory in /home/httpd/vhosts/domain.com/httpdocs/helplive/inc/header_mm.php on line 24

    Warning: Cannot add header information - headers already sent by (output started at /home/httpd/vhosts/domain.com/httpdocs/helplive/inc/header_mm.php:24) in /home/httpd/vhosts/domain.com/httpdocs/helplive/inc/config.php on line 203

    Warning: Cannot add header information - headers already sent by (output started at /home/httpd/vhosts/domain.com/httpdocs/helplive/inc/header_mm.php:24) in /home/httpd/vhosts/domain.com/httpdocs/helplive/inc/config.php on line 206

    Warning: Cannot add header information - headers already sent by (output started at /home/httpd/vhosts/domain.com/httpdocs/helplive/inc/header_mm.php:24) in /home/httpd/vhosts/domain.com/httpdocs/helplive/inc/config.php on line 209



    We have two servers

    1 one dedicated on whicn php is 4.3.2 and the same script is running fine

    2. we have VPS with plesk 6.0 and here php is 4.2.2 and we are facing above error

    Above kind of error we are facing in most of php scripts wheb we contacted our vps provider they say this is script problem we said that when it is running on other dedicated sever why problem in your server(VPS). we told that we are getting same kind of error in lot of php scripts. we understadn some thing is to be done at server level not at domain level as on other dedicated server we are running all scripts fine

    Can you guide what should be done at server level so that we should not face this error in most of domains

    our registered globle is ON
    Jagan Nath
    Web Development Company India SEO Services Since 1998 - Custom PHP Web Development

  • #2
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    can you not update the PHP version? Im no expert with servers but I have now managed to setup apache and updating PHP is almost just copying and pasting from what I can tell.

  • #3
    Senior Coder missing-score's Avatar
    Join Date
    Jan 2003
    Location
    UK
    Posts
    2,194
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Also just like to point out to you that your signature is 5 lines long when the rules (http://www.codingforums.com/rules.htm) state it can be no more than 4 lines

  • #4
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,093
    Thanks
    11
    Thanked 101 Times in 99 Posts
    I assume on your VPS you should have access to the php.ini ? if so just disable open_basedir directive , else you will have to ask your provider to do so for you.
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #5
    New Coder
    Join Date
    Feb 2004
    Location
    India
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    We contacted our server provider he says tell me the suggestion I will do it for you but he will charge 25USD for any modification so
    please let me know what should we ask him to do either ask him to have new version on virtual private server or ask him modification in php.ini
    Jagan Nath
    Web Development Company India SEO Services Since 1998 - Custom PHP Web Development

  • #6
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,093
    Thanks
    11
    Thanked 101 Times in 99 Posts
    OK before you spend any $$
    If its a VPS you should have access to your own php.ini [and should be able to modify it]

    usually @ /usr/local/lib/php.ini but this can vary ,
    do a find/locate and then

    cat /usr/local/lib/php.ini

    look for the open_basedir directive and see what it is set to , if it has no value then this is not the problem else post that value here ...or if you are feeling brave , backup the php.ini , comment out the directive , save and restart apache.
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #7
    New Coder
    Join Date
    Feb 2004
    Location
    India
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Dear firepages

    Thanks for your support

    we checked the php and found

    open_basedir no value

    well you can check the php here
    http://www.megrihost.com/test.php
    Jagan Nath
    Web Development Company India SEO Services Since 1998 - Custom PHP Web Development

  • #8
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,093
    Thanks
    11
    Thanked 101 Times in 99 Posts
    Hi , the local value which is the value that your installation is using is ..

    `/home/httpd/vhosts/megrihost.com/httpdocs:/tmp`

    you need to add to this the absolute path to the files you are trying to include , e.g.

    `/home/httpd/vhosts/megrihost.com/httpdocs:/tmp:/path/to/wherever/`

    the colons : seperate the paths the same as with an include path
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •