Modern events calendar g-export error

using MEC to sync with google calendar. Import is succeeding but export cron job gives following errors

/home2/liztighe/public_html/threeriversaffinitygroups/wp-content/plugins/modern-events-calendar/app/crons/g-export.php: line 1: ?php
: No such file or directory
/home2/liztighe/public_html/threeriversaffinitygroups/wp-content/plugins/modern-events-calendar/app/crons/g-export.php: line 2: /**
: No such file or directory
/home2/liztighe/public_html/threeriversaffinitygroups/wp-content/plugins/modern-events-calendar/app/crons/g-export.php: line 3: –: command not found
/home2/liztighe/public_html/threeriversaffinitygroups/wp-content/plugins/modern-events-calendar/app/crons/g-export.php: line 4: */
: No such file or directory
/home2/liztighe/public_html/threeriversaffinitygroups/wp-content/plugins/modern-events-calendar/app/crons/g-export.php: line 5: syntax error near unexpected token ' /home2/liztighe/public_html/threeriversaffinitygroups/wp-content/plugins/modern-events-calendar/app/crons/g-export.php: line 5:function mec_find_wordpress_base_path()
’

Hello @Tighe,

Thanks for asking. :slight_smile:

Can you please share website URL? Please make sure that you are using the compatible version of MEC 2.7.2.

Thanks.

the website is http://threeriversaffinitygroups.org. I am using the bundled version and ran the update that was pushed a few days ago, 2.7.2. Events page is https://www.threeriversaffinitygroups.org/trag-events. That is working fine. It’s sync with export to same google calendar that is failing. Thanks!

Hello There,

Thanks for updating in! What is the version of you PHP? Please make sure that you are using at least PHP 7.0. It might be the cause of the issue. You can check the if you have meet the requirements to run WordPress and the plugins by checking it here: https://wordpress.org/about/requirements/

We will also continue to investigate this issue as this might be a bug or an issue with the latest release.

Best Regards.

I am running php 7

Hi @Tighe ,

This looks like file-system related which your hosting provider may need to address. The function realpath(), file_exists() and dirname() are failing (most likely the realpath()). Those functions aren’t able to access your file system since it’s not permitted (especially if it’s Managed Wordpress), please contact them about this issue.

Thanks!

thanks - is there any way for me to force a reinstall of the bundled plugin just to make sure that all of the files are there and are current?

Hi there,

The only way is deleting the existing plugin and install it again. There is no re-install function in Wordpress.

Though, those errors aren’t related MEC files. The actual code where those appearing is this

function mec_find_wordpress_base_path()
{
    $dir = dirname(__FILE__);
    
    do
    {
        if(file_exists($dir.'/wp-config.php')) return $dir;
    }
    while($dir = realpath($dir.'/..'));
    
    return NULL;
}

Where it’s trying to list the path based on the position of wp-config.php, but it’s failing. My only guess is file permission and your host won’t allow it.

Thanks!

g-import working fine in same directory, same file permissions. Bluehost has no clue what could be wrong and claims it must be the code.

Hello There,

Could you please ask BlueHost and confirm to them that the function realpath(), file_exists() and dirname() are failing (most likely the realpath()) due the fact the they are disallowing it? Those functions aren’t able to access your file system since it’s not permitted (especially if it’s Managed Wordpress).

Please let us know how it goes.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.