View Issue Details

IDProjectCategoryView StatusLast Update
0020090mantisbtapi soappublic2015-10-08 01:49
Reportersoshnin Assigned Todregad  
PriorityhighSeveritymajorReproducibilityalways
Status closedResolutionno change required 
Product Version1.2.19 
Summary0020090: Allowed memory size
Description

We have problem with memory size. Problem ariz since today (we haven't change anything).
Error text:
"Allowed memory size of 268435456 bytes exhausted (tried to allocate 1937194865 bytes)"
Problem arising then i'am trying to greate mantis api object

// Create mantis issue.
include("mantis_api.php");
$mantis = new mantis();

TagsNo tags attached.
Attached Files
mantis_api.php (3,971 bytes)   
<?php
/**
 * UNITNSK Mantis bugtracker interface
 *
 * Copyright (c) 2012, ООО "Фактум"
 * All rights reserved.
 * 
 * Redistribution and use in source and binary forms, with or without 
 * modification, are permitted provided that the following conditions are met:
 * 
 *  Redistributions of source code must retain the above copyright notice, 
 *      this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright notice,
 *      this list of conditions and the following disclaimer in the 
 *      documentation and/or other materials provided with the distribution.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, 
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 
 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * @category UNIT library
 * @package mantis interface
 * @copyright Copyright (c) 2012 ООО "Фактум" Россия (http://unitnsk.ru)
 * @license The BSD 2-Clause License
 * @author Dmitri Perunov
 */

// No direct access to this file
defined('_JEXEC') or die('Restricted access');

/**
 * Interface to mantis bugtracker 1.2.14
 *
 * Class implement interface to bugtracker over http. URL and other properties
 * are hardcoded.
 */
class mantis
{
    /**
     * @var object SoapClient
     */
    private $_client;

    /**
     * @var string
     */
    private $_baseUrl = 'http://mantis.unitnsk.ru/';

    /**
     * @var string
     */
    private $_mantisUsername = 'mantis';

    /**
     * @var string
     */
    private $_mantisPassword = 'Dai2kee&d5coi0do';


    /**
     * Constructor
     */
    public function __construct()
    {
        $url    = $this->_baseUrl . 'api/soap/mantisconnect.php?wsdl'; 
        $this->_client = new SoapClient($url, array('trace' => 0, 'exception' => 0)); 

        $this->_login($this->_mantisUsername, $this->_mantisPassword);
    }

    /**
     * Function that login to Mantis.
     *
     * @param   string  $username
     * @param   string  $password 
     * @return  bool
     */
    private function _login($username, $password)
    {
        $result = $this->_client->__soapCall('mc_login', 
            array('username' => $username, 'password' => $password)
        );
        if (empty($result)) {
            return false;
        }
        return true;
    }

    /**
     * Create new task in Mantis.
     *
     * @param   string   $summary
     * @param   string   $description
     * @param   string   $additional_info
     * @return  bool
     */
    public function createTask($summary, $description, $additional_info)
    {
        $project_id = 1;
        $category = 1;

        $description = $description . '<br><br>' . $additional_info;

        $issue_data = array(
            'project' => array (
                'id' => $project_id
            ),
            'category' => $category,
            'summary' => $summary,
            'description' => $description
        );
        try {
            $result = $this->_client->__soapCall('mc_issue_add', 
                array(
                    'username' => $this->_mantisUsername, 
                    'password' => $this->_mantisPassword, 
                    'issue' => $issue_data
                )
            );
        } catch (Exception $e) {
        }

        return true;
    }
}
mantis_api.php (3,971 bytes)   

Activities

dregad

dregad

2015-09-09 05:21

developer   ~0051422

Last edited: 2015-09-09 05:21

First of all, I strongly suggest you immediately change the password of your 'mantis' user, which you just made public...

That being said, this sounds like a system configuration issue.

In any case, the information provided is not sufficient to help troubleshoot the problem. I suggest you trace the error in the back-end.

atrol

atrol

2015-09-25 16:55

developer   ~0051535

soshnin,

You did not provide any feedback; I am therefore resolving this issue as "no change required".

Feel free to reopen the issue at a later time and provide the requested information.