Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

 
Reply to this topicStart new topic
> poszukuje PHP520
cXIb8O3
post
Post #1





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 30.11.2005
Skąd: Luxembourg

Ostrzeżenie: (0%)
-----


Witam.

Poszukuje kogos kto posiada wersje php520 na sysemie linux, windows. Sam posiadam BSD i chcialbym cos sprawdzic. A dokladnie opcje safe_mode poniewaz posiadam pewien konfikt z tworcami php odnosnie bezpieczenstwa..

Chce tylko sprawdzic odpornosc safe_mode w wersji PHP520 i tylko w tej.

Pozdrawiam.
Go to the top of the page
+Quote Post
nasty
post
Post #2





Grupa: Zarejestrowani
Postów: 634
Pomógł: 14
Dołączył: 27.05.2006
Skąd: Berlin

Ostrzeżenie: (0%)
-----


A ciężko Ci samemu zainstalować ? uhh
Go to the top of the page
+Quote Post
cXIb8O3
post
Post #3





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 30.11.2005
Skąd: Luxembourg

Ostrzeżenie: (0%)
-----


Mam php520! Ale uzywam BSD. Poszukuje kogos kto ma PHP5.2.0 i Linuxa lub windowsa z safe_mode.
Go to the top of the page
+Quote Post
NuLL
post
Post #4





Grupa: Zarejestrowani
Postów: 2 262
Pomógł: 21
Dołączył: 3.05.2004
Skąd: Sopot, Krakow, W-wa

Ostrzeżenie: (0%)
-----


To zainstaluj sobie Linuxa (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif) (IMG:http://forum.php.pl/style_emoticons/default/snitch.gif)
Go to the top of the page
+Quote Post
cXIb8O3
post
Post #5





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 30.11.2005
Skąd: Luxembourg

Ostrzeżenie: (0%)
-----


Dzieki za super rade. Ale nie mam ochoty instalowac linuxa bo mam BSD na dysku? :]
Go to the top of the page
+Quote Post
NuLL
post
Post #6





Grupa: Zarejestrowani
Postów: 2 262
Pomógł: 21
Dołączył: 3.05.2004
Skąd: Sopot, Krakow, W-wa

Ostrzeżenie: (0%)
-----


