Site, Server Genel » Soru ve Cevaplar

/proc/loadavg a php den ulaşma

http://forum.whmdestek.com/

Geri git   WHM cPanel Destek Platformu » Site, Sunucu Sorunlarınız ve Çözümleri » Site, Server Genel » Soru ve Cevaplar
 
Reklam Alın!
Günlük 5k tekil ve üzeri sitelerinize reklam!
Fixreklam
Firma tanıtımı!
Firmanızın reklamını hemen yapın!
Reklamlar
Türkiye' nin Webmaster Sitesi
Webmaster Araçları, Bilgi ve hizmet alışverişi
Webmaster.com.TR

Cevapla
 
LinkBack Seçenekler Stil
  #1  
Alt 26.03.08, 21:35
ALEXIS - ait Kullanıcı Resmi (Avatar)
phpBB Türkiye
 
Üyelik tarihi: Aug 2007
Nerden: istanbul
Mesajlar: 112
Tecrübe Puanı: 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- Kodu:
$load = @file_get_contents('/proc/loadavg'
Sunucudan bir domainin bu dosyayı okuması ile ilgili nasıl kısıtlama olabilir ?
__________________
Profesyonel phpBB3 hizmetleri

Son Düzenleme: ALEXIS; Tarih / Saat: 26.03.08 22:11.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Alıntı ile Cevapla
  #2  
Alt 26.03.08, 21:39
misc - ait Kullanıcı Resmi (Avatar)
WHM VIP Member
 
Üyelik tarihi: Nov 2007
Nerden: Denizli
Mesajlar: 283
Tecrübe Puanı: 21
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
misc - MSN üzeri Mesaj gönder
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!
Alıntı ile Cevapla
  #3  
Alt 26.03.08, 21:42
ALEXIS - ait Kullanıcı Resmi (Avatar)
phpBB Türkiye
 
Üyelik tarihi: Aug 2007
Nerden: istanbul
Mesajlar: 112
Tecrübe Puanı: 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!
Alıntı ile Cevapla
  #4  
Alt 26.03.08, 21:46
misc - ait Kullanıcı Resmi (Avatar)
WHM VIP Member
 
Üyelik tarihi: Nov 2007
Nerden: Denizli
Mesajlar: 283
Tecrübe Puanı: 21
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
misc - MSN üzeri Mesaj gönder
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!
Alıntı ile Cevapla
  #5  
Alt 26.03.08, 22:11
ALEXIS - ait Kullanıcı Resmi (Avatar)
phpBB Türkiye
 
Üyelik tarihi: Aug 2007
Nerden: istanbul
Mesajlar: 112
Tecrübe Puanı: 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ı


Kod:
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!
Alıntı ile Cevapla
  #6  
Alt 27.03.08, 02:08
sinangunay - ait Kullanıcı Resmi (Avatar)
FULL DESTEK SUNUCULAR
 
Üyelik tarihi: Jul 2007
Nerden: biLi biLi boP
Yaş: 27
Mesajlar: 1.663
Tecrübe Puanı: 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!
Alıntı ile Cevapla
Cevapla


Seçenekler
Stil

Yetkileriniz
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 Açık
Smileler Açık
[IMG] Kodları Açık
HTML-KodlarıKapalı
Trackbacks are Açık
Pingbacks are Açık
Refbacks are Açık


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

Navigasyon
Menü