Web Analytics Made Easy -
StatCounter PHP Error open_basedir restriction - CodingForum

Announcement

Collapse
No announcement yet.

PHP Error open_basedir restriction

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new 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
    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.
    PHP Weekly - A PHP Developers Resource
    PHP 5.1.4 and Ruby on Rails web hosting
    Moderator of PHP and Work offers and Requests
    Install Apache/PHP/MySQL
    (by marek_mar) | TinyPlugin Architecture

    Comment


    • #3
      Also just like to point out to you that your signature is 5 lines long when the rules (http://www.codingforum.net/rules.htm) state it can be no more than 4 lines
      PHP Weekly - A PHP Developers Resource
      PHP 5.1.4 and Ruby on Rails web hosting
      Moderator of PHP and Work offers and Requests
      Install Apache/PHP/MySQL
      (by marek_mar) | TinyPlugin Architecture

      Comment


      • #4
        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)

        Comment


        • #5
          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

          Comment


          • #6
            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)

            Comment


            • #7
              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

              Comment


              • #8
                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)

                Comment

                Working...
                X