Hi Erinaka,
On 25 January 2015 at 22:55, erkinaka [via Zend Framework Community] <
[email protected]> wrote:
> i have the error below whe i use custom view helper. but it works on
> local. it doesn't work on far host.
>
>
>
> *Warning:
> require_once(/home/webnolog/public_html/sinav/module/Sorubankam\View\Helper\Testhelper.php):
> failed to open stream: No such file or directory in
> /home/webnolog/public_html/sinav/vendor/zendframework/zendframework/library/Zend/Loader/ClassMapAutoloader.php
> on line 138 Fatal error: require_once(): Failed opening required
> '/home/webnolog/public_html/sinav/module/Sorubankam\View\Helper\Testhelper.php'
> (include_path='.:/opt/php55/lib/php') in
> /home/webnolog/public_html/sinav/vendor/zendframework/zendframework/library/Zend/Loader/ClassMapAutoloader.php
> on line 138*
>
>
> my module.config.php
>
>
>
>
>
> * 'view_helpers' => array( 'invokables' => array(
> 'test_helper' => 'Sorubankam\View\Helper\Testhelper', ) ),*
>
>
> my testhelper
>
>
>
>
>
>
>
>
>
>
>
> *<?php namespace Sorubankam\View\Helper; use
> Zend\View\Helper\AbstractHelper; class Testhelper extends AbstractHelper
> { public function __invoke($output = 'bar') { return "$output , this
> is ZF2 View Helper"; } }*
>
You probably used an incorrect path where saving a file, like in following
example:
src/SoRUbanKAM/View/helper/TESTHELPER.pHp
This works on windows/osx, but will break when using a case-sensitive
filesystem (linux, by default).
Consider developing in a VM that reflects your production environment.
Marco Pivetta
http://twitter.com/Ocramius
http://ocramius.github.com/
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/ZF2-Custom-View-Helper-problem-tp4662444p4662445.html
Sent from the Zend Framework mailing list archive at Nabble.com.