Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #268511 > unrolled thread
| Started by | Bernard <bdebreil@free.fr> |
|---|---|
| First post | 2024-03-24 20:00 +0100 |
| Last post | 2024-03-26 17:00 +0100 |
| Articles | 15 — 7 participants |
Back to article view | Back to linux.debian.user
Debian 11 PHP 7.4 – Mysql 8 - Can’t get Mysqli_connect to work Bernard <bdebreil@free.fr> - 2024-03-24 20:00 +0100
Re: Debian 11 PHP 7.4 – Mysql 8 - Can’t get Mysqli_connect to work Marco Moock <mm@dorfdsl.de> - 2024-03-24 20:10 +0100
Re: Debian 11 PHP 7.4 – Mysql 8 - Can’t get Mysqli_connect to work Bernard <bdebreil@free.fr> - 2024-03-26 10:40 +0100
Re: Debian 11 PHP 7.4 – Mysql 8 - Can’t get Mysqli_connect to work Marco Moock <mm@dorfdsl.de> - 2024-03-26 15:10 +0100
Re: Debian 11 PHP 7.4 – Mysql 8 - Can’t get Mysqli_connect to work Jeffrey Walton <noloader@gmail.com> - 2024-03-26 18:30 +0100
Re: Debian 11 PHP 7.4 – Mysql 8 - Can’t get Mysqli_connect to work Geert Stappers <stappers@stappers.nl> - 2024-03-24 21:30 +0100
Re: Debian 11 PHP 7.4 – Mysql 8 - Can’t get Mysqli_connect to work Jeffrey Walton <noloader@gmail.com> - 2024-03-24 23:10 +0100
Re: Debian 11 PHP 7.4 – Mysql 8 - Can’t get Mysqli_connect to work Bernard <bdebreil@free.fr> - 2024-03-26 10:40 +0100
Re: Debian 11 PHP 7.4 – Mysql 8 - Can’t get Mysqli_connect to work Bernard <bdebreil@free.fr> - 2024-03-28 10:40 +0100
Re: Debian 11 PHP 7.4 – Mysql 8 - Can’t get Mysqli_connect to work Greg Wooledge <greg@wooledge.org> - 2024-03-28 12:10 +0100
Re: Debian 11 PHP 7.4 – Mysql 8 - Can’t get Mysqli_connect to work Bernard <bdebreil@free.fr> - 2024-03-29 11:50 +0100
Re: Debian 11 PHP 7.4 – Mysql 8 - Can’t get Mysqli_connect to work Greg Wooledge <greg@wooledge.org> - 2024-03-29 12:10 +0100
Re: Debian 11 PHP 7.4 – Mysql 8 - Can’t get Mysqli_connect to work Bernard <bdebreil@free.fr> - 2024-03-26 11:10 +0100
Re: Debian 11 PHP 7.4 – Mysql 8 - Can’t get Mysqli_connect to work Cindy Sue Causey <butterflybytes@gmail.com> - 2024-03-26 14:50 +0100
Re: Debian 11 PHP 7.4 – Mysql 8 - Can’t get Mysqli_connect to work David Wright <deblis@lionunicorn.co.uk> - 2024-03-26 17:00 +0100
| From | Bernard <bdebreil@free.fr> |
|---|---|
| Date | 2024-03-24 20:00 +0100 |
| Subject | Debian 11 PHP 7.4 – Mysql 8 - Can’t get Mysqli_connect to work |
| Message-ID | <IlBex-1pmd-7@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
Hi to Everyone ! *PHP Warning: PHP Startup: Unable to load dynamic library '//usr/lib/php/20190902/mysqli.so' * *However, the file is there... not human readable as expected* *and mysqli_connect doesn't operate.* *Thanks in advance for your help* *Bernard*
[toc] | [next] | [standalone]
| From | Marco Moock <mm@dorfdsl.de> |
|---|---|
| Date | 2024-03-24 20:10 +0100 |
| Message-ID | <IlBod-1pER-5@gated-at.bofh.it> |
| In reply to | #268511 |
Am Sun, 24 Mar 2024 19:51:05 +0100 schrieb Bernard <bdebreil@free.fr>: > '//usr/lib/php/20190902/mysqli.so' Is that really the path in the message? The 2 // must not be there.
[toc] | [prev] | [next] | [standalone]
| From | Bernard <bdebreil@free.fr> |
|---|---|
| Date | 2024-03-26 10:40 +0100 |
| Message-ID | <ImbrI-1Mtn-29@gated-at.bofh.it> |
| In reply to | #268512 |
On 24/03/2024 20:02, Marco Moock wrote: > Am Sun, 24 Mar 2024 19:51:05 +0100 > schrieb Bernard <bdebreil@free.fr>: > >> '//usr/lib/php/20190902/mysqli.so' > Is that really the path in the message? > The 2 // must not be there. I have the two // in the displayed error messages. However the file is where it should be, without double //
[toc] | [prev] | [next] | [standalone]
| From | Marco Moock <mm@dorfdsl.de> |
|---|---|
| Date | 2024-03-26 15:10 +0100 |
| Message-ID | <ImfEZ-1Pgw-7@gated-at.bofh.it> |
| In reply to | #268533 |
Am 26.03.2024 um 10:33:59 Uhr schrieb Bernard: > I have the two // in the displayed error messages. However the file > is where it should be, without double // The this seems to be a bug because if it searches for //file it will definitely not find it. Can you use strace to verify that? -- Gruß Marco Send unsolicited bulk mail to 1711445639muell@cartoonies.org
[toc] | [prev] | [next] | [standalone]
| From | Jeffrey Walton <noloader@gmail.com> |
|---|---|
| Date | 2024-03-26 18:30 +0100 |
| Message-ID | <ImiMx-1R4s-1@gated-at.bofh.it> |
| In reply to | #268536 |
On Tue, Mar 26, 2024 at 1:17 PM Marco Moock <mm@dorfdsl.de> wrote: > > Am 26.03.2024 um 10:33:59 Uhr schrieb Bernard: > > > I have the two // in the displayed error messages. However the file > > is where it should be, without double // > > The this seems to be a bug because if it searches for //file it will > definitely not find it. > Can you use strace to verify that? Also see <https://unix.stackexchange.com/a/1919>. Jeff
[toc] | [prev] | [next] | [standalone]
| From | Geert Stappers <stappers@stappers.nl> |
|---|---|
| Date | 2024-03-24 21:30 +0100 |
| Message-ID | <IlCDD-1qkJ-5@gated-at.bofh.it> |
| In reply to | #268511 |
On Sun, Mar 24, 2024 at 07:51:05PM +0100, Bernard wrote: > *PHP Warning: PHP Startup: Unable to load dynamic library > '//usr/lib/php/20190902/mysqli.so' |$ apt-file search mysqli.so |php8.2-mysql: /usr/lib/php/20220829/mysqli.so |$ So on my system, trixie, I would do `sudo apt install php8.2-mysql` and try again. Groeten Geert Stappers -- Silence is hard to parse
[toc] | [prev] | [next] | [standalone]
| From | Jeffrey Walton <noloader@gmail.com> |
|---|---|
| Date | 2024-03-24 23:10 +0100 |
| Message-ID | <IlEcp-1rmu-11@gated-at.bofh.it> |
| In reply to | #268511 |
On Sun, Mar 24, 2024 at 5:57 PM Bernard <bdebreil@free.fr> wrote: > > Hi to Everyone ! > > PHP Warning: PHP Startup: Unable to load dynamic library '//usr/lib/php/20190902/mysqli.so' However, the file is there... not human readable as expected and mysqli_connect doesn't operate. Please provide the output of `ls -Al /usr/lib/php` and `ls -Al /usr/lib/php/20190902`. If you are running SeLinux, then use `ls -AlZ` instead. Also state what user your web server runs under. You may need to show your php.ini. Jeff
[toc] | [prev] | [next] | [standalone]
| From | Bernard <bdebreil@free.fr> |
|---|---|
| Date | 2024-03-26 10:40 +0100 |
| Message-ID | <ImbrH-1Mtn-1@gated-at.bofh.it> |
| In reply to | #268515 |
[Multipart message — attachments visible in raw view] — view raw
ls -Al /usr/lib/php/20190902 total 7732 -rw-r--r-- 1 root root 34920 9 juin 2023 calendar.so -rw-r--r-- 1 root root 14440 9 juin 2023 ctype.so -rw-r--r-- 1 root root 92264 9 juin 2023 exif.so -rw-r--r-- 1 root root 161896 9 juin 2023 ffi.so -rw-r--r-- 1 root root 5744752 9 juin 2023 fileinfo.so -rw-r--r-- 1 root root 67688 9 juin 2023 ftp.so -rw-r--r-- 1 root root 14440 9 juin 2023 gettext.so -rw-r--r-- 1 root root 51304 9 juin 2023 iconv.so -rw-r--r-- 1 root root 47208 9 juin 2023 json.so -rw-r--r-- 1 root root 145512 9 juin 2023 mysqli.so -rw-r--r-- 1 root root 255832 9 juin 2023 mysqlnd.so -rw-r--r-- 1 root root 551440 9 juin 2023 opcache.so -rw-r--r-- 1 root root 34920 9 juin 2023 pdo_mysql.so -rw-r--r-- 1 root root 112744 9 juin 2023 pdo.so -rw-r--r-- 1 root root 280680 9 juin 2023 phar.so -rw-r--r-- 1 root root 39016 9 juin 2023 posix.so -rw-r--r-- 1 root root 34920 9 juin 2023 readline.so -rw-r--r-- 1 root root 14440 9 juin 2023 shmop.so -rw-r--r-- 1 root root 96360 9 juin 2023 sockets.so -rw-r--r-- 1 root root 22632 9 juin 2023 sysvmsg.so -rw-r--r-- 1 root root 14440 9 juin 2023 sysvsem.so -rw-r--r-- 1 root root 14440 9 juin 2023 sysvshm.so -rw-r--r-- 1 root root 26728 9 juin 2023 tokenizer.so On 24/03/2024 23:04, Jeffrey Walton wrote: > ls -Al > /usr/lib/php/20190902
[toc] | [prev] | [next] | [standalone]
| From | Bernard <bdebreil@free.fr> |
|---|---|
| Date | 2024-03-28 10:40 +0100 |
| Message-ID | <ImUoN-2eiy-7@gated-at.bofh.it> |
| In reply to | #268532 |
[Multipart message — attachments visible in raw view] — view raw
Yes, this list (exactly the same here) shows that mysqli.so is loaded. In any case, as said before, this function does operate as I have checked. But I've found more problems, concerning $_REQUEST, $_GET... The old way that I used 11 yrs ago no longer works : $nom = S_GET [‘nom’] ; no longer operates with php 7.4. This code is simply ignored. S_REQUEST, $_POST do not work either. Could someone show me how I should write these few lines dating 2010… (worked at least till 2013), which code is now ignored by php 7.4 with no explanations since I don’t have debugging function active. This example code comes from Kevin Yanks' s book dating 2010 : <?php $nom = $_GET[‘nom’] ; echo ‘Bienvenue sur notre site, ‘ . $nom . ‘ ] ; ?> These lines are now ignored by php 7.4 In any case, I’ve checked my php.ini (which I sent here a few days ago), and it seems to say that cookies are activated as well as $_REQUEST and other concerned functions. On 26/03/2024 10:38, Bernard wrote: > ls -Al /usr/lib/php/20190902
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <greg@wooledge.org> |
|---|---|
| Date | 2024-03-28 12:10 +0100 |
| Message-ID | <ImVNT-2fvh-7@gated-at.bofh.it> |
| In reply to | #268567 |
On Thu, Mar 28, 2024 at 10:36:01AM +0100, Bernard wrote: > But I've found more problems, concerning $_REQUEST, $_GET... > > The old way that I used 11 yrs ago no longer works : > > $nom = S_GET [‘nom’] ; > > no longer operates with php 7.4. This code is simply ignored. S_REQUEST, > $_POST do not work either. You mentioned $_GET and then you wrote S_GET. You also have Unicode curly quote marks there, not ASCII apostrophes. It's impossible for us to tell whether your PHP code is actually broken, or whether you *retyped* it with errors for your email.
[toc] | [prev] | [next] | [standalone]
| From | Bernard <bdebreil@free.fr> |
|---|---|
| Date | 2024-03-29 11:50 +0100 |
| Message-ID | <InhY5-2vti-3@gated-at.bofh.it> |
| In reply to | #268532 |
Hi to Everyone, The text quoted below has already been sent to the list, 2-3 days ago, someone had replied to it (but the message has been lost, I no longer see it on the list. I had replied again, which reply disappeared too.) So, I want to say again that the errors shown in the text below (S instead of $, ` inst of ') are not errors that I made in the php script, which scripts I write using old vi (vim). This was due to the fact that some parts of my messages here were typed using LibreOffice and parts were copy/pasted here. So, my actual concern still is that I can't get a php 7.4 script to call for a value entry, as I did years ago with older version. $nom = S_GET [‘nom’] ; > > no longer operates with php 7.4. This code is simply ignored. S_REQUEST, > $_POST do not work either. I spent hours searching for a way to get php to ask for an entry, but I didn't find anything. On 28/03/2024 10:33, Bernard wrote: > Yes, this list (exactly the same here) shows that mysqli.so is loaded. > In any case, as said before, this function does operate as I have checked. > > But I've found more problems, concerning $_REQUEST, $_GET... > > The old way that I used 11 yrs ago no longer works : > > $nom = S_GET [‘nom’] ; > > no longer operates with php 7.4. This code is simply ignored. S_REQUEST, > $_POST do not work either. > > Could someone show me how I should write these few lines dating 2010… > (worked at least till 2013), which code is now ignored by php 7.4 with > no explanations since I don’t have debugging function active. This > example code comes from Kevin Yanks' s book dating 2010 : > > <?php > > $nom = $_GET[‘nom’] ; > > echo ‘Bienvenue sur notre site, ‘ . $nom . ‘ ] ; > > ?> > > These lines are now ignored by php 7.4 > > In any case, I’ve checked my php.ini (which I sent here a few days ago), > and it seems to say that cookies are activated as well as $_REQUEST and > other concerned functions. > > On 26/03/2024 10:38, Bernard wrote: >> ls -Al /usr/lib/php/20190902
[toc] | [prev] | [next] | [standalone]
| From | Greg Wooledge <greg@wooledge.org> |
|---|---|
| Date | 2024-03-29 12:10 +0100 |
| Message-ID | <Inihr-2vQk-7@gated-at.bofh.it> |
| In reply to | #268613 |
On Fri, Mar 29, 2024 at 11:49:06AM +0100, Bernard wrote: > Hi to Everyone, > > The text quoted below has already been sent to the list, 2-3 days ago, > someone had replied to it (but the message has been lost, I no longer see it > on the list. I had replied again, which reply disappeared too.) > So, I want to say again that the errors shown in the text below (S instead > of $, ` inst of ') are not errors that I made in the php script, which > scripts I write using old vi (vim). This was due to the fact that some parts > of my messages here were typed using LibreOffice and parts were copy/pasted > here. That was something you wrote in a private reply to me, not to the list.
[toc] | [prev] | [next] | [standalone]
| From | Bernard <bdebreil@free.fr> |
|---|---|
| Date | 2024-03-26 11:10 +0100 |
| Message-ID | <ImbUJ-1MSV-1@gated-at.bofh.it> |
| In reply to | #268511 |
[Multipart message — attachments visible in raw view] — view raw
I have progressed a little in my trials. mysqli.so still shows the previously described problems, and I thought that this was responsible of the fact that mysqli functions were apparently discarded in the test programs I wrote. I discovered that this was due to errors I made in the php program. The errors in the script being corrected, mysqli_connect, mysqli_select_db, mysqli_query... now do operate... despite the errors concerning mysqli.so that I discovered when running the tests which are proposed by 'baeldung.com' " |$ php -m | grep mysqli| "If the MySQLi extension is enabled, we’ll see /mysqli/ in the output. Otherwise, the output will be empty." php -m grep mysqli PHP Warning: PHP Startup: Unable to load dynamic library '//usr/lib/php/20190902/mysqli.so' (tried: //usr/lib/php/20190902/mysqli.so (//usr/lib/php/20190902/mysqli.so: undefined symbol: mysqlnd_global_stats), /usr/lib/php/20190902///usr/lib/php/20190902/mysqli.so.so (/usr/lib/php/20190902///usr/lib/php/20190902/mysqli.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 PHP Warning: PHP Startup: Unable to load dynamic library 'mysqli' (tried: /usr/lib/php/20190902/mysqli (/usr/lib/php/20190902/mysqli: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/mysqli.so (/usr/lib/php/20190902/mysqli.so: undefined symbol: mysqlnd_global_stats)) in Unknown on line 0 mysqli " On 24/03/2024 19:51, Bernard wrote: > > Hi to Everyone ! > > *PHP Warning: PHP Startup: Unable to load dynamic library > '//usr/lib/php/20190902/mysqli.so' * *However, the file is there... > not human readable as expected* *and mysqli_connect doesn't operate.* > > *Thanks in advance for your help* > *Bernard* >
[toc] | [prev] | [next] | [standalone]
| From | Cindy Sue Causey <butterflybytes@gmail.com> |
|---|---|
| Date | 2024-03-26 14:50 +0100 |
| Message-ID | <ImflD-1OUD-3@gated-at.bofh.it> |
| In reply to | #268534 |
On Tue, Mar 26, 2024 at 6:04 AM Bernard <bdebreil@free.fr> wrote: > > I have progressed a little in my trials. > > mysqli.so still shows the previously described problems, and I thought that this was responsible of the fact that mysqli functions were apparently discarded in the test programs I wrote. > > I discovered that this was due to errors I made in the php program. The errors in the script being corrected, mysqli_connect, mysqli_select_db, mysqli_query... now do operate... despite the errors concerning mysqli.so that I discovered when running the tests which are proposed by 'baeldung.com' > > " > > $ php -m | grep mysqli > > "If the MySQLi extension is enabled, we’ll see mysqli in the output. Otherwise, the output will be empty." > > php -m grep mysqli > > PHP Warning: PHP Startup: Unable to load dynamic library '//usr/lib/php/20190902/mysqli.so' (tried: //usr/lib/php/20190902/mysqli.so (//usr/lib/php/20190902/mysqli.so: undefined symbol: mysqlnd_global_stats), /usr/lib/php/20190902///usr/lib/php/20190902/mysqli.so.so (/usr/lib/php/20190902///usr/lib/php/20190902/mysqli.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0 > PHP Warning: PHP Startup: Unable to load dynamic library 'mysqli' (tried: /usr/lib/php/20190902/mysqli (/usr/lib/php/20190902/mysqli: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/mysqli.so (/usr/lib/php/20190902/mysqli.so: undefined symbol: mysqlnd_global_stats)) in Unknown on line 0 > mysqli Just observing out loud: What's generating that double slash, i.e. "//usr," in the start of the message? That seems like a possible show stopper. Cindy :) -- Cindy-Sue Causey Talking Rock, Pickens County, Georgia, USA * runs with birdseed *
[toc] | [prev] | [next] | [standalone]
| From | David Wright <deblis@lionunicorn.co.uk> |
|---|---|
| Date | 2024-03-26 17:00 +0100 |
| Message-ID | <Imhnr-1Q5r-11@gated-at.bofh.it> |
| In reply to | #268535 |
On Tue 26 Mar 2024 at 09:43:37 (-0400), Cindy Sue Causey wrote:
> On Tue, Mar 26, 2024 at 6:04 AM Bernard <bdebreil@free.fr> wrote:
[ … ]
> > $ php -m | grep mysqli
> >
> > "If the MySQLi extension is enabled, we’ll see mysqli in the output. Otherwise, the output will be empty."
> >
> > php -m grep mysqli
> >
> > PHP Warning: PHP Startup: Unable to load dynamic library '//usr/lib/php/20190902/mysqli.so' (tried: //usr/lib/php/20190902/mysqli.so (//usr/lib/php/20190902/mysqli.so: undefined symbol: mysqlnd_global_stats), /usr/lib/php/20190902///usr/lib/php/20190902/mysqli.so.so (/usr/lib/php/20190902///usr/lib/php/20190902/mysqli.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
> > PHP Warning: PHP Startup: Unable to load dynamic library 'mysqli' (tried: /usr/lib/php/20190902/mysqli (/usr/lib/php/20190902/mysqli: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/mysqli.so (/usr/lib/php/20190902/mysqli.so: undefined symbol: mysqlnd_global_stats)) in Unknown on line 0
> > mysqli
>
> Just observing out loud: What's generating that double slash, i.e. "//usr,"
> in the start of the message? That seems like a possible show stopper.
At a glance, the first warning looks like it might be the
unsophisticated concatenation and substitution of paths,
without regard for either leading and trailing delimiters
or filename extensions:
null plus /usr/lib/php/20190902/mysqli.so
/usr/lib/php/20190902/ plus /usr/lib/php/20190902/mysqli.so plus .so
-------------------------------
substitution ↗
The second warning looks more significant, but mysqli is outside my
area of knowledge. Nonetheless, "mysqli" was seen in the last line,
though without any context: grep might be helped along by -A and -B.
Cheers,
David.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web