LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 09-26-2004, 06:24 AM   #1
atom
Member
 
Registered: Feb 2004
Location: Slovenia
Distribution: archlinux
Posts: 271

Rep: Reputation: 31
weird PHP error


Hi!

I have a weird error in my script. When I try to run it, it says "Parse error: parse error, unexpected $ in /usr/local/apache/htdocs/Inetpub/wwwroot/govorilne_test/index.php on line 190"

line 190 contains "?>"

what the f* is going on!???
 
Old 09-26-2004, 06:30 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
It sounds a bit odd - it is possible there is something before that. Is there any chance that you could post the script or link to the source.
 
Old 09-26-2004, 06:35 AM   #3
atom
Member
 
Registered: Feb 2004
Location: Slovenia
Distribution: archlinux
Posts: 271

Original Poster
Rep: Reputation: 31
unfortunately, I cannot post any of the requested, as it is a commertial construction. I can, however, post bits of code. I've debugged quite a bit, and came to the conclusion that it's got to be something not apparent. If I remove any semicolons, it recognises it and throws :that: error out. These are the last few lines:

PHP Code:
    }/*end if*/
    
$printout->print_errors();
    
$printout->spool(content::content_stop());
    
/*begin always print*/
    
$printout->spool(content::footer_content());
    
$printout->spool(content::footer_html());
    
    
    
/*this last line is sweet...*/
    
$printout->print_output(); /*output the whole page. period. We are ended.*/
?> 
 
Old 09-26-2004, 06:53 AM   #4
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
I can only assume that it is something in your print_output() function.
 
Old 09-26-2004, 07:02 AM   #5
atom
Member
 
Registered: Feb 2004
Location: Slovenia
Distribution: archlinux
Posts: 271

Original Poster
Rep: Reputation: 31
that's kind of a no-way... it worked before. Here is the code:

PHP Code:
          function spool($string/*for spooling errors for later output*/
    
{
        
$this->spooled_output $this->spooled_output $string;
        return 
0;
    }
    
    function 
print_output() /*this function does nothing more but print the spooled output*/
    
{
        echo 
$this->format_output($this->spooled_output);
        return 
0;
    } 
although I noticed something... when I try to paste the file somewhere, it, instead of printing the file, prints a weird string. "�B�B"

do you think it could be something with the encoding? It's listed as 8-bit (I use scite), but I might try UTF-8 and see what happens...
 
Old 09-26-2004, 08:50 AM   #6
atom
Member
 
Registered: Feb 2004
Location: Slovenia
Distribution: archlinux
Posts: 271

Original Poster
Rep: Reputation: 31
I got the error:

It was an unclosed if clause somewhere in the middle of the file.

weird, huh?

Thanks for your time,


Gasper
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP parse error in config.inc.php.in Confusedious Linux - Software 2 11-03-2005 05:08 AM
PHP-MySQL Weird Error Fordor Slackware 2 02-24-2005 12:01 PM
PHP $_GET is getting weird info ghight Programming 2 08-11-2004 12:32 PM
Weird error demonfi Linux - Newbie 1 08-16-2003 01:35 PM
Weird error help! please Devboy Linux - Software 9 08-01-2003 08:56 PM


All times are GMT -5. The time now is 03:33 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration