I recently installed a sitemap generator on my site. And I noticed that it was not working properly, so I decided to run the task manually and then I got these errors.

Code: 
Warning: fopen(/home/*****/public_html/forumsitemap-1.xml)  [function.fopen]: failed to open stream: Permission denied in  /home/*****/public_html/???????/applications/core/tasks/db30_gsmg.php on  line 1655

Warning: fwrite(): supplied argument is not a valid  stream resource in  /home/*****/public_html/???????/applications/core/tasks/db30_gsmg.php on  line 1656

Warning: fclose(): supplied argument is not a valid  stream resource in  /home/*****/public_html/???????/applications/core/tasks/db30_gsmg.php on  line 1657

Fatal error: Allowed memory size of 33554432 bytes  exhausted (tried to allocate 262295 bytes) in  /home/*****/public_html/???????/applications/core/tasks/db30_gsmg.php on  line 1636
And this is that piece of code where its all about:

Code: 
/**
     * Create File
     */
    private function createFile($generateMap, $entry, $xml, $fileName)
    {
        if ( is_array( $entry ) and count( $entry ) )
        {
            foreach( $entry as $e )
            {
                $xml->tmp_doc .=  "\n\t\t".$e."\n";
            }
        }

        $xml->xml_format_document();

        $doc = $xml->xml_document;

        if($generateMap)
        {
            if( $this->gzippossible != 0 )
            {
                $handle = gzopen( DOC_IPS_ROOT_PATH . $fileName .'.xml.gz', "w9" );
                gzwrite( $handle, $doc );
                gzclose( $handle );
                array_push($this->filesToindex, $fileName .'.xml.gz');
            }
            else
            {
                $handle = fopen( DOC_IPS_ROOT_PATH . $fileName.'.xml', "w");
                fwrite( $handle, $doc );
                fclose( $handle );
                array_push($this->filesToindex, $fileName.'.xml');
Does anyone know what to do in order to fix these errors?
WarezFreaks Reviewed by WarezFreaks on . Some errors I can't fix I recently installed a sitemap generator on my site. And I noticed that it was not working properly, so I decided to run the task manually and then I got these errors. Warning: fopen(/home/*****/public_html/forumsitemap-1.xml) : failed to open stream: Permission denied in /home/*****/public_html/???????/applications/core/tasks/db30_gsmg.php on line 1655 Warning: fwrite(): supplied argument is not a valid stream resource in Rating: 5