Php script not showing errors but only redirects to homepage

I am making e-commerce site and add to basket script not doing anything I expect it to insert data into shopping basket from products page that is working perfectly fine. Please have a look and help me figure it out.. it is not giving any syntax error or parse error it just dont do anything and when I click buy it just redirect me to homepage

<?php error_reporting(E_ALL); session_start(); require("db.php"); require("functions.php"); $  validid = pf_validate_number($  _GET['id'], "redirect", $  config_basedir); $  prodsql = "SELECT * FROM products WHERE id = " . $  _GET['id'] . ";"; $  prodres = mysqli_query($  prodsql); $  numrows = mysqli_num_rows($  prodres); $  prodrow = mysqli_fetch_assoc($  prodres); if($  numrows == 0) {        header("Location: " . $  config_basedir); } else {   if($  _POST['submit'])   {     if($  _SESSION['SESS_ORDERNUM'])     {       $  itemsql = "INSERT INTO orderitems(order_id, product_id, quantity) VALUES("                  . $  _SESSION['SESS_ORDERNUM'] . ", "                  . $  _GET['id'] . ", "                  . $  _POST['amountBox'] . ")";       mysqli_query($  itemsql);     } else {       if($  _SESSION['SESS_LOGGEDIN'])       {         $  sql = "INSERT INTO orders(customer_id, registered, date) VALUES("                . $  _SESSION['SESS_USERID'] . ", 1, NOW())";         mysqli_query($  sql);         session_register("SESS_ORDERNUM");         $  _SESSION['SESS_ORDERNUM'] = mysqli_insert_id();         $  itemsql = "INSERT INTO orderitems(order_id, product_id, quantity) VALUES("                    . $  _SESSION['SESS_ORDERNUM']                    . ", " . $  _GET['id'] . ", "                    . $  _POST['amountBox'] . ")";         mysqli_query($  itemsql);       } else {         $  sql = "INSERT INTO orders(registered, date, session) VALUES("                . "0, NOW(), '" . session_id() . "')";         mysqli_query($  sql);         session_register("SESS_ORDERNUM");         $  _SESSION['SESS_ORDERNUM'] = mysqli_insert_id();         $  itemsql = "INSERT INTO orderitems(order_id, product_id, quantity) VALUES("                    . $  _SESSION['SESS_ORDERNUM'] . ", " . $  _GET['id'] . ", "                     . $  _POST['amountBox'] . ")";         mysqli_query($  itemsql);       }     }     $  totalprice = $  prodrow['price'] * $  _POST['amountBox'] ;     $  updsql = "UPDATE orders SET total = total + "               . $  totalprice . " WHERE id = "               . $  _SESSION['SESS_ORDERNUM'] . ";";     mysqli_query($  updres);     header("Location: " . $  config_basedir . "showcart.php");   } else {     require("header.php");     echo "<form action='addtobasket.php?id="          . $  _GET['id'] . "' method='POST'>";     echo "<table cellpadding='10'>";     echo "<tr>";     if(empty($  prodrow['image']))      {       echo "<td><img src='./productimages/dummy.jpg' width='50' alt='"            . $  prodrow['name'] . "'></td>";     } else {       echo "<td><img src='./productimages/" . $  prodrow['image']            . "' width='50' alt='" . $  prodrow['name']            . "'></td>";     }       echo "<td>" . $  prodrow['name'] . "</td>";       echo "<td>Select Quantity <select name='amountBox'>";       for($  i=1;$  i<=100;$  i++)       {         echo "<option>" . $  i . "</option>";       }       echo "</select></td>";       echo "<td><strong>&pound;"            . sprintf('%.2f', $  prodrow['price'])            . "</strong></td>";       echo "<td><input type='submit' name='submit' value='Add to basket'></td>";       echo "</tr>";       echo "</table>";       echo "</form>";    } } require("footer.php");  ?> 

Building webkit2-gtk with macports, errors sys/types not found

Trying to build webkit2 with macports, I get

:info:build /usr/bin/cc -c  -I/opt/local/include -fno-common -DPERL_DARWIN -mmacosx-version-min=10.14 -pipe -Os -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fno-strict-aliasing -fstack-protector-strong -I/opt/local/include -DPERL_USE_SAFE_PUTENV -m64 -O3   -DVERSION=\"1.85\" -DXS_VERSION=\"1.85\"  "-I/opt/local/lib/perl5/5.28/darwin-thread-multi-2level/CORE"   SSLeay.c :info:build clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk' [-Wmissing-sysroot] :info:build In file included from SSLeay.xs:141: :info:build /opt/local/lib/perl5/5.28/darwin-thread-multi-2level/CORE/perl.h:684:10:¡™ fatal error: 'sys/types.h' file not found  :info:build #include <sys/types.h> :info:build          ^~~~~~~~~~~~~  :info:build 1 error generated. :info:build make: *** [SSLeay.o] Error 1 

Is sys/types.h provided by netports, or a third party POSIX-compat package?

Why my add to cart button not working and responding some errors?

greeting of the day, i am new in drupal, i set up products which is look like this:

my simple product:

enter image description here

and every setting is correct i checked everywhere there no problem i am facing but once i click on add to cart button the error something like error showing showing you below i don’t know how can i solve this and also i don’t have deep knowledge in drupal 7:

enter image description here

error message after clicking on add to cart button:

can someone help or give me any hints me that how can i solve this errors? your any help must be appreciated.

Ubuntu 18.04.2 LTS problems after automatic suspend, vast file of errors on screen no functions

Hi to all I am new here and a novice Ubuntu user having escaped the clutches of Microsoft at last! I am getting a fairly regular issue with my system if left for a few hours after going into automatic suspend. I either have no functions available via keyboard or mouse or otherwise get a screen full of process information which I am unable to copy. Any help or suggestions gratefully received! N.B. I am really pleased with the setup other than this glitch, only way I can think of sharing the screen is to take picture and try to post it but it is not ideal as there are pages of info. Many thanks in advance.

Packer errors with qemu-system-aarch64

I have some success creating Vagrant base boxes with Packer for x86 and x86_64 guests, including VirtualBox, VMware, and qemu hypervisors. Now, I want to start making ARM guests with Packer and qemu, but I am not sure how to resolve the error that I am getting.

Configuration:

https://github.com/mcandre/packer-templates/tree/issue-153

Trace:

$   packer build debian-arm64.json ... qemu-system-aarch64 \ "-cdrom" \ "/home/andrew/go/src/github.com/mcandre/packer-templates/debian/packer_cache/2a6f0986fb423f739b50f89f0d4905752bcac8eb.iso" \ "-drive" \ "file=output-qemu/debian-arm64,if=virtio,cache=writeback,discard=ignore,format=qcow2" \ "-m" \ "1024" \ "-boot" \ "once=d" \ "-name" \ "debian-arm64" \ "-netdev" \ "user,id=user.0,hostfwd=tcp::2406-:22" \ "-device" \ "virtio-net,netdev=user.0" \ "-machine" \ "type=virt,accel=tcg" \ "-display" \ "sdl" \ "-vnc" \ "127.0.0.1:34" ... qemu-system-aarch64: no function defined to set boot device list for this architecture 

Any tips for resolving this error? Unfortunately, there aren’t too many ARM examples for Packer posted online quite yet.

Startup errors: Missing privilege separation directory: /var/run/sshd and network unreachable resolving

Getting a lot of error messages trying to fix my ubuntu server not having any internet. In the end, I found out it was due to the gateway pointing to wrong IP. Had to switch gateway to xxx.xxx.x.193 in /etc/network/interfaces

But prior to that, I was reading answer here and followed its commands to see if it would resolve my internet on server.

https://askubuntu.com/questions/767574/no-network-after-upgrade-to-16-04/767944#767944  $   sudo systemctl enable systemd-networkd $   sudo systemctl enable systemd-resolved $   sudo systemctl start systemd-resolved $   sudo rm /etc/resolv.conf $   sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf $   sudo vi /etc/systemd/network/20-dhcp.network 

After I did that and rebooted, got all sorts of error messages. I am thinking might be related to DHCP being set to auto. But not sure. Any suggestions on fix? Here’s errors I am getting in startup messages.

Mar 22 20:04:42 ubuntu sshd[1413]: Missing privilege separation directory: /var/run/sshd Mar 22 20:04:42 ubuntu systemd[1]: ssh.service: Control process exited, code=exited status=255 Mar 22 20:04:42 ubuntu systemd[1]: Failed to start OpenBSD Secure Shell server. Mar 22 20:04:42 ubuntu systemd[1]: ssh.service: Unit entered failed state. Mar 22 20:04:42 ubuntu systemd[1]: ssh.service: Failed with result 'exit-code'. Mar 22 20:04:42 ubuntu systemd[1]: ssh.service: Service hold-off time over, scheduling restart. Mar 22 20:04:42 ubuntu systemd[1]: Stopped OpenBSD Secure Shell server. Mar 22 20:04:42 ubuntu systemd[1]: Starting OpenBSD Secure Shell server... Mar 22 20:04:42 ubuntu sshd[1528]: Missing privilege separation directory: /var/run/sshd Mar 22 20:04:42 ubuntu systemd[1]: ssh.service: Control process exited, code=exited status=255 Mar 22 20:04:42 ubuntu systemd[1]: Failed to start OpenBSD Secure Shell server. Mar 22 20:04:42 ubuntu systemd[1]: ssh.service: Unit entered failed state. Mar 22 20:04:42 ubuntu systemd[1]: ssh.service: Failed with result 'exit-code'. Mar 22 20:04:42 ubuntu dovecot: master: Dovecot v2.2.22 (fe789d2) starting up for imap, pop3 (core dumps disabled) Mar 22 20:04:42 ubuntu systemd[1]: dovecot.service: PID file /var/run/dovecot/master.pid not readable (yet?) after start: No such file or directory Mar 22 20:04:42 ubuntu systemd[1]: Started Dovecot IMAP/POP3 email server. Mar 22 20:04:42 ubuntu systemd[1]: ssh.service: Service hold-off time over, scheduling restart. Mar 22 20:04:42 ubuntu systemd[1]: Stopped OpenBSD Secure Shell server. Mar 22 20:04:42 ubuntu systemd[1]: Starting OpenBSD Secure Shell server... Mar 22 20:04:42 ubuntu sshd[1533]: Missing privilege separation directory: /var/run/sshd Mar 22 20:04:42 ubuntu systemd[1]: ssh.service: Control process exited, code=exited status=255 Mar 22 20:04:42 ubuntu sshd[1533]: Missing privilege separation directory: /var/run/sshd Mar 22 20:04:42 ubuntu systemd[1]: ssh.service: Control process exited, code=exited status=255 Mar 22 20:04:42 ubuntu systemd[1]: Failed to start OpenBSD Secure Shell server. Mar 22 20:04:42 ubuntu systemd[1]: ssh.service: Unit entered failed state. Mar 22 20:04:42 ubuntu systemd[1]: ssh.service: Failed with result 'exit-code'. Mar 22 20:04:43 ubuntu systemd[1]: ssh.service: Service hold-off time over, scheduling restart. Mar 22 20:04:43 ubuntu systemd[1]: Stopped OpenBSD Secure Shell server. Mar 22 20:04:43 ubuntu systemd[1]: Starting OpenBSD Secure Shell server... Mar 22 20:04:43 ubuntu sshd[1537]: Missing privilege separation directory: /var/run/sshd Mar 22 20:04:43 ubuntu systemd[1]: ssh.service: Control process exited, code=exited status=255 Mar 22 20:04:43 ubuntu systemd[1]: Failed to start OpenBSD Secure Shell server. Mar 22 20:04:43 ubuntu systemd[1]: ssh.service: Unit entered failed state. Mar 22 20:04:43 ubuntu systemd[1]: ssh.service: Failed with result 'exit-code'. Mar 22 20:04:43 ubuntu systemd[1]: ssh.service: Service hold-off time over, scheduling restart. Mar 22 20:04:43 ubuntu systemd[1]: Stopped OpenBSD Secure Shell server. Mar 22 20:04:43 ubuntu systemd[1]: Starting OpenBSD Secure Shell server... Mar 22 20:04:43 ubuntu sshd[1541]: Missing privilege separation directory: /var/run/sshd Mar 22 20:04:43 ubuntu systemd[1]: ssh.service: Control process exited, code=exited status=255 Mar 22 20:04:43 ubuntu systemd[1]: Failed to start OpenBSD Secure Shell server. Mar 22 20:04:43 ubuntu systemd[1]: ssh.service: Unit entered failed state. Mar 22 20:04:43 ubuntu systemd[1]: ssh.service: Failed with result 'exit-code'. Mar 22 20:04:44 ubuntu systemd[1]: ssh.service: Service hold-off time over, scheduling restart. Mar 22 20:04:44 ubuntu systemd[1]: Stopped OpenBSD Secure Shell server. Mar 22 20:04:44 ubuntu systemd[1]: ssh.service: Service hold-off time over, scheduling restart. Mar 22 20:04:44 ubuntu systemd[1]: Stopped OpenBSD Secure Shell server. Mar 22 20:04:44 ubuntu systemd[1]: ssh.service: Start request repeated too quickly. Mar 22 20:04:44 ubuntu systemd[1]: Failed to start OpenBSD Secure Shell server. Mar 22 20:04:44 ubuntu systemd[1]: ssh.service: Unit entered failed state. Mar 22 20:04:44 ubuntu systemd[1]: ssh.service: Failed with result 'start-limit-hit'. Mar 22 20:04:45 ubuntu fail2ban-client[1415]: ERROR  Failed during configuration: While reading from '/etc/fail2ban/jail.local' [line 146]: option 'port' $   Mar 22 20:04:45 ubuntu named[1441]: using built-in root key for view _default Mar 22 20:04:45 ubuntu named[1441]: set up managed keys zone for view _default, file 'managed-keys.bind' Mar 22 20:04:45 ubuntu named[1441]: configuring command channel from '/etc/bind/rndc.key' Mar 22 20:04:45 ubuntu named[1441]: command channel listening on 127.0.0.1#953 Mar 22 20:04:45 ubuntu named[1441]: configuring command channel from '/etc/bind/rndc.key' Mar 22 20:04:45 ubuntu named[1441]: command channel listening on ::1#953 Mar 22 20:04:45 ubuntu named[1441]: the working directory is not writable Mar 22 20:04:45 ubuntu systemd[1]: fail2ban.service: Unit entered failed state. Mar 22 20:04:45 ubuntu systemd[1]: fail2ban.service: Failed with result 'exit-code'. Mar 22 20:04:45 ubuntu named[1441]: managed-keys-zone: journal file is out of date: removing journal file Mar 22 20:04:45 ubuntu named[1441]: unable to remove journal 'managed-keys.bind.jnl': 'Permission denied' Mar 22 20:04:45 ubuntu named[1441]: managed-keys-zone: loaded serial 5 Mar 22 20:04:45 ubuntu named[1441]: zone 0.in-addr.arpa/IN: loaded serial 1 Mar 22 20:04:45 ubuntu named[1441]: zone localhost/IN: loaded serial 2 Mar 22 20:04:45 ubuntu named[1441]: zone 127.in-addr.arpa/IN: loaded serial 1 Mar 22 20:04:45 ubuntu named[1441]: zone 255.in-addr.arpa/IN: loaded serial 1 Mar 22 20:04:45 ubuntu named[1441]: all zones loaded Mar 22 20:04:45 ubuntu named[1441]: running Mar 22 20:04:45 ubuntu named[1441]: network unreachable resolving './DNSKEY/IN': 2001:500:84::b#53 Mar 22 20:04:45 ubuntu named[1441]: network unreachable resolving './NS/IN': 2001:500:84::b#53 Mar 22 20:04:45 ubuntu named[1441]: network unreachable resolving './DNSKEY/IN': 2001:500:84::b#53 Mar 22 20:04:45 ubuntu named[1441]: network unreachable resolving './NS/IN': 2001:500:84::b#53 Mar 22 20:04:45 ubuntu named[1441]: network unreachable resolving 'G.ROOT-SERVERS.NET/AAAA/IN': 2001:503:ba3e::2:30#53 Mar 22 20:04:45 ubuntu named[1441]: network unreachable resolving './DNSKEY/IN': 2001:503:ba3e::2:30#53 Mar 22 20:04:45 ubuntu named[1441]: network unreachable resolving 'E.ROOT-SERVERS.NET/AAAA/IN': 2001:503:ba3e::2:30#53 Mar 22 20:04:45 ubuntu named[1441]: network unreachable resolving './NS/IN': 2001:503:ba3e::2:30#53 Mar 22 20:04:45 ubuntu systemd[1]: fail2ban.service: Service hold-off time over, scheduling restart. Mar 22 20:04:45 ubuntu systemd[1]: Stopped Fail2Ban Service. Mar 22 20:04:45 ubuntu systemd[1]: Starting Fail2Ban Service... Mar 22 20:04:45 ubuntu fail2ban-client[1551]: ERROR  Failed during configuration: While reading from '/etc/fail2ban/jail.local' [line 146]: option 'port' $   Mar 22 20:04:45 ubuntu systemd[1]: fail2ban.service: Control process exited, code=exited status=255 Mar 22 20:04:45 ubuntu systemd[1]: Failed to start Fail2Ban Service. Mar 22 20:04:45 ubuntu kernel: [   23.839071] audit: type=1400 audit(1553310285.596:10): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" nam$   Mar 22 20:04:45 ubuntu systemd[1]: fail2ban.service: Unit entered failed state. Mar 22 20:04:45 ubuntu systemd[1]: fail2ban.service: Failed with result 'exit-code'. Mar 22 20:04:45 ubuntu systemd[1]: fail2ban.service: Service hold-off time over, scheduling restart. Mar 22 20:04:45 ubuntu systemd[1]: Stopped Fail2Ban Service. Mar 22 20:04:45 ubuntu systemd[1]: Starting Fail2Ban Service... Mar 22 20:04:46 ubuntu systemd[1]: Started A high performance web server and a reverse proxy server. Mar 22 20:04:46 ubuntu named[1441]: network unreachable resolving 'G.ROOT-SERVERS.NET/AAAA/IN': 2001:dc3::35#53 Mar 22 20:04:46 ubuntu fail2ban-client[1559]: ERROR  Failed during configuration: While reading from '/etc/fail2ban/jail.local' [line 146]: option 'port' $   Mar 22 20:04:46 ubuntu systemd[1]: fail2ban.service: Control process exited, code=exited status=255 Mar 22 20:04:46 ubuntu systemd[1]: Failed to start Fail2Ban Service. Mar 22 20:04:46 ubuntu systemd[1]: fail2ban.service: Control process exited, code=exited status=255 Mar 22 20:04:46 ubuntu systemd[1]: Failed to start Fail2Ban Service. Mar 22 20:04:46 ubuntu systemd[1]: fail2ban.service: Unit entered failed state. Mar 22 20:04:46 ubuntu systemd[1]: fail2ban.service: Failed with result 'exit-code'. Mar 22 20:04:46 ubuntu php-fpm7.2[1435]: [22-Mar-2019 20:04:46] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library 'php_com_do$   Mar 22 20:04:46 ubuntu systemd[1]: fail2ban.service: Service hold-off time over, scheduling restart. Mar 22 20:04:46 ubuntu systemd[1]: Stopped Fail2Ban Service. Mar 22 20:04:46 ubuntu systemd[1]: Starting Fail2Ban Service... Mar 22 20:04:46 ubuntu mysql[1446]:  * Starting MySQL (Percona Server) database server mysqld Mar 22 20:04:46 ubuntu fail2ban-client[1569]: ERROR  Failed during configuration: While reading from '/etc/fail2ban/jail.local' [line 146]: option 'port' $   Mar 22 20:04:46 ubuntu systemd[1]: fail2ban.service: Control process exited, code=exited status=255 Mar 22 20:04:46 ubuntu systemd[1]: Failed to start Fail2Ban Service. Mar 22 20:04:46 ubuntu systemd[1]: fail2ban.service: Unit entered failed state. Mar 22 20:04:46 ubuntu systemd[1]: fail2ban.service: Failed with result 'exit-code'. Mar 22 20:04:46 ubuntu kernel: [   24.800151] audit: type=1400 audit(1553310286.560:11): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" nam$   Mar 22 20:04:46 ubuntu systemd[1]: fail2ban.service: Service hold-off time over, scheduling restart. Mar 22 20:04:46 ubuntu systemd[1]: Stopped Fail2Ban Service. Mar 22 20:04:46 ubuntu systemd[1]: Starting Fail2Ban Service... Mar 22 20:04:46 ubuntu fail2ban-client[1880]: ERROR  Failed during configuration: While reading from '/etc/fail2ban/jail.local' [line 146]: option 'port' $   Mar 22 20:04:46 ubuntu systemd[1]: fail2ban.service: Control process exited, code=exited status=255 Mar 22 20:04:46 ubuntu systemd[1]: Failed to start Fail2Ban Service. Mar 22 20:04:46 ubuntu systemd[1]: fail2ban.service: Unit entered failed state. Mar 22 20:04:46 ubuntu systemd[1]: fail2ban.service: Failed with result 'exit-code'. Mar 22 20:04:46 ubuntu systemd[1]: fail2ban.service: Unit entered failed state. Mar 22 20:04:46 ubuntu systemd[1]: fail2ban.service: Failed with result 'exit-code'. Mar 22 20:04:47 ubuntu kernel: [   25.398516] audit: type=1400 audit(1553310287.156:12): apparmor="DENIED" operation="open" profile="/usr/sbin/mysqld" nam$   Mar 22 20:04:47 ubuntu systemd[1]: fail2ban.service: Service hold-off time over, scheduling restart. Mar 22 20:04:47 ubuntu systemd[1]: Stopped Fail2Ban Service. Mar 22 20:04:47 ubuntu systemd[1]: fail2ban.service: Start request repeated too quickly. Mar 22 20:04:47 ubuntu systemd[1]: Failed to start Fail2Ban Service. Mar 22 20:04:47 ubuntu systemd[1]: fail2ban.service: Unit entered failed state. Mar 22 20:04:47 ubuntu systemd[1]: fail2ban.service: Failed with result 'start-limit-hit'. 

