Jump to content

Jagboy

Members
  • Posts

    10
  • Joined

  • Last visited

Everything posted by Jagboy

  1. Thank you so much! I'm sure I can sort out the sql problem. I never would have figured out the localhost thing, without you pointing me in the right direction. What really surprises me is I had none of these problems when I set this all up on the Rapsberry Pi. I just installed the software, did some very simple configuration, and it all just worked perfectly.
  2. This looks like progress! Changing the host to 127.0.0.1 I get: Fatal error: Uncaught mysqli_sql_exception: Can't read dir of './qdtimerdata/' (errno: 13 "Permission denied") in /root/NewEvent.php:33 Stack trace: #0 /root/NewEvent.php(33): mysqli->query('SHOW TABLES;') #1 {main} thrown in /root/NewEvent.php on line 33 I assume this is a permissions problem in SQL?
  3. See below files and screen shot . CommonDefs gets included into NewEvent. The first executable line in NewEvent is a call to connect in CommonDefs, which tries to create the mysqli object, which fails. Though now it is giving a different message (I don't know why?), the error is still at the same point in the code - the call to the mysqli constructor. CommonDefs.php.txt NewEvent.php.txt
  4. Yes, when it is installed, phpinfo() shows it is installed.
  5. php-cli -m | grep mysqli prints "mysqli". php-cgi does the same. I see nothing obvious in php.ini to enable php. The error message shows it does have the correct path for the mysqli library file. Numerous searches have reinforced my impresstion that simply installing the module should enable it, without changing anything in the ini file.
  6. RPi-3B is the RaspberryPi v3B board. On that version of this system, the OS is Debian Linux, while the new system (a NanoPi R5C) is running OpenWRT (another Linux variant). As I said, I truly hope I am simply doing someting stupid here. On the RPI3, I installed only the apache2 package, and the php-mbstring software package, and it just worked, as if by magic. I am not familiar wiith PDO. How different is it? I can re-write for PDO if I absolutely must. I did try running the script through the web server, rather than php-cli, but got the same result.
  7. This is far from my area of expertise, so I may be completely misunderstanding things. My understanding is that mysqlnd is, effectively, a replacement for mysqli, which is basically API-compatible, so the same PHP script should run with either. Is my understandingn wrong? On the RPi-3B, which I was using until recently, I used mysqli and had no problems. Anyway, whether I install mysqli alone, without mysqlnd, or install my mysqlnd alone, without mysqli, when I run my PHP script using php-cli, I get: "Fatal error: Uncaught Error: Class "mysqli" not found...". I would be thrilled to find out I am just an idiot, and doing something stupid. That would be the best solution!
  8. When I run your code snippet, it says "Enable Mysqli support in your PHP installation". HOW do I "enable Mysqli"??
  9. phpinfo() says mysqlnd in installed, and when I install msqli I get a similar display. AFAICT, there is nothing to do to "enable" it. If it's installed, it's enabled. Is there something I don't know (HIGHLY likely!!)?
  10. I'm trying to get PHP8 to play nice with SQL, but only get the above error, when trying to create the mysqli object. All the code has been working fine for years on a Rapsberry Pi, but I've recently had to move to a NanoPi-R5C. PHP and SQL both work fine. phpinfo() says mysqli is installed, and it shows the correct library path and filename. I've also tried mysqlnd with the same result. I cannot figure out why it does not work. Any ideas? I've been stuck on this all day...
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.