Title: Argument Count Error
Last modified: March 11, 2023

---

# Argument Count Error

 *  [PastorCG](https://wordpress.org/support/users/pastorcg/)
 * (@pastorcg)
 * [3 years, 2 months ago](https://wordpress.org/support/topic/argument-count-error/)
 * I’m attempting to convert Weebly generated HTML to WordPress pages using this
   importer. I thought I had configured everything correctly, but encountered this
   error (note, site name obfuscated for privacy):
 * ======================================
 * **Fatal error**: Uncaught ArgumentCountError: fopen() expects at least 2 arguments,
   1 given in /homepages/xxxxxxxxxxxxxxx/htdocs/xxxxxxxxxxxxxxx/wp-content/plugins/
   import-html-pages/html-importer.php:286 Stack trace: #0 /homepages/xxxxxxxxxxxxxxx/
   htdocs/xxxxxxxxxxxxxxx/wp-content/plugins/import-html-pages/html-importer.php(
   286): fopen(‘/homepages/~…’) #1 /homepages/xxxxxxxxxxxxxxx/htdocs/xxxxxxxxxxxxxxx/
   wp-content/plugins/import-html-pages/html-importer.php(1099): HTML_Import->get_files_from_directory(‘/
   homepages/~…’) #2 /homepages/xxxxxxxxxxxxxxx/htdocs/xxxxxxxxxxxxxxx/wp-content/
   plugins/import-html-pages/html-importer.php(1129): HTML_Import->import() #3 /
   homepages/xxxxxxxxxxxxxxx/htdocs/xxxxxxxxxxxxxxx/wp-admin/admin.php(364): HTML_Import-
   >dispatch() #4 {main} thrown in **/homepages/xxxxxxxxxxxxxxx/htdocs/xxxxxxxxxxxxxxx/
   wp-content/plugins/import-html-pages/html-importer.php** on line **286**
 * There has been a critical error on this website. Please check your site admin
   email inbox for instructions.
 * ======================================
 * If any forum members have some thoughts about what is happening on line 286 of
   the importer code, I’m fine with tuning it. I just haven’t figured out what code
   to adjust.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [smbell1979](https://wordpress.org/support/users/smbell1979/)
 * (@smbell1979)
 * [2 years, 12 months ago](https://wordpress.org/support/topic/argument-count-error/#post-16802542)
 * I’m pretty sure this has to do with the php version. I have a home server using
   php 7 and it works fine, but my production server using php 8 has this error.
 *  [sjoannef](https://wordpress.org/support/users/sjoannef/)
 * (@sjoannef)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/argument-count-error/#post-16869261)
 * Has anyone found fixes for PHP8? Or an alternative plugin?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Argument Count Error’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/import-html-pages.svg)
 * [HTML Import 2](https://wordpress.org/plugins/import-html-pages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/import-html-pages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/import-html-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/import-html-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/import-html-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/import-html-pages/reviews/)

## Tags

 * [HTML Import](https://wordpress.org/support/topic-tag/html-import/)

 * 2 replies
 * 3 participants
 * Last reply from: [sjoannef](https://wordpress.org/support/users/sjoannef/)
 * Last activity: [2 years, 11 months ago](https://wordpress.org/support/topic/argument-count-error/#post-16869261)
 * Status: not resolved