Open jberanek opened 1 year ago
The strange thing is that one of the reservation pages (on the same website and the same db) still works, it only breaks when i change the link in the config file, to one of the other reservation tables. (I made a new set of tables and that worked also.)
You are probably seeing this on some systems but not others because curl_exec is only called very occasionally. It's used to get new timezone definitions which are cached for 28 days.
The problem happens in the first place because MRBS is just checking for the existence of curl_init() before using curl. In your case it will exist, but curl_exec() has been disabled so will appear as though it doesn't exist (in PHP 8). I will modify the code.
Unknown database type 'Percona Server (GPL), Release '44', Revision '27f408641db''
This is just a Notice error which you can ignore, but I will modify the code.
Original comment by: campbell-m
Ah, ok that explains the strange behaviour then. I have finally got an answer from the admins here, curl should be replaced by https://www.php.net/manual/en/function.stream-context-create.php
example they give me: (sadly again above my understanding)
curl_exec_without_curl.php <==
1 <?php
2 $opts = array(
3 'http'=>array(
4 'method'=>"GET",
5 'header'=>"Accept-language: en\r\n" .
6 "Cookie: foo=bar\r\n"
7 )
8 );
9 $context = stream_context_create($opts);
10 /* Sends an http request to the site
11 with additional headers shown above */
12 $url = "https://---------/mip.php";
13 $fp = fopen($url, 'r', false, $context);
14 fpassthru($fp);
15 fclose($fp);
16 ?>
Original comment by: hebus4
Yes, that's exactly what MRBS does if it thinks that curl is not available. The problem is that it thought curl was available on your system. Fix coming up.
Original comment by: campbell-m
As I haven't got a Percona system to test against, could you run the attached test program please in the MRBS directory and let me know the output? It should look something like
MySQL Community Server - GPL
8.0.28
but obviously changed for Percona.
Original comment by: campbell-m
Attachments: https://sourceforge.net/p/mrbs/support-requests/_discuss/thread/ba7d438049/395d/attachment/test.php
I have raised the dependence of phpCAS on curl as an issue with the phpCAS team.
Original comment by: campbell-m
Ty for the fast response Campbell, I replaced the functions.inc file using the f8b0619 fix. But when i open de page i'm getting this error now.
Uncaught exception 'Error' in /srv/vhosts/---------/functions.inc at line 2525 Call to undefined method MRBS\Session\SessionCas::isset()
Original comment by: *anonymous
Yes, there have been a number of other changes to functions.inc which are incompatible with 1.11.0.
I think you'll need to download the complete latest code from this page (follow the green Code button) and treat it like an upgrade. You'll obviously need to reapply any modifications you have made yourself (eg the change to CurlRequest.php above).
If you don't want to do that you'll need to apply the changes in the fixes manually to your existing functions.inc.
Original comment by: campbell-m
For the db test this is the result. Percona Server (GPL), Release '44', Revision '27f408641db' 5.7.41-44-log
Original comment by: *anonymous
Thanks. I've now added in support for Percona version checking in b0dfff6. I think that in this case you should just be able to put the new DB_mysql.php into an MRBS 1.11.0 system.
Alternatively when you set $debug = false;
the error message "Unknown database type 'Percona Server (GPL), Release '44', Revision '27f408641db'" will go away.
Original comment by: campbell-m
After a few days of test running, it looks like the reservations are working again, incl. mailing etc. :). So thanks again for the fast fix.
The only error i still have in debugmode is :
E_USER_NOTICE in /srv/vhosts/...../functions_mail.inc at line 174
Invalid email address "usershortname <usershortname>".
But that will probably be an error in my config file i need to look into when i have more time.
Original comment by: hebus4
Looks to be resolved.
I've reopened this issue to remind me to submit a PR to the PHP CAS team.
Hello, wonderfull developers, i think i need some help here. I'm using this wonderful script for years now , but now i'm at the end of my IT knowledge.
The admins here decided, for security reasons, to turn off this functions:
exec, passthru, shell_exec, system, proc_open, popen,curl, exec,curl, multi_exec,show_source
Result CAS login was broken.
They fixed this by editing the CurlRequest file. (code on the bottom)
Recently the server has been updated to php 8.1. But now when i want to make a reservation i'm getting this error.
The strange thing is that one of the reservation pages (on the same website and the same db) still works, it only breaks when i change the link in the config file, to one of the other reservation tables. (I made a new set of tables and that worked also.)
I then see this error:
E_USER_NOTICE in /srv/vhosts/-----MRBS/DB_mysql.php at line 402 Unknown database type 'Percona Server (GPL), Release '44', Revision '27f408641db''
Someone has any clue what is going on here, this is going above my knowledge of php/mysql.
CurlRequest
Reported by: hebus4
Original Ticket: mrbs/support-requests/2744