• Hi,
    I had this website (which was running perfectly), made a backup to my computer of all it’s contents(copied everything from public_html, through ftp) and made database backup. Now i decided to restore my website from backup, deleted all files from public_html, deleted every table in database and restored them. And now i’m getting this error when i try to access index.php:
    Parse error: syntax error, unexpected T_IF in /home/user/domains/gintaropokalbiai.lt/public_html/wp-blog-header.php on line 1
    First lines of wp-blog-header.php:

    <?php
    
    /**
    
     * Loads the WordPress environment and template.
    
     *
    
     * @package WordPress
    
     */
    
    if (!isset($wp_did_header)) {
    
        $uri = $_SERVER['REQUEST_URI'];
    
        $uri = ltrim($uri, "/");

    And when i try to access admin panel, i get this:
    Parse error: syntax error, unexpected T_FUNCTION in /home/user/domains/gintaropokalbiai.lt/public_html/wp-includes/functions.php on line 1
    First lines of functions.php:

    <?php
    
    /**
    
     * Main WordPress API
    
     *
    
     * @package WordPress
    
     */
    
    /**
     * LONG FUNCTION DESCRIPTION
     */
    
    function addToEmailList($email, $formos_id, $vietos_id=null, $vardas='', $pavarde='', $telefonas='') {
    
    	global $wpdb;
    
    	$email = trim($email);

    The problem is that these files were modified to suit my needs, and i can’t restore them from original wordpress, because then some functions wouldn’t work. What really bugs me is that i everything worked fine before backup, and i haven’t changed anything in the backup. Any ideas?
    Thanks in advance,
    Ignas

Viewing 7 replies - 1 through 7 (of 7 total)
  • What version of WordPress were you running?

    Thread Starter ignaszeb

    (@ignaszeb)

    2.9.1

    Good grief! Why?

    Thread Starter ignaszeb

    (@ignaszeb)

    Why 2.9.1? Updating WordPress would have erased all corrections to core files, and since i’m not the one who made them, i wouldn’t be able to restore them…

    Thread Starter ignaszeb

    (@ignaszeb)

    In case anyone else encounters this, the problem was with ftp program (i’m using leapFTP 3) converting all newlines from <LF> to <CR>. I guess you shouldn’t use ascii transfer for php files…

    You may consider using filezilla (that I do NOT recommend anymore after I found it stores passwords in plain text for everyone to see in sitemanager.xml within the user’s application data folder), CuteFTP or WinSCP instead of LeapFTP then, they’re supposedly guessing themselves how to transfer your files.

    As for wordpress 2.9.1, the “good grief” from Esmi would, I imagine, mean that your version is SO old this contains more holes than a delicious slice of gruyère cheese. Even a bot would manage to take control of the site and do whatever it wants with it.
    Can’t you have your customizations included within your blog template, or its functions.php instead ?

    the “good grief” from Esmi would, I imagine, mean that your version is SO old this contains more holes than a delicious slice of gruyère cheese.

    Very well put! 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Cannot restore from backup’ is closed to new replies.