CMS Error in content.php
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/cms_tools.html
A lot of information about the Content Manager System can be found in the help/manual. Please read this first before posting any questions! Also check out the demo template that is include with the software.
CMS trouble shooting / FAQ:
viewtopic.php?f=10&t=43245
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/cms_tools.html
A lot of information about the Content Manager System can be found in the help/manual. Please read this first before posting any questions! Also check out the demo template that is include with the software.
CMS trouble shooting / FAQ:
viewtopic.php?f=10&t=43245
CMS Error in content.php
I get the following error:
PHP Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in ...
I have created the 3 tables manually in the MySQL application that I'm using and confirmed they were created successfully.
The error occurs on this line:
while ($data = mysqli_fetch_array($result))
Suggestions?
PHP Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given in ...
I have created the 3 tables manually in the MySQL application that I'm using and confirmed they were created successfully.
The error occurs on this line:
while ($data = mysqli_fetch_array($result))
Suggestions?
Re: CMS Error in content.php
There may be an error in the table structure.
Re: CMS Error in content.php
I copied the create scripts from the help page. Do they need to get updated?
CREATE TABLE `CMS_PAGES` (
`id` int(10) unsigned NOT NULL auto_increment,
`category_id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`content` text NOT NULL,
`home` tinyint(1) NOT NULL default '0',
`visible` tinyint(1) NOT NULL,
`create_date` timestamp NOT NULL,
`created_by` varchar(255) NOT NULL,
`last_update_date` timestamp NOT NULL default '0000-00-00 00:00:00',
`last_update_by` varchar(255) NOT NULL,
`views` int(11) NOT NULL,
`menu_index` smallint(4) NOT NULL,
`url` varchar(255) NULL,
`extra_data` varchar(255) NULL,
`title` VARCHAR(100),
`description` VARCHAR(255),
`keywords` VARCHAR(255),
`seo_friendly_url` VARCHAR(100),
PRIMARY KEY (`id`));
CREATE TABLE `CMS_SEARCH_WORDMATCH` (
`page_id` int(10) unsigned NOT NULL,
`word_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`page_id`,`word_id`));
CREATE TABLE `CMS_SEARCH_WORDS` (
`id` int(10) unsigned NOT NULL auto_increment,
`word` varchar(50) NOT NULL,
PRIMARY KEY (`id`)) ;
CREATE TABLE `CMS_PAGES` (
`id` int(10) unsigned NOT NULL auto_increment,
`category_id` int(11) NOT NULL,
`name` varchar(255) NOT NULL,
`content` text NOT NULL,
`home` tinyint(1) NOT NULL default '0',
`visible` tinyint(1) NOT NULL,
`create_date` timestamp NOT NULL,
`created_by` varchar(255) NOT NULL,
`last_update_date` timestamp NOT NULL default '0000-00-00 00:00:00',
`last_update_by` varchar(255) NOT NULL,
`views` int(11) NOT NULL,
`menu_index` smallint(4) NOT NULL,
`url` varchar(255) NULL,
`extra_data` varchar(255) NULL,
`title` VARCHAR(100),
`description` VARCHAR(255),
`keywords` VARCHAR(255),
`seo_friendly_url` VARCHAR(100),
PRIMARY KEY (`id`));
CREATE TABLE `CMS_SEARCH_WORDMATCH` (
`page_id` int(10) unsigned NOT NULL,
`word_id` int(10) unsigned NOT NULL,
PRIMARY KEY (`page_id`,`word_id`));
CREATE TABLE `CMS_SEARCH_WORDS` (
`id` int(10) unsigned NOT NULL auto_increment,
`word` varchar(50) NOT NULL,
PRIMARY KEY (`id`)) ;
Re: CMS Error in content.php
The table structure is ok.
But did you use the correct MySQL settings?
But did you use the correct MySQL settings?
Re: CMS Error in content.php
Pablo I found the problem causing the error:
$sql = "SELECT id, parent_id, name, url FROM " . $mysql_table . "PAGES WHERE visible = 1 ORDER BY menu_index ASC";
There was no "parent_id" column in the table, created from the SQL as I listed it above.
When I added the column manually in the table it removed the error.
But now when I click on "Administrator" I cant add any records.
Is there something else that has to be done?
$sql = "SELECT id, parent_id, name, url FROM " . $mysql_table . "PAGES WHERE visible = 1 ORDER BY menu_index ASC";
There was no "parent_id" column in the table, created from the SQL as I listed it above.
When I added the column manually in the table it removed the error.
But now when I click on "Administrator" I cant add any records.
Is there something else that has to be done?
Re: CMS Error in content.php
Is there another error?
Re: CMS Error in content.php
No other error it just shows:
The CMS Admin object allows you to add, edit or remove pages online.
And nothing else.
The CMS Admin object allows you to add, edit or remove pages online.
And nothing else.
Re: CMS Error in content.php
What happens if you add a page?
Are there any error in the server log?
Are there any error in the server log?
Re: CMS Error in content.php
I added a page and re-published the site. No change.
No errors on server log.
No errors on server log.
Re: CMS Error in content.php
By the way here is the web server configuration:
Web server
Microsoft-IIS/10.0
Database client version: libmysql - mysqlnd 5.0.12-dev - 20150407 - $Id: 3591daad22de08524295e1bd073aceeff11e6579 $
PHP extension: mysqli Documentation curl Documentation mbstring Documentation
PHP version: 7.2.26
Web server
Microsoft-IIS/10.0
Database client version: libmysql - mysqlnd 5.0.12-dev - 20150407 - $Id: 3591daad22de08524295e1bd073aceeff11e6579 $
PHP extension: mysqli Documentation curl Documentation mbstring Documentation
PHP version: 7.2.26
Re: CMS Error in content.php
Did you enable PHP error reporting on the server?
If it does not work then there should be at least be a message about by it fails.
If it does not work then there should be at least be a message about by it fails.
Re: CMS Error in content.php
I'm using a hosting service and I don't see anywhere where you can capture PHP errors.
However I created my own error handler:
-------------------------------------------------
//error handler function
function customError($errno, $errstr) {
echo "<b>Error:</b> [$errno] $errstr";
}
//set error handler
set_error_handler("customError");
-------------------------------------------------
No errors reported. I created a copy of the page and forced an error, which the handler did pick up.
So I'm pretty sure there were no MySQL or PHP errors. In any case there is a lot of error checking in the script.
Is there a working sample of the demo so I can see what the screens look like when it is working correctly?
However I created my own error handler:
-------------------------------------------------
//error handler function
function customError($errno, $errstr) {
echo "<b>Error:</b> [$errno] $errstr";
}
//set error handler
set_error_handler("customError");
-------------------------------------------------
No errors reported. I created a copy of the page and forced an error, which the handler did pick up.
So I'm pretty sure there were no MySQL or PHP errors. In any case there is a lot of error checking in the script.
Is there a working sample of the demo so I can see what the screens look like when it is working correctly?
Re: CMS Error in content.php
Pablo I found the problem. I had PHP set to 7 on the content page but not on the admin page.
Sorry for the run around I should have checked that right off the bat.
Sorry for the run around I should have checked that right off the bat.
Re: CMS Error in content.php
Next problem: I added a new page and clicked "Save" but the new page was not created. I added write permissions on the folder.
Should the name field have an extension, i.e. "test.htm"?
What is the format for the External URL field?
Should the Owner field be the name of the site admin?
Should the name field have an extension, i.e. "test.htm"?
What is the format for the External URL field?
Should the Owner field be the name of the site admin?
Re: CMS Error in content.php
Pages are not saved to a folder. The content is are stored in the database. All content is accessed from one page (with a CMS view).
Here is a related tutorial:
http://wysiwygwebbuilder.com/cms_tools.html
Here is a related tutorial:
http://wysiwygwebbuilder.com/cms_tools.html
Re: CMS Error in content.php
OK thanks..got it working.