PiRSquared17 / mediawiki-page-attachment

Automatically exported from code.google.com/p/mediawiki-page-attachment
Other
0 stars 0 forks source link

Warning: Unexpected character in input: '\' (ASCII=92) state=1 #35

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Download 2.0.2 of PageAttachment
2. Install and activate in LocalSettings.php
3. Run php maintenance/update.php
4. Browse to a wiki page

What is the expected output? What do you see instead?
Expected output: the normal wiki page rendered
Seen instead:
Warning: Unexpected character in input: '\' (ASCII=92) state=1 in 
extensions/PageAttachment/SetupExtension.php on line 131

Parse error: syntax error, unexpected T_STRING in 
extensions/PageAttachment/SetupExtension.php on line 131

(note: the full path to the wiki was redacted from the above statements)

What version of the product are you using? On what operating system?
* PageAttachment version: 2.0.2
* MediaWiki version: 1.18.0
* PHP version: 5.2.17 (cgi-fcgi)
* Operating System name & version: Linux 2.6.32.8

Please provide any additional information below.
Line 131 reads:         $requestHandler = new PageAttachment\RequestHandler();
I suspect it is the backslash that is causing the problem.

Original issue reported on code.google.com by keld...@gmail.com on 22 Jan 2012 at 2:10

GoogleCodeExporter commented 9 years ago
Hi keldym:

PHP 5.2.x doesn't support namespaces.  It looks like you are using the wrong 
download. 

There are two downloads for version 2.0.2:

1. mediawiki-page-attachment-2.0.2.zip             <-- Runs only on 5.3.x
2. mediawiki-page-attachment-2.0.2-php-5.2-b4.zip  <-- Runs on PHP 5.2.x & PHP 
5.3.x

   * Note that releases for PHP 5.2.x are "beta" versions.

Please, use the download for PHP 5.2.x and kindly report back if you encounter 
any issues.

Sincerely yours,

Aldrin

Original comment by Aldrin.Baroi@gmail.com on 22 Jan 2012 at 5:00

GoogleCodeExporter commented 9 years ago
Thanks very much for the quick answer. That mostly fixed the problem. I 
installed the 2.0.2-php-5.2-b4 version.

Ran into:
Parse error: syntax error, unexpected T_STRING, expecting ')' in 
extensions/PageAttachment/messages/Messages_DE.php on line 49

Similar error in the Messages_DE-formal.php on that same line:
    'viewUserPage'                              => 'Zeige $1_'s Seite',

I escaped the single apostrophe after the $1_ in both files and it looks like I 
am in business.

Thanks again for your help!

Original comment by keld...@gmail.com on 22 Jan 2012 at 5:24

GoogleCodeExporter commented 9 years ago
Hi Keldym:

I am glad that it is working for you. Closing this report as invalid report. 

By the way, it looks like you did encounter a bug.  PHP 5.2.x releases are 
built by transforming the PHP 5.3.x compatible code using a script. The script 
is removing the needed backslash.  Created a separate bug report (issue# 36) to 
track & fix this.

Original comment by Aldrin.Baroi@gmail.com on 24 Jan 2012 at 4:38