How to avoid std::filesystem linker errors with Qt?

I would like to use the std::filesystem with Qt 5.12.0 with the g++ version Ubuntu 8.2.0-7ubuntu1, but getting linker errors:

g++ -lstdc++fs -Wl,-rpath,/home/user/Qt/5.12.0/gcc_64/lib -o qf_filesystem_test main.o   -L/home/user/Qt/5.12.0/gcc_64/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread    /usr/bin/ld: main.o: in function `std::filesystem::exists(std::filesystem::__cxx11::path const&)': /usr/include/c++/8/bits/fs_ops.h:121: undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)' /usr/bin/ld: main.o: in function `std::filesystem::__cxx11::path::path<char*, std::filesystem::__cxx11::path>(char* const&, std::filesystem::__cxx11::path::format)': /usr/include/c++/8/bits/fs_path.h:183: undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()' collect2: error: ld returned 1 exit status make: *** [Makefile:257: qf_filesystem_test] Error 1 22:12:16: The process "/usr/bin/make" exited with code 2. Error while building/deploying project qf_filesystem_test (kit: Desktop Qt 5.12.0 GCC 64bit) When executing step "Make" 

After some googling, I found that I need to use the linker flag -lstdc++fs. My code builds perfectly with the command g++ main.cpp -std=c++17 -lstdc++fs, but I can’t seem to make it work inside Qt Creator. My simple test code is the following:

