Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Router ErrorException [ Fatal Error ]: Class Inflector not found
  • Localhost working app, hosting on not working. Apache 2.4.7 - PHP 5.4.23

    live address : http://www.beta2.dev10.net/
    ErrorException [ Fatal Error ]:
    Class 'Inflector' not found COREPATH/classes/router.php @ line 262
    $class $namespace.static::$prefix.\Inflector::words_to_upper(implode('_'$temp_segments));
  • Really no idea.

    You're sure the deployment went ok, and the ./fuel/core/classes/inflector.php file is actually there?
  • Yes file is there...
  • No problems with permissions (no read rights means it can't be found too)?
  • No permission problem. Using SuPHP.
  • New problems : Fatal error: Call to undefined method ReflectionClass::newInstance() in /home/dev10/public_html/beta2/fuel/core/classes/request.php on line 401
  • You are sure you're running PHP5?

    That is a built-in class, so it should always be there: http://uk1.php.net/manual/en/reflectionclass.newinstance.php
  • Yes I'm sure.
  • According to your phpinfo(), that PHP version is compiled with Reflection support, so there is reason why it should not be there.

    Can you upload a test file, containing

    <?php
    var_dump(get_class_methods('ReflectionClass'));

    and check if "newInstance" is defined as a method?

    I am absolutely clueless to what is going on here.
  • Then I'm out of idea's.

    The error is

    Call to undefined method ReflectionClass::newInstance()

    but the method is absolutely there.
  • List have a;
    [33] => newInstance
    [34] => newInstanceWithoutConstructor
    [35] => newInstanceArgs
    what's a problem?
  • I don't know.

    The ReflectionClass is there, it has a method called newInstance, so it should not give that error.
  • What solved the initial error btw? How come the Inflector class is found al of a sudden?
  • $class $namespace.static::$prefix.\Inflector::words_to_upper(implode('_'$temp_segments));
    change to
    $class $namespace.static::$prefix.str_replace(' ', '_', ucwords(str_replace('_', ' ', implode('_'$temp_segments))));
  • That didn't solve the problem, that worked around it.

    You have a serious problem somewhere, either in your installation or with your host. And you need to sort that out, not change framework code.

    Have you tried to deploy the 1.7.1 zip directly, without any changes, additional composer stuff, or your own code? Does the welcome controller load?
  • Problem resolved;
    Config locale problem : tr_TR change to tr_TR.UTF-8, tr_TR, tr-tr, turkish
  • HarroHarro
    Accepted Answer
    I've seen this before, google "php turkish bug" and be amazed... ;-)
  • Unfortunately, as a joke.
    PHP 5.4 is supported to working. I installed the 1.7.1 version worked.
    I did try these results appeared one by one :)

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion