php hatalar.log çalışmıyor

8 Cevap

Bu 1000 kez istendi ve ben bu göndermeden önce farklı mesaj yoluyla göz var ama bir cevap bulamadı. Sürece PHP ile prgramming olduğu gibi, bu her zaman çalışma almak için bir kabus olmuştur. Birisi burada yanlış ne yapıyorum bana söyleyebilir misiniz?

E_STRICT | Ben hatalar.log error_reporting = E_ALL ile birlikte ini dosyasında ayarladığınız

Başka ne eksik? Bu genellikle bana verdi. Ben ini dosyasında ve benim komut bu seti istiyorum.

Oluyor başka ilginç şey purposfully denemek ve benim komut birinde bir hata atmak Apache, tekrar tekrar yeniden başlatılır ve olmasıdır.


Bu bir hata sonra benim olay günlüğü. Damgası de yağma

Wed Nov 04 19:34:23 2009] [notice] Apache/2.2.14 (Win32) PHP/5.3.0 configured -- resuming normal operations
[Wed Nov 04 19:34:23 2009] [notice] Server built: Sep 28 2009 22:41:08
[Wed Nov 04 19:34:23 2009] [notice] Parent: Created child process 1700
[Wed Nov 04 19:34:23 2009] [notice] Child 1700: Child process is running
[Wed Nov 04 19:34:23 2009] [notice] Child 3008: Released the start mutex
[Wed Nov 04 19:34:23 2009] [notice] Child 1700: Acquired the start mutex.
[Wed Nov 04 19:34:23 2009] [notice] Child 1700: Starting 64 worker threads.
[Wed Nov 04 19:34:23 2009] [notice] Child 1700: Starting thread to listen on port 80.
[Wed Nov 04 19:34:24 2009] [notice] Child 3008: All worker threads have exited.
[Wed Nov 04 19:34:24 2009] [notice] Child 3008: Child process is exiting
[Wed Nov 04 19:34:53 2009] [notice] Parent: child process exited with status 128 -- Restarting.
[Wed Nov 04 19:34:53 2009] [notice] Apache/2.2.14 (Win32) PHP/5.3.0 configured -- resuming normal operations
[Wed Nov 04 19:34:53 2009] [notice] Server built: Sep 28 2009 22:41:08
[Wed Nov 04 19:34:53 2009] [notice] Parent: Created child process 3656
[Wed Nov 04 19:34:53 2009] [notice] Child 3656: Child process is running
[Wed Nov 04 19:34:53 2009] [notice] Child 3656: Acquired the start mutex.
[Wed Nov 04 19:34:53 2009] [notice] Child 3656: Starting 64 worker threads.
[Wed Nov 04 19:34:53 2009] [notice] Child 3656: Starting thread to listen on port 80.
[Wed Nov 04 19:34:53 2009] [notice] Parent: child process exited with status 128 -- Restarting.
[Wed Nov 04 19:34:54 2009] [notice] Apache/2.2.14 (Win32) PHP/5.3.0 configured -- resuming normal operations
[Wed Nov 04 19:34:54 2009] [notice] Server built: Sep 28 2009 22:41:08
[Wed Nov 04 19:34:54 2009] [notice] Parent: Created child process 3980
[Wed Nov 04 19:34:54 2009] [notice] Child 3980: Child process is running
[Wed Nov 04 19:34:54 2009] [notice] Child 3980: Acquired the start mutex.
[Wed Nov 04 19:34:54 2009] [notice] Child 3980: Starting 64 worker threads.
[Wed Nov 04 19:34:54 2009] [notice] Child 3980: Starting thread to listen on port 80.
[Wed Nov 04 19:34:54 2009] [notice] Parent: child process exited with status 128 -- Restarting.
[Wed Nov 04 19:34:54 2009] [notice] Apache/2.2.14 (Win32) PHP/5.3.0 configured -- resuming normal operations
[Wed Nov 04 19:34:54 2009] [notice] Server built: Sep 28 2009 22:41:08
[Wed Nov 04 19:34:54 2009] [notice] Parent: Created child process 1600
[Wed Nov 04 19:34:54 2009] [notice] Child 1600: Child process is running
[Wed Nov 04 19:34:54 2009] [notice] Child 1600: Acquired the start mutex.
[Wed Nov 04 19:34:54 2009] [notice] Child 1600: Starting 64 worker threads.
[Wed Nov 04 19:34:54 2009] [notice] Child 1600: Starting thread to listen on port 80.
[Wed Nov 04 19:34:55 2009] [notice] Parent: child process exited with status 128 -- Restarting.
[Wed Nov 04 19:34:55 2009] [notice] Apache/2.2.14 (Win32) PHP/5.3.0 configured -- resuming normal operations
[Wed Nov 04 19:34:55 2009] [notice] Server built: Sep 28 2009 22:41:08
[Wed Nov 04 19:34:55 2009] [notice] Parent: Created child process 1068
[Wed Nov 04 19:34:55 2009] [notice] Child 1068: Child process is running
[Wed Nov 04 19:34:55 2009] [notice] Child 1068: Acquired the start mutex.
[Wed Nov 04 19:34:55 2009] [notice] Child 1068: Starting 64 worker threads.
[Wed Nov 04 19:34:55 2009] [notice] Child 1068: Starting thread to listen on port 80.
[Wed Nov 04 19:34:55 2009] [notice] Parent: child process exited with status 128 -- Restarting.
[Wed Nov 04 19:34:55 2009] [notice] Apache/2.2.14 (Win32) PHP/5.3.0 configured -- resuming normal operations
[Wed Nov 04 19:34:55 2009] [notice] Server built: Sep 28 2009 22:41:08
[Wed Nov 04 19:34:55 2009] [notice] Parent: Created child process 3220
[Wed Nov 04 19:34:56 2009] [notice] Child 3220: Child process is running
[Wed Nov 04 19:34:56 2009] [notice] Child 3220: Acquired the start mutex.
[Wed Nov 04 19:34:56 2009] [notice] Child 3220: Starting 64 worker threads.
[Wed Nov 04 19:34:56 2009] [notice] Child 3220: Starting thread to listen on port 80.