#include <iostream> #include <filesystem>  int main(int argc, char *argv[]) {     if(1 < argc)     {         std::cout << argv[1] << " does ";         if(!std::filesystem::exists(std::filesystem::path(argv[1]))) std::cout << "not ";         std::cout << "exist!" << std::endl;     }      return 0; } 

My .pro file looks like this:

QT       += core gui  greaterThan(QT_MAJOR_VERSION, 4): QT += widgets  TARGET = qf_filesystem_test TEMPLATE = app  DEFINES += QT_DEPRECATED_WARNINGS  CONFIG += c++17 QMAKE_LFLAGS += -lstdc++fs  SOURCES += main.cpp 

After some tests with g++ It seems to me, that the problem is caused by the order of the g++ flags, because Qt puts the -lstdc++fs to the front.

  • Why do I need to still use this flag? I thought that g++8 already supports C++17 and this flag is only needed if I want to use the std::experimental::filesystem.
  • How could I make my code build in Qt Creator?

i’m trying to update Kernal version manually and after 2hour got these errors at the end. And now i’m feeling like at deadend

make[5]: * [drivers/net/ethernet/mellanox/mlx5/core/en_rep.o] Error 1 scripts/Makefile.build:544: recipe for target ‘drivers/net/ethernet/mellanox/mlx5/core’ failed make[4]: [drivers/net/ethernet/mellanox/mlx5/core] Error 2 scripts/Makefile.build:544: recipe for target ‘drivers/net/ethernet/mellanox’ failed make[3]: [drivers/net/ethernet/mellanox] Error 2 make[3]: Waiting for unfinished jobs…. CC [M] drivers/net/vmxnet3/vmxnet3_drv.o scripts/Makefile.build:544: recipe for target ‘drivers/net/ethernet’ failed make[2]: [drivers/net/ethernet] Error 2 make[2]: Waiting for unfinished jobs…. CC [M] drivers/net/vmxnet3/vmxnet3_ethtool.o AR drivers/ptp/built-in.a CC [M] drivers/ptp/ptp_clock.o CC [M] drivers/ptp/ptp_chardev.o LD [M] drivers/net/vmxnet3/vmxnet3.o scripts/Makefile.build:544: recipe for target ‘drivers/net’ failed make[1]: [drivers/net] Error 2 make[1]: * Waiting for unfinished jobs…. CC [M] drivers/ptp/ptp_sysfs.o CC [M] drivers/ptp/ptp_pch.o CC [M] drivers/ptp/ptp_kvm.o LD [M] drivers/ptp/ptp.o Makefile:1047: recipe for target ‘drivers’ failed make: *** [drivers] Error 2

Cache and deadlock related database errors

We have a module that performs fairly complex operations underneath the hood. Sometimes the processes exit with database related errors, since there are no exceptions thrown by Drupal core we can’t catch them and the operation gets hosed. Here are few example logs

Cache issue

Drupal\Core\Database\IntegrityConstraintViolationException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘foldershare_scheduledtask:228’ for key ‘PRIMARY’: INSERT INTO {cachetags} (invalidations, tag) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => foldershare_scheduledtask:228 ) in Drupal\Core\Database\Connection->handleQueryException() (line 683 of /var/www/html/core/lib/Drupal/Core/Database/Connection.php).

Deadlock issue

Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction: INSERT INTO {cache_config} (cid, expire, created, tags, checksum, data, serialized) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6) ON DUPLICATE KEY UPDATE cid = VALUES(cid), expire = VALUES(expire), created = VALUES(created), tags = VALUES(tags), checksum = VALUES(checksum), data = VALUES(data), serialized = VALUES(serialized); Array ( [:db_insert_placeholder_0] => last_write_timestamp_cache_config [:db_insert_placeholder_1] => -1 [:db_insert_placeholder_2] => 1553130698.381 [:db_insert_placeholder_3] => [:db_insert_placeholder_4] => 0 [:db_insert_placeholder_5] => d:1553130698.382; [:db_insert_placeholder_6] => 1 ) in Drupal\Core\Cache\ChainedFastBackend->markAsOutdated() (line 306 of /var/www/html/core/lib/Drupal/Core/Cache/ChainedFastBackend.php).

