Mediawiki Php Parse Error Syntax Error Unexpected T_paamayim_nekudotayim
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings parse error syntax error unexpected t_paamayim_nekudotayim wordpress and policies of this site About Us Learn more about Stack Overflow
Parse Error: Syntax Error, Unexpected 'protected' (t_protected)
the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation syntax error, unexpected ')', expecting t_paamayim_nekudotayim Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it
Php Parse Error Syntax Error Unexpected Expecting
only takes a minute: Sign up What does this mean? “Parse error: syntax error, unexpected T_PAAMAYIM_NEKUDOTAYIM” up vote 48 down vote favorite 8 T_PAAMAYIM_NEKUDOTAYIM sounds really exotic, but most certainly absolutely nonsense to me. I traced it all down to this lines of code: config; return $cnf::getConfig($key); } function __construct() { $this->config = new Config(); } } ?> In the constructor I create a Config object. Here's the class: final class Config { private static $instance = NULL; private static $config; public static function getConfig($key) { return self::$config[$key]; } public static function getInstance() { if (!self::$instance) { self::$instance = new Config(); } return self::$instance; } private function __construct() { // include configuration file include __ROOT_INCLUDE_PATH . '/sys/config/config.php'; // defines a $config array $this->config = $config; } } No idea why this doesnt work / what the error means... php share|improve this question asked Dec 27 '09 at 14:02 openfrog 14.3k37169305 possible duplicate of PHP expects T_PAAMAYIM_NEKUDOTAYIM? –John Slegers Jul 4 '15 at 14:32 add a comment| 7 Answers 7 active oldest votes up vote 57 down vote accepted T_PAAMAYIM_NEKUDOTAYIM is the double colon scope resolution thingy PHP uses - :: Quick glance at your code, I think this line: return $cnf::getConfig($key); should be return $cnf->getConfig($key); The first is the way to call a method statically - this code would be
7 Error whilst upgrading Semantic Mediawiki store 8 error: "unexpected T_PAAMAYIM_NEKUDOTAYIM" (PHP 5.3 Namespace issue) 9 Lack of Looping Any ideas on
Scope Resolution Operator
how to link to the previous or next page? When I surround a {{}} command in [[ ]], it somehow displays as a heading: [[{{#pagebefore:}}]] | [[{{#pageafter:}}]] you could try the latest version; get it here. Jean-Lou Dupont 23:59, 23 August 2007 (UTC) Trouble with usage[edit] Could you give an example of http://stackoverflow.com/questions/1966010/what-does-this-mean-parse-error-syntax-error-unexpected-t-paamayim-nekudotay how to insert this into a wiki page? I don't understand the instructions. I've tried: {{#pagebefore: [context]|Main|Title_of_my_Page|Category_Name }} And all I get is the final page within that category. Help? The brackets [ ] mean optional parameters. Some examples: {{#pagebefore:category=All_extensions}} {{#pageafter:category=All_extensions}} Jean-Lou Dupont 11:44, 15 November 2007 (UTC) MySQL problem with apostrophes (RESOLVED)[edit] https://www.mediawiki.org/wiki/Extension_talk:PageAfterAndBefore Whenever I try to use this extension on an article that has an apostrophe in the title, the saved page displays the following error message: A database query syntax error has occurred. This may indicate a bug in the software. The last attempted database query was: (SQL query hidden) from within function "". MySQL returned error "1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[title of article after the apostrophe]')=-1 AND `wiki_categorylinks`.cl_to = 'Tran' at line 1 (mysql.[my database])". Do you know how this can be fixed? Thanks. Many thanks to you! I had forgotten to 'escape' properly the parameters before passing them to the DB layer -> potential for SQL injection attacks. I have fixed the issue in v1.0.2. Just do pear upgrade mediawiki/pageafterandbefore (assuming you are using PEAR). Jean-Lou Dupont 16:36, 20 November 2007 (UTC) filtercurrent?[e
award-winning dad, an adventurist, a photographer and a chief, living in beautiful Madison, Wisconsin. Find Solutions Here Search Sponsored Links https://icesquare.com/wordpress/mediawiki-error-parse-error-syntax-error-unexpected-t_namespace-expecting-t_string-in-usrlocalwwwapache22datawikiincludesnamespace-php-on-line-46/ Popular Problem [Linux]/dev/sdb1: more filesystems detected. This should not happen, modprobe: ERROR: could not insert ‘zfs': Required key not available Dropbox on FreeBSD RHEL 7 / MariaDB / MySQL: ERROR 1018 (HY000): Can't read dir of ‘.' (errno: 24) CentOS/RHEL: No ZFS after upgrading the kernel (2.6.32-573.7.1.el6.x86_64) Rsync with space in the directory name syntax error Running ZFS on Linux: Things you should know and be aware of FreeBSD or Linux in 6 Simple Questions CentOS 6: No Networking Connections After Upgrade [FreeBSD]Upgrade PHP 5.5 to 5.6 MediaWiki Error: "Parse error: syntax error, unexpected T_NAMESPACE, expecting T_STRING in /usr/local/www/apache22/data/wiki/includes/Namespace.php on line 46" April 19, 2010 by Derrick·65 Comments After upgrading my parse error syntax PHP to 5.3.2, I received the following error when accessing MediaWiki (1.6.12): Parse error: syntax error, unexpected T_NAMESPACE, expecting T_STRING in /usr/local/www/apache22/data/wiki/includes/Namespace.php on line 46 There are three solutions: Downgrade your PHP from 5.3 back to 5.2 Upgrade your MediaWiki to a newer version. Fix the codes. In my case, the first couple solutions do not work for me, and therefore I choose 3. Backup your wiki file first. Access your webserver and go to the MediaWiki/includes directory. For example:
cd /usr/local/www/apache22/data/wiki/includes Edit Namespace.php nano Namespace.php Go to line 46, change the following from: class Namespace { to: class MWNamespace { Save the file. Now, let's create a script: nano wikifix.sh Copy and paste the following: for fl in *.php; do mv $fl $fl.old sed 's/Namespace::/MWNamespace::/g' $fl.old > $fl done Save the file. Change the file to executable by: chmod u+x wikifix.sh Search the keyword Namespace:: and replace it by MWNamespace::: ./wikifix.sh Warning: Don't run the script twice! Delete the script. rm wiki