CodeLobster IDE

Free cross-platform PHP IDE (HTML, PHP, CSS, JavaScript code editor) with support Drupal, Joomla, Twig, JQuery, BackboneJS, LaravelJS, Node.js, Fhalcon, CodeIgniter, CakePHP, Laravel, Magento, MeteorJS, Phalcon, Symfony, VueJS, WordPress, Yii
It is currently Fri Apr 26, 2019 1:57 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Codelobster does not find MariaDB
PostPosted: Sun Oct 22, 2017 1:22 pm 
Offline

Joined: Sun Oct 22, 2017 12:15 pm
Posts: 4
Location: Diepenbeek, Belgium
Hello, I'm a new member and have a problem.

I'm using a registered Codelobster 5.13 Lite together with WAMP 3.1.0_x64 with Apache 2.4.27, PHP 5.631/7.19, MySQL 5.7.19, MariaDB10.28
I have no problem with databases in MySQL but if I try to use MariaDB I got an warning I cannot find a database in MariaDB.
The SQL-manager has no problems with the database but my connect-script gives a warning and my pages do not work.

See the enclosed picture and the code of my 'dbconnect.php' (this works fine for all of my MySQL-bases.

Do I need a special setting in Codelobster or does Codelobster not recognises MariaDB?

Code:
<?php
// Database settings WAMP-MariaDB-Webserver
   define('DB_HOST','localhost');
   define('DB_USER','root');
   define('DB_PASSWORD','');
   define('DB_NAME','_font_web_mdb_php71');
// mysqli_connect opent de juiste database in PHP
   $db_connect = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);   
      if(!$db_connect)
         die('<p>Momenteel kan niet geconnecteerd worden met de database "_font_web_mdb_php71".</p>');
//      echo "<p>De databasekoppeling is gelukt!</p>";
// Stel de te gebruiken karakterset in voor de database. Nodig voor accentletters!
   mysqli_set_charset($db_connect, "utf8");
   date_default_timezone_set('Europe/Brussels');
// Stel de gewenste taal in. Omdat het op verschillende systemen een verschillende syntaxis kan zijn, neem je best zoveel mogelijke aanduidingen.
   setlocale( LC_ALL, 'nl_BE', 'nl-BE', 'Dutch_Netherlands', 'Dutch', 'nl_NL', 'nl-NL', 'nl', 'nl_NL.ISO8859-1', 'nl_NL.UTF-8', 'nld_nld', 'nld', 'nld_NLD', 'NL_nl' );
?>



Attachments:
File comment: Settings in CodeLobster
probleem_mariadb.png
probleem_mariadb.png [ 94.97 KiB | Viewed 8426 times ]

_________________
Vriendelijke groet
Albert
Top
 Profile  
 
 Post subject: Re: Codelobster does not find MariaDB
PostPosted: Mon Oct 23, 2017 3:17 pm 
Offline
Site Admin

Joined: Wed Sep 12, 2007 2:18 pm
Posts: 3377
Hi.

You receive PHP error from your web server.
This problem isn't related to Codelobster.

Regards,
Codelobster Team.


Top
 Profile  
 
 Post subject: Re: Codelobster does not find MariaDB
PostPosted: Fri Oct 27, 2017 5:23 pm 
Offline

Joined: Sun Oct 22, 2017 12:15 pm
Posts: 4
Location: Diepenbeek, Belgium
Admin wrote:
Hi.

You receive PHP error from your web server.
This problem isn't related to Codelobster.

Regards,
Codelobster Team.


Thank you for the quick answer.

Sorry that it took so long for my answer, but as I said, I'm new in the use of WAMP + Codelobster.

Meanwhile i looked what could be the reason and I've found it.
I give my solution here, maybe another can use this solution too.

The problem is in the new WAMP-server. This new one now has build in two databases: MySQL and MariaDB.
Both are working but the MySQL uses the general port 3306 and MariaDB uses the port 3307.

Normally the DB_PORT does not need to be mentioned in $db_connect, so it Always is 3306.

Now I have to include the portnumber if I want to use MariaDB.

This is the right connectionscript that works with the definition of the MariaDB-port 3307.

Code:

<?php
// Database settings WAMP-MariaDB-Webserver
   define('DB_HOST','localhost');
   define('DB_USER','root');
   define('DB_PASSWORD','');
   define('DB_NAME','_font_web_mdb_php71');
   define('DB_PORT',3307);
// mysqli_connect opent de juiste database in PHP
   $db_connect = mysqli_connect(DB_HOST, DB_USER, DB_PASSWORD, DB_NAME, DB_PORT);   
      if(!$db_connect)
         die('<p>Momenteel kan niet geconnecteerd worden met de database "_font_web_mdb_php71".</p>');
// Stel de te gebruiken karakterset in voor de database. Nodig voor accentletters!
   mysqli_set_charset($db_connect, "utf8");
   date_default_timezone_set('Europe/Brussels');
// Stel de gewenste taal in. Omdat het op verschillende systemen een verschillende syntaxis kan zijn, neem je best zoveel mogelijke aanduidingen.
   setlocale( LC_ALL, 'nl_BE', 'nl-BE', 'Dutch_Netherlands', 'Dutch', 'nl_NL', 'nl-NL', 'nl', 'nl_NL.ISO8859-1', 'nl_NL.UTF-8', 'nld_nld', 'nld', 'nld_NLD', 'NL_nl' );
?>



_________________
Vriendelijke groet
Albert


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2016 phpBB Group