Jump to content
[MUST READ] Forum Rules ×

Recommended Posts

Hi ! I've a big problem since several days.

When I try to connect to my Sql database, I get a 403 error. I read somme topics but it didn't change anything.

Help please !!

$bdd = new PDO('mysql:host=sql###.byethost.com;dbname=dbname;charset=utf8', 'id', 'password', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));

Link to comment
Share on other sites

9 hours ago, Becaye said:

Hi ! I've a big problem since several days.

When I try to connect to my Sql database, I get a 403 error. I read somme topics but it didn't change anything.

Help please !!

$bdd = new PDO('mysql:host=sql###.byethost.com;dbname=dbname;charset=utf8', 'id', 'password', array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));

Did the code work flawlessly before ? If so, did you change anything recently ?

Link to comment
Share on other sites

  • 2 weeks later...
On 24/05/2019 at 4:07 PM, mike said:

Did the code work flawlessly before ? If so, did you change anything recently ?

It works when I am in localhost but when I send it to byet server, I adapt the names but it doesn't work

Link to comment
Share on other sites

On 6/3/2019 at 6:35 AM, Becaye said:

It works when I am in localhost but when I send it to byet server, I adapt the names but it doesn't work

I've just tested some php code with a pdo connection, and everything worked perfectly. Please check the username, password, server, and database names.

If this everything is okay, but you still get the same error, please post a bit more of your code.

Link to comment
Share on other sites

  • 5 weeks later...

As some advice use utf8mb4 and utf8_unicode_520_ci as your charset and collation in your queries please, the old utf8 doesn't fully support UTF-8 characters exceeding three bytes like emoji and just cuts them off which can impose a potential security hazard to my knowledge.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...