Pretty hard to tell (at least for me) with just that info. How does the cron job call the script? If it calls it directly and you're on a UNIX/Linux system, did you include the "shebang" line as the very first line to let the OS know what interpreter to use?
#!/usr/bin/php
<?php
// rest of script...
?>
(Change "/usr/bin/php" to whatever the path is to PHP on your host.)
Alternatively, you can have cron call the interpreter:
/usr/bin/php /path/to/your/file.php