1

I am using php v7.4, I just do what https://www.php.net/manual/en/rrd.installation.php says me to do but php cant see my php_rrd.dll file extension that I downloaded in PECL in C:\xampp\php\ext (my extension_dir is correct). When I do php -m I got a warning: Image of my error. but in my phpinfo() it appears that it is already enabled. When I tried to run my program in postman I got an error of "Attempted to call function "rrd_graph" from namespace "App\Service" which means that it cant still load my module that I installed. I am using XAMPP on windows. "

joshoe
  • 51
  • 1
  • 8
  • You mention that your installation is C:\xampp\php\ext but the system is looking it on \xampp\php\ext\rdd , without the C:\ I am not super expert on Windows but this looks like an error. Can you share where you added the dll inclusion and how? – Andrea Olivato May 31 '21 at 03:14
  • 1
    On Windows I have seen this happen when an extension doesn’t match the same bitness and/or threading model – Chris Haas May 31 '21 at 03:51
  • @AndreaOlivato I just copy and paste the php_rrd.dll from PECL that i just download inside the directory of C:\xampp\php\ext and thats it. I also tried to put some other module like ssh2.dll inside that directory to test if that directory is good and it works on that ssh2 module but not on my rrd module. I tried to change the extension_dir in my php.ini file (\xampp\php\ext) but it the same error. im so stuck in this problem for almost a week. hope you help me :) ty. – joshoe May 31 '21 at 05:58
  • @ChrisHaas I checked my phpinfo() and the architecture is 64x which means its 64 bit and I also check the threading model and it is Thread safe. I checked all of it before I download but it still not working. I hope you can help me. Thank you :) – joshoe May 31 '21 at 06:01
  • I think the extension dir should be C:\xampp\php\ext with the C: – Andrea Olivato May 31 '21 at 06:11
  • @AndreaOlivato I tried that but still have the same error. btw the folder that i downloaded from pecl has some other .dll files other than php_rrd.dll. do you think I need to do something with that files? – joshoe May 31 '21 at 06:45
  • Well, it might be a dependancy. Can you share where you downloaded the .dll from so we can have a look? – Andrea Olivato May 31 '21 at 06:46
  • I found it, you downloaded from here: https://pecl.php.net/package/rrd/2.0.3/windows Yes, you definitely need all the DLLs Also can you post how you edited your PHP.ini to load the extension as per the official documentation here: https://www.php.net/manual/en/install.pecl.windows.php – Andrea Olivato May 31 '21 at 06:48
  • @AndreaOlivato I just do what the documentation said, I enabled my extension by doing this: extension = rrd where should i put the other .dll files? oh wait it has other files that are not dll included in the folder. where do you think i put this? :) – joshoe May 31 '21 at 06:56
  • OK, you might want to try with the full name of the DLL as per the documentation `extension=php_extname.dll` it's optional for PHP >7.2. After adding all the other DLLs and restarting the webserver does it work? – Andrea Olivato May 31 '21 at 07:00
  • @AndreaOlivato I tried now the `extension=php_rrd.dll` , but still not working. btw I copy and paste all dll files in xampp/apache/bin and it appear that in my phpinfo() my rrd module is marked as enabled but still my php -m has the same error. – joshoe May 31 '21 at 07:15
  • The error should have changed a bit since we changed the name of the dll. Is it possible that you have 2 separate .ini files and you're editing just the one of the webserver? if you run `php -i | grep ini` from command line, is the path of the php.ini the same as you're editing? – Andrea Olivato May 31 '21 at 07:20
  • @AndreaOlivato it changed a bit like the name of the module in error but still same error as I mentioned above. I tried uncomment and comment some modules in my `php.ini` and it works, so it means that my php.ini is the right one. – joshoe May 31 '21 at 07:34
  • @AndreaOlivato now it works after a week of researching, i just copy all the files that comes with the php_rrd.dll to the C:\xampp\php. I was surprised it works. Php_rrd.dll just need a dependencies to run and read by the php. Thank you bro, I appreciate your effort in helping me :) – joshoe Jun 01 '21 at 03:49

0 Answers0