Site, Server Genel » Soru ve Cevaplar

/proc/loadavg a php den ulaşma

Geri git   WHM cPanel Destek Platformu » Site, Sunucu Sorunlarınız ve Çözümleri » Site, Server Genel » Soru ve Cevaplar
Kayıt ol Yardım Üye Listesi Ajanda Forumları Okundu Kabul Et
 

Cevapla
 
LinkBack Seçenekler Stil
  #1 (permalink)  
Alt 26.03.08, 09:35 PM
ALEXIS - ait Kullanıcı Resmi (Avatar)
phpBB Türkiye
 
Üyelik tarihi: Aug 2007
Nerden: istanbul
Mesajlar: 104
Tecrübe Puanı: 1
ALEXIS is on a distinguished road
Çözüldü /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 ?
__________________
phpBB3 SEO | phpBB3 xml sitemap

Konu ALEXIS tarafından (26.03.08 Saat 10:11 PM ) değiştirilmiştir..
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 (permalink)  
Alt 26.03.08, 09:39 PM
misc - ait Kullanıcı Resmi (Avatar)
WHM VIP Member
 
Üyelik tarihi: Nov 2007
Nerden: Denizli
Mesajlar: 281
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 (permalink)  
Alt 26.03.08, 09:42 PM
ALEXIS - ait Kullanıcı Resmi (Avatar)
phpBB Türkiye
 
Üyelik tarihi: Aug 2007
Nerden: istanbul
Mesajlar: 104
Tecrübe Puanı: 1
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
__________________
phpBB3 SEO | phpBB3 xml sitemap
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 (permalink)  
Alt 26.03.08, 09:46 PM
misc - ait Kullanıcı Resmi (Avatar)
WHM VIP Member
 
Üyelik tarihi: Nov 2007
Nerden: Denizli
Mesajlar: 281
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 (permalink)  
Alt 26.03.08, 10:11 PM
ALEXIS - ait Kullanıcı Resmi (Avatar)
phpBB Türkiye
 
Üyelik tarihi: Aug 2007
Nerden: istanbul
Mesajlar: 104
Tecrübe Puanı: 1
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):
__________________
phpBB3 SEO | phpBB3 xml sitemap
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 (permalink)  
Alt 27.03.08, 02:08 AM
sinangunay - ait Kullanıcı Resmi (Avatar)
FULL DESTEK SUNUCULAR
 
Üyelik tarihi: Jul 2007
Nerden: biLi biLi boP
Yaş: 27
Mesajlar: 1.621
Tecrübe Puanı: 1072
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;
?>
__________________
KROYUM AMMA SİSTEM BİLGİSİ BENDE
KAMYON ÇEKER 10-20 TON, GÖNLÜM ÇEKER PARİS HİLTON

RAHMETLİ DE HACKLERDİ
TEK RAKİBİM SUN MICROSYSTEMS
SOLLAMA BENİ, FORMATLARIM SENİ


HAZİRAN AYININ 2SİNE KADAR SINAVLAR NEDENİYLE YOKUM YARDIMCI OLAMADIĞIM İÇİN ÖZÜR DİLERİM

-----------------------------------------------------------------------------------------

>> 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
Yeni Mesaj yazma yetkiniz aktif değil dir.
Mesajlara Cevap verme yetkiniz aktif değil dir.
Eklenti ekleme yetkiniz aktif değil dir.
Kendi Mesajınızı değiştirme yetkiniz aktif değil dir.

Smileler Açık
[IMG] Kodları Açık
HTML-KodlarıKapalı
Trackbacks are Açık
Pingbacks are Açık
Refbacks are Açık