Results 1 to 4 of 4

Thread: Help with Parse error: syntax error, unexpected ';', expecting ')'

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Help with Parse error: syntax error, unexpected ';', expecting ')'

    Hi all i tried the following php script but when i run it i get the following error:
    Code:
    Parse error: syntax error, unexpected ';', expecting ')' in www\remote.php on line 35
    I put ')' after Arry( to make it like Array() but still i get the above error. So i be happy if an expert tell me how to fix it. Thanks


    The bold part shows the error line:
    Code:
    <?
    
    // Copy remote file locally to scan with getID3()
    $remotefilename = 'http://ww.remoteserver.com/song.mp3';
    if ($fp_remote = fopen($remotefilename, 'rb')) {
        $localtempfilename = tempnam('/tmp', 'getID3');
        if ($fp_local = fopen($localtempfilename, 'wb')) {
            while ($buffer = fread($fp_remote, 8192)) {
                fwrite($fp_local, $buffer);
            }
            fclose($fp_local);
    
    		// Initialize getID3 engine
    		$getID3 = new getID3;
    
    		$ThisFileInfo = $getID3->analyze($filename);
    
            // Delete temporary file
            unlink($localtempfilename);
        }
        fclose($fp_remote);
    }
    
    
    // Writing tags:
    require_once('getid3.php');
    $getID3 = new getID3;
    getid3_lib::IncludeDependency(GETID3_INCLUDEPATH.'write.php', __FILE__);
    $tagwriter = new getid3_writetags;
    $tagwriter->filename   = $Filename;
    $tagwriter->tagformats = array('id3v2.3', 'ape');
    $TagData['title'][]  = 'Song Title';
    $TagData['artist'][] = 'Artist Name';
    $tagwriter->tag_data = array(; ===> error here
    if ($tagwriter->WriteTags()) {
    	echo 'success';
    } else {
    	echo 'failure';
    }
    
    
    <?

  2. #2
    <?="Moderator"?> john tindell's Avatar
    Join Date
    Jan 2002
    Location
    Brighton, UK
    Posts
    1,099

    Re: Help with Parse error: syntax error, unexpected ';', expecting ')'

    PHP Code:
    $tagwriter->tag_data = array(; 
    is ment to be
    PHP Code:
    $tagwriter->tag_data = array(); 
    As the error said you were missing the closing ) on the array decleration.

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Apr 2005
    Posts
    1,907

    Re: Help with Parse error: syntax error, unexpected ';', expecting ')'

    Quote Originally Posted by john tindell
    PHP Code:
    $tagwriter->tag_data = array(; 
    is ment to be
    PHP Code:
    $tagwriter->tag_data = array(); 
    As the error said you were missing the closing ) on the array decleration.
    Thank for u reply. I tried that already did not work!!

  4. #4
    VBA Nutter visualAd's Avatar
    Join Date
    Apr 2002
    Location
    Ickenham, UK
    Posts
    4,906

    Re: Help with Parse error: syntax error, unexpected ';', expecting ')'

    You clearly have another error then.
    PHP || MySql || Apache || Get Firefox || OpenOffice.org || Click || Slap ILMV || 1337 c0d || GotoMyPc For FREE! Part 1, Part 2

    | PHP Session --> Database Handler * Custom Error Handler * Installing PHP * HTML Form Handler * PHP 5 OOP * Using XML * Ajax * Xslt | VB6 Winsock - HTTP POST / GET * Winsock - HTTP File Upload

    Latest quote: crptcblade - VB6 executables can't be decompiled, only disassembled. And the disassembled code is even less useful than I am.

    Random VisualAd: Blog - Latest Post: When the Internet becomes Electricity!!


    Spread happiness and joy. Rate good posts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width