Code Monkey home page Code Monkey logo

dherrorlogging's Introduction

DHErrorLogging - ZF2 / ZF3 application error logging

Latest Version Downloads

Introduction

Full featured Error logging module for ZF2/ZF3 MVC application.

Features

  • Log framework specific exceptions (in dispatch or render lifecycle)
  • Log other exception
  • Log php errors
  • Log fatal errors or parse errors (outside of dispatch or render lifecycle)
  • Ability to filter which PHP E_* Error to log or not (i.e.: don't log E_USER_DEPRECATED errors) via config setting
  • The module adds several useful info to the final log such as IP, request, url called, session id, backtrace,...
  • Ability to choose multiple destinations where to log to, via log writers (DB, email, file, chromephp, 'fingerscrossed', 'firephp', 'mail', 'mock', 'null', 'syslog', 'zendmonitor')
  • Custom DB log writer included aside of the other default log writers provided by ZF
  • Custom Doctrine log writer included
  • Content negotiation included (i.e.: renders JSON response for json request, console response for console request, html response for rest of the requests..)
  • Ability to show a pretty error page that includes an error code (which helps to identify the problem when reporting it back to you) to users
  • Pretty error page templates for each of the error/exception types (dispatch, render, exception, error, fatal, console., json)

Installation

  • Add "davidhavl/dherrorlogging": "^2.0" to the require section of your composer.json
  • Add 'DhErrorLogging' to the modules array in your application.config.php (or modules.config.php in ZF3 skeleton application) before any other custom modules (or as close to the top as possible).
  • If you have a ./config/autoload/ directory set up for your project, you can drop the dherrorlogging.global.php.dist (rename it to dherrorlogging.global.php) config file from config directory in it and change the values as you wish.
  • Enable at least one log writer (in the dherrorlogging.global.php "log_writers" section).
  • To display an Error Reference in your own exception template (error/404, error/index) make sure you echo the error reference variable errorReference; ?>

Notes

Via the dherrorlogging.global.php you can enable/disable the logging functionality completely or disable just some types of errors/exceptions. You can configure several other things such as template path for errors or log writers. You can also overwrite the logger, processor, reference generator or response sender if you wish (and know what you are doing).

When adding new log writer you can either add new config array for some of the the standard ZF2 writers that don't need injection of other objects (stream, chromephp, 'fingerscrossed', 'firephp', 'mail', 'mock', 'null', 'syslog', 'zendmonitor') or identifier of your own registered log writer factory (registered in main config section ['log_writers']) to the '['dherrorlogging']['log_writers']' section.

In order for the error page to return http status code 500 you should have PHP display_errors off.

Example db writer setup:

Let say you want to enable logging to database via zend db. I have provided a custom db log writer (DhErrorLogging\DbWriter) right out of the box, so all you need to do is to uncomment the db part (line 71 - 91) of the new dherrorlogging.global.php in your config directory so that the module knows you want to use database, and lastly say you are using MySQL you can use the bellow sql schema (also found in /data/sql directory) to create log table in your database:

CREATE TABLE IF NOT EXISTS `error_log` (
  `log_id` int(11) NOT NULL AUTO_INCREMENT,
  `creation_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `reference` varchar(6) DEFAULT '',
  `type` varchar(10) DEFAULT 'ERROR',
  `priority` varchar(6) DEFAULT 'DEBUG',
  `message` text,
  `file` text,
  `line` varchar(12),
  `trace` text,
  `xdebug` text,
  `uri` text,
  `request` text,
  `ip` varchar(45) DEFAULT NULL,
  `session_id` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`log_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

Or use your own table and field names but make sure you adjust the ['db']['options']['table_name'] and ['db']['options']['table_map'] accordingly. Also make sure that zend db adapter alias (line 191 of dherrorlogging.global.php) is set to same adapter you are using.

Example doctrine writer setup:

I have provided a custom doctrine log writer (DhErrorLogging\Writer\DoctrineWriter) right out of the box, so all you need to do is to uncomment the doctrine part (line 100 - 102) of the new dherrorlogging.global.php and run doctrine update command to create the new table. Make sure that doctrine entity manager alias (line 199 of dherrorlogging.global.php) is set to same one you are using.

Migration from v1 to v2

Version 2 is in large respect a complete rewrite. The following has also been added:

  • error type enable/disable,
  • exception filter,
  • module options,
  • response sender (ability to send different response depending on where it come from or what request accept headers are)

In matter of settings, the following has been deprecated: ['dherrorlogging']['priority'] You can easily re-enable this functionality if you use your own logger implementation.

Contributing

Want to make it better or more polished? Feel free to send pull request. I am always happy to collaborate with others or listen to a feedback. Don't know where to start? How about help with writing tests.

TODO:

  • Tests. Yes it is boring to code, but necessary.

dherrorlogging's People

Contributors

davidhavl avatar gounlaf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

dherrorlogging's Issues

Error still displayed

Hi,

I just installed and use the "default configuration" (no email sending, and just the default stream logger) ;
the module is enable "first"

Error: my database server is shutdown, so I got a PDO Exception
Result: the default HTML page you provide is well displayed, but the error is still echo in source ;
The web browser doesn't display it, but the error is still accessible for anyone ;

Does I missed something ?

Notes:

  • When display_errors is set to Off it works well, but I thank your module allow this settings to be set On or Off according to buffer clean in Module.php
<br />
<b>Fatal error</b>:  Uncaught exception 'PDOException' with message 'SQLSTATE[08006] [7] could not connect to server: Connection refused
    Is the server running on host &quot;localhost&quot; and accepting
    TCP/IP connections on port 5432?
could not connect to server: Connection refused
    Is the server running on host &quot;localhost&quot; and accepting
    TCP/IP connections on port 5432?' in /foo/bar/zf2-skeleton/vendor/bshaffer/oauth2-server-php/src/OAuth2/Storage/Pdo.php:53
Stack trace:
#0 /foo/bar/zf2-skeleton/vendor/bshaffer/oauth2-server-php/src/OAuth2/Storage/Pdo.php(53): PDO-&gt;__construct('pgsql:dbname=ja...', 'florianlevis', NULL, Array)
#1 /foo/bar/zf2-skeleton/vendor/zfcampus/zf-oauth2/src/Adapter/PdoAdapter.php(89): OAuth2\Storage\Pdo-&gt;__construct(Array, Array)
#2 /foo/bar/zf2-skeleton/vendor/zfcampus/zf-oauth2/src/Factory/PdoAdapterFactory.php(45): ZF\OAuth2\Adapter\PdoAdapter-&gt;__construct(Array, Array)
#3 [internal function]: ZF\OA in <b>/foo/bar/zf2-skeleton/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php</b> on line <b>930</b><br />
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <title>We're sorry!</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <style type="text/css">
        *
        {
            color: white;
            font-family: Helvetica, arial, sans-serif;
            margin: 0px;

Thanks,

Regards

HTTP error code

Hello David,

first of all: Thanks for the module! This saves me a lot of work.

I noticed that the fatal error page is delivered to the client with a HTTP status code of 200. I would much prefer this to be something adequate (possible 500). What would you think? Send a static header or rather make it configurable? I could also try to create an appropriate pull request.

Sebastian

table name in factory

hihi;

would be nice to move $dbTableName from DbWriterFactory::createService to config, so we dont have to create new factory to override just the table name

thx

Feedback

Hello again,

I managed to have your module working but I had a problem to make the module take config/autoload/dherrorlogging.global.php .
I placed it in the very first position of my application config.

    'modules' => array(
        'DhErrorLogging',
        'DoctrineModule',
        'DoctrineORMModule',
....

I had to manually empty the vendor/davidhavl/dherrorlogging/config/module.config.php as this file was always overwriting the above config file. Looking like this

return array(
);

What do you think, is there any step that I'm doing wrong?

Thanks again for your module!

More detailed requirements

I'm currently optimizing my composer.json. The major change is that I don't require zendframework/zendframework anymore, but only those components that I actually use (MVC, View, Session, I18n).

Unfortunately, that leads to a conflict with your composer.json, which would like to install the whole framework. But is that really necessary? Do you depend on all components?

Careful with new releases

Hello,

Few minutes ago you updated master and happened to break my whole application.

The error I got was:

PHP Fatal error:  Uncaught exception 'Zend\Stdlib\Exception\BadMethodCallException' with message 'The option "priority" does not have a matching "setPriority" ("setpriority") setter method which must be defined' in /repo/vendor/zendframework/zendframework/library/Zend/Stdlib/AbstractOptions.php:110
Stack trace:
#0 /repo/vendor/zendframework/zendframework/library/Zend/Stdlib/AbstractOptions.php(62): Zend\Stdlib\AbstractOptions->__set('priority', 6)
#1 /repo/vendor/zendframework/zendframework/library/Zend/Stdlib/AbstractOptions.php(32): Zend\Stdlib\AbstractOptions->setFromArray(Array)
#2 /repo/vendor/davidhavl/dherrorlogging/src/DhErrorLogging/Options/Factory/ModuleOptionsFactory.php(21): Zend\Stdlib\AbstractOptions->__construct(Array)
#3 [internal function]: DhErrorLogging\Options\Factory\ModuleOptionsFactory->createService(Object(Zend\ServiceManager\ServiceManager), 'dherrorloggingo...', 'DhErrorLogging\\...')
#4 /repo/vendor/liquid-cr in /repo/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php on line 930

Fatal error: Uncaught exception 'Zend\Stdlib\Exception\BadMethodCallException' with message 'The option "priority" does not have a matching "setPriority" ("setpriority") setter method which must be defined' in /repo/vendor/zendframework/zendframework/library/Zend/Stdlib/AbstractOptions.php:110
Stack trace:
#0 /repo/vendor/zendframework/zendframework/library/Zend/Stdlib/AbstractOptions.php(62): Zend\Stdlib\AbstractOptions->__set('priority', 6)
#1 /repo/vendor/zendframework/zendframework/library/Zend/Stdlib/AbstractOptions.php(32): Zend\Stdlib\AbstractOptions->setFromArray(Array)
#2 /repo/vendor/davidhavl/dherrorlogging/src/DhErrorLogging/Options/Factory/ModuleOptionsFactory.php(21): Zend\Stdlib\AbstractOptions->__construct(Array)
#3 [internal function]: DhErrorLogging\Options\Factory\ModuleOptionsFactory->createService(Object(Zend\ServiceManager\ServiceManager), 'dherrorloggingo...', 'DhErrorLogging\\...')
#4 /repo/vendor/ in /repo/vendor/zendframework/zendframework/library/Zend/ServiceManager/ServiceManager.php on line 930

Many thanks for your work!

Can't save in database

I can't save log in database

2014-07-16T15:53:06+01:00 ERR (3): error-router-no-match {"reference":"1f098e","uri":"http://esolidar.proto.esolidar.com/images/favicon16x16.ico","ip":"192.168.1.31","session_id":"upk67hm1ed7nfac3rv3strq5g96kqod5","trace":"#0/usr/local/zend/var/apps/http/esolidar.bewarket.setima.local/80/0.1/vendor/davidhavl/dherrorlogging/Module.php(103): DhErrorLogging\Module DhErrorLogging{closure}\n"}

2014-07-16T15:53:07+01:00 ERR (3): error-router-no-match {"reference":"1d97c1","uri":"http://esolidar.proto.esolidar.com/images/favicon16x16.ico","ip":"192.168.1.31","session_id":"upk67hm1ed7nfac3rv3strq5g96kqod5","trace":"#0/usr/local/zend/var/apps/http/esolidar.bewarket.setima.local/80/0.1/vendor/davidhavl/dherrorlogging/Module.php(103): DhErrorLogging\Module DhErrorLogging{closure}\n"}

2014-07-16T15:53:50+01:00 ERR (3): Invalid method (getAllAuctionsWal) called, caught by Zend\Db\TableGateway\AbstractTableGateway::__call() {"reference":"5809f3","file":"/usr/local/zend/var/apps/http/esolidar.bewarket.setima.local/80/0.1/vendor/zendframework/zendframework/library/Zend/Db/TableGateway/AbstractTableGateway.php","line":473,"trace":"#0 /usr/local/zend/var/apps/http/esolidar.bewarket.setima.local/80/0.1/module/Application/src/Application/Controller/Wall2Controller.php(26): Zend\Db\TableGateway\AbstractTableGateway->__call('getAllAuctionsW...', Array)\n#1 /usr/local/zend/var/apps/http/esolidar.bewarket.setima.local/80/0.1/module/Application/src/Application/Controller/Wall2Controller.php(26): Application\Model\AuctionsTable->getAllAuctionsWal()\n#2 /usr/local/zend/var/apps/http/esolidar.bewarket.setima.local/80/0.1/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractActionController.php(83): Application\Controller\Wall2Controller->indexAction()\n#3 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))\n#4 /usr/local/zend/var/apps/http/esolidar.bewarket.setima.local/80/0.1/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))\n#5 /usr/local/zend/var/apps/http/esolidar.bewarket.setima.local/80/0.1/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))\n#6 /usr/local/zend/var/apps/http/esolidar.bewarket.setima.local/80/0.1/vendor/zendframework/zendframework/library/Zend/Mvc/Controller/AbstractController.php(117): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))\n#7 /usr/local/zend/var/apps/http/esolidar.bewarket.setima.local/80/0.1/vendor/zendframework/zendframework/library/Zend/Mvc/DispatchListener.php(114): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))\n#8 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))\n#9 /usr/local/zend/var/apps/http/esolidar.bewarket.setima.local/80/0.1/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(468): call_user_func(Array, Object(Zend\Mvc\MvcEvent))\n#10 /usr/local/zend/var/apps/http/esolidar.bewarket.setima.local/80/0.1/vendor/zendframework/zendframework/library/Zend/EventManager/EventManager.php(207): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))\n#11 /usr/local/zend/var/apps/http/esolidar.bewarket.setima.local/80/0.1/vendor/zendframework/zendframework/library/Zend/Mvc/Application.php(313): Zend\EventManager\EventManager->trigger('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))\n#12 /usr/local/zend/var/apps/http/esolidar.bewarket.setima.local/80/0.1/public/index.php(25): Zend\Mvc\Application->run()\n#13 {main}","uri":"http://esolidar.proto.esolidar.com/","ip":"192.168.1.10","session_id":"fqk32okolu8hr1ds0citj0lf0ikf3qo2"}

ZF2 DhErrorLogging\\Options\\Factory\\ModuleOptionsFactory::__invoke()

Not sure why this is happening but here is the error.
Argument 1 passed to DhErrorLogging\Options\Factory\ModuleOptionsFactory::__invoke() must be an instance of Interop\Container\ContainerInterface, instance of Zend\ServiceManager\ServiceManager given.

Changing:
public function __invoke(ContainerInterface $container, $name, array $options = null)
to:
public function __invoke(ServiceLocatorInterface $container, $name, array $options = null) resolves the issue.

running ZF 2.4

Hello, thanks. One question

Hello,

Thank you very much for your module. It looks great. Does it have an option to have a sample rate logging config option?

Let's say we want to store 1 of every 100 errors just to not saturate the error_log table?

regards!

ZF3 ZendDB logging issue: zend_db_adapter does not have a callable setZendDbAdapter

Hi David

I have been using your logging module successfully with ZF2 logging to the database with Zend DB.

I am now trying to use this with ZF3 and getting the following error:

PHP Fatal error:  Uncaught exception 'Zend\Stdlib\Exception\BadMethodCallException' with message 'The option "zend_db_adapter" does not have a callable "setZendDbAdapter" ("setzenddbadapter") setter method which must be defined' in /vendor/zendframework/zend-stdlib/src/AbstractOptions.php:112
Stack trace:
#0 /vendor/zendframework/zend-stdlib/src/AbstractOptions.php(64): Zend\Stdlib\AbstractOptions->__set('zend_db_adapter', 'Zend\\Db\\Adapter...')
#1 /vendor/zendframework/zend-stdlib/src/AbstractOptions.php(34): Zend\Stdlib\AbstractOptions->setFromArray(Array)
#2 /vendor/davidhavl/dherrorlogging/src/DhErrorLogging/Options/Factory/ModuleOptionsFactory.php(24): Zend\Stdlib\AbstractOptions->__construct(Array)
#3 /vendor/zendframework/zend-servicemanager/src/ServiceManager.php(758): DhErrorLogging\Options\Facto in /vendor/zendframework/zend-servicemanager/src/ServiceManager.php on line 765

Some googling found that another project had this problem, and they fixed it by adding

$__strictmode__ = false;

to the Options/ModuleOptions.php

SocalNick/ScnSocialAuth@7d153b1

I've tested this and it works with this module, but seems like a bit of a hack to me.

DbWriterFactory is not instantiate with the options

Hello,
I don't know exactly why, if it is the WriterPluginManager that is not making his job well or something else, but since we migrate our project to ZF3, the DbWriterFactory is not instantiate with the options.
I have to add this at the beginning of the __invoke method :
if (empty($this->options)) $this->options = $options;
The __construct populate (or not) the variable with empty options.
Kind regards
Philippe

Error trace uncomplete

Hello David,

I am noticing that some error traces in DB look like this:

       log_id: 3
creation_time: 2014-08-05 15:31:23
    reference: 01852a
     priority: ERR
      message: Call to a member function format() on a non-object
         file: /vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/DateTimeType.php
         line: 53
        trace: #0/vendor/davidhavl/dherrorlogging/Module.php(134): DhErrorLogging\Module DhErrorLogging\{closure}

          uri: http://xxxx.local/members/contacts
           ip: 192.168.33.1
      user_id: 2
1 row in set (0.00 sec)

It seems that somehow is not taking the whole trace into the trace column

Custom view templates overwritten

Hello David,

I have set up quite nice error pages for my ZF2 application (in module/Application/view/error/…). As soon as I activate your module (with appropriate configuration), Zend always uses the view files your module provides (vendor/davidhavl/dherrorlogging/view/error/…).

Do you know why? The order of the modules seems to have no effect.

Sebastian

class map in module having issues

I spent some time this morning upgrading to the latest version and I've noticed that the location of Logger in the last release is in a different place.

It used to be 'DhErrorLogging\Factory\Logger\LoggerFactory' and right now is 'DhErrorLogging\Logger\Factory\LoggerFactory' I had to regenerate the class map and change dherrorloging.global.php with this changes.

I wonder wether this is the way to go or a potential bug.

Send log email

Hi

Great module, it possible config on module.config.php send log through email ?

Thanks

Fatal error when running the error logger on a console environment

Just trying to run the doctrine clear cache script or a php queue system (both on a console environment) I get the next error:

PHP Catchable fatal error:  Argument 1 passed to DhErrorLogging\Processor\Extras::__construct() must be an instance of Zend\Http\PhpEnvironment\Request, instance of Zend\Console\Request given, called in /vendor/davidhavl/dherrorlogging/src/DhErrorLogging/Factory/Processor/ExtrasProcessorFactory.php on line 23 and defined in /vendor/davidhavl/dherrorlogging/src/DhErrorLogging/Processor/Extras.php on line 14

That is because in the Extras class you are casting in the constructor to be a Zend\Http\PhpEnvironment\Request but when you are running it on a console you get Zend\Console\Request. The workaround I had was just removing the type by leaving like this:

    public function __construct($request)
    {
        $this->request = $request;
    }

You consider this could be the fix ? At the moment without this workaround, the module is unusable.

Issue after Upgrading module

Hello David,

I believe you should just remove from vendor/davidhavl/dherrorlogging/config/module.config.php the whole array:

    'service_manager' => array(

        'aliases' => array(
            'dherrorlogging_zend_db_adapter' => 'Zend\Db\Adapter\Adapter',
        ),

        'factories' => array(
            'DhErrorLogging\Logger' => 'DhErrorLogging\Factory\Logger\LoggerFactory',
            'DhErrorLogging\ErrorReferenceGenerator' => 'DhErrorLogging\Factory\Generator\ErrorReferenceGeneratorFactory'
        ),


    ),

And only leaving it on dherrorlogging.global.php. Just after the upgrade I got the same error

Fatal error: Uncaught exception 'Zend\ServiceManager\Exception\InvalidServiceNameException' with message 'An alias by the name "dherrorloggingzenddbadapter" or "dherrorlogging_zend_db_adapter" already exists' 

My proposal is, same way you commented the log_writter part, whether leave it commented or just in the global.php config. I had to do this in the module.config.php :

    'service_manager' => array(
/*
        'aliases' => array(
            'dherrorlogging_zend_db_adapter' => 'Zend\Db\Adapter\Adapter',
        ),

        'factories' => array(
            'DhErrorLogging\Logger' => 'DhErrorLogging\Factory\Logger\LoggerFactory',
            'DhErrorLogging\ErrorReferenceGenerator' => 'DhErrorLogging\Factory\Generator\ErrorReferenceGeneratorFactory'
        ),*/

    ),

And this in my global.php config:

return array(
    'dherrorlogging' => $config,

    'service_manager' => array(
        'factories' => array(
            'dherrorlogging_zend_db_adapter' => function ($sm){
                    $config = $sm->get('Config');

                    $dbAdapter = new Adapter(array(
                        'driver' => 'Mysqli',
                        'database' => $dbname, // from config
                        'username' => $user, // from config
                        'password' => $password,// from config
                        'host'     => $host,// from config
                        'port'     => $port,// from config
                    ));
                    return $dbAdapter;
                },
            'DhErrorLogging\Logger' => 'DhErrorLogging\Factory\Logger\LoggerFactory',
            'DhErrorLogging\ErrorReferenceGenerator' => 'DhErrorLogging\Factory\Generator\ErrorReferenceGeneratorFactory'
        ),

    ),
);

By the way, in the global.php config you are calling the main config array $config and in the bottom you are doing a ternary to the $settings variable. Is that correct?

The mail not working

I have this configuration. i used 2.0 version to zf2 2.5

'mail' => [
'name' => 'mail',
'options' => [
/*
* Subject Prepend Text
/
'subject_prepend_text' => 'Error Log',
/

* Mail Options
* @see Zend\Mail\Message
/
'mail' => [
'from' => '[email protected]',
'to' => '[email protected]',
],
/

* Transport
* - sendmail => Zend\Mail\Transport\Sendmail,
* - smtp => Zend\Mail\Transport\Smtp,
*
* Default transport is smtp
*/
'transport' => [
'type' => 'smtp',

                /*
                 * Transport Options
                 * @see Zend\Mail\Transport\SmtpOptions
                 */
                'options' => [
                    'host' => 'mail.mail.com',
                    'connection_class' => 'login',
                    'connection_config' => [
                        'username' => '[email protected]',
                        'password' => 'XXXXXXXX',
                        'ssl' => 'tls',
                        'port' => 587
                    ]
                ],
            ]
        ]
    ]

the error its:

Fatal error: Uncaught exception 'Zend\Log\Exception\InvalidArgumentException' with message 'Transport parameter of type array is invalid; must be of type Zend\Mail\Transport\TransportInterface' in C:\xampp\htdocs\xestur\vendor\zendframework\zend-log\src\Writer\Mail.php:109 Stack trace: #0 C:\xampp\htdocs\xestur\vendor\zendframework\zend-servicemanager\src\AbstractPluginManager.php(254): Zend\Log\Writer\Mail->__construct(Array) #1 C:\xampp\htdocs\xestur\vendor\zendframework\zend-servicemanager\src\ServiceManager.php(638): Zend\ServiceManager\AbstractPluginManager->createFromInvokable('mail', 'mail') #2 C:\xampp\htdocs\xestur\vendor\zendframework\zend-servicemanager\src\ServiceManager.php(597): Zend\ServiceManager\ServiceManager->doCreate('mail', 'mail') #3 C:\xampp\htdocs\xestur\vendor\zendframework\zend-servicemanager\src\ServiceManager.php(530): Zend\ServiceManager\ServiceManager->create(Array) #4 C:\xampp\htdocs\xestur\vendor\zendframework\zend-servicemanager\src\AbstractPluginManager.php(161): Zend\ServiceManager\Servi in C:\xampp\htdocs\xestur\vendor\zendframework\zend-servicemanager\src\ServiceManager.php on line 941

what happens??
thanks

Is it compatible for Zend 3?

I tried for ZF3, following error shows.

Fatal error: Class DhErrorLogging\Options\Factory\ModuleOptionsFactory contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (Zend\ServiceManager\Factory\FactoryInterface::__invoke) in /var/www/html/zf3-skelton/vendor/davidhavl/dherrorlogging/src/DhErrorLogging/Options/Factory/ModuleOptionsFactory.php on line 23

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.