I am encountering the following errors with PHP 7:
Deprecated function: Methods with the same name as their class will not be constructors in a future version of PHP; Whois has a deprecated constructor in include_once() (line 83 of .../sites/all/modules/domain_finder/domain_finder.module).
Deprecated function: Methods with the same name as their class will not be constructors in a future version of PHP; WhoisClient has a deprecated constructor in require_once() (line 28 of .../sites/all/libraries/phpwhois/whois.main.php).
Deprecated function: Methods with the same name as their class will not be constructors in a future version of PHP; idna_convert has a deprecated constructor in require_once() (line 29 of .../sites/all/libraries/phpwhois/whois.main.php).
Ay help please to resolve this problem?
Thanks in advance.
Comment | File | Size | Author |
---|---|---|---|
#3 | domain_finder-deprecated_function-3011618-3.patch | 2.23 KB | dj1999 |
Comments
Comment #2
ljgra CreditAttribution: ljgra commentedComment #3
dj1999 CreditAttribution: dj1999 at Brainsum for Tieto commentedHere is a patch for php 7 version but have to change phpwhois library to https://github.com/jsmitty12/phpWhois
Install:
cd sites/all/libraries
rm -r phpwhois
mkdir phpwhois
cd phpwhois
php composer.phar require "jsmitty12/phpwhois":"^5.0"
Apply the patch.
Comment #4
ljgra CreditAttribution: ljgra commentedThank you so much for this great module. I installed a newer version of domain finder (patch applied already)/problem above is solved. But now I get the message: No phpWhois library found in %path folder.
I am a php noob. If this bug could be patched?
Again, thanks so much in advance.
Comment #5
dj1999 CreditAttribution: dj1999 at Brainsum for Tieto commentedWhere did you run composer command?
Correct place is:
sites/all/libraries/phpwhois
The modul checks that the autoload.php is exist in sites/all/libraries/phpwhois/vendor folder.
If you run the composer require command in sites/all/libraries/phpwhois than composer generate the vendor folder and all required components.
Comment #6
ljgra CreditAttribution: ljgra commentedThanks much for the kind reply. Out of ignorance, I ran composer.phar (after installing composer) just to get some error because I missed some steps. So I did the patch manually, however this did not work, resulting on the %path problem. So for those who are like me, How I fixed this and sharing this may help:
I used Centos 7. Following dj1999's first four steps in #3 above:
cd sites/all/libraries
rm -r phpwhois
mkdir phpwhois
cd phpwhois
Next, enter the following commands:
php -r "readfile('https://getcomposer.org/installer');" | php
Return:
All settings correct for using Composer
Downloading...
Composer (version 1.7.3) successfully installed to:
.... /public_html/studio/sites/all/libraries/phpwhois/composer.phar
Use it: php composer.phar
Now you can run successfully:
php composer.phar require "jsmitty12/phpwhois":"^5.0"
That's it. Thanks dj1999!
Comment #7
ljgra CreditAttribution: ljgra commentedComment #8
dj1999 CreditAttribution: dj1999 at Brainsum for Tieto commented