• Resolved Rhand

    (@rhand)


    I am trying to install a theme on my local MAMP. In preview I see a lot of code and these errors:

    Warning: Invalid argument supplied for foreach() in htdocs/wordpress/wp-content/themes/chapter26/index.php on line 5
    
    Parse error: syntax error, unexpected $end in htdocs/wordpress/wp-content/themes/chapter26/header.php on line 154

    Line 5 in the index.php of the theme has:

    foreach ($options as $value)
    {
    	if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); }
    }

    After installation all crashes and I get

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at htdocs/wordpress/wp-content/themes/chapter26/admin/admin-options.php:293) in htdocs/wordpress/wp-content/themes/chapter26/functions.php on line 145
    
    Warning: Cannot modify header information - headers already sent by (output started at htdocs/wordpress/wp-content/themes/chapter26/admin/admin-options.php:293) in htdocs/wordpress/wp-includes/functions.php on line 790
    
    Warning: Cannot modify header information - headers already sent by (output started at htdocs/wordpress/wp-content/themes/chapter26/admin/admin-options.php:293) in /opt/local/apache2/htdocs/wordpress/wp-includes/functions.php on line 791

    Any ideas why? No plugins are running and the two standard WordPress themes just place nicely.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Rhand

    (@rhand)

    Well there were <? in my code and the local server only accepted <?phps. All good except for a few minor bugs..

    This site: https://www.mydigitallife.info/2006/04/23/php-parse-error-syntax-error-unexpected-end/ I found after some Googling a debugging anf confirmed my suspicions. Simple coding changes: <? to <?php were needed ??

    hi! Thanks for posting this solution. It saves me a lot of time on googling about this issue. I also encountered the same problem and been trying to solve it for 3 days now. Tried re-downloading all the files thrice, but no success. Good thing I searched on the forum and found your solution very, very helpful. Now, it’s working on my local server.

    Thanks a bunch!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Theme installation errors’ is closed to new replies.