Gentoo Archives: gentoo-user

From: Mick <michaelkintzios@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] reading php file code in text editor
Date: Wed, 23 Jun 2010 13:06:06
Message-Id: AANLkTikl6EYA-irTg9tP7sfoDfSq5gt4kbsAFHevJQZG@mail.gmail.com
In Reply to: Re: [gentoo-user] reading php file code in text editor by roundyz@hotmail.ru
1 On 23 June 2010 13:48, <roundyz@×××××××.ru> wrote:
2 > Stroller wrote:
3 >
4 >>> On 23 Jun 2010, at 07:18, Mick wrote:
5 >>>
6 >>> > I am looking at some php files which are causing parsing errors in
7 >>> > Drupal, like:
8
9 > @^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@
10 > See this line here with all the ^@, delete it, or better yet comment it
11 > out, and see if it runs the same, it is not part of the php file, so
12 > maybe it was dumped during a refactoring session or the like.
13
14 Thanks guys,
15
16 I've tried all sort of 'fixes' like trying to add escape characters,
17 using closing tags, completely deleting the null symbols and what not,
18 but loading the page in drupal still causes similar parsing errors
19 although not always at the last line.
20
21 The files in question are attached in this message.
22
23 When looking at them with a hex editor I see this:
24
25 000027b0 20 7d 0d 0a 20 20 20 20 24 6c 69 73 74 5f 70 72 | }.. $list_pr|
26 000027c0 69 63 65 20 3d 20 21 65 6d 70 74 79 28 24 6e 6f |ice = !empty($no|
27 000027d0 64 65 2d 3e 6c 69 73 74 5f 70 72 69 63 65 29 20 |de->list_price) |
28 000027e0 26 26 20 24 6e 6f 64 65 2d 3e 6c 69 73 74 5f 70 |&& $node->list_p|
29 000027f0 72 69 63 65 20 3e 20 30 3b 20 20 20 20 20 20 20 |rice > 0; |
30 00002800 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
31 *
32 00006170 00 00 00 00 00 00 00 00 |........|
33 00006178
34
35 It is the last 5 lines that seem to cause the problem. Any idea why
36 they are shown as binary in text editors (using vim, or less)?
37
38 PS. I just looked at earlier (stable) versions of these files here:
39
40 http://drupal.org/project/skinr
41
42 and here:
43
44 http://drupal.org/project/fusion
45
46 and they do not have the binary characters at the end - so this could
47 well be a problem with the development versions. I'll try the stable
48 versions when I get home and report back.
49 --
50 Regards,
51 Mick

Attachments

File name MIME type
skinr.module application/octet-stream
template.php application/octet-stream

Replies

Subject Author
Re: [gentoo-user] reading php file code in text editor roundyz@×××××××.ru
Re: [gentoo-user] reading php file code in text editor Stroller <stroller@××××××××××××××××××.uk>
Re: [gentoo-user] reading php file code in text editor Vincent Launchbury <vincent@×××××××××××××××.com>