Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse error with file-cache.php and breadcrumbs #1962

Closed
AsherJac opened this issue Sep 2, 2016 · 18 comments
Closed

Parse error with file-cache.php and breadcrumbs #1962

AsherJac opened this issue Sep 2, 2016 · 18 comments

Comments

@AsherJac
Copy link

AsherJac commented Sep 2, 2016

I installed the update to 2.6.0 this morning and all was working well for a few hours.
Then we couldn't access the site with the following error:

Parse error: syntax error, unexpected '/' in XXXX/wp-content/uploads/fw/file-cache.php on line 441

I notice file-cache was something included in the new version, so I expect it's something to do with that.

Here is line 441:
);t:breadcrumbs:uri:/static/css/style.css' => 'https://www.smartschoolcouncils.org.uk/wp-content/plugins/unyson/framework/extensions/breadcrumbs/static/css/style.css',

I tried reinstalling Unyson, but it didn't help.

I deleted XXXX/wp-content/uploads/fw/file-cache.php and everything is working ok, but I imagine the problem may re-emerge...

@ghost ghost self-assigned this Sep 2, 2016
@ghost
Copy link

ghost commented Sep 2, 2016

Hello,

Thank you for reporting.

Can you check your server error.log?

I think there was an error on writing to uploads/fw/file-cache.php

@AsherJac
Copy link
Author

AsherJac commented Sep 2, 2016

I attach my error log since the plugin was updated. I've removed the identical lines and put a note in where that's happened.
error_log-extract.txt
I hope it means more to you than me. If you need other logs, please let me know where to look.

@ghost
Copy link

ghost commented Sep 2, 2016

You should report this to theme author (this is not the cause of this issue)

Fatal error:  Call to undefined function bp_is_active() in XXXX/wp-content/themes/woffice/inc/register.php on line 131

@ghost
Copy link

ghost commented Sep 2, 2016

Something happened on your server and a few files were missing

[02-Sep-2016 10:41:12 UTC] PHP Warning:  require(XXXX/wp-content/plugins/unyson/framework/helpers/general.php): failed to open stream: No such file or directory in XXXX/wp-content/plugins/unyson/framework/bootstrap.php on line 29
[02-Sep-2016 10:41:12 UTC] PHP Fatal error:  require(): Failed opening required 'XXXX/wp-content/plugins/unyson/framework/helpers/general.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in XXXX/wp-content/plugins/unyson/framework/bootstrap.php on line 29
[02-Sep-2016 10:41:27 UTC] PHP Warning:  require(XXXX/wp-content/plugins/unyson/framework/core/extends/class-fw-extension.php): failed to open stream: No such file or directory in XXXX/wp-content/plugins/unyson/framework/core/Fw.php on line 47
[02-Sep-2016 10:41:27 UTC] PHP Fatal error:  require(): Failed opening required 'XXXX/wp-content/plugins/unyson/framework/core/extends/class-fw-extension.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in XXXX/wp-content/plugins/unyson/framework/core/Fw.php on line 47
[02-Sep-2016 10:41:33 UTC] PHP Warning:  require(XXXX/wp-content/plugins/unyson/framework/core/extends/class-fw-extension.php): failed to open stream: No such file or directory in XXXX/wp-content/plugins/unyson/framework/core/Fw.php on line 47
[02-Sep-2016 10:41:33 UTC] PHP Fatal error:  require(): Failed opening required 'XXXX/wp-content/plugins/unyson/framework/core/extends/class-fw-extension.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in XXXX/wp-content/plugins/unyson/framework/core/Fw.php on line 47
[02-Sep-2016 10:41:49 UTC] PHP Warning:  require(XXXX/wp-content/plugins/unyson/framework/core/components/extensions/class-fw-extension-default.php): failed to open stream: No such file or directory in XXXX/wp-content/plugins/unyson/framework/core/components/extensions.php on line 93
[02-Sep-2016 10:41:49 UTC] PHP Fatal error:  require(): Failed opening required 'XXXX/wp-content/plugins/unyson/framework/core/components/extensions/class-fw-extension-default.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in XXXX/wp-content/plugins/unyson/framework/core/components/extensions.php on line 93

I have only two versions:

  1. You uploaded the files via ftp and some files were corrupted
  2. There was a php timeout and the script wasn't able to finish writing data to file-cache.php

The ideal fix would be to try {} catch here if the file is invalid, but unfortunately it is not possible.

So the only fix I can do is to check here if the write has failed the write an empty array to the cache.

@ghost ghost closed this as completed in ff53139 Sep 2, 2016
@AsherJac
Copy link
Author

AsherJac commented Sep 2, 2016

Thanks. The bp_is_active thing is a theme issue. I'm aware of that.
I've reuploaded everything via FTP today, but those lines come from before then, when the plugin was updated through wp-admin

@ghost
Copy link

ghost commented Sep 2, 2016

#1968 (reference)

@simoskets
Copy link

i have a similar problem.
Since yesterday my site is down. I have contacted my hosting company and found that is due to unyson plugin (has already been updated). When tried to deactivate and activate again the site goes down. They replied with the following error they found:

PHP Parse error: syntax error, unexpected '/' in /var/www/vhosts/2105874157.blog.com.gr/httpdocs/wp-content/uploads/fw/file-cache.php on line 246

Can you please assist?
Simos

@ghost
Copy link

ghost commented Sep 9, 2016

@simoskets Thank you for reporting. Please confirm that this error happens with Unyson 2.6.2.

Also can you send me your admin/ftp details to moldcraft[at]email.com?

@ghost ghost added the waiting for a reply label Sep 9, 2016
@ghost ghost reopened this Sep 9, 2016
@ghost ghost added the in progress label Sep 9, 2016
@simoskets
Copy link

No this is with 2.6.1 as i can see. admin access sent to your email. Please confirm receipt of same.

@ghost
Copy link

ghost commented Sep 9, 2016

Thank you. This problem should be fixed in 2.6.2.

Admin details received, but I also need FTP details.

@ghost
Copy link

ghost commented Sep 9, 2016

@simoskets Why on your site I don't get a notification that there is an update for Unyson plugin (2.6.2) ?

@ghost
Copy link

ghost commented Sep 9, 2016

If you can't give me the FTP details. I deleted the file that caused the problem wp-content/uploads/fw/file-cache.php and activated Unyson plugin.

But please update Unyson plugin to latest version 2.6.2 then let me know if this problem happens again.

@simoskets
Copy link

Sorry for the late reply. I do not have FTP access to the site. For the record where did you go and deleted the file?
Also i can see from the plugin that the latest ver. is 2.6.1. i do not see 2.6.2.
unyson

@simoskets
Copy link

Also thank you very much for the fix!

@ghost
Copy link

ghost commented Sep 9, 2016

Ops, I am very sorry, I was confused.

Yes, the latest version is 2.6.1.

Yes, I deleted that file.

Important: Please report to us if this problem will happen again and we will remove that file entirely and will create an urgent Unyson release.

Thank you for cooperation.

@simoskets
Copy link

Just for my education.. can you tell me where did you go and deleted the file?

@ghost
Copy link

ghost commented Sep 9, 2016

The file that needs to be deleted is:

wp-content/uploads/fw/file-cache.php

But I didn't have FTP details so I did a little trick:

  1. Go to menu Plugins > Editor

  2. At the end of any active plugin (in your case it was Akismet) add this code:

    if (isset($_GET['test'])) {
        $tmp = wp_upload_dir();
        unlink($tmp['basedir'] . '/fw/file-cache.php');
    }
  3. Open any admin page and add ?test=1 in url

    http://{YOUR_SITE}/wp-admin/?test=1
    

    The file should be deleted.

  4. Delete the code added in step 2.

Then I activated Unyson and it has generated a new (correct) file.

@simoskets
Copy link

Thank you very much for the help and for the code!!!

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants