Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[solved]problem enabling curl PHP extension
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
zoe
Guru
Guru


Joined: 10 Jun 2007
Posts: 324
Location: Greece

PostPosted: Tue Mar 12, 2013 7:14 pm    Post subject: [solved]problem enabling curl PHP extension Reply with quote

Hello everyone,

This is quite strange so i could use some help.

I've been trying to enable curl extension for PHP. Even though i did an emerge using curl use flag but it doesn't seem to work. I will give some info and i hope someone has an idea of what's going on

Quote:

php -v
PHP 5.3.15-pl0-gentoo (cli) (built: Aug 22 2012 16:12:05)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2012 Zend Technologie


Quote:

emerge -av php
[ebuild R ] dev-lang/php-5.4.8:5.4 USE="apache2 berkdb bzip2 cgi cli crypt ctype curl curlwrappers exif fileinfo filter gd gdbm hash iconv ipv6 json ldap mysql mysqli nls phar posix readline session simplexml spell ssl tokenizer truetype unicode xml xmlrpc zlib


As you can check from the above output i emerge with both curl and curlwrappers but again when i run

Quote:

php -m
[PHP Modules]
bz2
Core
ctype
date
dba
dom
ereg
exif
fileinfo
filter
gd
gettext
hash
iconv
json
ldap
libxml
mbstring
mcrypt
mysql
mysqli
openssl
pcre
Phar
posix
pspell
readline
Reflection
session
SimpleXML
SPL
standard
tokenizer
xml
xmlrpc
zlib

[Zend Modules]


I don't understand what else should i do in order to enable this extension . Any ideas?

If you need more info plz post

thanks in advance


Last edited by zoe on Sat Mar 16, 2013 4:19 pm; edited 1 time in total
Back to top
View user's profile Send private message
richard.scott
Veteran
Veteran


Joined: 19 May 2003
Posts: 1496
Location: Oxfordshire, UK

PostPosted: Fri Mar 15, 2013 3:54 pm    Post subject: Reply with quote

Hi,

your "php -v" shows your have php 5.3.15 setup as your command line version, but when you do an emerge your installing version 5.4.8 which is different.

run this to see what php versions you have installed:

Code:
eselect php show cli


or this to see what version Apache2 is configured to use:

Code:
eselect php show apache2


you can run these to change the defaults:

Code:
eselect php set apache2 php5.4
eselect php set cli php5.4


And then restart Apache if your running it.

hope that helps,

Rich
Back to top
View user's profile Send private message
zoe
Guru
Guru


Joined: 10 Jun 2007
Posts: 324
Location: Greece

PostPosted: Sat Mar 16, 2013 4:18 pm    Post subject: Reply with quote

Thanks a lot!

Quote:

eselect php set apache2 php5.4


I wouldn't think of it at all. After i edited my post i saw the exact thing you mentioned so o i changed to php 5.4. But i didn't know what else i was missing. After your idea everything works perfect

Thanks again for the help
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum