Shared installation
Why guest?
This guest is elf2000.
This guest is elf2000.
--
Tadashi Jokagi
Serendipity Weblog Japanese http://oss.poyo.jp/s9y-ja/
HotPHPPER News http://news.hotphpper.net/
Tadashi Jokagi
Serendipity Weblog Japanese http://oss.poyo.jp/s9y-ja/
HotPHPPER News http://news.hotphpper.net/
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
This is very strange, I don't know why it works for me then. I'll investigate it thoroughly this weekend!
Regards,
Garvin
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
I am guesses with this information.
Garvin is writing that "/var/www/" is docroot.
That is, /var/www/serendipity/s9y-01/is also docroot.
In that case, this processing is performed.
That is, it can interpret like this.
I was not able to find the information which you have installed in public_html.
I am sorry if a mistake exists.
I expect the survey in a weekend.
"/var/www/serendipity/s9y-01/" is included in "/var/www/".My config was:
/usr/local/lib/php/s9y -- s9y repository
/var/www/ -- document root
/var/www/serendipity/s9y-01/
Garvin is writing that "/var/www/" is docroot.
That is, /var/www/serendipity/s9y-01/is also docroot.
In that case, this processing is performed.
Code: Select all
function serendipity_query_default($optname, $default, $usertemplate = false, $type = 'string') {
(snip)
switch ($optname) {
(snip)
case 'serendipityPath':
$test_path1 = $_SERVER['DOCUMENT_ROOT'] . rtrim(dirname($_SERVER['PHP_SELF']), '/') . '/';
(snip)
if (file_exists($test_path1 . 'serendipity_admin.php')) {
return $test_path1;
(snip)
}
Code: Select all
function serendipity_query_default($optname, $default, $usertemplate = false, $type = 'string') {
(snip)
switch ($optname) {
(snip)
case 'serendipityPath':
$test_path1 = "/var/www/" . rtrim(dirname("/serendipity/s9y-01/serendipity_admin.inc.php"), '/') . '/';
(snip)
if (file_exists($test_path1 . 'serendipity_admin.php')) {
return $test_path1;
(snip)
I am sorry if a mistake exists.
I expect the survey in a weekend.
--
Tadashi Jokagi
Serendipity Weblog Japanese http://oss.poyo.jp/s9y-ja/
HotPHPPER News http://news.hotphpper.net/
Tadashi Jokagi
Serendipity Weblog Japanese http://oss.poyo.jp/s9y-ja/
HotPHPPER News http://news.hotphpper.net/
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
I think I've found the problem. Your server doesn'T seem to set $_SERVER['PHP_SELF'].
The first $test_path1 check should in your case return the directory! The $test_path2 is used for NON-Shared installs.
Please try this patch:
http://nopaste.php-q.net/185833
Regards,
Garvin
The first $test_path1 check should in your case return the directory! The $test_path2 is used for NON-Shared installs.
Please try this patch:
http://nopaste.php-q.net/185833
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
ahhh... I am disappointed...
I performed svn update.
Please see:
http://elf.no-ip.org/~user01/
Why do you adhere to DOCUMENT_ROOT?
Please install s9y outside DOCUMENT_ROOT.
Otherwise, you are not find this problem.
I performed svn update.
Code: Select all
if (empty($_SERVER['PHP_SELF'])) {
$test_path1 = $_SERVER['DOCUMENT_ROOT'] . rtrim(dirname($_SERVER['SCRIPT_FILENAME']), '/') . '/';
} else {
$test_path1 = $_SERVER['DOCUMENT_ROOT'] . rtrim(dirname($_SERVER['PHP_SELF']), '/') . '/';
}http://elf.no-ip.org/~user01/
Why do you adhere to DOCUMENT_ROOT?
Please install s9y outside DOCUMENT_ROOT.
Otherwise, you are not find this problem.
--
Tadashi Jokagi
Serendipity Weblog Japanese http://oss.poyo.jp/s9y-ja/
HotPHPPER News http://news.hotphpper.net/
Tadashi Jokagi
Serendipity Weblog Japanese http://oss.poyo.jp/s9y-ja/
HotPHPPER News http://news.hotphpper.net/
...
I review the code of Garvin, Let's go!
I access this URL by a browser.
http://elf.no-ip.org/~user01/serendipity_admin.php
The following setup to $_SERVER.
$_SERVER['PHP_SELF'] is set up in my environment.
However, let's assume that it was not set up.
#This has not happened in my server.
This is the new code of Garvin.
This is true. Therefore, this code is executed.
A variable is extract.
A variable is more extract.
A variable is more extract.
A variable is more extract, and finish.
Where is this file?

I review the code of Garvin, Let's go!
I access this URL by a browser.
http://elf.no-ip.org/~user01/serendipity_admin.php
The following setup to $_SERVER.
Code: Select all
$_SERVER['DOCUMENT_ROOT'] = '/var/www/html';
$_SERVER['PHP_SELF'] = "/~user01/serendipity_admin.php";
$_SERVER['SCRIPT_FILENAME'] = '/home/user01/public_html/serendipity_admin.inc.php';However, let's assume that it was not set up.
Code: Select all
unset( $_SERVER['PHP_SELF']);This is the new code of Garvin.
Code: Select all
if (empty($_SERVER['PHP_SELF'])) {Code: Select all
$test_path1 = $_SERVER['DOCUMENT_ROOT'] . rtrim(dirname($_SERVER['SCRIPT_FILENAME']), '/') . '/';Code: Select all
$test_path1 = '/var/www/html' . rtrim(dirname('/home/user01/public_html/serendipity_admin.inc.php'), '/') . '/';Code: Select all
$test_path1 = '/var/www/html' . rtrim('/home/user01/public_html', '/')Code: Select all
$test_path1 = '/var/www/html' . '/home/user01/public_html' . '/'Code: Select all
$test_path1 = '/var/www/html/home/user01/public_html/';--
Tadashi Jokagi
Serendipity Weblog Japanese http://oss.poyo.jp/s9y-ja/
HotPHPPER News http://news.hotphpper.net/
Tadashi Jokagi
Serendipity Weblog Japanese http://oss.poyo.jp/s9y-ja/
HotPHPPER News http://news.hotphpper.net/
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi elf!
Installing serendipty from a directory that is not within the subdirectory of DOCUMENT_ROOT is not supported.
How does that happen on your server? How can it happen that you access a directory via HTTP that is outside of DOCUMENT_ROOT? I do not understand that.
Regards,
Garvin
Installing serendipty from a directory that is not within the subdirectory of DOCUMENT_ROOT is not supported.
How does that happen on your server? How can it happen that you access a directory via HTTP that is outside of DOCUMENT_ROOT? I do not understand that.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
hahaha Garvin,
( = =)...
Do you know/use UserDir directive?
http://httpd.apache.org/docs/2.0/en/mod ... erdir.html
The company prepared the directory for webs for office staff.
Usually, a directory becomes the following.
/home/<staff-name>/
The following was prepared for webs.
/home/<staff-name>/public_html/
URL becomes the following.
http://www.example.com/~<staff-name>/
The server guardian looked for the web log system.
The system needs a shared feature.
Then, he chose s9y.
He installed the core.
He planned to be an office staff and to share this core.
There is a one office staff.
His name is called taro.
He did installation work.
$ mkdir public_html
$ cd public_html
$ cp -a /usr/local/lib/php/s9y/deployment/* .
(snip)
...
It is the often seen scenery.
A company may be replaced to ISP.
A company may be replaced to a school.
Don't you really know?
( = =)...
Do you know/use UserDir directive?
http://httpd.apache.org/docs/2.0/en/mod ... erdir.html
The company prepared the directory for webs for office staff.
Usually, a directory becomes the following.
/home/<staff-name>/
The following was prepared for webs.
/home/<staff-name>/public_html/
URL becomes the following.
http://www.example.com/~<staff-name>/
The server guardian looked for the web log system.
The system needs a shared feature.
Then, he chose s9y.
He installed the core.
Code: Select all
# mkdir -p /usr/local/lib/php
# cd /usr/local/lib/php
# tar zxf serendipity-0.9.1.tar.gz
# mv serendipity s9y
(snip)There is a one office staff.
His name is called taro.
He did installation work.
$ mkdir public_html
$ cd public_html
$ cp -a /usr/local/lib/php/s9y/deployment/* .
(snip)
...
It is the often seen scenery.
A company may be replaced to ISP.
A company may be replaced to a school.
Don't you really know?
--
Tadashi Jokagi
Serendipity Weblog Japanese http://oss.poyo.jp/s9y-ja/
HotPHPPER News http://news.hotphpper.net/
Tadashi Jokagi
Serendipity Weblog Japanese http://oss.poyo.jp/s9y-ja/
HotPHPPER News http://news.hotphpper.net/
Interesting. I never thought about the user dirs before.
Serendipity really isn't designed for that configuration (shared with libs outside of the local document tree). It uses relative paths for lots of stuff, and the server will prevent access outside the user's home directory, even for the PHP calls.
You could give each user his own copy. Or create symlinks to the PHP libraries for him.
Serendipity really isn't designed for that configuration (shared with libs outside of the local document tree). It uses relative paths for lots of stuff, and the server will prevent access outside the user's home directory, even for the PHP calls.
You could give each user his own copy. Or create symlinks to the PHP libraries for him.
judebert,
The work is mitigable if my patch is used.
Although a new constant increases, there are not the original installation method and a change.
My patch does not use a relative path at least now (URL and file system).
However, My patch may still need to make some modification.
I think that there are also conditions which I cannot assume.
I think that there are also cases which I cannot assume.
Modification will be considered if there is a problem.
Modification of a patch will be considered if there is a problem.
Please give a concrete issue and an advice.
The work is mitigable if my patch is used.
Although a new constant increases, there are not the original installation method and a change.
My patch does not use a relative path at least now (URL and file system).
However, My patch may still need to make some modification.
I think that there are also conditions which I cannot assume.
I think that there are also cases which I cannot assume.
Modification will be considered if there is a problem.
Modification of a patch will be considered if there is a problem.
Please give a concrete issue and an advice.
--
Tadashi Jokagi
Serendipity Weblog Japanese http://oss.poyo.jp/s9y-ja/
HotPHPPER News http://news.hotphpper.net/
Tadashi Jokagi
Serendipity Weblog Japanese http://oss.poyo.jp/s9y-ja/
HotPHPPER News http://news.hotphpper.net/