php error

Status
Not open for further replies.

mason689

New Member
Messages
10
Reaction score
0
Points
0
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
 

galaxyAbstractor

Community Advocate
Community Support
Messages
5,508
Reaction score
35
Points
48
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.
 

Sharky

Community Paragon
Community Support
Messages
4,399
Reaction score
95
Points
48
What is it that the cron job does?
 

mason689

New Member
Messages
10
Reaction score
0
Points
0
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.
 

Sharky

Community Paragon
Community Support
Messages
4,399
Reaction score
95
Points
48
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!
 

mason689

New Member
Messages
10
Reaction score
0
Points
0
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.
 

ah-blabla

New Member
Messages
375
Reaction score
7
Points
0
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:
Status
Not open for further replies.
Top