0

i have developed website in cakephp 2.6.10 and on server where php version is 7.3 , it is giving errors http://tradeskills-recruitment.co.uk/ and i contacted support team, they said to use PDO or MySqli extension.. but after searching on google i get to know that cakephp 2.x already uses PDO by default.. Although it is like this

class DATABASE_CONFIG {

    public $default = array(
        'datasource' => 'Database/Mysql',
        'persistent' => false,
        'host' => 'test_host',
        'login' => 'test_user',
        'password' => 'test_pwd',
        'database' => 'test_db',
        'prefix' => '',
        //'encoding' => 'utf8',
    );

    public $test = array(
        'datasource' => 'Database/Mysql',
        'persistent' => false,
        'host' => 'localhost',
        'login' => 'user',
        'password' => 'password',
        'database' => 'test_database_name',
        'prefix' => '',
        //'encoding' => 'utf8',
    );
}

Please help me in resolving this issue.. Thanks to all..!!

aynber
  • 22,380
  • 8
  • 50
  • 63
  • It said Access denied for user 'test_user'@'10.27.37.9' (using password: YES) – Simranjit singh Mar 13 '19 at 15:44
  • Does that user have sufficient permissions on the database? – Worthwelle Mar 13 '19 at 15:44
  • Yes.. they have.. when i contacted the support team they told me to use MySqli or PDO. They said i'm using MySql.. – Simranjit singh Mar 13 '19 at 15:54
  • Pretty sure CakePHP 2.6.10 does not support PHP 7.3. You're going to have bigger issues than just the database connection. – Greg Schmidt Mar 13 '19 at 16:10
  • @GregSchmidt is there any other way because apart from 7.3, server is providing options for 7.1 & 7.2 and if i need to upgrade, which version should i use because i have also tried cakephp 2.10.15 but still errors.. – Simranjit singh Mar 13 '19 at 17:06
  • I don't know of a general resource for what versions of PHP are supported by what versions of CakePHP. The answer on [this question](https://stackoverflow.com/questions/29748611/cakephp-is-version-x-compatible-with-php-version-y) gives some approaches to figure it out. The `travis.yml` file for version 2.10.15 does indicate that it should work with 7.3. – Greg Schmidt Mar 13 '19 at 18:37
  • When you tried 2.10.15, did it give the same "Access denied" error you mentioned above, or something else? – Greg Schmidt Mar 13 '19 at 18:38
  • @GregSchmidt yes it gave me same error actually.. I will try again to use some updated version now and will inform you shortly if it works.. Thanks – Simranjit singh Mar 14 '19 at 07:57
  • Are you absolutely sure that the correct database permissions are in place? You can connect using the command line from the web server with the exact credentials from the config file? Because "Access denied" would seem to indicate that the code is running, just, you know, being denied access. – Greg Schmidt Mar 14 '19 at 15:18
  • @GregSchmidt yes even server support team checked it and they verified it.. Its strange.. Thanks for your revert..!! – Simranjit singh Mar 15 '19 at 11:34
  • @GregSchmidt server providers are saying that "the framework itself is not supported due to requires being able to change document root, which we do not support." is there any other option to run cakephp on such server ? – Simranjit singh Mar 19 '19 at 09:43
  • First, it's straight-forward to edit the `webroot/index.php` to find the implementation files in a different folder, so you can change your installation to match the server environment instead of the other way around. Second, that would not result in an "access denied" error from the database. – Greg Schmidt Mar 19 '19 at 14:44

0 Answers0