Server issue? PHP mode issue? Other? Need a resolution. Thanks.

Status
Not open for further replies.

slight

New Member
Messages
38
Reaction score
1
Points
0
I posted this to the programming forum as well (apologies). I'm getting the following error. It is affecting my ability to generate a sitemap, and other issues. Some folks online have told me this is really a server issue (perhaps with PHP running in safe mode?).

Any idea what could be causing this and how to resolve it?

Here's the error:
Warning: is_writable() [function.is-writable]: open_basedir restriction in effect. File(/) is not within the allowed path(s):

Some history:

1. I originally defined the project in a new (dedicated) subdirectory of an existing site. Call this mysite.x10hosting.com/wordpress/ (not the actual name)

2. Once the Wordpress site was up and running at mysite.x10hosting.com/wordpress I created an addon domain, such as www.newsite.com that mapped to mysite.x10hosting.com/wordpress, and I changed my Wordpress blog URL to www.newsite.com

That's when the problem started.

Could this be related to the .htaccess file related (just a guess)? That file currently has the following format:

# BEGIN WordPress
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(.*)mysite.x10hosting.com/wordpress [NC]
RewriteRule ^(.*)$ http://www.newsite.com/$1 [R=301,L]

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>


# END WordPress


Hoping you can help. Thanks.
 

kadai

New Member
Messages
51
Reaction score
2
Points
0
Well, apparently is a issue with the function itself, maybe try use a different one?
As so far, I use the script described here: http://www.dynamicdrive.com/forums/showthread.php?p=50943 to generate my sitemaps, and it works perfectly (of course, with some modifications to fit my own needs).
Give it a test.

By Twey
Code:
<?php
  $cwd = $_SERVER['REQUEST_URI'];
  $cwd = substr($cwd, 0, strrpos($cwd, '/' + 1));

  function paintUndersideOfFox($c) {
    global $cwd;
    echo('<ul class="dirlist">');
    $d = opendir($c);
    while($f = readdir($d)) {
      if(strpos($f, '.') === 0) continue;
      $ff = $c . '/' . $f;
      echo('<li><a href="' . $cwd . $ff . '">' . $ff . '</a></li>');
      if(is_dir($ff)) paintUndersideOfFox($ff);
    }
    echo('</ul>');
  }

  paintUndersideOfFox('.');
?>
 
Last edited:

slight

New Member
Messages
38
Reaction score
1
Points
0
The problem is not with the function, the problem is with access to basedir.
 

Derek

Community Support Force
Community Support
Messages
12,882
Reaction score
186
Points
63
You know if you change your wordpress domain you have to change 10 other things... If it's a blog that has nothing I suggest you reinstall with the new domain..
 

kadai

New Member
Messages
51
Reaction score
2
Points
0
Wait wait... are you sure if you are reading the proper dir?
Please remember that there is a difference between "/" and "/home/<username>/public_html"... after having reading again your warning more carefully, I noticed that maybe you was trying to read the "root" base dir, what is not permitted.

Just giving as parameter "/" to "is_writable()" will make PHP check if the server dir "/" (or C: in windows machines) is writable by you.

In such case, you can use $_SERVER['DOCUMENT_ROOT'] to get the root of where your documents are.
 
Status
Not open for further replies.
Top