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.
Post Reply
jjhoog8
 
 
Posts: 8
Joined: Sat Jan 11, 2020 4:04 pm

No data retrieved from mysql

Post by jjhoog8 »

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: 21574
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: No data retrieved from mysql

Post by Pablo »

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 »

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: 21574
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: No data retrieved from mysql

Post by Pablo »

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 »

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: 21574
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: No data retrieved from mysql

Post by Pablo »

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 »

Hi Pablo

Could the problem be on the Maria10 db?
It should support Msqli.
User avatar
Pablo
 
Posts: 21574
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: No data retrieved from mysql

Post by Pablo »

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: 287
Joined: Tue May 02, 2017 11:56 pm
Location: British Columbia, Canada

Re: No data retrieved from mysql

Post by MGD4me »

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 »

Hi

I use phpMyAdmin
The table is filled with 32 records
And in the code has the select statement
MGD4me
 
 
Posts: 287
Joined: Tue May 02, 2017 11:56 pm
Location: British Columbia, Canada

Re: No data retrieved from mysql

Post by MGD4me »

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 »

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: 287
Joined: Tue May 02, 2017 11:56 pm
Location: British Columbia, Canada

Re: No data retrieved from mysql

Post by MGD4me »

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 »

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: 21574
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: No data retrieved from mysql

Post by Pablo »

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

Maybe the configuration is wrorng?
jjhoog8
 
 
Posts: 8
Joined: Sat Jan 11, 2020 4:04 pm

Re: No data retrieved from mysql

Post by jjhoog8 »

Hi Pablo

Thanks for your answer
Where do i have to look for the configuration?
Ni idea where to look
User avatar
Pablo
 
Posts: 21574
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: No data retrieved from mysql

Post by Pablo »

In the page properties.
Post Reply