Jump to content

Zend debug.log


tobimichigan

Recommended Posts

Here  is my hierarchy:

 

data      -logs folder-debug.log

htdocs  -index.php

include  -Contollers,Smarty,Templater,Zend

templates

 

Now when I launch index.php from htdocs, I get this un-seeming error:

 

"Fatal error: Uncaught exception 'Zend_Log_Exception' with message '"/var/htdocs/Books/practical_Web2.0/data/logs/debug.log" cannot be opened with mode "a"' in C:\xampp\php\PEAR\Zend\Log\Writer\Stream.php:69 Stack trace: #0 C:\xampp\htdocs\Books\practical_Web2.0\chapter-02\htdocs\index.php(11): Zend_Log_Writer_Stream->__construct('/var/htdocs/Boo...') #1 {main} thrown in C:\xampp\php\PEAR\Zend\Log\Writer\Stream.php on line 69 "

 

I went to the zend folder in xampp, php, pear, zend, log, writer.php dir and I found this:

 

/**

    * Class Constructor

    *

    * @param  streamOrUrl    Stream or URL to open as a stream

    * @param  mode            Mode, only applicable if a URL is given

    */

    public function __construct($streamOrUrl, $mode = 'a')

    {

        if (is_resource($streamOrUrl)) {

            if (get_resource_type($streamOrUrl) != 'stream') {

                require_once 'Zend/Log/Exception.php';

                throw new Zend_Log_Exception('Resource is not a stream');

            }

 

            if ($mode != 'a') {

                require_once 'Zend/Log/Exception.php';

                throw new Zend_Log_Exception('Mode cannot be changed on existing streams');

            }

 

            $this->_stream = $streamOrUrl;

        } else {

            if (! $this->_stream = @fopen($streamOrUrl, $mode, false)) {

                require_once 'Zend/Log/Exception.php';

                $msg = "\"$streamOrUrl\" cannot be opened with mode \"$mode\"";

                throw new Zend_Log_Exception($msg);

            }

        }

 

        $this->_formatter = new Zend_Log_Formatter_Simple();

    }

 

 

line 69 is =>throw new Zend_Log_Exception($msg);

 

What could be wrong?

Hint:

 

settings.conf

[development]

 

database.type      = pdo_mysql

database.hostname  = localhost

database.username  = root

database.password  =

database.database  = phpweb20

 

paths.base      = /var/htdocs/Books/practical_Web2.0

paths.data      = /var/htdocs/Books/practical_Web2.0/data

paths.templates = /var/htdocs/Books/practical_Web2.0/templates

 

logging.file = /var/htdocs/Books/practical_Web2.0/data/logs/debug.log

 

 

Any pointer as to why there is a fatal error?

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.