Web based family history software

Question Running webtrees onlocalhost

  • impartit
  • Topic Author
  • Offline
  • New Member
  • New Member
More
11 months 8 hours ago #1 by impartit
Running webtrees onlocalhost was created by impartit
webtrees runs perfectly well on my Hosting at IONOS

I have
 
  1. installed xamp
  2. started 'Apache' and 'MySQ'L in xamp
  3. installed 'webtrees' in htdocs
  4. dumped my hosted database as sql
  5. in xamp I have imported the dumped sql file with 'phpmyadmin'
  6. created a view file 'webtrees' with:

CREATE ALGORITHM=UNDEFINED DEFINER=`ROOT`@`%` SQL SECURITY DEFINER VIEW `webtrees` AS
SELECT
    `wt_individuals`.`i_id` AS `i_id`,
    `wt_individuals`.`i_file` AS `i_file`,
    `wt_individuals`.`i_rin` AS `i_rin`,
    `wt_individuals`.`i_sex` AS `i_sex`,
    `wt_individuals`.`i_gedcom` AS `i_gedcom`
FROM
    `wt_individuals`
WHERE
    1
ORDER BY
    `wt_individuals`.`i_gedcom` ASC;
BUT !!
URL localhost/webtrees give the following errors (I have attached just the top portion only here)

PDOException: SQLSTATE[HY000]: General error: 1364 Field 'log_id' doesn't have a default value in C:\xampp\htdocs\webtrees\vendor\illuminate\database\Connection.php:501
Stack trace:
#0 C:\xampp\htdocs\webtrees\vendor\illuminate\database\Connection.php(501): PDOStatement->execute()
#1 C:\xampp\htdocs\webtrees\vendor\illuminate\database\Connection.php(705): Illuminate\Database\Connection->Illuminate\Database\{closure}('insert into `wt...', Array)
#2 C:\xampp\htdocs\webtrees\vendor\illuminate\database\Connection.php(672): Illuminate\Database\Connection->runQueryCallback('insert into `wt...', Array, Object(Closure))
#3 C:\xampp\htdocs\webtrees\vendor\illuminate\database\Connection.php(490): Illuminate\Database\Connection->run('insert into `wt...', Array, Object(Closure))
#4 C:\xampp\htdocs\webtrees\vendor\illuminate\database\Connection.php(454): Illuminate\Database\Connection->statement('insert into `wt...', Array)
#5 C:\xampp\htdocs\webtrees\vendor\illuminate\database\Query\Builder.php(2978): Illuminate\Database\Connection->insert('insert into `wt...', Array)
#6 C:\xampp\htdocs\webtrees\app\Log.php(72): Illuminate\Database\Query\Builder->insert(Array)

I have checked for any nulls in tables of the above view the view and none have nulls in any field.

OS is Windows 11
Two whole days wasted in attemptiing a fix. Can anyone help me please""

Please Log in or Create an account to join the conversation.

More
11 months 8 hours ago #2 by fisharebest
Replied by fisharebest on topic Running webtrees onlocalhost
What is the result of this SQL statement?

SHOW CREATE TABLE wt_log;

What version of MySQL?

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

More
11 months 3 hours ago #3 by fisharebest
Replied by fisharebest on topic Running webtrees onlocalhost

CREATE TABLE `wt_log` ( `log_id` int(11) NOT NULL, `log_time` timestamp NOT NULL DEFAULT current_timestamp(), `log_type` enum('auth','config','debug','edit','error','media','search') NOT NULL, `log_message` longtext NOT NULL, `ip_address` varchar(45) NOT NULL, `user_id` int(11) DEFAULT NULL, `gedcom_id` int(11) DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci


The `log_id` column is missing the "autoincrement" attribute.

This SQL statement should add it for you.

alter table wt_log change log_id log_id int not null auto_increment;

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum