Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call to undefined function ACRCloud\acrcloud_create_fingerprint_by_file() #8

Open
King-abys opened this issue Oct 2, 2023 · 1 comment

Comments

@King-abys
Copy link

I am getting this Uncaught Error: Call to undefined function ACRCloud\acrcloud_create_fingerprint_by_file() in C:\wamp64\www\Myproject\acrcloud_recognizer.php on line 298. I couldn't figure out what the issue is.

@lucaspanik
Copy link

lucaspanik commented Oct 10, 2023

I am getting this Uncaught Error: Call to undefined function ACRCloud\acrcloud_create_fingerprint_by_file() in C:\wamp64\www\Myproject\acrcloud_recognizer.php on line 298. I couldn't figure out what the issue is.

You may not have activated the PHP extension.


Steps to reproduce adding extension in PHP 8.2:

php_extension_dir=$(php -r "echo ini_get('extension_dir');") && \
    cd $php_extension_dir && \
    curl -L -o acrcloud_extr_tool.so https://github.com/acrcloud/acrcloud_sdk_php/raw/master/linux/x86-64/php82/modules/acrcloud_extr_tool.so
php -ini | grep 'Scan this dir for additional .ini files'
# Scan this dir for additional .ini files => /etc/php/8.2/cli/conf.d

If you have php-fpm:

php-fpm -ini | grep 'Scan this dir for additional .ini files'
# Scan this dir for additional .ini files => /etc/php/8.2/fpm/conf.d

Use the values above to replace below

echo "extension=acrcloud_extr_tool.so" > /etc/php/8.2/cli/conf.d/30-acrcloud.ini
echo "extension=acrcloud_extr_tool.so" > /etc/php/8.2/fpm/conf.d/30-acrcloud.ini

More information:
https://github.com/acrcloud/acrcloud_sdk_php#install-modules

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants