Site, Server Genel » Genel Soru ve Cevaplar

/proc/loadavg a php den ulaşma

http://forum.whmdestek.com/

Go Back   WHM/cPanel Support Platform » Türkçe » Site, Sunucu Sorunlarınız ve Çözümleri » Site, Server Genel » Genel Soru ve Cevaplar
 
Firma tanıtımı!
Firmanızın reklamını hemen yapın!
Reklamlar
Extreme yoksa Sayyac var!
Ücretsiz İstatistik Servisi
Sayyac.com
Reklam Alın!
Günlük 5k tekil ve üzeri sitelerinize reklam!
Fixreklam

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 26.03.08, 22:35
ALEXIS's Avatar
phpBB Türkiye
 
Join Date: Aug 2007
Location: istanbul
Posts: 112
Rep Power: 2
ALEXIS is on a distinguished road
/proc/loadavg a php den ulaşma

dreamhosttaki sitem de çalışan, fakan kendi sunucumda çalışmayan bir şey var

PHP Code:
$load = @file_get_contents('/proc/loadavg'
Sunucudan bir domainin bu dosyayı okuması ile ilgili nasıl kısıtlama olabilir ?
__________________
Profesyonel phpBB3 hizmetleri

Last edited by ALEXIS; 26.03.08 at 23:11.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2  
Old 26.03.08, 22:39
misc's Avatar
WHM VIP Member
 
Join Date: Nov 2007
Location: Denizli
Posts: 283
Rep Power: 22
misc has a reputation beyond reputemisc has a reputation beyond reputemisc has a reputation beyond reputemisc has a reputation beyond reputemisc has a reputation beyond reputemisc has a reputation beyond reputemisc has a reputation beyond reputemisc has a reputation beyond reputemisc has a reputation beyond reputemisc has a reputation beyond reputemisc has a reputation beyond repute
Send a message via MSN to misc
php.ini deki disable_functions=exec kodu olabilir mi?

chmod ile kısıtlanabileceğini düşünüyorum bir deneyin isterseniz.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old 26.03.08, 22:42
ALEXIS's Avatar
phpBB Türkiye
 
Join Date: Aug 2007
Location: istanbul
Posts: 112
Rep Power: 2
ALEXIS is on a distinguished road
disable_function ları sildim,
"allow_url_fopen On" konumunda

phpinfoları karşılaştırdım, birşey bulamadım, "/proc/loadavg" izinlere baktım 444, sadece okumalar işaretli, 777 de denedim...

var: http://phpbb3cms.com/load.php
yok: http://www.canversoft.net/_test/load.php
__________________
Profesyonel phpBB3 hizmetleri
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old 26.03.08, 22:46
misc's Avatar
WHM VIP Member
 
Join Date: Nov 2007
Location: Denizli
Posts: 283
Rep Power: 22
misc has a reputation beyond reputemisc has a reputation beyond reputemisc has a reputation beyond reputemisc has a reputation beyond reputemisc has a reputation beyond reputemisc has a reputation beyond reputemisc has a reputation beyond reputemisc has a reputation beyond reputemisc has a reputation beyond reputemisc has a reputation beyond reputemisc has a reputation beyond repute
Send a message via MSN to misc
bu loadavg yi çalıştırmak istiyorsunuz sanırım? başka türlü önerilerim var çözümü bilmiyorum (ikisinde de php.ini aynıysa ve chmodları eşitse)

çalıştırmak için
<? $loadavg=`cat /proc/loadavg`; print $loadavg; ?>

eğer disable_functions ta exec kodu kapatılmışsa bir alternatif daha var bildiğim kadarıyla ssh2_connect ile çözümlenir olmazsa onu da yazarım..
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old 26.03.08, 23:11
ALEXIS's Avatar
phpBB Türkiye
 
Join Date: Aug 2007
Location: istanbul
Posts: 112
Rep Power: 2
ALEXIS is on a distinguished road
Sorun şu ki, alternatif aramıyorum, fopen, exec, sabahtan beri bir sürü php kodu buldum, ama php koduna ihtiyacım yok.

@ olduğu için hata görünmüyor ama aslında .................


sabahtan beri sunucuyla uğraşıyorum, bayılmak üzeriyim, @ kaldırdım gitsin, hata da cevabı gördüm: "open_basedir"

security den ilgili domaine işret koyunca çalıştı


Code:
Warning:  file_get_contents() [function.file-get-contents]: open_basedir restriction in effect. File(/proc/loadavg) is not within the allowed path(s):
__________________
Profesyonel phpBB3 hizmetleri
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old 27.03.08, 03:08
sinangunay's Avatar
FULL DESTEK SUNUCULAR
 
Join Date: Jul 2007
Location: biLi biLi boP
Age: 27
Posts: 1,664
Rep Power: 1073
sinangunay has a reputation beyond reputesinangunay has a reputation beyond reputesinangunay has a reputation beyond reputesinangunay has a reputation beyond reputesinangunay has a reputation beyond reputesinangunay has a reputation beyond reputesinangunay has a reputation beyond reputesinangunay has a reputation beyond reputesinangunay has a reputation beyond reputesinangunay has a reputation beyond reputesinangunay has a reputation beyond repute
Sunucudaki OpenBasedir ayarının kapatılması gerekiyor..

O dosyaya ulaşmak yerine bunu denemek isteyebilirsin belki,


<?PHP
$load = shell_exec("uptime");

echo $load;
?>
__________________
-----------------------------------------------------------------------------------------
>> LÜTFEN ÜCRETSİZ DESTEK TALEP ETMEK İÇİN MSN ADRESLERİMİZİ EKLEMEYİNİZ. HER TÜRLÜ ÜCRETSİZ DESTEK İÇİN FORUMLARIMIZI KULLANINIZ. TEŞEKKÜRLER <<
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Sign up for PayPal and start accepting credit card payments instantly.

Navigasyon
Menü