Results 1 to 11 of 11

Thread: Mysterious Parse Error

  1. #1
    Join Date
    Jul 2004
    Posts
    9

    Question Mysterious Parse Error

    This one has me stumped. My daughter was adding links to my site and after adding a number of links she clicked "update links" and since then we have not been able to view index.html or admin.
    We get this error:
    "Parse error: parse error, unexpected ';', expecting T_STRING or T_VARIABLE or '$' in /home/hsphere/local/home/sportair/sportaircraft.webezy.net/lib/ link.class.php on line 1202"

    I have not changed anything in the link.class.php page and everything was working fine.

    Has anybody had this problem? Can somebody please help. Thank you.

  2. #2
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    sounds like maybe either your database or the link.class.php file is damaged.

    can you open the link.class.php file from the server? What is line 1202?

    can you open the idx_link file thru your phpmyadmin in the server's control panel?




    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  3. #3
    Join Date
    Jul 2004
    Posts
    9

    Default

    Hi esm,

    Yes I can open link.class.php in webshell if that is what you mean.

    1202 is "$line = str_replace("<%new%>",$this->icon_new,$line);" in the method to display links - write template

    Yes I have openned idx_link table in phpmyadmin.

    I searched through all the links that were added to see if prehaps there was a ";" that was causing a conflict in the code.

    I even backed up table and deleted the links that were added but that still did not help.

    I have also uploaded link.class again.

    Do you have any ideas?
    Last edited by petervw; 09-24-2004 at 07:42 PM.

  4. #4
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    yep, that seems strange. that line is not one that would normally generate an error.

    so you ran the Update Number of Links. Did it finish???



    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  5. #5
    Join Date
    Jul 2004
    Posts
    9

    Default

    I wish I was doing the adding of links so I am going by what my 16 yr old daughter related to me. She said that there was a 504 server error when she updated.

    I have just finished setting all the new and updated fields in idx_links to '0'.

    Still the same.

    I am trying whatever to see if it changes anything.

  6. #6
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    well, if all of the links don't display, it would probably be either the php file or the table. since you received a 504 error duing an add, looks like it might be the sql table.

    absent a restoring a recent backup, you could try running the repair table command (http://dev.mysql.com/doc/mysql/en/REPAIR_TABLE.html)

    make a backup first.



    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  7. #7
    Join Date
    Jul 2004
    Posts
    9

    Default

    I ran the repair table command and the status is OK.

    I really don't know what to do next.

    Is it not possible that there is a bug?

  8. #8
    Join Date
    Apr 2003
    Location
    Atlanta GA
    Posts
    3,395

    Default

    Well, if it worked before and now it doesn't work, it's not likely a bug. Escpecailly if you deleted any new adds since the last time it worked. You replaced the file so it is not corrupted. You could try reloading the browse.php but I don't think that will solve the problem. but it is worth a try.

    I think the key is that you got a 504 server error while adding a record. The database is most susceptible to damage when it is being written to during an insert or update.

    This is way out of my league. But I would talk to your host. They should have a mysql expert on staff that could test the integrity of the database and maybe fix it if it is in fact a damaged database.



    esm
    "The older I get, the more I admire competence, just simple competence, in any field from adultery to zoology."

    .

  9. #9
    Join Date
    Feb 2003
    Location
    Saudi Arabia - Jeddah
    Posts
    141

    Default

    petervw :
    ---------

    I saw a similar error few days ago. I got the same massage but with the template.lib.php file

    I overcame this be reloading [ index.php ] file NOT [template.lib.php] file

    And the error massage disappeared


    If your problem is the same try to upload [Add.php ] or [any other php files ] used during the add & update process. IT MAY WORK

  10. #10
    Join Date
    Jul 2004
    Posts
    9

    Default

    Thanks for the tip althahabi. I have tried uploading the files again, but the problem has not gone away.

    It is not the database as I uploaded the orig database and the error is still there.

    I can see how the code could have changed when I have not touched it.

    This is really frustrating.

  11. #11
    Join Date
    Jul 2004
    Posts
    9

    Default

    I think I have the answer.

    I checked my php.ini file settings and found asp_tags on. They should be off for indexu to work properly.

    I have not had any trouble with it working till now so all I can think is the server setting was changed by my admin for some reason.

    I have contacted them to get it changed. I might have to create a htaccess file and use ini_set.

    I'll report back on what happens.

Similar Threads

  1. Replies: 11
    Last Post: 06-25-2003, 06:12 PM
  2. Replies: 3
    Last Post: 06-11-2003, 10:10 PM
  3. Replies: 4
    Last Post: 06-11-2003, 04:47 PM
  4. Parse error on install.php
    By doublep in forum v5.x
    Replies: 0
    Last Post: 01-23-2003, 12:13 PM
  5. i have this error with indexu
    By crazy_aspirin in forum v5.x
    Replies: 1
    Last Post: 07-10-2002, 03:31 AM

Posting Permissions

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