cannot connect to MySQL

0

Hi, sorry to bother you again.
I made a fresh install on a new domain, with SQL 5.7 and "only_full_group_by" said to be disabled.
Installation went smooth. But when done, I cannot enter login or register. See visclubldh.pt
I get the following errorlog;

<?php defined('BASEPATH') OR exit('No direct script access allowed'); ?>

ERROR - 2020-07-24 16:06:24 --> Severity: Warning --> mysqli::real_connect(): (HY000/2002): No such file or directory /NAS2/vhosts/JO3711/visclubldh.pt/public_www/lib/database/drivers/mysqli/mysqli_driver.php 203
ERROR - 2020-07-24 16:06:24 --> Unable to connect to the database
ERROR - 2020-07-24 16:06:24 --> Severity: Warning --> mysqli::real_connect(): (HY000/2002): No such file or directory /NAS2/vhosts/JO3711/visclubldh.pt/public_www/lib/database/drivers/mysqli/mysqli_driver.php 203
ERROR - 2020-07-24 16:06:24 --> Severity: Warning --> session_start(): Failed to initialize storage module: user (path: ) /NAS2/vhosts/JO3711/visclubldh.pt/public_www/lib/libraries/Session/Session.php 143
ERROR - 2020-07-24 16:06:24 --> Severity: Warning --> mysqli::real_connect(): (HY000/2002): No such file or directory /NAS2/vhosts/JO3711/visclubldh.pt/public_www/lib/database/drivers/mysqli/mysqli_driver.php 203
ERROR - 2020-07-24 16:06:24 --> Unable to connect to the database
ERROR - 2020-07-24 16:06:24 --> Query error: No such file or directory - Invalid query: SELECT *
FROM tec_settings
ERROR - 2020-07-24 16:06:24 --> Severity: error --> Exception: Call to a member function num_rows() on bool /NAS2/vhosts/JO3711/visclubldh.pt/public_www/app/models/Settings_model.php 220

(BTW on my testdomain verygood.pt the forum runs fantastic, so now I want to change it to the permanent domain.)

Can you give me a solution based on the errors?
Thank you so much.

Question Resolved For: Simple Forum - Responsive Bulletin Board 0 Votes 5 Answers 1.2k Views
Asked by Hans van Os 4 years ago

0

Answered by Mian Saleem

Hello,

404 not found error nothing to do with MySQL mode.

The .htaccess file looks fine. For mod_rewrite, you need to check with server admin/host.

Thank you

0

Answered by Mian Saleem 4 years ago

Hello,

Theses error might be logged before the installation.

404 not found error is caused mostly due to missing .htaccess file.

Please check the following FAQ


Why am I getting 404 Not Found error after installation?

Please

  1. make sure that your apache mod_rewite is enabled
  2. check that .htaccess file is successfully uploaded and exists in the main directory of SMA
  3. base_url in app/config/config.php

If you are using godaddy, please visit the codeigniter official guide here. You might need to check and modify you .htaccess files too.

0

Answered by Hans van Os 4 years ago

Thank you,
The errorlog, you may be right. I transferred a clean new script to the server, then changed the error log to 1 in the config.php and then installed.
how can I check mod_rewrite to be enabled on the host server? The htaccess file says enabled.
The .htaccess file is identical to the running script on my testsite. There is also a different .htaccess file in the app directory.
this is the file in the main directory:

<IfModule mod_rewrite.c>

RewriteEngine On
# RewriteBase /forums/
RewriteCond $1 !^(index\.php|assets|install|update)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# For godady Shared Hosting Server uncomment the line below
# RewriteRule ^(.*)$ index.php?/$1 [L]

# Please comment this if you have uncommented the above
RewriteRule ^(.*)$ index.php/$1 [NC,L,QSA]

</IfModule>


# Uncomment all line below to improve caching - remove # from start

# <IfModule mod_headers.c>
#   <FilesMatch ".(css|js)$">
#     Header set Cache-Control "max-age=7200, public"
#   </FilesMatch>
# </IfModule>

# <IfModule mod_expires.c>
# ExpiresActive On
# ExpiresByType image/jpg "access plus 1 year"
# ExpiresByType image/jpeg "access plus 1 year"
# ExpiresByType image/gif "access plus 1 year"
# ExpiresByType image/png "access plus 1 year"
# ExpiresByType text/css "access plus 1 month"
# ExpiresByType text/x-javascript "access plus 1 month"
# ExpiresByType image/x-icon "access plus 1 year"
# ExpiresDefault "access plus 2 days"
# </IfModule>

The base_url is also correct. https://visclubldh.pt/

Can it be possible that "only_full_group_by" is not disabled on the server?
I know on verygood.pt it is disabled and I use sql3.netim.hosting
I asked the same disabling for visclubldh.pt, but there was confusion. although they answered that it was disabled.

Thank you.

0

Answered by Hans van Os 4 years ago

sorry for the stupid copy paste file.

0

Answered by Hans van Os 4 years ago

I solved the problem with my host. They had put me on a nginx server instead of apache. therefore the htaccess file was not read.
Thank you.

We use Cookies

We use cookies to ensure that we give you the best experience on our website. By continuing to browse the site you are agreeing to our use of cookies.