Nekochan Net

Official Chat Channel: #nekochan // irc.nekochan.net
It is currently Wed Aug 27, 2014 8:56 am

All times are UTC - 8 hours


Forum rules


Any posts concerning pirated software or offering to buy/sell/trade commercial software are subject to removal.



Post new topic Reply to topic  [ 10 posts ] 
Author Message
Unread postPosted: Fri Aug 13, 2004 1:13 am 
Offline

Joined: Fri Apr 18, 2003 12:32 pm
Posts: 260
Location: Vleuten, The Netherlands
I've been working on a new setup on my server and after some problems I thought I had it working (finally!)... however gettext doesn't seem to work in my PHP setup.

I compiled all stuff myself, new Apache 2.0.50 server, PHP 5.0.0 and gettext 0.14.1 when running the configure script for PHP everything goes fine. It even compiles without problems. But when I run a simple test script:
Code:
<?php
gettext ("TEST")
?>

I get a fatal error messages telling me: "Call to undefined function gettext()" :(

The problem is I have no idea what is going wrong. I'm positive that the "ext/gettext" gets compiled. Also that these functions are included checked the #ifdef, even removed quite a few of them so the code would allways compile but it just doesn't work :(

Anyone with tips on what I might be doing wrong, they are very much appreciated.


Top
 Profile  
 
Unread postPosted: Fri Aug 13, 2004 5:29 am 
Offline
User avatar

Joined: Thu Jan 08, 2004 6:57 am
Posts: 2223
Location: In an origin rack - Germany
shrek wrote:
[..]
I get a fatal error messages telling me: "Call to undefined function gettext()" :(

The problem is I have no idea what is going wrong. I'm positive that the "ext/gettext" gets compiled. Also that these functions are included checked the #ifdef, even removed quite a few of them so the code would allways compile but it just doesn't work :(

Anyone with tips on what I might be doing wrong, they are very much appreciated.


Well... looks like that php configure havent detected your gettext installation and have build php without gettext support. Which php extension currently available in your build a phpinfo() can show you.

Its also possilbe to build the most extensions as a shared one. These 'foo.so' can be load in php.ini or during runtime by using dl('foo.so') in the script.

You can compile loadable extension with the main build or in later step!

[o2k]:/usr2/MIPS/php-5/ext/gettext
[o2k]:/usr2/MIPS/php-5/ext/gettext $ phpize
[o2k]:/usr2/MIPS/php-5/ext/gettext $ ./configure --with-gettext=/usr/local
[o2k]:/usr2/MIPS/php-5/ext/gettext $ gmake
[o2k]:/usr2/MIPS/php-5/ext/gettext $ gmake install
Installing shared extensions: /usr/local/php5/lib/php/extensions/no-debug-non-zts-20040412/

ll /usr/local/php5/lib/php/extensions/no-debug-non-zts-20040412/gettext.so
-rwxr-xr-x 1 root sys 22536 Aug 13 15:16 /usr/local/php5/lib/php/extensions/no-debug-non-zts-20040412/gettext.so

To load this extension the 'extension_dir' config parameter in your php.ini must match to the right dir.


After that you have these functions avalaible
http://www.irixworld.net/php/overview.php?ext=gettext

At this point an eye goes to your
shrek wrote:
[..]
I get a fatal error messages telling me: "Call to undefined function gettext()" :(


all my gettext related function starts with 'libintl_*' which is completly wrong :| So please use get_extension_funcs('gettext') to see which functions are exists and drop a note for me.


Top
 Profile  
 
Unread postPosted: Fri Aug 13, 2004 5:41 am 
Offline

Joined: Fri Apr 18, 2003 12:32 pm
Posts: 260
Location: Vleuten, The Netherlands
joerg wrote:
Well... looks like that php configure havent detected your gettext installation and have build php without gettext support. Which php extension currently available in your build a phpinfo() can show you.

Well I did everything to make sure they were compiled, tried shared stuff all of it...

joerg wrote:
After that you have these functions avalaible
http://www.irixworld.net/php/overview.php?ext=gettext

At this point an eye goes to your
shrek wrote:
[..]
I get a fatal error messages telling me: "Call to undefined function gettext()" :(


all my gettext related function starts with 'libintl_*' which is completly wrong :| So please use get_extension_funcs('gettext') to see which functions are exists and drop a note for me.


My list:
Code:
25 sander@origin ~% /opt/apache2/php/bin/php
<?php
print_r (get_extension_funcs('gettext'));
?>^D
Array
(
    [0] => libintl_textdomain
    [1] => libintl_gettext
    [2] => _
    [3] => libintl_dgettext
    [4] => libintl_dcgettext
    [5] => libintl_bindtextdomain
    [6] => libintl_ngettext
    [7] => libintl_dngettext
    [8] => libintl_dcngettext
    [9] => libintl_bind_textdomain_codeset
)
26 sander@origin ~%


So they seem to be prefixed with libintl_ here to! That explains all. Well I write something around this now I know how to call the functions. Thanks very much for your help, and if you find something to strip the libintl_ for good... let me know!

Again thanx!


Top
 Profile  
 
Unread postPosted: Fri Aug 13, 2004 5:52 am 
Offline
User avatar

Joined: Thu Jan 08, 2004 6:57 am
Posts: 2223
Location: In an origin rack - Germany
http://bugs.php.net/bug.php?id=29414&edit=3

regards
Joerg


Top
 Profile  
 
 Post subject:
Unread postPosted: Fri Aug 13, 2004 2:15 pm 
Offline
User avatar

Joined: Mon Apr 14, 2003 3:34 am
Posts: 5108
hello,

nice to hear it worked.
i didn't respect special functions and some wouldn't compile so you might miss the one or the other.
but it's made with mipspro so i guess the stuff that works works quite well ;-)

_________________
r-a-c.de


Top
 Profile  
 
 Post subject:
Unread postPosted: Fri Aug 13, 2004 9:17 pm 
Offline
Site Admin
Site Admin
User avatar

Joined: Thu Jan 23, 2003 1:31 am
Posts: 7973
Location: Pleasanton, California
Looks like this was fixed in PHP 5.0.1 - which is out now.

_________________
Twitter: @neko_no_ko
IRIX Release 4.0.5 IP12 Version 06151813 System V
Copyright 1987-1992 Silicon Graphics, Inc.
All Rights Reserved.


Top
 Profile  
 
 Post subject:
Unread postPosted: Sat Aug 14, 2004 7:20 am 
Offline

Joined: Fri Apr 18, 2003 12:32 pm
Posts: 260
Location: Vleuten, The Netherlands
Thanks neko for metioning. It is indeed solved in PHP 5.0.1 which is running fine!


Top
 Profile  
 
 Post subject:
Unread postPosted: Mon Aug 16, 2004 5:23 pm 
Offline
User avatar

Joined: Mon Apr 14, 2003 3:34 am
Posts: 5108
wow, you guys are fast.
upped it just a few hours ago :D

_________________
r-a-c.de


Top
 Profile  
 
 Post subject:
Unread postPosted: Mon Aug 16, 2004 11:21 pm 
Offline

Joined: Fri Apr 18, 2003 12:32 pm
Posts: 260
Location: Vleuten, The Netherlands
Well my work depended on it and I work for myself so I regular work through the weekends :)

Though I've got no time atm to make nice tardist of everything :)


BTW, is anyone familiar with "sprocsp" errors with PHP when you are using libraries compiled with MIPSPro's "-apo" flag? I've had quite a few of them and I have no idea how to resolve them aside from just removing the -apo flag during build of the library... (it happend to MySQL if I remember correctly and to the latest GD (graphics library).


Top
 Profile  
 
 Post subject:
Unread postPosted: Tue Aug 17, 2004 7:16 pm 
Offline
User avatar

Joined: Mon Apr 14, 2003 3:34 am
Posts: 5108
shrek wrote:
Well my work depended on it and I work for myself so I regular work through the weekends :)

Though I've got no time atm to make nice tardist of everything :)


BTW, is anyone familiar with "sprocsp" errors with PHP when you are using libraries compiled with MIPSPro's "-apo" flag? I've had quite a few of them and I have no idea how to resolve them aside from just removing the -apo flag during build of the library... (it happend to MySQL if I remember correctly and to the latest GD (graphics library).


also got -apo errors. but only when using php as a plugin/lib.
same with apache2.

_________________
r-a-c.de


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


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 post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group