Status
Not open for further replies.

Grinder

Active Member
909
2009
9
0
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?
 
1 comment
You on't have permission to write in this directory DOC_IPS_ROOT_PATH (Normally the forum root).
check the installation instruction for that sitemap generator there should some chmod or smth.or just chmod it temporarily so that it can write in that directory and then get the permission back to it's original.
 
Status
Not open for further replies.
Back
Top