AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

Filter by custom fields

Topic prefix

AI Assistant
Notifications
Clear all

[Solved] 500 error - Fatal error: Uncaught TypeError: fclose()

3 Posts
2 Users
0 Reactions
4,037 Views
Posts: 16
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@tonyatfonsori)
Eminent Member
Joined: 5 years ago
[#15479]

Fatal error: Uncaught TypeError: fclose(): Argument #1 ($stream) must be of type resource, bool given in /www/######/public/wp-content/plugins/wpforo/wpf-includes/functions.php:847 Stack trace: #0 /www/######/public/wp-content/plugins/wpforo/wpf-includes/functions.php(847): fclose(false) #1 /www/######/public/wp-content/plugins/wpforo/wpf-includes/functions.php(1129): wpforo_get_file_content('/www/######...') #2 /www/######/public/wp-content/plugins/wpforo/wpforo.php(555): get_wpf_option('wpforo_use_home...', 0) #3 /www/######/public/wp-content/plugins/wpforo/wpforo.php(125): wpForo->init_options() #4 /www/######/public/wp-content/plugins/wpforo/wpforo.php(109): wpForo->__construct() #5 /www/######/public/wp-content/plugins/wpforo/wpforo.php(1119): wpForo::instance() #6 /www/######/public/wp-content/plugins/wpforo/wpforo.php(1124): WPF() #7 /www/######/public/wp-settings.php(388): include_once('/www/######...') #8 /www/######/public/wp-config.php(80): require_once('/www/######...') #9 /www/######/public/wp-load.php(37): require_once('/www/######...') #10 /www/######/public/wp-blog-header.php(13): require_once('/www/######...') #11 /www/Fatal error: Uncaught TypeError: fclose()/public/index.php(17): require('/www/######...') #12 {main} thrown in /www/######/public/wp-content/plugins/wpforo/wpf-includes/functions.php on line 847


2 Replies
Robert
Posts: 10732
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@robert)
Support Team
Joined: 2 months ago

Hi @tonyatfonsori,

Something is wrong with your server file system permissions. Please change and make sure all folders have 755 permission, and all files have 644 permission. Folders and files I recommend to check:

  • /wp-content/
  • /wp-content/uploads/
  • /wp-content/uploads/wpforo/
  • /wp-content/uploads/wpforo/cache/

 

We'll adapt the core to avoid such error in next update. At the moment you can do a small change in wp-content/plugins/wpforo/wpf-includes/functions.php file. Please open this file and find this code part:

if( !$fp ){
@fclose( $fp );
return false;
}

 

Remove the @fclose( $fp ); line:

if( !$fp ){
return false;
}

 

Save and activate the plugin again.


Posts: 16
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@tonyatfonsori)
Eminent Member
Joined: 5 years ago

Hi Robert, thanks for the help. I got it to work following your advice.


Share: