PHP runs under the same username/groupname as the web server unless you are using the CGI module (as opposed to, say mod_php for Apache) suexec()'ed to some other username.
The most common usernames for the apache web server are, in no particular order, www, apache, nobody, daemon. The group name likely corresponds...
The question, then, is how you moved it in the first place ("I moved it over to a Linux server...") I assume you used FTP. Since you were almost assuredly not logged in as "Apache", the other file has different ownership...that of your FTP login ...
You're probably in a bit of a difficult spot, unless your FTP user has permission to chown and chgrp to "apache:apache". It's pretty certain that PHP won't have permission to override your umask....
Of course, now I'm wondering if I answered your question at all...
You generally don't want to let PHP create files in a directory under the document root. If crackerz get in, they can then change the content on your site. Code as securely as possible ...