Title: Errors on Theme install
Last modified: August 19, 2016

---

# Errors on Theme install

 *  [schmacklab](https://wordpress.org/support/users/schmacklab/)
 * (@schmacklab)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/errors-on-theme-install/)
 * Hey everybody,
 * I just a finished a new theme for a personal site and while the theme has uploaded
   and appears to function I got these errors on the upload.
 * Warning: fopen(/home1/schmackl/public_html/wp-content/themes/schmackLab-v1.0/
   style.css) [function.fopen]: failed to open stream: No such file or directory
   in /home1/schmackl/public_html/wp-includes/functions.php on line 3598
 * Warning: fread(): supplied argument is not a valid stream resource in /home1/
   schmackl/public_html/wp-includes/functions.php on line 3601
 * Warning: fclose(): supplied argument is not a valid stream resource in /home1/
   schmackl/public_html/wp-includes/functions.php on line 3604
 * Even though the theme works I am worried about these errors since I installed
   last week put up a ton of content and then had an explicable data base crash (
   possibly due to plugins, not really sure).
 * I had to delete the database and start over and would like avoid another catastrophe
   down the line.
 * Thanks for you help!

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

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/errors-on-theme-install/#post-1434409)
 * Looks like there’s an issue with the theme’s style.css file. Is it missing?
 *  Thread Starter [schmacklab](https://wordpress.org/support/users/schmacklab/)
 * (@schmacklab)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/errors-on-theme-install/#post-1434454)
 * My css file is present. I had not placed the meta information comments at top
   but doing so did not solve the problem.
 * I found this plugin authors comments regarding the same error under different
   circumstances.
 * > A lot of you have commented and e-mailed me regarding an fopen PHP error that
   > occurs during the usage of one of my plugins. The reason for this is because
   > of your PHP configurations, editted by your web host. Your web host must have
   > disabled URL file-access, which is the method I use to retrieve the plugin 
   > support link which is displayed on my plugins, which you have an option to 
   > enable/disable.
   >  It took a while, but I’ve released an update to every plugin I’ve released.
   > In this update, I no longer use the fopen command. I use cURL instead, which
   > should solve the problem for the users which have this issue.
 * If this is a problem with my host (bluehost) do I need to worry about it?
 * Would this have had anything to do with my DB problems mentioned above?
 * Thanks for any help.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/errors-on-theme-install/#post-1434455)
 * That’s unlikely to be the same issue. It’s for a plugin – whilst yours is for
   a theme which is normally self-contained. And the file it cannot open correctly
   is schmackLab-v1.0/style.css.
 * The meta info at the top of style.css is vital to proper theme operation. You
   also need to ensure that you do not create or edit the stylesheet in anything
   other than a plain text editor.
 * [http://codex.wordpress.org/Theme_Development](http://codex.wordpress.org/Theme_Development)
 *  Thread Starter [schmacklab](https://wordpress.org/support/users/schmacklab/)
 * (@schmacklab)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/errors-on-theme-install/#post-1434459)
 * I write all my code in Coda by hand. The only thing different I’m doing is using
   [@import](https://wordpress.org/support/users/import/) in my style.css to import
   a reset.css and a main.css as well as the css for a jquery plugin.
 * I’ll try removing the [@import](https://wordpress.org/support/users/import/) 
   and see if that fixes anything…
 *  Thread Starter [schmacklab](https://wordpress.org/support/users/schmacklab/)
 * (@schmacklab)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/errors-on-theme-install/#post-1434461)
 * No luck with the [@import](https://wordpress.org/support/users/import/) changes.
 * This is the code form teh functions.php file that the error refers to starting
   at line 3596:
 *     ```
       function get_file_data( $file, $default_headers, $context = '' ) {
       	// We don't need to write to the file, so just open for reading.
       	$fp = fopen( $file, 'r' );
   
       	// Pull only the first 8kiB of the file in.
       	$file_data = fread( $fp, 8192 );
   
       	// PHP will close file handle, but we are good citizens.
       	fclose( $fp );
       ```
   
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [16 years, 2 months ago](https://wordpress.org/support/topic/errors-on-theme-install/#post-1434631)
 * The issue isn’t in wp-includes/functions.php. There’s something wrong in the 
   style.css file. I know it’s not an [@import](https://wordpress.org/support/users/import/)
   rule as I use them all of the time. My guess is that it’s related to the way 
   in which the file is being saved. Try opening style.css in NotePad and re-saving
   it.
 *  [hylndr11](https://wordpress.org/support/users/hylndr11/)
 * (@hylndr11)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/errors-on-theme-install/#post-1434780)
 * i have the same problem with all premium themes, all the css is accurate, has
   to be the host
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/errors-on-theme-install/#post-1434781)
 * Contact the company that you bought the premium themes from. Support is part 
   of the package that you purchased from them.

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

The topic ‘Errors on Theme install’ is closed to new replies.

## Tags

 * [fopen](https://wordpress.org/support/topic-tag/fopen/)
 * [theme install error](https://wordpress.org/support/topic-tag/theme-install-error/)

 * 8 replies
 * 4 participants
 * Last reply from: [James Huff](https://wordpress.org/support/users/macmanx/)
 * Last activity: [15 years, 11 months ago](https://wordpress.org/support/topic/errors-on-theme-install/#post-1434781)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
