Installed this module ad I'm unable to Regenerate modules now because I get this error. Does anyone know what this means? Thanks.
Fatal error: Call to undefined function _() in /dir/dir/dir/public_html/www.mydomain.com/modules/helpdesk/pnversion.php on line 13
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- mazdev responded to »Hide "Register new account" and change template to 3 col« 07:50 AM
- mesteele101 created topic »Zikula 1.3.3 - Site Search 1.5.2 - Unable to turn off plug-ins« 07:48 AM
- internetking created topic »password problem« 25. May
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
- mdee created topic »How to implement returnpage ?« 25. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
HelpDesk - fatal error
-
- Rank: Freshman
- Registered: Jul 14, 2005
- Last visit: Oct 21, 2009
- Posts: 68
-
- Rank: Registered User
- Registered: Jun 19, 2003
- Last visit: Oct 21, 2009
- Posts: 32
You need to install the PHP gettext module as _() is a shortform of the gettext() command.
If you can't get this module installed (because of your hosting company) you need to hack the program 'locale/pn_gettext.php' to return the unmodified string.
Let me know how it goes.
Bernd -
- Rank: Freshman
- Registered: Jul 14, 2005
- Last visit: Oct 21, 2009
- Posts: 68
My hoster said the following. So I should hack the file? Could you please be more specific? How do I hack the file exactly? what are the lines?
>> The "gettext" program is installed on the server but PHP isn't
compiled to use it.
-
- Rank: Registered User
- Registered: Jun 19, 2003
- Last visit: Oct 21, 2009
- Posts: 32
There are 2 solutions:
1) ask your hoster to install the PHP-gettext module
2) add the following code at the end of the locale/pn_gettext.php file:
/**
* N_
* This function just returns what it receives, see gettext
* manual for noopt function.
*/
function N_($string) {
return $string;
}
Hope this helps!
Bernd -
- Rank: Freshman
- Registered: Jul 14, 2005
- Last visit: Oct 21, 2009
- Posts: 68
-
- Rank: Registered User
- Registered: Jun 19, 2003
- Last visit: Oct 21, 2009
- Posts: 32
Add the following 2 functions at the end of pn_gettext.php:
/**
* gettext
* This function just returns what it receives, see gettext
* manual for noopt function.
*/
function gettext($string) {
return $string;
}
function _($string) {
return $string;
}
Good luck,
Bernd -
- Rank: Freshman
- Registered: Jul 14, 2005
- Last visit: Oct 21, 2009
- Posts: 68
-
- Rank: Registered User
- Registered: Jun 19, 2003
- Last visit: Oct 21, 2009
- Posts: 32
While I'm quite willing to help you I can't really help you if all you are saying is "same error message occurs".
I gave you detailed information about how to provide a dummy function for the missing gettext function. Please modify the program accordingly are ask your hosting company to install the PHP gettext module. For most Linux distributions separate modules are available and thus there is no need to re-compile PHP.
Regards,
Bernd -
- Rank: Freshman
- Registered: Jul 14, 2005
- Last visit: Oct 21, 2009
- Posts: 68
Sorry perhaps I wasn't being clear I did add the code as you suggested to the end of the file but I still received the same message. -
- Rank: Registered User
- Registered: Jun 19, 2003
- Last visit: Oct 21, 2009
- Posts: 32
Fatal error: Call to undefined function _() in /dir/dir/dir/public_html/www.mydomain.com/modules/helpdesk/pnversion.php on line 13
This is what you wrote back in April. If you added the 2 above mentioned functions AND the program is found and included it is NOT possible that you get the same error message.
You need to make sure that two functions are available. -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 15, 2007
- Posts: 1
I have a different problem. When i try to activate the module or Regenerate List i get no page found, when i delete the helpdesk module everything work fine. I need help to get this installed.. Is this an upgrade version or new installation? -
- Rank: Team Member
- Registered: Dec 07, 2003
- Last visit: May 09, 2010
- Posts: 2703
Are you uploading the correct directory with correct subdirectories and files. Double check to make sure the pninit.php is in the highest directory you upload.
--
David Pahl
Zikula Support Team
- Moderated by:
- Support
