Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Custom Class not working on server

I am using phalcon in one of the my project and i'm using some custom classes for whole application its just like a plugin the issue is the project is working on our local and stagging server but when I upload this to client server i gout class not found error I have registered the classes into loader but that is not working only client servers ther we have installed the phalcon successfully but getting error into error logs.

Please help me for this issue.

$config = $this->getConfig()->toArray();

    $di = new \Phalcon\DI\FactoryDefault();

    $loader = new \Phalcon\Loader();

    /**
     * We're a registering a set of directories taken from the configuration file
     */
    $loader->registerDirs($config['services'])->register();
    foreach($config['services'] as $key => $value) {
        $loader->registerNamespaces(array(
            $key => $value
        ));
    }

i got this when print the loader

*Phalcon\Loader Object ( [eventsManager:protected] => [foundPath:protected] => [checkedPath:protected] => [prefixes:protected] => [classes:protected] => [extensions:protected] => Array ( [0] => php ) [namespaces:protected] => Array ( [Models] => application/models/ ) [directories:protected] => Array ( [Library] =>/application/library/ [Models] =>./application/models/ ) [_registered:protected] => 1 )

* my custome functions under the ../application/library/standered/functions *

the error into the log file is : PHP Fatal error: * Class 'Standard\Functions' not found in /application/application.php on line 185*



30.8k
Accepted
answer

Hi,

maybe just a typo error:

my custome functions under the ../application/library/standered/functions

Class 'Standard\Functions' not found

rename your "standered" directory to "standard"



535
edited Mar '15

Thanks for reply , yes the issue with case sensitive we witer Standred and the folder name was standred.

Hi,

maybe just a typo error:

my custome functions under the ../application/library/standered/functions

Class 'Standard\Functions' not found

rename your "standered" directory to "standard"