Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

amadkinnon's avatar

Updated php minor version, now v4.2 is broken

Our admin did a php upgrade from php-5.5.38-1 to php-5.5.38-5 and now our laravel application is failing with the message: "The use statement with non-compound name 'Config' has no effect". We get this error when trying to access the app either via the browser or via php artisan. I have been unable to locate any solutions on the web. Any help would be appreciated. I have attempted a compser dump-autoload, composer update and restarted all http services. This is running on CentOS 6.

Thanks

0 likes
4 replies
ohffs's avatar
ohffs
Best Answer
Level 50

Are you doing something like :

<?php
use Config;

class SomethingController extends Controller {
}

If so, removing the 'use Config' might help.

1 like
amadkinnon's avatar

This error is from the laravel config file itself. I haven't changed any base code.

Simply running php artisan generates the error:

$ php artisan
{"error":
    {    "type":"ErrorException","message":"The use statement with non-compound name 'Config' has no effect",
         "file":"\/opt\/www\/myapp\/app\/start\/global.php",
         "line":3
    }
}
amadkinnon's avatar

Gah, there is some custom code in there. I removed the use config and call the config directly. Seems to have fixed the problem. Thanks for the response.

1 like
ohffs's avatar

No worries - glad you're back working! :-)

Please or to participate in this conversation.