We can see these issues on develop sites with sqlite database and also on test sites with mysql database.

Any ideas on how to deal with these, without disabling entity cache entirely.

Errors when the product price is not the same as default country

On Drupal commerce 2 (Drupal 8), the default country for the site is Canada. But I have multiple currencies enabled. When the price for a product is entered as US dollars, after completing the payment process in a cart, the following message shows:

The website encountered an unexpected error. Please try again later.Drupal\Core\Entity\EntityStorageException:  in Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() (line 783 of core\lib\Drupal\Core\Entity\Sql\SqlContentEntityStorage.php). Drupal\commerce_price\Price->add(Object) (Line: 44) Drupal\commerce_payment\PaymentOrderManager->updateTotalPaid(Object) (Line: 323) Drupal\commerce_payment\Entity\Payment->postSave(Object, ) (Line: 506) Drupal\Core\Entity\EntityStorageBase->doPostSave(Object, ) (Line: 658) Drupal\Core\Entity\ContentEntityStorageBase->doPostSave(Object, ) (Line: 432) Drupal\Core\Entity\EntityStorageBase->save(Object) (Line: 774) Drupal\Core\Entity\Sql\SqlContentEntityStorage->save(Object) (Line: 390) Drupal\Core\Entity\Entity->save() (Line: 113) Drupal\commerce_payment_example\Plugin\Commerce\PaymentGateway\Onsite->createPayment(Object, 1) (Line: 173) Drupal\commerce_payment\Plugin\Commerce\CheckoutPane\PaymentProcess->buildPaneForm(Array, Object, Array) (Line: 558) Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow\CheckoutFlowWithPanesBase->buildForm(Array, Object, 'payment') call_user_func_array(Array, Array) (Line: 518) Drupal\Core\Form\FormBuilder->retrieveForm('commerce_checkout_flow_multistep_default', Object) (Line: 275) Drupal\Core\Form\FormBuilder->buildForm('commerce_checkout_flow_multistep_default', Object) (Line: 216) Drupal\Core\Form\FormBuilder->getForm(Object, 'payment') (Line: 94) Drupal\commerce_checkout\Controller\CheckoutController->formPage(Object) call_user_func_array(Array, Array) (Line: 123) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 582) Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 151) Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68) Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57) Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47) Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99) Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78) Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47) Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52) Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23) Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 693) Drupal\Core\DrupalKernel->handle(Object) (Line: 19) 

For testing purpose, I set up one payment gateway as Example(on-site) in test mode. I thought commerce 2 is able to handle multiple currencies out of the box. or are there any other modules or settings in order to handle multiple currencies on the same site? I also tried to create a store with default currency as USD, then order a product from this store but got the same error.