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

PHP7 cURL extension issues (and how I fixed it) #51

Open
atchoo78 opened this issue Dec 6, 2019 · 1 comment
Open

PHP7 cURL extension issues (and how I fixed it) #51

atchoo78 opened this issue Dec 6, 2019 · 1 comment

Comments

@atchoo78
Copy link

atchoo78 commented Dec 6, 2019

First of all, I didn't know where else to write this. I just wanted to share this, as I'm sure someone else must have run into this particular problem:

I finally managed to get PHP7 up and running on my Yun Rev.2 with most of the available (from opkg) extensions.

Whenever I tried to load a PHP page (with some cURL code in it), from the web browser, I got a "call to undefined function: curl_init();" error message. So after experimenting for a loooong time, I suddenly thought it would be worth a shot to run the php script from php-cli, instead. Lo and behold, it was:

root@yun:/mnt/sda1/arduino/www/current_noserver# php-cli curltest.php

**  PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/curl.so' - Error loading shared library libmbedcrypto.so.0: No such file or directory (needed by /usr/lib/php/curl.so) in Unknown on line 0 **

I discovered that there was a file named libmbedcrypto.so.1 (instead of 0) in /usr/lib. So I applied this quick-trick-fix, as suggested (only slightly modifed) on this page:

ln -s /usr/lib/libmbedcrypto.so.1 /usr/lib/libmbedcrypto.so.0

and

/etc/init.d/uhttpd restart

At last all of the extensions clicked into place, and I now have an (amazingly fast!) working and wifi connected wireless hardware/button-controlled web/PHP server. That's truly awesome...

Hope this helps someone. At least that was my intention for writing this, but I'm aware this may not be the right place to post this.

Andreas

@nsmith1024
Copy link

Hello anybody knows the github link tot the full repository of OpenWRT for Arduino YUN for the rev-2 board so i can build that OpenWRT myself from scratch?

Thanks

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