MYSQL not working in shared hosting..

Published 1 year ago by amitshrestha221

I am working with Laravel 5.3 which required PHP 5.6.4. In my server there is only option for 5.6.3 or 7.0

When I select 5.6.3 using Multi PHP Manager in cpanel for the domain, mysql connection works and returns value when i wrote simple code for testing connection:


    $conn = mysqli_connect('localhost','amplesho_admin', '1#Ampleadmin', 'amplesho_ampleshop1') or die('Database Error');

        echo "success";
        echo "failed";

While selecting 5.6.3 it returns success. But when i select 7.0, it returns nothing. I'm on a shared hosting.

Please sign in or create an account to participate in this conversation.