Closed Thread
Results 1 to 7 of 7

Thread: php error

  1. #1
    mason689 is offline x10Hosting Member mason689 is an unknown quantity at this point
    Join Date
    Oct 2009
    Posts
    10

    Question php error

    I get the following error in my Drupal log every time cron is run:

    is_dir() [<a href='function.is-dir'>function.is-dir</a>]: open_basedir restriction in effect. File(/tmp/mysql.sock) is not within the allowed path(s): (/home/:/tmp)

    I found a Drupal thread that relates to this error:
    http://drupal.org/node/363583

    And the error was eventually reported solved with this:
    My host enabled php open base directory.

    So my question, is this a familiar problem to you?

    -Mike

  2. #2
    galaxyAbstractor's Avatar
    galaxyAbstractor is offline Community Advocate galaxyAbstractor is on a distinguished road
    Join Date
    Oct 2007
    Location
    Land of Null and Insanity
    Posts
    5,495

    Re: php error

    You aren't able to access that folder for security reasons, so you'll have to find an alternate way of doing what you are trying.

  3. #3
    Sharky's Avatar
    Sharky is offline Admiral Awesome Sharky will become famous soon enough
    Join Date
    Oct 2007
    Location
    Outside the USA
    Posts
    3,306

    Re: php error

    What is it that the cron job does?
    The physics is theoretical but the fun is real.

  4. #4
    mason689 is offline x10Hosting Member mason689 is an unknown quantity at this point
    Join Date
    Oct 2009
    Posts
    10

    Re: php error

    The cron.php script is the standard one supplied in the Drupal package, and I am not proficient enough to tell you how it is programmed.

    I personally only have it set to run for the purpose of checking for Drupal core and module updates, but in the future I will need it send newsletters as well. But that is all done in the background - I program none of it.

    If this is some uneccessary check or something, and someone knows if it's possible to "disable" this part of the code I could try that.

  5. #5
    Sharky's Avatar
    Sharky is offline Admiral Awesome Sharky will become famous soon enough
    Join Date
    Oct 2007
    Location
    Outside the USA
    Posts
    3,306

    Re: php error

    The reason I asked is that I'm not entirely sure the cron job is required for anything other than archival purposes and updates. Although from what you say, it seems it is used for more!
    The physics is theoretical but the fun is real.

  6. #6
    mason689 is offline x10Hosting Member mason689 is an unknown quantity at this point
    Join Date
    Oct 2009
    Posts
    10

    Thumbs up Re: php error

    Solution ...
    On a last-chance whim, under Drupal settings I changed the TMP directory setting from just "tmp" to "home/X10_username/tmp". No more errors.
    Thanks for input.

  7. #7
    ah-blabla's Avatar
    ah-blabla is offline x10 Lieutenant ah-blabla is an unknown quantity at this point
    Join Date
    Sep 2009
    Posts
    375

    Re: php error

    I'm not sure about what the drupal script does, but it seems to assume it has access to /tmp/mysql.sock, which it doesn't. In the thread you linked to, /tmp is accessible, but the file checked (mysql.sock) is just a symlink to another place:
    Indeed, on my (shared) server, mysql.sock is a symlink:
    lrwxrwxrwx 1 root root 27 Mar 8 01:52 /tmp/mysql.sock -> ../var/lib/mysql/mysql.sock

    and /var/lib is not in the allowed paths...
    The problem there was that the user couldn't access /var/lib/mysql (i.e. where mysql.sock points to), so adding this to the php allowed paths (server config) *should* solve the problem.
    Last edited by ah-blabla; 10-31-2009 at 03:44 PM.

Closed Thread

Similar Threads

  1. Replies: 4
    Last Post: 03-15-2009, 01:51 PM
  2. Error headers with php.
    By Tarzan in forum Programming Help
    Replies: 5
    Last Post: 08-06-2008, 11:07 AM
  3. Replies: 1
    Last Post: 05-03-2008, 03:42 AM
  4. "PHP Startup: Invalid Library" - Interesting error
    By javaguy78 in forum Free Hosting
    Replies: 5
    Last Post: 03-27-2007, 02:33 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers