Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I was working on developing a wordpress theme/plugin, and stupidly I decided to upgrade to Mountain Lion. I installed it as a fresh copy.

But now, I'm experiencing weird errors.

First error I noticed is part of my plugin doesn't work anymore, it throws error:

PHP Parse error:  parse error in /Library/WebServer/Documents/wordpress/wp-content/plugins/sendpress/inc/forms/email-style.2.0.php on line 309, referer: http://localhost/wordpress/wp-admin/

line 309: (btw after removing this code and running website everything works)

                        <?if ( false !== $this->get_option('canspam') ){
                            echo wpautop( $this->get_option('canspam') );

                        } else { ?> 
                        Blog/Company Name<br>
                                Street Address<br>
                                Anywhere, USA 01234<br>
<?php } ?>
                            </div><br>

Previously it there had been no error.

And most importantly I get php segmentation fault error when I put this in functions.php

// This function adds javascripts in a proper manner
function holidayge_theme_js() {
    if (!is_admin()) {
        wp_enqueue_script( 'tabs', get_bloginfo('template_directory').'/js/tabs.js' );
        wp_enqueue_script( 'lionbars', get_bloginfo('template_directory').'/js/jquery.lionbars.0.3.js' );
        wp_enqueue_script( 'slides', get_bloginfo('template_directory').'/js/slides.jquery.js' );
        wp_enqueue_script( 'dropp', get_bloginfo('template_directory').'/js/jquery.dropp.js' );
        wp_enqueue_script( 'selectconvert', get_bloginfo('template_directory').'/js/selectConvert.js' );
        wp_enqueue_script( 'easypaginate', get_bloginfo('template_directory').'/js/easypaginate.js' );
        wp_enqueue_script( 'adgallery', get_bloginfo('template_directory').'/js/jquery.ad-gallery.js' );
        wp_enqueue_script( 'simplemodal', get_bloginfo('template_directory').'/js/jquery.simplemodal.js' );
        wp_enqueue_script( 'settings', get_bloginfo('template_directory').'/js/settings.js' );
}
add_action('init', 'holidayge_theme_js');

Apache error:

[Fri Jul 27 10:00:35 2012] [notice] child pid 662 exit signal Segmentation fault (11)
[Fri Jul 27 10:00:42 2012] [notice] child pid 653 exit signal Segmentation fault (11)

p.s. yes I need to be spanked for upgrading to version 1.0 OS.

share|improve this question

2 Answers 2

up vote 2 down vote accepted

I'm not sure what the problem causing the segmentation fault error is, but perhaps short PHP tag-codes aren't enabled, causing the syntax error?

<?php if ( false !== $this->get_option('canspam') ){
    echo wpautop( $this->get_option('canspam') );
} else { ?>
share|improve this answer
    
And you are right! –  Sandro Dzneladze Jul 27 '12 at 8:54
    
Was it the short tags or that there was no space between the opening <? and if ? Short tags are working fine for me in MAMP and OSX 10.8. –  Chris Herbert Jul 28 '12 at 17:10

Not sure if it's a mistake in copying the code, but your if statement is not closed:

// This function adds javascripts in a proper manner
    function holidayge_theme_js() {
        if (!is_admin()) {
            wp_enqueue_script( 'tabs', get_bloginfo('template_directory').'/js/tabs.js' );
            wp_enqueue_script( 'lionbars', get_bloginfo('template_directory').'/js/jquery.lionbars.0.3.js' );
            wp_enqueue_script( 'slides', get_bloginfo('template_directory').'/js/slides.jquery.js' );
            wp_enqueue_script( 'dropp', get_bloginfo('template_directory').'/js/jquery.dropp.js' );
            wp_enqueue_script( 'selectconvert', get_bloginfo('template_directory').'/js/selectConvert.js' );
            wp_enqueue_script( 'easypaginate', get_bloginfo('template_directory').'/js/easypaginate.js' );
            wp_enqueue_script( 'adgallery', get_bloginfo('template_directory').'/js/jquery.ad-gallery.js' );
            wp_enqueue_script( 'simplemodal', get_bloginfo('template_directory').'/js/jquery.simplemodal.js' );
            wp_enqueue_script( 'settings', get_bloginfo('template_directory').'/js/settings.js' );
        }
    }
    add_action('init', 'holidayge_theme_js');
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.