SOAP Internal Error

I should use SOAP to call a web server function. I declared this parameters:

$this->parametriSOAP = [
        "location" => "",
        "login" => "UWT3CBXX",
        "password" => "PBUW9EBP",
        "authentication" => SOAP_AUTHENTICATION_BASIC,
        "trace" => true,
        "exceptions" => false

That’s my SoapClient instance:

$this->parametriSOAP["location"] = $endpoint;
        $wsdl = BASE_URL . "/storage/SistemaTS/" . $wsdl;
        $client = new SoapClient($wsdl, $this->parametriSOAP);

Instead this’s the function’s call:

$result = $client->__soapCall("EsitoInvii", [
        "DatiInputRichiesta" => [
            "protocollo" => "17080120163582925",
            "pinCode" => "0Gv1vsTpzlvRD9kBd8FVLo2/441rZ8rRZVf0Zi9eO6+L7kme0KC8Vx6ZjRj/4JjA4aHPTCi3D6YW9OtmYkIpW7sfchmhqHdVORBZHPitiPHdr5iIipAhIzBhFOQIPfpYasW5cQmU//uNB4GSWSNDIkaqdMrDjTPpIkbKKeoA4dQ="

    if (is_soap_fault($result)) {
        var_dump($result->faultcode . " " . $result->faultstring);
        return false;


I receveid the error: env:Client Internal Error

Here there are WSDL and XSD schema: https://we.tlegiEBZ0vgT

Source: stackoverflow-php

Not able to populate dummy data in phosphorum/phalcon forum initial install

Installed phosphorum(phalcon forum) successfully on my WHM server(shared hosting). But when populating database using command usr/bin/php /home/xxxx/public_html/forum/forum seeder:populate , I am getting this message in command prompt(using putty SSH)

Start X-Powered-By: PHP/5.6.31 Content-type: text/html; charset=UTF-8

But no entries in database. When i check app/logs/application.log, it says,

[04-Aug-2017 17:53:34][DEBUG] [boot] Parsed options:
[“seeder:populate”] [04-Aug-2017 17:53:34][DEBUG] [boot] Task
definition: {“task”:”seeder”,”action”:”populate”,”params”:[]}
[04-Aug-2017 17:53:34][ERROR] WhoopsExceptionErrorException:
fwrite() expects parameter 1 to be resource, string given in file

on line 28 Stack trace:

/home/xxxxx/public_html/forum/forum:28 fwrite()

I googled, did not get any solution. Tried different ways to my knowledge without success. Did anyone get this kind of error while installing? if so, any solutions?Is there any manual way/.sql to populate data?
Phosphorum Version 3.2.1
PHP version 5.6
OS – Linux version 2.6.32

Source: stackoverflow-php

how to get data from database using date between?

Database stored date

item 1: date from :- 10-07-2017 date to :- 20-07-2017
item 2: date from :- 02-07-2017 date to :- 02-08-2017
item 3: date from :- 01-06-2017 date to :- 20-08-2017

input date

start date:- 05-07-2017 end date :- 25-07-2017

here I gave an input date to get data from database. database stored date is the data I want to print. thing is that, which are the items date included in the input date

this are the condition I want to work

start_date < date from && end_date > date_to 
start_date > date from && end_date > date_to 
start_date < date from && end_date < date_to 
start_date > date from && end_date < date_to 

exception case

start_date < end_date < date_to
start_date > end_date > date_to

I want a codeignitor solution . below am giving my model class structure

public function getDate( $start_date = "",$end_date = """)

Source: stackoverflow-php

PayPal split payment between buyer and more then 15 sellers. Any solution?

I’m trying to implement a marketplace website with multiple sellers. But unfortunately I can’t figure out how to implement the payout system for multiple sellers (buyer pay direct to sellers) because Paypal have this limitation of 6 receivers.

I know that is a lot of scripts (cart scripts) on web but I’m not sure if they have this limitation.
Maybe somebody can help me with some ideas?


Source: stackoverflow-php

PHP: JSON Api Tenor

how can i get all url-s from (results->media->nanomp4->url)

if($json = cURLGetContents("")) {
    $obj = json_decode($json);
    echo $obj->results->{"media"}->{"nanomp4"}->{"url"};

Function cURLGetContents($url) {
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    $data = curl_exec($ch);
    return $data;

Source: stackoverflow-php

Image tag src-attribute: Session lost with mobile connection

I use an <img> tag with an src-attribute pointing to a script that loads the image from a non-public folder. When I test my website with a mobile connection, the scr-attributes path is changed from src=" to src=", I guess that has something to do with my mobile internet provider. The problem is, the image-providing script cannot identify the session of the incoming request anymore.
On a non-mobile WIFI connection, the src-attribute is not changed, everything works as expected and the session is found.

Source: stackoverflow-php

Can I create a new database using PDO without having a default database?

$servername = "ABC";
$username = "DEF";
$password = "GHI";
try {
    $conn = new PDO("mysql:host=$servername;dbname=fruit", $username, $password);
    // set the PDO error mode to exception
    $sql = "CREATE DATABASE apple";
    // use exec() because no results are returned
    echo "Database created successfully<br>";
} catch (PDOException $e) {
    echo $sql . "<br>" . $e->getMessage();

$conn = null;

Considering the code above, I always have to use an already created database (....mysql:host=$servername;dbname=fruit...) in order to create a new one (i.e. apple). It seems peculiar to me because in order to create a database I need a database. Doesn’t it sound weird?
Is there any way I can avoid it, if I still want to stick with PDO?

Source: stackoverflow-php

How can I use CAD ground plane in PHP web application in order to calculate distances between points?

I have an Autocad Warehouse ground plane which I want to read on my PHP based web application in order to calculate exact distances between points (not airline distance) which are actually storage slots in warehouse.

Is there any platform/framework/script which can help me?

Any ideas, advices? Thanks in advance.

Source: stackoverflow-php

How to retrieve boolean value from php to javascript file

is that possible to retrieve Boolean value from php to javascript?

All I want to do is simple: Retrieve Boolean value from php variable $x into js

  1. Should be true when emails are sent

  2. And False when emails are not sent

Then take that Boolean value with javascript print the appropriate message

Complete code of my work can be found here, on my other case I had opened yesterday


if (!$mail->send()) {
   $x = false;

    } else {
     $x = true;

JS Pseudocode


        function (data) {
if(php Boolean variable is true)
      ("$formText").html("Message sent");
else (if php Boolean variableis false) {
      ("$formText").html("Message not sent");
                 } //end function data      
                 );//end done function

Source: stackoverflow-php

Display Custom Post Type on Toolset Types Plugin

I have created a custom post type with php and my problem is that this post type is not appearing in the menu of Toolset Types Plugin. I think that must be some option that I have to fill but I have tried with almost everything and I don´t know why this is happening.

I want to edit the relationship between post types, specially between cars and news.

My code to create the custom post type is this.

function car_post_type() {
    $labels = array(
        'name' => 'Coches',
        'singular_name' => 'Coche',
        'menu_name' => 'Coches',
        'name_admin_bar' => 'Coches',
        'parent_item_colon' => 'Padre:',
        'all_items' => 'Todos los coches',
        'add_new_item' => 'Añadir nuevo coche',
        'add_new' => 'Añadir coche',
        'new_item' => 'Nuevo coche',
        'edit_item' => 'Editar coche',
        'update_item' => 'Actualizar coche',
        'view_item' => 'Ver coche',
        'search_items' => 'Buscar coches',
        'not_found' => 'No hay resultados',
        'not_found_in_trash' => 'No se han encontrado coches en la papelera',
    $rewrite = array(
        'slug' => 'coche',
        'with_front' => true,
        'pages' => true,
        'feeds' => true,
    $args = array(
        'label' => __( 'Car', 'clever' ),
        'description' => __( 'Cars', 'clever' ),
        'labels' => $labels,
        'supports' => array(
            'title', 'editor', 'excerpt', 'thumbnail', 'revisions',
        'taxonomies' => array(),
        'hierarchical' => false,
        'public' => true,
        'show_ui' => true,
        'show_in_menu' => true,
        'menu_position' => 5,
        'menu_icon' => 'dashicons-dashboard',
        'show_in_admin_bar' => true,
        'show_in_nav_menus' => true,
        'can_export' => true,
        'has_archive' => true,
        'exclude_from_search' => false,
        'publicly_queryable' => true,
        'rewrite' => $rewrite,
        'capability_type' => 'post',

    register_post_type('car', $args);
add_action('init', 'car_post_type', 0);

Thanks for your help.

Source: stackoverflow-php