Befox / cdav

Dolibarr module to access calendars and address book from CalDAV/CardDAV tools
GNU General Public License v3.0
47 stars 28 forks source link

PHP7 - Call to undefined function mcrypt_ecb() (function REMOVED from PHP) #21

Closed matll42 closed 6 years ago

matll42 commented 6 years ago

Hi,

Still experimenting your module, I'm facing another issue with URL ICS this time, page content stops after first employee without giving the URL:

==> /var/log/apache2/labo.mydoli-error.log <==
[Wed Jun 06 11:14:26.894262 2018] [:error] [pid 10900] [client 192.168.0.241:55159] PHP Fatal error:  Uncaught Error: Call to undefined function mcrypt_ecb() in /usr/share/dolibarr/htdocs/cdav/cdavurls.php:128\nStack trace:\n#0 {main}\n  thrown in /usr/share/dolibarr/htdocs/cdav/cdavurls.php on line 128, referer: http://labo.mydoli/comm/action/listactions.php?

But page loading is 200 HTTP status code

192.168.0.241 - - [06/Jun/2018:11:14:26 +0200] "GET /cdav/cdavurls.php?type=ICS&mainmenu=agenda&idmenu=26438 HTTP/1.1" 200 5832

I saw on PHP doc that whole extension Mcrypt is deprecated since PHP7.1 and will be removed in PHP7.2, but function incriminated is deprecated since PHP5.5.0 and removed since PHP7.0.0 (http://be2.php.net/manual/en/function.mcrypt-ecb.php)

My configuration :

Settings Value
PHP Version 7.0.30-0ubuntu0.16.04.1
Registered Stream Filters zlib., string.rot13, string.toupper, string.tolower, string.strip_tags, convert., consumed, dechunk, convert.iconv., mcrypt., mdecrypt.*

Mathieu, Dolibarr 6.0.5 PHP7.0.3 CDav1.02

jpfox commented 6 years ago

Thanks for these precisions... I think theses points have been already corrected in CDav. I'm going to have a look in sources

jpfox commented 6 years ago

Which version do you use ? mcrypt_ecb has been removed in this commit : https://github.com/Befox/cdav/commit/8914ba8a70210fe5b4de4dd76b63e2542215686a

Please, download last version from master branch.

matll42 commented 6 years ago

I was using CDav 1.02 Strange, I downloaded it from github this week and I must have been on a previous commit. I downloaded it again and now I'm on CDav 1.10

I confirm it now works.