Libiconv

apps

#1

hi,
just wondering if iconv (libiconv) is installed as default. if not, do I have permissions to install it on my dreamhost server? this lib is needed for a photo gallery plugin.

thanks for any help.


#2

Iconv is also needed to convert an old Joomla (1.0.11) to the new version, 1.5


#3

Yes, iconv appears to be installed on Dreamhost. From the shell prompt, just type:

which iconv (followed by a carraige return)

to see the where iconv is installed. On genki (and I assume it is the same on all Dreamhost servers), it is located as follows:

/usr/bin/iconv

–rlparker


#4

Please see my earlier thread in this post, which tells you how to locate iconv on your server. Good Luck!

–rlparker


#5

woah, man, thanks! i totally missed your first post! Thanks!


#6

No problem…you didn’t really “miss” the post, as I just answered the original poster’s question - my reply to you was just so you wouldn’t miss it! :wink:

–rlparker


#7

my website forum also need iconv to run properly. From your first post you said iconv is installed on Dreamhost by default? then why support services told me it’s not? But by type in “which iconv” I do see it’s shown to located at /usr/bin/iconv. Then why my chat forum is still asking for it?

here is the error message I was talking about “Fatal error: Call to undefined function: bcdiv() in /home/.milton/essaymonster/essaymonster.com/home/class/date_c.php on line 33”


#8

I have no idea about that; why don’t you write them and ask them? :wink:

Again, how would I know the answer to that? You haven’t even described what software your “chat forum” is using, provided any information about it’s configuration, or produced an error message related to it.

From looking at the error message you provided, it is not even clear than iconv is in any way involved; the error message is reporting that your script can’t the function bcdiv() (included in libbcmath) – one of the BCMath Arbitrary Precision Mathematics Functions.

According to that manual page, and a phpinfo() run on one of my domains, that does not appear to be enabled on DreamHost’s PHP. From the manual:

“These functions are only available if PHP was configured with --enable-bcmath.”

If support was actually talking about this, instead of iconv, I agree that it is not installed at DreamHost “by default” - but they are two different things.

You can recompile your own PHP if you want, and enable it in that way.

–rlparker


#9

AH! you are talking about the PHP library libiconv (which is a different thing than the iconv I was talking about).

That is not installed by default in DreamHost’s PHP implementation, but you can add it yourself by compiling your own PHP, just like with the bcmath issue. :wink:

–rlparker


#10

so…how can I point a script there?

Currently, my php script says, return iconv(“ISO-8859-2”, “UTF-8”, $string);

How do I fix that?


#11

If you are using PHP 5.2.9, you should not have to “point” anywhere. Note that if you re-read this thread in it’s entirety you will see that two different “iconv” usages are discussed here.

PHP 5.2.9 as installed on DreamHost has the libiconv included, as you can see in the output of phpinfo():

iconv
iconv support enabled
iconv implementation glibc
iconv library version 2.3.6

Directive Local Value Master Value
iconv.input_encoding ISO-8859-1 ISO-8859-1
iconv.internal_encoding ISO-8859-1 ISO-8859-1
iconv.output_encoding ISO-8859-1 ISO-8859-1

Please refer to the php.net PHP manual for further usage information.

–rlparker
–DreamHost Tech Support


#12

Update:
I solved the problem. Dreamhost had me running PHP 5 FastCGI. I downgraded to PHP 5 CGI and that solved it. FastCGI doesn’t have the iconv library, I guess.

Thanks for looking into it…and yeah, I had read the entire thread…the Fast CGI threw me for a loop, I guess.