Taki cudowny ten BSD ze tylko jeden system mozesz miec na dysku ? ROTFL (IMG:http://forum.php.pl/style_emoticons/default/biggrin.gif)
Go to the top of the page
+Quote Post
cXIb8O3
post
Post #7





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 30.11.2005
Skąd: Luxembourg

Ostrzeżenie: (0%)
-----


BSD to nie linux i nie windows. Zadowala mnie w 100%. Kwestia gustow.

Probowalem wszystkiego i dlamnie BSD jest najoptymalniejsze. Dla ciebie moze to byc windows. Nie interesuje mnie to co lubisz. A linuxa instalowac nie bede bo nie mam czasu ani ochoty ani potrzeby. Dlatego sie pytam kto ma linuxa. Proste?
Go to the top of the page
+Quote Post
Bastion
post
Post #8





Grupa: Zarejestrowani
Postów: 505
Pomógł: 0
Dołączył: 8.01.2005

Ostrzeżenie: (0%)
-----


Powiedzmy że ja mam. Jakbyś napisał o co chodzi - byłoby szybciej.
Go to the top of the page
+Quote Post
cXIb8O3
post
Post #9





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 30.11.2005
Skąd: Luxembourg

Ostrzeżenie: (0%)
-----


Ah wiec dokladnie chodzi o takie cos....

cxib# uname -a
FreeBSD cxib.laptop 6.2-RELEASE FreeBSD 6.2-RELEASE #0: Fri Jan 12 08:43:30
UTC 2007 root@portnoy.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP amd64
cxib# php -v
php 5.2.0 (cli) (built: Jan 19 2007 21:19:36) (DEBUG)
Copyright © 1997-2006 The php Group
Zend Engine v2.2.0, Copyright © 1998-2006 Zend Technologies
cxib# su cxib
%whoami
cxib
%ls -la /dir/text.txt
-rwxrw-rw- 1 root wheel 0 Jan 21 00:53 /dir/text.txt
%pwd
/usr/home/cxib
%php -d
safe_mode=1 -r 'var_dump(fopen("srpath://///../../../../../../../../dir/text.txt", a));'
resource(5) of type (stream)

Dzieki adresowi srpath://///../../../../../../../../dir/text.txt mozna ominac safe_mode... Testowalem to pod wersja PHP520 i tylko podniad jest to osiagalne. Interesuje mnie to czy pod Linuxem bedzie to wspolpracowalo.


Dokladne informacje mozna znalesc pod adresem.
http://cxib.net/info/writing_mode.adv
Go to the top of the page
+Quote Post
Bastion
post
Post #10





Grupa: Zarejestrowani
Postów: 505
Pomógł: 0
Dołączył: 8.01.2005

Ostrzeżenie: (0%)
-----


niestety pingwin nie wspolpracuje

Cytat
Warning: fopen(srpath://///../../../../../../../../a.txt): failed to open stream: Permission denied in Command line code on line 1
bool(false)
Go to the top of the page
+Quote Post
cXIb8O3
post
Post #11





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 30.11.2005
Skąd: Luxembourg

Ostrzeżenie: (0%)
-----


ale proboj zapisac tam gdzie masz prawa zapisu... czyli 777 no i katalog nie nalezy do ciebie...

czyli

mkdir /dir
chmod 777 /dir
chown jakisuser:grupa /dir

wnioskuje z tego ze blad dziala... bo dla przykladu

%ls -la / |grep ..
total 1027
drwxr-xr-x 23 root wheel 1024 Jan 24 19:49 .
drwxr-xr-x 23 root wheel 1024 Jan 24 19:49 ..
%php -d safe_mode=1 -r 'var_dump(fopen("/tesssxt.txt", a));'

Warning: fopen(): SAFE MODE Restriction in effect. The script whose uid is 1001 is not allowed to access / owned by uid 0 in Command line code on line 1

Warning: fopen(/tesssxt.txt): failed to open stream: Invalid argument in Command line code on line 1
bool(false)
%php -d safe_mode=1 -r 'var_dump(fopen("x://../../../../tesssxt.txt", a));'

Warning: fopen(x://../../../../tesssxt.txt): failed to open stream: Permission denied in Command line code on line 1
bool(false)

Ten post edytował cXIb8O3 24.01.2007, 21:55:14
Go to the top of the page
+Quote Post
Bastion
post
Post #12





Grupa: Zarejestrowani
Postów: 505
Pomógł: 0
Dołączył: 8.01.2005

Ostrzeżenie: (0%)
-----


still nothing

Cytat
Warning: fopen(srpath://///../../../../../../../../tmp/a.txt): failed to open stream: Permission denied in Command line code on line 1
bool(false)


Cytat
Warning: fopen(srpath://///../../../../../../../../test/a.txt): failed to open stream: Permission denied in Command line code on line 1
bool(false)


Jak błąd może działać ? (IMG:http://forum.php.pl/style_emoticons/default/smile.gif)

Pozatym chyba jest ok, że safe mode nie pozwala na takie zagrywki.,

Ten post edytował Bastion 24.01.2007, 21:58:23
Go to the top of the page
+Quote Post
cXIb8O3
post
Post #13





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 30.11.2005
Skąd: Luxembourg

Ostrzeżenie: (0%)
-----


a mozesz utworzyc katalog z prawami 777 i probowac tam zapisas?

bo z tego co widze safe_mode jest omijane ale jest problem z zapisem.. bo na dobra sprawe powinno wywalic SAFE_MODE RESTRICTED przy
php -d safe_mode=1 -r 'var_dump(fopen("/tmp/tesssxt.txt", a));'
Go to the top of the page
+Quote Post
Bastion
post
Post #14





Grupa: Zarejestrowani
Postów: 505
Pomógł: 0
Dołączył: 8.01.2005

Ostrzeżenie: (0%)
-----


no i wywala

Cytat
owner@hellfire:/home$ php -d safe_mode=1 -r 'var_dump(fopen("/tmp/a.txt", "a"));'
php Warning: fopen(): SAFE MODE Restriction in effect. The script whose uid is 1005 is not allowed to access /tmp/a.txt owned by uid 0 in Command line code on line 1

Warning: fopen(): SAFE MODE Restriction in effect. The script whose uid is 1005 is not allowed to access /tmp/a.txt owned by uid 0 in Command line code on line 1
php Warning: fopen(/tmp/a.txt): failed to open stream: No such file or directory in Command line code on line 1

Warning: fopen(/tmp/a.txt): failed to open stream: No such file or directory in Command line code on line 1
bool(false)
Go to the top of the page
+Quote Post
cXIb8O3
post
Post #15





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 30.11.2005
Skąd: Luxembourg

Ostrzeżenie: (0%)
-----


czyli safe_mode jest omijane w wersji PHP520. Umnie nawet plik zostaje zapisany. Musisz probowac tam gdzie masz konkretne prawa zapisu. Boje sie ze katalog /tmp jest na tyle specyficzny ze moga wystapic tu problemy.
Go to the top of the page
+Quote Post
Bastion
post
Post #16





Grupa: Zarejestrowani
Postów: 505
Pomógł: 0
Dołączył: 8.01.2005

Ostrzeżenie: (0%)
-----


ja cie chyba wyraznie nie rozumiem, u ciebie blad jest faktycznie bo dostajesz
Cytat
resource(5) of type (stream)

pomimo safe mode. u mnie natomiast :
Cytat
php Warning: fopen(): SAFE MODE Restriction in effect. The script whose uid is 1005 is not allowed to access /tmp/a.txt owned by uid 0 in Command line code on line 1


wiec chyba jest w porzadku
Go to the top of the page
+Quote Post
cXIb8O3
post
Post #17





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 30.11.2005
Skąd: Luxembourg

Ostrzeżenie: (0%)
-----


no nie rozumiesz mnie... patrz jak dam /tmp/cos.cos

%php -d safe_mode=1 -r 'var_dump(fopen("/tmp/cos.cos", a));'

Warning: fopen(): SAFE MODE Restriction in effect. The script whose uid is 1001 is not allowed to access /tmp owned by uid 0 in Command line code on line 1

Warning: fopen(/tmp/cos.cos): failed to open stream: Invalid argument in Command line code on line 1
bool(false)
%php -d safe_mode=1 -r 'var_dump(fopen("x://../../../../tmp/cos.cos", a));'
resource(5) of type (stream)
%

U ciebie wywala Permission denied jakbys nie mial tam praw zapisu. A jakie prawa ma katalog /tmp u ciebie? Probowales zapisac do pliku z uprawnieniami 777 lub katalogu z 777?

lub wez sproboj otworzyc /dev/null bo tam na bank sa prawa zapisu.
Umnie to wyglada tak:

%php -d safe_mode=1 -r 'var_dump(fopen("/dev/null", a));'

Warning: fopen(): SAFE MODE Restriction in effect. The script whose uid is 1001 is not allowed to access /dev/null owned by uid 0 in Command line code on line 1

Warning: fopen(/dev/null): failed to open stream: Invalid argument in Command line code on line 1
bool(false)
%php -d safe_mode=1 -r 'var_dump(fopen("x://../../../../dev/null", a));'
resource(5) of type (stream)
Go to the top of the page
+Quote Post
Sh4dow
post
Post #18





Grupa: Zarejestrowani
Postów: 569
Pomógł: 0
Dołączył: 17.08.2003
Skąd: Dąbrowa Górnicza

Ostrzeżenie: (0%)
-----


Kod
tomek@shadow:/root$ /usr/local/php5.2/bin/php -d safe_mode=1 -r 'var_dump(fopen("/dev/null", "a"));'

Warning: fopen(): SAFE MODE Restriction in effect.  The script whose uid is 1000 is not allowed to access /dev/null owned by uid 0 in Command line code on line 1

Call Stack:
    0.0002     262144   1. {main}() Command line code:0
    0.0003     262144   2. fopen() Command line code:1


Warning: fopen(/dev/null): failed to open stream: No such file or directory in Command line code on line 1

Call Stack:
    0.0002     262144   1. {main}() Command line code:0
    0.0003     262144   2. fopen() Command line code:1

bool(false)



Kod
tomek@shadow:/root$ /usr/local/php5.2/bin/php -d safe_mode=1 -r 'var_dump(fopen("/../../../../dev/null", "a"));'

Warning: fopen(): SAFE MODE Restriction in effect.  The script whose uid is 1000 is not allowed to access /../../../../dev/null owned by uid 0 in Command line code on line 1

Call Stack:
    0.0002     262144   1. {main}() Command line code:0
    0.0003     262144   2. fopen() Command line code:1


Warning: fopen(/../../../../dev/null): failed to open stream: No such file or directory in Command line code on line 1

Call Stack:
    0.0002     262144   1. {main}() Command line code:0
    0.0003     262144   2. fopen() Command line code:1

bool(false)


O to moze ci chodziło ?

Kod
php 5.2.1RC3-dev (cli) (built: Jan  9 2007 10:15:45)
Copyright (c) 1997-2007 The php Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
    with Xdebug v2.0.0RC1, Copyright (c) 2002, 2003, 2004, 2005, 2006, by Derick Rethans
Go to the top of the page
+Quote Post
cXIb8O3
post
Post #19





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 30.11.2005
Skąd: Luxembourg

Ostrzeżenie: (0%)
-----


uzywasz wersji 5.2.1RC a z tego co mi wiadomo blad tam nie funkcjonuje. Pozatym trzeba dodac jakis prefix np xxxxx://../../../../../dev/null a nie same ../../../../dev/null bo wtedy ./../../../../ jest skracane przez realpath. chodzi tu o prefix
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 25.09.2025 - 19:30