8 Cevap

Ayrıca ayarlamanız gerekir log_errors = On.

Durumda başkasının sorun hataları oturum yerel kalkınma ortamı oluyor yaşıyor, burada benim için sabit ne:

Pencerelerde, hatalar.log (: \ apache \ php_errors.log hatalar.log = c) çalışması error_log için log () için tam yolu için ayarlanmış olması gerekir. Ancak, hatalar.log = php_errors.log ise hiçbir yolu ile, php hala gibi başlatma hataları oturum açmak mümkün olacak "PHP Başlangıç:. Dinamik kütüphane 'ext \ php_mysqli.dll' yüklenemiyor - belirtilen modül bulunamadı olamazdı"

Ben koştu sorun ben tayin etmişti hata günlüğü yazma korumalı oldu. Bütün. Htaccess ayarları hiçbir izinleri vardı çünkü PHP sadece hata günlüğüne yazamadı, doğru. Bu benim için doğru it up sabit:

chmod 777 watermellon-app-errors.log

Açıkçası, bir günlüğüne için kullandığınız ne olursa olsun dosya için. Günlük değiştirmek istediğiniz gidiyoruz.

Hatalar.log yönergesi ayarlı ise, dosya php hataları, bu hataları ayarlanmadığı zaman Apache günlüğüne kaydedilir kayıt için kullanılacaktır. http://us3.php.net/manual/en/errorfunc.configuration.php#ini.error-log bir göz atın.

Bu öyle hatalar.log dosya ve dizin Apache altında çalışan kullanıcı tarafından yazılabilir olmalıdır. Dosyası oluşturuluyor değilse, muhtemelen bir izin sorunu nedeniyle olduğunu.

Ben Apache sana çökmesini olurdu neden emin bilmiyorum, ama ben bu tür bir izin sorunu tahmin ediyorum.

I why anlamıyorum, ama hata günlüğü şimdi çalışıyor. İşte ne yaptım. Vazgeçti ve hatalar.log direktifin geri dışarı yorumladı ve ini dosyasını kapattı. Ben Apache görmek için ayrıştırma hatası ile komut hala çökme koştu ve ben günlük dosyasında PHP hata var. Ini dosyası artık etkin error_log ve benim komut dosyası) (ini_set kullanarak değil, çünkü bu ürkütücü.

Herkes bu delilik için bir açıklama var mı? Ayrıca, Apache artık çöküyor.

Bradym dediği gibi, sen php hata günlüğü apache kullanıcı için bulunduğu dizine yazma izinlerine sahip olup olmadığını kontrol edin. Eğer bu yeterli değil yazılı izinlere sahip bir günlük dosyası oluşturulur ise, dir onları da olmalıdır.

Hatalar.log = "C: \ php \ Log \ error.log" Benim için de çalışma değildi. Benim için çözüm PHP sizin için yapacak çünkü, error.log kendiniz oluşturmanız gerektiğini oldu. See the PHP message board. Ben bir Windows 2008 sunucu üzerinde PHP 5.2 kullanıyorum

Emin ve de set yapmak

display_errors = On

Ve denemek

 error_reporting(E_ALL);

Kodunuzda. Çoğu zaman ben geliştiriyorum zaman hataları döner ve ben olmadığımda onları geri döner bir çalışma zamanı hatası yapılandırma komut dosyası içerir. Bu kabaca şöyle:

if ($debugmode == 'on') {
    error_reporting(E_ALL); 
    ini_set("display_errors", 1);
}else { 
    error_reporting(0); 
    ini_set("display_errors", 0);
}

Umarım bu yardımcı olur.

** Ben bu durumda Chaos 'cevabı sizin için ne arıyorsanız, bunun yerine ekran hataları oturum istiyorsanız, doğru okumak vermedi.