1

I am installing PHPProBid Auction Script and suddenly I get this error:

Fatal error: Call to undefined function Cube\Config\simplexml_load_file() in /home/admin/webserendibite.ir/library/Cube/Config/Xml.php on line 60

Configuration:CentOS 5,Apache httpd,php 5.6,froxlor panel php info page: http://www.webserendibite.ir/phpInfo.php ionloader installer page :http://webserendibite.ir/ioncube/loader-wizard.php

and here is this function:

/** * * convert input into \SimpleXMLElement, then process the xml into an array * * @param mixed $input the input variable, it can be a path to an xml file, a string in xml format or an object of type \SimpleXMLElement * @return \Cube\Config\Xml */

public function setData($input)
{
    $xml = null;

    if ($input instanceof \SimpleXMLElement) {
        $xml = $input;
    }

    else if (file_exists($input)) {
        $xml = simplexml_load_file($input);

    }

    else {
        $xml = simplexml_load_string($input);
    }

    $this->_data = json_decode(json_encode((array)$xml), 1);

    return $this;
}

I appreciate any help :)

user3238904
  • 11
  • 1
  • 2

3 Answers3

1

It looks like your server is missing the SimpleXML PHP extension. If you can install packages on this server (either via command line or some other means), look for a package called php-simplexml or php-xml. You will have solved the problem when you see the SimpleXML extension on your phpinfo page, or in the command line output of php -m.

As a side note, I don't think exposing your phpinfo and especially ioncube loader pages is a good idea, especially if your application will be running on this same server. I suggest restricting access to those pages as soon as possible.

emb
  • 320
  • 2
  • 8
  • I ran "yum install php-simplexml" and after restarting Apache server by "service httpd restart" i get a blank page instead of error page.now what should I do? By the way surely I'll restrict access to those pages after installing the script. – user3238904 Jul 25 '15 at 15:37
  • Have you checked your Apache error log? It should be under `/var/log/httpd/error_log` by default, and you can check it from command line by running `tail -f /var/log/httpd/error_log`, or opening the text file via other means. – emb Jul 25 '15 at 16:53
0

error log for the last try to access the page:[Sat Jul 25 21:44:01 2015] [notice] caught SIGTERM, shutting down Failed loading /usr/lib/kloxophp/ioncube/ioncube_loader_lin_5.2.so: /usr/lib/kloxophp/ioncube/ioncube_loader_lin_5.2.so: undefined symbol: execute [Sat Jul 25 21:45:43 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec) [Sat Jul 25 21:45:43 2015] [warn] RSA server certificate wildcard CommonName (CN) *.lxlabs.com' does NOT match server name!? [Sat Jul 25 21:45:43 2015] [notice] Digest: generating secret for digest authentication ... [Sat Jul 25 21:45:43 2015] [notice] Digest: done [Sat Jul 25 21:45:44 2015] [warn] RSA server certificate wildcard CommonName (CN)*.lxlabs.com' does NOT match server name!? [Sat Jul 25 21:45:44 2015] [notice] Apache/2.2.27 (Unix) DAV/2 PHP/5.6.11 mod_ssl/2.2.27 OpenSSL/0.9.8e-fips-rhel5 configured -- resuming normal operations

user3238904
  • 11
  • 1
  • 2
  • 1
    It looks like you may be using the wrong version of the ioncube loader. See this link: http://kb.odin.com/en/121962 – emb Jul 25 '15 at 19:46
  • I've done ioncube installation according ro the https://watchmy.domains/tutorials/install-ioncube.php (php version 5.6 and and ioncube_loader_lin_5.6.so and ioncube_loader_lin_5.6_ts.so are added in php.ini ) my http://www.webserendibite.ir/phpInfo.php shows that ioncube is installed correctly. – user3238904 Jul 25 '15 at 20:11
  • I've done a fresh installing according to http://stackoverflow.com/questions/21083506/getting-blank-php-page-over-apache (the answer with green mark)and added extension= /usr/lib/modules/simplexml.so to php.ini and after that http://webserendibite.ir/simpexml.php shows that simplexml changed to enabled state but from now the main page goes blank. – user3238904 Jul 25 '15 at 23:21
  • 1
    @user3238904 You should only have one `zend_extension` entry with the ionCube Loader in your `php.ini`. You can find out if you have the thread-safe (`_ts` appended) or non thread-safe (nothing appended to loader filename) by looking at the output of your `phpinfo()`. If your error messages still indicate a problem with the ionCube Loader, you could open a ticket at [support.ioncube.com](http://support.ioncube.com) (best include your error log, output of your `phpinfo()` as HTML document and `php.ini` in the ticket). – SebiH Jul 27 '15 at 09:12
  • I corrected this based on what you said,and now I don't get any error or warning about ioncube,now I am sure that simplexml is installed based on my phpinfo and test page (http://webserendibite.ir/simpexml.php) and now i don't get any error or warning neither in apache nor php error log but still I have the blank php page for the main page of my site – user3238904 Jul 27 '15 at 11:30
0

I tried to create new controller in phpprobid, but got an error 404 Error

The page you are looking for could not be found.

Try checking the URL for errors, then hit the refresh button on your browser.

This is the process i fallowed

**//created route**
  'app-test'         => array(
        'test',
        array(
            'controller' => 'test',
            'action'     => 'index',
        ),
    ),


 **//controller**

namespace App\Controller;

use Ppb\Controller\Action\AbstractAction,
Cube\Controller\Front,
Cube\View,
Cube\Validate\Url as UrlValidator,
Cube\Controller\Request,
Ppb\Service;


class Test extends AbstractAction
{
public function Index()
{
    die('ok');
}
public function test()
{
    die('ok');
}
}

Thanks

Srinivas
  • 21
  • 3