Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-02-10 23:31:37
- craigontour
- New Member
- Registered: 2006-02-10
- Posts: 3
"open_basedir restriction in effect" (new install)
I have just installed and setup textpattern on my ISP site at www.domain.com/textpattern-4.0.3. Although I can get to the admin page at www.domain.com/textpattern-4.0.3/textpattern/index.php the main page at www.domain.com/textpattern-4.0.3/index.php doesnt work.
Gives lots of errors about open_basedir, e.g.
Warning: main(): open_basedir restriction in effect. File(/htdocs/textpattern-4.0.3/textpattern/publish.php) is not within the allowed path(s): (/usr/local/psa/home/vhosts/domain.com/httpdocs:/tmp) in /usr/local/psa/home/vhosts/domain.com/httpdocs/textpattern-4.0.3/index.php on line 27
I think it might be to do with the errors shown in Diagnostics tab (see below) or with the Adv Prefs which include following:
Image directory: /textpattern-4.0.3/images
Temp folder: /textpattern-4.0.3/textpattern/tmp
File Upload Path: /textpattern-4.0.3/files
Any ideas?
Cheers
Craig.
—————————————————————-
Diagnostic info:
Textpattern version: 4.0.3 (r1188)
last_update: 2006-02-10 21:21:01/1970-01-01 00:00:00
Document root: /usr/local/psa/home/vhosts/domain.com/httpdocs
$path_to_site: /usr/local/psa/home/vhosts/domain.com/httpdocs/textpattern-4.0.3
Textpattern path: /usr/local/psa/home/vhosts/domain.com/httpdocs/textpattern-4.0.3/textpattern
Permanent link mode: section_id_title
open_basedir: /usr/local/psa/home/vhosts/domain.com/httpdocs:/tmp
upload_tmp_dir: /tmp
Temp folder: /textpattern-4.0.3/textpattern/tmp
Site URL: www.domain.com
PHP version: 4.4.2
Register globals: 1
server_time: 2006-02-10 23:23:28
MySQL: 4.1.11
Locale: en_GB.ISO_8859-1
Server: Apache/1.3.33 (Unix) mod_fastcgi/2.4.2 mod_python/2.7.10 Python/2.2.2 mod_gzip/1.3.26.1a mod_perl/1.29 mod_throttle/3.1.2 PHP/4.4.2 FrontPage/5.0.2.2635 mod_ssl/2.8.22 OpenSSL/0.9.7e
Apache version: Apache/1.3.33 (Unix) mod_fastcgi/2.4.2 mod_python/2.7.10 Python/2.2.2 mod_gzip/1.3.26.1a mod_perl/1.29 mod_throttle/3.1.2 PHP/4.4.2 FrontPage/5.0.2.2635 mod_ssl/2.8.22 OpenSSL/0.9.7e
php_sapi_mode: apache
os_version: FreeBSD 4.9-RELEASE-p13
Pre-flight check:
————————————
Image directory is not writable: /usr/local/psa/home/vhosts/notdotcom.com/httpdocs/textpattern-4.0.3//textpattern-4.0.3/images
File Upload Path is not writable: /textpattern-4.0.3/files
Temp folder is not writable: /textpattern-4.0.3/textpattern/tmp
————————————
.htaccess file contents:
————————————
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) – [PT,L]
RewriteRule ^(.*) index.php
————————————
(Edit: assumed resolved and marked as such. :) -Mary)
Offline
Re: "open_basedir restriction in effect" (new install)
Change the directory structure as follows:
url.com/textpattern/
url.com/images/
url.com/files/
url.com/tmp/
or, at least, try removing the -4.0.3 from the end of the first directory…
Proud Canadian. Toronto Locksmith , Actualize Consulting
Offline
#3 2006-02-11 15:59:43
- craigontour
- New Member
- Registered: 2006-02-10
- Posts: 3
Re: "open_basedir restriction in effect" (new install)
Ok, so I reinstalled the whole thing from scratch.
I ftp’d the folder at textpattern-4.0.3/textpattern to site as textpattern, and then the textpattern-4.0.3/images as images and textpattern-4.0.3/files as files. Then I moved textpattern-4.0.3/textpattern/tmp to tmp.
This worked better than any other way so far and seemed to work ok.
I forgot to remove update and setup so I got that message about /usr/… still exists so I binned them and it went away.
Then I had to change permissions to images, files and tmp to 777 and the messages for those went away.
At last ….. alll checks passed!
So I then went to my site at www.url.com/index.php (being that I’ve now moved all the directories to that level) and I still get a bunch of these errors:
Warning: main(): open_basedir restriction in effect. File(/httpdocs/textpattern/publish.php) is not within the allowed path(s): (/usr/local/psa/home/vhosts/notdotcom.com/httpdocs:/tmp) in /usr/local/psa/home/vhosts/notdotcom.com/httpdocs/index.php on line 27
Warning: main(/httpdocs/textpattern/publish.php): failed to open stream: Operation not permitted in /usr/local/psa/home/vhosts/notdotcom.com/httpdocs/index.php on line 27
Warning: main(): open_basedir restriction in effect. File(/httpdocs/textpattern/publish.php) is not within the allowed path(s): (/usr/local/psa/home/vhosts/notdotcom.com/httpdocs:/tmp) in /usr/local/psa/home/vhosts/notdotcom.com/httpdocs/index.php on line 27
Warning: main(/httpdocs/textpattern/publish.php): failed to open stream: Operation not permitted in /usr/local/psa/home/vhosts/notdotcom.com/httpdocs/index.php on line 27
Warning: main(): open_basedir restriction in effect. File(/httpdocs/textpattern/publish.php) is not within the allowed path(s): (/usr/local/psa/home/vhosts/notdotcom.com/httpdocs:/tmp) in /usr/local/psa/home/vhosts/notdotcom.com/httpdocs/index.php on line 27
Warning: main(/httpdocs/textpattern/publish.php): failed to open stream: Operation not permitted in /usr/local/psa/home/vhosts/notdotcom.com/httpdocs/index.php on line 27
Warning: main(): Failed opening ‘/httpdocs/textpattern/publish.php’ for inclusion (include_path=’.:/usr/local/psa/apache/lib/php’) in /usr/local/psa/home/vhosts/notdotcom.com/httpdocs/index.php on line 27
Fatal error: Call to undefined function: textpattern() in /usr/local/psa/home/vhosts/notdotcom.com/httpdocs/index.php on line 28
Now when I go to Diagnostics tab I see that there are write errors for images and tmp even though I’ve set them to writable.
Please, please help – it looks a great app.
Cheers
Offline
Re: "open_basedir restriction in effect" (new install)
Did you change your config.php file to the same effect? I’ve seen these errors before. When I messed up on a path. Not to say that this is what you did, although it’s quite possible.
Last edited by 1beb (2006-02-11 20:53:04)
Proud Canadian. Toronto Locksmith , Actualize Consulting
Offline
#5 2006-02-11 23:29:33
- craigontour
- New Member
- Registered: 2006-02-10
- Posts: 3
Re: "open_basedir restriction in effect" (new install)
Config.php looks like:
<?php
$txpcfg[‘db’] = ‘mydb’;
$txpcfg[‘user’] = ‘admin’;
$txpcfg[‘pass’] = ‘pass’;
$txpcfg[‘host’] = ‘www.url.com’;
$txpcfg[‘table_prefix’] = ‘’;
$txpcfg[‘txpath’] = ‘/httpdocs/textpattern’;
$txpcfg[‘dbcharset’] = ‘utf8’;
?>
Is that right?
Offline
Re: "open_basedir restriction in effect" (new install)
The only prolem you had (have), was (is) likely that your txpath setting in config was wrong.
Instead of
/httpdocs/textpattern...
it should have been something like:
usr/local/psa/home/vhosts/notdotcom.com/httpdocs/textpattern...
Offline
Re: "open_basedir restriction in effect" (new install)
I have same problem, I tried to modify txp_path but without success
Error report:
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/tmp/txp_tuiHBd) is not within the allowed path(s): (/DISK2/WWW:/DISK3/WWW:/DISK2/TMP) in /DISK2/WWW/ovsem.net/www/textpattern/lib/txplib_misc.php on line 973
Diagnostics
Verze Textpattern: 4.0.3 (r1188)
Poslední změna: 2006-10-31 20:20:41/2005-12-31 12:31:45
Hlavní adresář dokumentů: /usr/local/apache2/htdocs
$path_to_site: /DISK2/WWW/ovsem.net/www
Cesta k Textpattern: /DISK2/WWW/ovsem.net/www/textpattern
Podoba stálých odkazů?: section_title
open_basedir: /DISK2/WWW:/DISK3/WWW:/DISK2/TMP
upload_tmp_dir: /DISK2/TMP
Adresář dočasných souborů?: /DISK2/WWW/ovsem.net/www/images
Adresa serveru: www.ovsem.net
Verze PHP: 5.1.6
Globální proměnné: 1
Místní čas na serveru: 2006-11-02 09:06:15
MySQL: 5.0.26-log
Místní prostředí?: cs_CZ.UTF-8
Server: Apache
Verze Apache: Apache
API pro PHP na serveru: apache2handler
Verze operačního systému: Linux 2.6.18.1
Obsah souboru .htaccess:
————————————
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
RewriteBase /
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.+) – [PT,L]
RewriteRule ^(.*) index.php
RewriteCond %{HTTP_HOST} ^ovsem\.net
RewriteRule ^(.*)$ http://www.ovsem.net/ [R=301,QSA]
</IfModule>
CONFIG:
$txpcfg[‘db’] = ‘txp_db’;
$txpcfg[‘user’] = ‘user’;
$txpcfg[‘pass’] = ‘pass’;
$txpcfg[‘host’] = ‘mysql’;
$txpcfg[‘table_prefix’] = ‘’;
$txpcfg[‘txpath’] = ‘/DISK2/WWW/ovsem.net/www/textpattern’;
$txpcfg[‘dbcharset’] = ‘utf8’;
Can you help?
Last edited by beztak (2006-11-02 08:18:46)
Job: Plugo – tvorba eshopu
Projects: Czech free fonts
Offline
Re: "open_basedir restriction in effect" (new install)
In the Textpattern advanced preferences, try changing the ‘temporary directory path’ to: /DISK2/WWW/ovsem.net/www/textpattern/tmp
Last edited by ruud (2006-11-02 08:41:23)
Offline
#9 2011-04-28 08:28:48
- HarryG
- Member
- Registered: 2011-01-12
- Posts: 21
Re: "open_basedir restriction in effect" (new install)
I have the same problem. This is the error message:
Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/dev/urandom) is not within the allowed path(s): (/home/:/usr/lib/php:/tmp) in /home/u292440919/public_html/textpattern/lib/PasswordHash.php on line 51
Here’e the Textpattern-install-generated config.php (with some fields obfuscated):
<?php
$txpcfg[‘db’] = ‘u292440919_db’;
$txpcfg[‘user’] = ‘u292440919_usr’;
$txpcfg[‘pass’] = ‘myPW’;
$txpcfg[‘host’] = ‘mysitehost.com’;
$txpcfg[‘table_prefix’] = ‘’;
$txpcfg[‘txpath’] = ‘/home/u292440919/public_html/textpattern’;
$txpcfg[‘dbcharset’] = ‘utf8’;
?>
Thats’ a good database name and username. And a good hostname.
I would be grateful for any help.
Thanks
Offline
Re: "open_basedir restriction in effect" (new install)
HarryG wrote:
I have the same problem. This is the error message:
Warning: is_readable() [function.is-readable]: open_basedir restriction in effect. File(/dev/urandom) is not within the allowed path(s): (/home/:/usr/lib/php:/tmp) in /home/u292440919/public_html/textpattern/lib/PasswordHash.php on line 51
That should only effect generating password hashes during logging in. You can ignore the message or you can replace /textpattern/lib/PasswordHash.php
with SVN version of PasswordHash.php.
Offline
#11 2011-04-28 09:28:08
- HarryG
- Member
- Registered: 2011-01-12
- Posts: 21
Re: "open_basedir restriction in effect" (new install)
’Thanks. Installed the upgrade to the password hash and it didn’t help. The problem most likely lies with the (free hosting) server. Besides the above error, Admin > Diagnostics reports:
Textpattern version: 4.4.0 (r3514)
Last Update: 2011-04-28 08:32:25/2011-04-28 07:55:35
Document root: /usr/local/apache/htdocs ()
$path_to_site: /home/u292440919/public_html
Textpattern path: /home/u292440919/public_html/textpattern
Permanent link mode: section_id_title
open_basedir: /home/:/usr/lib/php:/tmp
upload_tmp_dir: /tmp
Temporary directory path: /home/u292440919/public_html/textpattern/tmp
Site URL: familystudies.co.cc
PHP version: 5.2.17
GD Image Library: version bundled (2.0.34 compatible), supported formats: GIF, JPG, PNG
Server TZ: America/New_York
Server Local Time: 2011-04-28 05:20:53
DST enabled?: 0
Automatically adjust DST setting?: 0
Time Zone: America/Toronto (-14400)
MySQL: 5.0.91-community
Locale: en_US.UTF-8
Server: Apache
Apache version: Apache
PHP Server API: apache2handler
RFC 2616 headers:
Server OS: Linux 2.6.18-194.32.1.el5
Admin-side theme: classic 4.4.0
Pre-flight check:
————————————
The following PHP functions (which may be necessary to run Textpattern) are disabled on your server: mysql_list_dbs, ini_alter, pfsockopen, openlog, syslog, symlink, link, chgrp, leak, escapeshellcmd, apache_child_terminate, apache_getenv, apache_note, apache_setenv, virtual, mb_send_mail <!— strange: txp sent me a password-change notice. —>
clean_url_data_failed: <!DOCTYPE HTML PUBLIC “-//IETF//DTD HTML 2.0//EN”>
————————————
.htaccess file contents:
————————————
#DirectoryIndex index.php index.html
#Options +FollowSymLinks
#Options -Indexes
#ErrorDocument 403 default
<IfModule mod_rewrite.c> RewriteEngine On #RewriteBase /relative/web/path/
RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^(.+) – [PT,L]
RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^(.*) index.php
RewriteCond %{HTTP:Authorization} !^$
RewriteRule .* – [E=REMOTE_USER:%{HTTP:Authorization}]
</IfModule>
#php_value register_globals 0
————————————
Not being a guru, I could really use some help.
TY
Offline
Re: "open_basedir restriction in effect" (new install)
If you can access the diagnostics tab, you can log in. What is the problem? Please provide a detailed step-by-step description of how to reproduce it and what is that makes you think it is a problem.
The disabled functions aren’t a problem, as far as I can tell after looking at them briefly. TXP doesn’t use the ‘mb_’ function to send email.
Offline