Closed (fixed)
Project:
Texy!
Version:
5.x-1.4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Mar 2007 at 19:57 UTC
Updated:
4 Jun 2007 at 21:24 UTC
Jump to comment: Most recent file
After some googling around I can say the following error is pretty common on texy-powered websites ;-) .
Warning: is_file() [function.is-file]: open_basedir restriction in effect. File is not within the allowed path(s)
I've prepaired a little patch which gets rid of this (I think) and sets a proper value for the rootPrefix
variable (so Texy! can generate width and height attributes). Please review.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | texy.module.patch | 1.76 KB | havran |
| texy.module-image-root-rootprefix.patch | 1.32 KB | archetwist |
Comments
Comment #1
havran commentedI thinking (and testing) about this patch. But in my site i get problem with this because i have subdirectory in path in URL.
I have Drupal installed physically in directory like /data/user/jc01
From web i need go into URL like mysite.com/havran/
Texy! create physical path for checking image size with joining $texy->imageModule->rootPrefix (which in my case is /data/user/jc01) and $texy->imageModule->root (which is for me /havran/files/).
For my case $texy->imageModule->rootPrefix + $texy->imageModule->root != real physical directory with images...
For some cases is this correct because many webs don't use subdirectories in url...
I check Texy! code in texy/texy/modules/tm-image.php:
Maybe this is Texy! problem...
And second thing. I trying reproduce problem with open_basedir but i have no luck with this. I have modify patch - modified version attached.
Comment #2
archetwist commentedAdding
base_path()resolved my problem with open_basedir restriction but the rootPrefix issue indeed looks like a bug of Texy. I'm afraid I'll be of no help here as my knowledge of PHP is poor ;-) .And why
dirname($_SERVER["SCRIPT_FILENAME"])is better than$_SERVER['DOCUMENT_ROOT'] . '/'. Could you explain?Maybe it is because of different server/PHP configuration.
Comment #3
havran commentedBecause (for example) i have my web on (physicall directory) /web/users/havran a document root for web server is /web/htdocs - for this reason we need look exactly for real path where is your index.php (Drupal index.php).
Yes, i try simulate same conditions with open_basedir settings but i have no luck.
Comment #4
archetwist commentedAs the patch is in the module and it's working I think we can mark this issue as being fixed, can't we?
Comment #5
(not verified) commented