First my config :
/var/www/site = www.mydomaine.com
www.mydomaine.com/securityadmin
the directory PSA
www.mydomaine.com/metabase
the metabase directory
www.mydomaine.com/prive/*
directory with some restricted pages
each pages have :
<?php require_once "/securityadmin/_restrict.php"; ?>
on top
loged or not this is the messages I can see when I try to browse pages :
Warning: main(): Safe_mode.c: Access to [/securityadmin] for [/var/www/site] is forbidden in /var/www/site/prive/katana.php on line 7
Warning: main(): Access forbidden! in /var/www/site/prive/katana.php on line 7
Warning: main(/securityadmin/_restrict.php): failed to open stream: No such file or directory in /var/www/site/prive/katana.php on line 7
Fatal error: main(): Failed opening required '/securityadmin/_restrict.php' (include_path='/var/www/site/include:.') in /var/www/site/prive/katana.php on line 7
katana.php is a protected page
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry about that, ignore the "secondly" part... I thought this was part of the other thread I replied to this morning....
Your problem seems to deal directly with the fact that safe_mode = On in php.ini and that your file permissions are allowing for the inclusion of the files in the PSA directory.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm thinking that your problem likes within how the PSA files are "owned" ...
This is what I think (I've *never* used safe mode, so I may be way off base here):
Do an ls -l in your DOCUMENT_ROOT
The PSA dir should have the same owner and group as the other files that PHP *can* include, and the directories need to be executable by the web server user (or all users), and the files readable by the same.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
All the files have the same mode in my web site. I am using coppermine galery photo (php and mysql) and also webcalendar (php, mysql) all work ok.
Anyway I cant change the file's mode in my ISP web site.
All directories are rwx ... ...
All files are rw. r.. r..
All have the same owner and group
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi
First my config :
/var/www/site = www.mydomaine.com
www.mydomaine.com/securityadmin
the directory PSA
www.mydomaine.com/metabase
the metabase directory
www.mydomaine.com/prive/*
directory with some restricted pages
each pages have :
<?php require_once "/securityadmin/_restrict.php"; ?>
on top
loged or not this is the messages I can see when I try to browse pages :
Warning: main(): Safe_mode.c: Access to [/securityadmin] for [/var/www/site] is forbidden in /var/www/site/prive/katana.php on line 7
Warning: main(): Access forbidden! in /var/www/site/prive/katana.php on line 7
Warning: main(/securityadmin/_restrict.php): failed to open stream: No such file or directory in /var/www/site/prive/katana.php on line 7
Fatal error: main(): Failed opening required '/securityadmin/_restrict.php' (include_path='/var/www/site/include:.') in /var/www/site/prive/katana.php on line 7
katana.php is a protected page
It looks like you have some safe_mode issues to work out with file permissions first...
Secondly, if you are accessing:
http://www.example.com/prive/test.php the profile will need to have "/prve/test.php" defined, not just "/test.php"
Sorry about that, ignore the "secondly" part... I thought this was part of the other thread I replied to this morning....
Your problem seems to deal directly with the fact that safe_mode = On in php.ini and that your file permissions are allowing for the inclusion of the files in the PSA directory.
Thank for answers
In the php info I have :
safe_mode_exec_dir
/usr/local/php/bin
/usr/local/php/bin
safe_mode_gid
On
On
safe_mode_include_dir
no value
no value
safe_mode_allowed_env_vars
PHP_
PHP_
safe_mode_protected_env_vars
LD_LIBRARY_PATH, , HTTP_, REDIRECT_
LD_LIBRARY_PATH, , HTTP_, REDIRECT_
The web site is on my provider and i cant change php config. How I can modify PSA to work?
I'm thinking that your problem likes within how the PSA files are "owned" ...
This is what I think (I've *never* used safe mode, so I may be way off base here):
Do an ls -l in your DOCUMENT_ROOT
The PSA dir should have the same owner and group as the other files that PHP *can* include, and the directories need to be executable by the web server user (or all users), and the files readable by the same.
All the files have the same mode in my web site. I am using coppermine galery photo (php and mysql) and also webcalendar (php, mysql) all work ok.
Anyway I cant change the file's mode in my ISP web site.
All directories are rwx ... ...
All files are rw. r.. r..
All have the same owner and group
OK, I totally missed this before:
<?php require_once "/securityadmin/_restrict.php"; ?>
should be...
<?php require_once "/var/www/site/securityadmin/_restrict.php"; ?>