Closed Thread Icon

Topic awaiting preservation: Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=22740" title="Pages that link to Topic awaiting preservation: Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE <span class="small">(Page 1 of 1)</span>\

 
Hebedee
Paranoid (IV) Inmate

From: Maryland, USA
Insane since: Jan 2001

posted posted 07-30-2004 22:31

I am having this error whether I comment the code out or not.

It can be reached at:

http://www.phoenixcradle.com/oz/page.php

Source:

http://www.phoenixcradle.com/oz/page.phps


I have searched around to try to solve this before turning to you guys, but thanks in advance for any advice you can give. I have faith in the Asylum.

butcher
Paranoid (IV) Inmate

From: New Jersey, USA
Insane since: Oct 2000

posted posted 07-31-2004 00:47

I don't know if this is the problem, but I ran into somthing like this once when using a PHP <<<HERE once. I found that the parser didn't like the HERE to be indented in certain ways.

I was just thinking it could be the same problem with one of your <<< somewhere along the line.

-Butcher-

(Edited by butcher on 07-31-2004 00:58)

Hebedee
Paranoid (IV) Inmate

From: Maryland, USA
Insane since: Jan 2001

posted posted 07-31-2004 07:12

Perhaps, but I have run through it a number of times and I couldn't see anything wrong with my heredoc syntax.

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 07-31-2004 09:21

first herodoc: you've a space behind the <<<EOT. That causes the 'unexpected T_SL'.

second error in line 165: For some funny reason the Heredoc marker has to be three characters long. Like EOT. Not like FOOT.

line 190: You've a ) misplaced.

so long,

->Tyberius Prime

Hebedee
Paranoid (IV) Inmate

From: Maryland, USA
Insane since: Jan 2001

posted posted 08-01-2004 07:11

Thanks for the help, Prime, but after trying those solutions (and not getting anywhere), I discovered there was a tab after "EOD." I removed it and the whole thing was fixed.

However, I have a new problem. I have information stored on the webserver below the public directory, and I try to access it using fopen. However, it tells me it is not a valid string resource.


Warning: fopen(/bw/ps.txt): failed to open stream: No such file or directory

I haven't changed the function from the files up there. Do you see anything wrong with them, if the filenames are correct?

[Edit- Nevermind, I am dumb about file heirarchy.]

(Edited by Hebedee on 08-01-2004 07:16)

Tyberius Prime
Paranoid (IV) Mad Scientist with Finglongers

From: Germany
Insane since: Sep 2001

posted posted 08-01-2004 08:11

you need quotes around strings.

Arthurio
Bipolar (III) Inmate

From: Rapla, Estonia
Insane since: Jul 2003

posted posted 08-01-2004 11:05

if($secure) && isset($_GET['userName'])
$this->securityMessage = 'You are logged in as <em>' . $_GET['userName'] . '</em>.&nbsp;&nbsp;<a href="/common/security.php?logout=1">logout</a>';
else
$this->securityMessage = '<span><a href="/admin/index.php">log in</a></span>';


amm ... you have to put { } around sentences

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 08-01-2004 21:11

Actually you don't as long as your if/else statements are only one line.

That being said I learned long ago to just always use the brackets, for code readability.



.:[ Never resist a perfect moment ]:.

Hebedee
Paranoid (IV) Inmate

From: Maryland, USA
Insane since: Jan 2001

posted posted 08-01-2004 21:41

Yeah, I added those in. That was an old bit of code that I reused. After fixing those errors I went through and cleaned up my code. Also, that was the error report - it removes quotes from those for some reason.

« BackwardsOnwards »

Show Forum Drop Down Menu