由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
BuildingWeb版 - Question about Apache & permission
相关主题
How To Install Linux, Apache, MySQL, PHP (LAMP)apache问题请教
error in connecting PHP with MySQLproblem: apache web server
请推荐好的web hosting service,要求如下:怎么在Apache tomcat6下装php5?
how to make a dir readable/writeablehow to configure apache to support mobile browsing traffic?
有成功集合过Apache2和PHP4的大侠吗?Apache PHP 和MySQL 的版本问题
Can not start Apache 2 with 用户认证. :-(求教 php中的js语句不work
[转载] start apache server , httpd? apachectl?新浪互联星空网站的体系结构(转)
Apache 1.3.33 + PHP 4.3.10 @ Redhat 9???请问怎么用unix/linux 做web page?
相关话题的讨论汇总
话题: apache话题: path话题: question话题: permission话题: web
进入BuildingWeb版参与讨论
1 (共1页)
c**t
发帖数: 2744
1
Running apache+php on Windows XP; gnu-Util installed but the following state
ment always failed when requesting via web browser; but can return correct f
iles when running from command line:
...
$files = explode("\n", `ls -c1 $path | tail -n$numb` );
...
I guess it's permission issue? can anyone help?
c*****t
发帖数: 1879
2
Sure sounds like it. Here are two things that you can do
1. Print $path, and `ls -c1 $path` before the line shown and
save the output to a file and see that is expected.
2. Generate the environement which is set up by the web server using
a simple shell script. Then launch your script within this
environment under the assumed id of the web server at command line
to debug.

state
f

【在 c**t 的大作中提到】
: Running apache+php on Windows XP; gnu-Util installed but the following state
: ment always failed when requesting via web browser; but can return correct f
: iles when running from command line:
: ...
: $files = explode("\n", `ls -c1 $path | tail -n$numb` );
: ...
: I guess it's permission issue? can anyone help?

q**1
发帖数: 193
3
your code should be working well as long as you issued an
absolute physical path to '$path'. under my apache2/php5/ubuntu
box, it can even grab files under /etc and post them to the web...
but WinXP might be different, duno, hehe.

state
f

【在 c**t 的大作中提到】
: Running apache+php on Windows XP; gnu-Util installed but the following state
: ment always failed when requesting via web browser; but can return correct f
: iles when running from command line:
: ...
: $files = explode("\n", `ls -c1 $path | tail -n$numb` );
: ...
: I guess it's permission issue? can anyone help?

c**t
发帖数: 2744
4
like is_writeable($file) always returns read-only on XP... I am using absolu
te physical path $_SERVER['DOCUMENT_ROOT'] . "/..."; also tried "\\...",
neither worked in browser..

【在 q**1 的大作中提到】
: your code should be working well as long as you issued an
: absolute physical path to '$path'. under my apache2/php5/ubuntu
: box, it can even grab files under /etc and post them to the web...
: but WinXP might be different, duno, hehe.
:
: state
: f

q**1
发帖数: 193
5
can you print out this "$path" to the web and see if it prints
correctly? All my files under /etc are not writeable, and failed
with the is_writeable($file) test, but they can all be on the web
properly. BTW, is the $path from your URL?? like
http://example.com/path
only in this case, I think you need to prepend 'DOCUMENT_ROOT'
right?? :-)

absolu
,

【在 c**t 的大作中提到】
: like is_writeable($file) always returns read-only on XP... I am using absolu
: te physical path $_SERVER['DOCUMENT_ROOT'] . "/..."; also tried "\\...",
: neither worked in browser..

1 (共1页)
进入BuildingWeb版参与讨论
相关主题
请问怎么用unix/linux 做web page?有成功集合过Apache2和PHP4的大侠吗?
PHP5+MYSQL的连接问题 undefined mysql_connect()Can not start Apache 2 with 用户认证. :-(
How to get a free domain?[转载] start apache server , httpd? apachectl?
要能用index.php就好了!Apache 1.3.33 + PHP 4.3.10 @ Redhat 9???
How To Install Linux, Apache, MySQL, PHP (LAMP)apache问题请教
error in connecting PHP with MySQLproblem: apache web server
请推荐好的web hosting service,要求如下:怎么在Apache tomcat6下装php5?
how to make a dir readable/writeablehow to configure apache to support mobile browsing traffic?
相关话题的讨论汇总
话题: apache话题: path话题: question话题: permission话题: web