No data retrieved from mysql

This section is for posting questions which are not directly related to WYSIWYG Web Builder.
Examples of off topics: web server configuration, hosting, programming related questions, third party scripts.

Note that these questions will generally not be answered by the administrators of this forum.
jjhoog8
 
 
Posts: 8
Joined: Sat Jan 11, 2020 4:04 pm

No data retrieved from mysql

Post by jjhoog8 » Thu Jan 16, 2020 9:17 am

Hi,

I am using a Synology NAS as a webserver.
Details:
Synology DS216 II
MariaDB 10 (Mysql database) port 3306 (default)
Apache http server 2.4
PHP7.3
PHP7.2
PHP5.6
Wordpress
Webstation
Webserver runs ok,

When I connect to the Synology I use the following connection information:
Database source MySQL (online)
MySQL server 192.168.1.19
MySQL Database Briefing
MySQL Username GEZC
MySQL Password xxxxx
MySQLTable Instructeurs

After publishing the whole site to the Synology:
No errors, but no data

response is : \n";foreach($row as $cell) {echo "\n';} echo "\n";}?
Column1 Column2 Column3
".$cell."

What is wrong?
Al the connection parameters are correct I use them for another application to.
The user GEZC has all rights.
Connecting with user root gives the same problem.

Thanks in advance

User avatar
Pablo
 
Posts: 19261
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: No data retrieved from mysql

Post by Pablo » Thu Jan 16, 2020 11:15 am

It looks like the page extension is not set to PHP.

jjhoog8
 
 
Posts: 8
Joined: Sat Jan 11, 2020 4:04 pm

Re: No data retrieved from mysql

Post by jjhoog8 » Fri Jan 17, 2020 7:27 am

Hi Pablo

When i set the page to php and publish the site i get only the html code including php code. But no results from the table

User avatar
Pablo
 
Posts: 19261
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: No data retrieved from mysql

Post by Pablo » Fri Jan 17, 2020 8:09 am

Maybe PHP is not installed on the server?

jjhoog8
 
 
Posts: 8
Joined: Sat Jan 11, 2020 4:04 pm

Re: No data retrieved from mysql

Post by jjhoog8 » Fri Jan 17, 2020 3:40 pm

Hi
Php is installed
W***p***s needs it too. W**d***s is up and running
And another tool i use is PHPRad, this tool makes php pages only
Both applications are running on my synology webserver.

User avatar
Pablo
 
Posts: 19261
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: No data retrieved from mysql

Post by Pablo » Fri Jan 17, 2020 4:26 pm

In that case, the server should not send the PHP to the browser.

jjhoog8
 
 
Posts: 8
Joined: Sat Jan 11, 2020 4:04 pm

Re: No data retrieved from mysql

Post by jjhoog8 » Fri Jan 17, 2020 5:26 pm

Hi Pablo

Could the problem be on the Maria10 db?
It should support Msqli.

User avatar
Pablo
 
Posts: 19261
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: No data retrieved from mysql

Post by Pablo » Fri Jan 17, 2020 6:04 pm

I'm sorry, I am not familiar with Maria DB so I cannot help you with that.
However, the server should never send PHP code to the browser.

MGD4me
 
 
Posts: 139
Joined: Tue May 02, 2017 11:56 pm
Location: Canada

Re: No data retrieved from mysql

Post by MGD4me » Fri Jan 17, 2020 10:51 pm

After publishing the whole site to the Synology:
No errors, but no data

response is : \n";foreach($row as $cell) {echo "\n';} echo "\n";}?
Column1 Column2 Column3
".$cell."

What is wrong?
First... the above only shows part of the code necessary to get data from the database.

Immediately prior to the response above, does your SQL code include a statement with " SELECT * FROM Instructeurs", etc ??

I would suggest using a tool such as phpMyAdmin to determine if your 'Briefing' database even has data stored in the 'Instructeurs' table.

jjhoog8
 
 
Posts: 8
Joined: Sat Jan 11, 2020 4:04 pm

Re: No data retrieved from mysql

Post by jjhoog8 » Sun Jan 19, 2020 10:16 am

Hi

I use phpMyAdmin
The table is filled with 32 records
And in the code has the select statement

MGD4me
 
 
Posts: 139
Joined: Tue May 02, 2017 11:56 pm
Location: Canada

Re: No data retrieved from mysql

Post by MGD4me » Sun Jan 19, 2020 10:40 pm

I use phpMyAdmin
The table is filled with 32 records
And in the code has the select statement
Without seeing your actual code, it would be difficult for anyone to guess what the issue might be. You are seeking standard SQL support, which unfortunately has nothing to do with the WWB program itself, so support from this forum might be limited.

If you are writing your own code, you might try something like: https://www.w3schools.com/php/func_mysqli_query.asp

Or...

You could try the 'Dataviewer' extension, which will retrieve data for you by simply entering your credentials into the configuration. It comes with a PDF 'Help' document to guide through the process. It states:

Data Viewer can display data from CSV files, a MS Access database or MySQL tables.
The data will be displayed in a table which can be sorted and paginated by the user without the need to refresh the whole page!
The appearance of the table is very customizable and has several cool options like alternate row colors and sorted column highlighting.

jjhoog8
 
 
Posts: 8
Joined: Sat Jan 11, 2020 4:04 pm

Re: No data retrieved from mysql

Post by jjhoog8 » Fri Jan 24, 2020 11:46 am

Hi

Thanks for your reply
I have the data extension installed. But the same problem.
In between i found the problem
Mariadb is standard not allowed for remote connections
I have to change the my.cnf file of the mariadb on my Synology
I let you know after the change if the problem is solved

MGD4me
 
 
Posts: 139
Joined: Tue May 02, 2017 11:56 pm
Location: Canada

Re: No data retrieved from mysql

Post by MGD4me » Fri Jan 24, 2020 5:39 pm

Mariadb is standard not allowed for remote connections
That is a normal security practice. Thanks for letting us know that you got it working!!

jjhoog8
 
 
Posts: 8
Joined: Sat Jan 11, 2020 4:04 pm

Re: No data retrieved from mysql

Post by jjhoog8 » Sat Jan 25, 2020 4:05 pm

Hi
The wysywig builder has the paid extension tables installed. Not the demo version.
I use the dutch version of wysiwyg builder 15

The generated php code from the extension I paste it into a separate php file
It runs well directly in the browser. Localhost/test.php.
I get the records back. So the mariadb connection is working, the phpcode from the extension is working
Rest only 1 problem.
Publishing from Wysiwyg builder gives no records
Page extension on php
documenttype on HTML 5
The result is the complete page code.
When I save this code in a php file it runs correct in the browser. I get the records back

I looked into the map and see that wysiwyg writes a html file and not a php file
Regardless of the page setting extension on php
What do I wrong?
Or is it maybe a bug in the dutch version of wysiwyg?

I hope we can solve together this final problem.
Thanks in advance for all your help

User avatar
Pablo
 
Posts: 19261
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: No data retrieved from mysql

Post by Pablo » Sat Jan 25, 2020 4:23 pm

The dutch version is 100% the same as the English version. Only the selected language is different.

Maybe the configuration is wrorng?

Post Reply