Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
php extension problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
crushone
n00b
n00b


Joined: 08 Sep 2005
Posts: 4

PostPosted: Thu Sep 08, 2005 4:04 pm    Post subject: php extension problem Reply with quote

Hello,

I encountered a problem while trying to activate gd2
I emerged php_mod with the +gd flag but I get the following message in my apache error log:

PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20020429/php_exif.dll' - /usr/lib/php/extensions/no-debug-non-zts-20020429/php_exif.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20020429/php_gd2.dll' - /usr/lib/php/extensions/no-debug-non-zts-20020429/php_gd2.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20020429/php_pdf.dll' - /usr/lib/php/extensions/no-debug-non-zts-20020429/php_pdf.dll: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20020429/php_zip.dll' - /usr/lib/php/extensions/no-debug-non-zts-20020429/php_zip.dll: cannot open shared object file: No such file or directory in Unknown on line 0

this is in my php.ini
; Directory in which the loadable extensions (modules) reside.
extension_dir = /usr/lib/php/extensions/no-debug-non-zts-20020429

but that location doesnt excist. Did I do something wrong during installation?
Back to top
View user's profile Send private message
crushone
n00b
n00b


Joined: 08 Sep 2005
Posts: 4

PostPosted: Thu Sep 08, 2005 8:36 pm    Post subject: Reply with quote

I noticed this on the end of the php-4.4.0 merge

* This is a CLI only build.
* You cannot use it on a webserver.
md5sum: //root/.pearrc: No such file or directory
>>> Regenerating /etc/ld.so.cache...
>>> dev-php/php-4.4.0 merged.


CLI build? :?
Back to top
View user's profile Send private message
Bruce Misinoff
n00b
n00b


Joined: 06 Oct 2005
Posts: 8

PostPosted: Thu Oct 06, 2005 12:44 pm    Post subject: Reply with quote

hello,
I got exactly the same trouble witch i had submit to the french section of this forum:
https://forums.gentoo.org/viewtopic-t-388351.html

emerged php with gd:
Code:
USE="gd" emerge php

checking phpinfo() for gd to be enabled and it's ok;
my extention_dir in php.ini is the same than yours, and as you it doesn't exist;
finally i got the same message:
Code:
PHP Warning: Unknown(): Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20020429/php_gd2.dll' - /usr/lib/php/extensions/no-debug-non-zts-20020429/php_gd2.dll: cannot open shared object file: No such file or directory in Unknown on line 0


I still don't know why this file is not installed there, or what i did wrong, i'll post there if i find something out.
Back to top
View user's profile Send private message
Bruce Misinoff
n00b
n00b


Joined: 06 Oct 2005
Posts: 8

PostPosted: Thu Oct 06, 2005 12:59 pm    Post subject: Reply with quote

crushone wrote:

CLI build? :?

about CLI
http://fr.php.net/manual/en/features.commandline.php
Back to top
View user's profile Send private message
llongi
Retired Dev
Retired Dev


Joined: 15 Apr 2004
Posts: 459
Location: Switzerland

PostPosted: Thu Oct 06, 2005 1:15 pm    Post subject: Reply with quote

It should never search for .dll's, these are Windows-only! Probably some screwed-up line in the php.ini file, comment the lines containing .dll out. Or emerge dev-lang/php, wich should not present this problem at all.
Best regards, CHTEKK.
_________________
Best regards, Luca.
Back to top
View user's profile Send private message
Bruce Misinoff
n00b
n00b


Joined: 06 Oct 2005
Posts: 8

PostPosted: Thu Oct 06, 2005 5:12 pm    Post subject: Reply with quote

Thanks a lot, that was exactly a part of the problem, i had uncommented the wrong line in my php.ini file (as the noob i am).
I had commented out the line witch contain:
Code:
;Windows Extensions
(...)
;extension=php_gd2.dll

As i realised after your post, it is written Windows Extensions!!!

Now the error message is gone, that's a first step, now i got to find how to tell php.ini to load my gd extention.
Thanks again
Back to top
View user's profile Send private message
llongi
Retired Dev
Retired Dev


Joined: 15 Apr 2004
Posts: 459
Location: Switzerland

PostPosted: Thu Oct 06, 2005 5:28 pm    Post subject: Reply with quote

Bruce Misinoff wrote:

Now the error message is gone, that's a first step, now i got to find how to tell php.ini to load my gd extention.


Search for "extension_dir" in your php.ini, then check if there is a "gd.so" file in that directory. If there is, just add "extension=gd.so" to your php.ini, preferrably somewhere at the end of it and it will be loaded.
Best regards, CHTEKK.
_________________
Best regards, Luca.
Back to top
View user's profile Send private message
Bruce Misinoff
n00b
n00b


Joined: 06 Oct 2005
Posts: 8

PostPosted: Thu Oct 06, 2005 7:37 pm    Post subject: Reply with quote

Thanks again, this is where i am:
the extension_dir in my php.ini is /usr/lib/php/extensions/no-debug-non-zts-20020429/ but usr/lib/php/extentions do not exist.
I found the file libgb.so witch is in /usr/lib, should i change my php.ini with
Code:
extension_dir=usr/lib
extension=libgd.so
changing my extension_dir will not affect php because i don't have anyelse extension but i feel like a bad way of doing...

Maybe the better way is to emerge php again.
Back to top
View user's profile Send private message
llongi
Retired Dev
Retired Dev


Joined: 15 Apr 2004
Posts: 459
Location: Switzerland

PostPosted: Thu Oct 06, 2005 8:03 pm    Post subject: Reply with quote

Yeah that should work (writing /usr/lib is better).
Though it's strange you have a libgd.so at all for dev-php/mod_php, it _should_ be compiled internally to mod_php, and not as a separate extension... If you want to change PHP, switch over to dev-lang/php wich is the new generation of PHP support in Gentoo and will sobstitute dev-php/mod_php etc., and has far more features. :)
For some docs on this: http://svn.gnqs.org/projects/gentoo-php-overlay/file/docs/php-upgrading.html?format=raw
Best regards, CHTEKK.
_________________
Best regards, Luca.
Back to top
View user's profile Send private message
Bruce Misinoff
n00b
n00b


Joined: 06 Oct 2005
Posts: 8

PostPosted: Thu Oct 06, 2005 8:37 pm    Post subject: Reply with quote

Trying to load libgd.so lead to an error: "Invalid library (maybe not a PHP library)", i don't know why it is media-libs/gd installed instead of an internal compilation...

So it is clear now, i'll change php, mine is the dev-php/php so i'll switch to dev-lang/php as you told me.
In your link they say: "The new PHP packages require the new Apache layout" and they give a link for upgrading Apache witch doesn't work, do you think i need to emerge apache2 again to update, or just do nothing at all?

Thanks you a lot for all :wink:
Back to top
View user's profile Send private message
j-m
Retired Dev
Retired Dev


Joined: 31 Oct 2004
Posts: 975

PostPosted: Thu Oct 06, 2005 9:38 pm    Post subject: Reply with quote

I don't understand what are you attempting here. Recompile php with USE=gd or USE=gd-external and stop adding some strange things into php.ini.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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