Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

[SOLVED] How do I get PHP to create extensions?

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
5 posts • Page 1 of 1
Author
Message
UnclePa
n00b
n00b
Posts: 19
Joined: Fri Apr 05, 2019 1:40 am

[SOLVED] How do I get PHP to create extensions?

  • Quote

Post by UnclePa » Thu Aug 22, 2019 5:47 pm

I'm probably missing something simple. I have

/etc/portage/package.use/php: dev-lang/php apache2 fpm curl gd json pdo sqlite

and make.conf has: PHP_TARGETS="php7-3"

but the extensions aren't being created. E.g. there is no "curl.so" anywhere on my system. PHP installs and runs fine otherwise from CL, nginx or apache, but cannot load the extensions. I have uncommented the essential extensions (just curl and pdo for now) in all the php.ini files.

After changing make.conf according to the wiki php page, I did
emerge --ask --update --changed-use --deep @world
as instructed but it said nothing needed done. I emerged php again and checked to make sure the above flags are indeed on and again changed the php.ini files but still no extensions.
Last edited by UnclePa on Fri Aug 23, 2019 4:11 pm, edited 1 time in total.
Top
apiaio
Guru
Guru
Posts: 443
Joined: Thu Dec 04, 2008 1:49 pm

  • Quote

Post by apiaio » Thu Aug 22, 2019 6:43 pm

I would say, that you did not configure /etc/conf.d/apache2 file.
PHP must be enabled in line

Code: Select all

APACHE2_OPTS="-D DEFAULT_VHOST -D INFO -D SSL -D SSL_DEFAULT_VHOST -D LANGUAGE -D PHP"
Top
UnclePa
n00b
n00b
Posts: 19
Joined: Fri Apr 05, 2019 1:40 am

  • Quote

Post by UnclePa » Thu Aug 22, 2019 7:22 pm

Thanks, but I do have that. This doesn't really have anything to do with apache or nginx--it has the same behavior even from the command line (e.g. "php -a").

Code: Select all

$ php -a
PHP Warning:  PHP Startup: Unable to load dynamic library 'curl' (tried: /usr/lib64/php7.3/lib/extensions/no-debug-non-zts-20180731/curl (/usr/lib64/php7.3/lib/extensions/no-debug-non-zts-20180731/curl: cannot open shared object file: No such file or directory), /usr/lib64/php7.3/lib/extensions/no-debug-non-zts-20180731/curl.so (/usr/lib64/php7.3/lib/extensions/no-debug-non-zts-20180731/curl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'pdo_mysql' (tried: /usr/lib64/php7.3/lib/extensions/no-debug-non-zts-20180731/pdo_mysql (/usr/lib64/php7.3/lib/extensions/no-debug-non-zts-20180731/pdo_mysql: cannot open shared object file: No such file or directory), /usr/lib64/php7.3/lib/extensions/no-debug-non-zts-20180731/pdo_mysql.so (/usr/lib64/php7.3/lib/extensions/no-debug-non-zts-20180731/pdo_mysql.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
Interactive shell

php >
[Moderator edit: added [code] tags to preserve output layout. -Hu]
Top
UnclePa
n00b
n00b
Posts: 19
Joined: Fri Apr 05, 2019 1:40 am

  • Quote

Post by UnclePa » Fri Aug 23, 2019 4:10 pm

It looks like it works differently in Gentoo from what I'm accustomed to. Apparently I don't need to change the php.ini files to load the extensions. I suppose either they aren't actually extensions any more or they are loaded automatically somehow.
Top
freke
Veteran
Veteran
Posts: 1136
Joined: Thu Jan 23, 2003 3:17 pm
Location: Somewhere in Denmark
Contact:
Contact freke
Website

  • Quote

Post by freke » Fri Aug 23, 2019 4:50 pm

I was just having a look on my php-installation, it'd seem that the extensions is built into the executable (https://superuser.com/questions/108617/ ... ver/108618)

phpinfo on my server reports cURL enabled just fine.
Top
Post Reply

5 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic