WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [closed] Getting Parse error: syntax error, unexpected T_VARIABLE (19 posts)

  1. Kashif456
    Member
    Posted 2 years ago #

    I just tried installing WP with my own hosting and I am getting this error:

    Parse error: syntax error, unexpected T_VARIABLE in /homepages/44/d175365316/htdocs/KashIndustries/wp-includes/option.php on line 225

    First time with the install, any help is appreciated.

  2. esmi
    Forum Moderator
    Posted 2 years ago #

    Try re-uploading all files & folders from a fresh download of WordPress.

  3. Kashif456
    Member
    Posted 2 years ago #

    I tried again but same error. I am not exactly sure what's going on. I even tried with another version 3.4.1 to 3.4.0 and I am seeing the same issue.

    Any thoughts?

  4. esmi
    Forum Moderator
    Posted 2 years ago #

    Please try another re-upload.

  5. Kashif456
    Member
    Posted 2 years ago #

    I tried again and here's the error: Parse error: syntax error, unexpected T_VARIABLE in /homepages/44/d175365316/htdocs/KashIndustries/wp-includes/option.php on line 225

    Can you please explain what's going on?

  6. esmi
    Forum Moderator
    Posted 2 years ago #

    I'm sorry but it looks like you aren't uploading all of the necessary files.

  7. Kashif456
    Member
    Posted 2 years ago #

    I have checked all the files and it does look like all the files are there.

  8. esmi
    Forum Moderator
    Posted 2 years ago #

    Try re-downloading a copy of WordPress, extracting the wp-includes/option.php file and uploading that to the wp-includes folder.

  9. Kashif456
    Member
    Posted 2 years ago #

    This is really frustrating. I have tried doing this again and also tried uploading the file independently and it failed.

  10. esmi
    Forum Moderator
    Posted 2 years ago #

    Let's try another approach - try:
    - switching to the Twenty Eleven theme by renaming your current theme's folder inside wp-content/themes and adding "-old" to the end of the folder name using FTP or whatever file management application your host provides.

    - resetting the plugins folder by FTP or phpMyAdmin.

    - running the upgrade manually via wp-admin/upgrade.php

  11. judijan
    Member
    Posted 2 years ago #

    I'm having the exact same problem/error with the option.php. I've tried several fresh uploads.

  12. judijan
    Member
    Posted 2 years ago #

    OK, maybe this will help. I went all the way back to version 3.1 and did a manual install. It worked. When I tried to upgrade, I got this message:

    You cannot update because WordPress 3.4.1 requires PHP version 5.2.4 or higher. You are running version 4.4.9.

    So it looks like because the hosting provider is not up to date, it was causing this error.
    Kashif456, you might want to check if you have a similar situation.

    Hope this was helpful.

  13. Kashif456
    Member
    Posted 2 years ago #

    Thanks for looking into this for me and commenting. I talked to my hosting company and they helped me figure this out. My hosting company does support php 5.2.4 with the linux package however it required me to do the following:

    Please create a .htaccess file or edit if you already have one by adding the following code:

    AddHandler x-mapp-php5 .php

  14. twobib
    Member
    Posted 2 years ago #

    A .htaccess with only this inside :
    SetEnv PHP_VER 5
    And it solved the problem

    Mettre un fichier .htaccess à la racine, avec seulement ceci à l'intérieur :
    SetEnv PHP_VER 5
    Et hop, problème résolu !

  15. Nathalie31820
    Member
    Posted 2 years ago #

    I had the exact same problem with 1&1 and by just making sure php version was set to 5, it solves the problem immediatly!

  16. rollingokie
    Member
    Posted 2 years ago #

    I also use 1&1 ( 1and1 ) and had to set the "global php version" to 5 in the control panel. It worked like a charm after that.

  17. Queen Jeneene
    Member
    Posted 2 years ago #

    me too. ... thanks!!!!!!

  18. Queen Jeneene
    Member
    Posted 2 years ago #

    if ur using 1&1 dont forget to switch your PHP version to 5 in your control panel under Web Space

    Global PHP Version

    cant believe ive been up alllllllll night stressing over such an easy fix.

    Thanks again.

  19. twobib
    Member
    Posted 2 years ago #

    :p

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags