Click here to Skip to main content
15,849,130 members
Home / Discussions / Linux, Apache, MySQL, PHP
   

Linux, Apache, MySQL, PHP

 
GeneralRe: Subtraction of sum of 2 different table colums Pin
Richard MacCutchan18-Jun-20 5:39
mveRichard MacCutchan18-Jun-20 5:39 
GeneralRe: Subtraction of sum of 2 different table colums Pin
Mick Chambers18-Jun-20 3:13
Mick Chambers18-Jun-20 3:13 
GeneralRe: Subtraction of sum of 2 different table colums Pin
Richard MacCutchan18-Jun-20 5:40
mveRichard MacCutchan18-Jun-20 5:40 
QuestionHow to handle response after PayPal subscription approval Pin
Petar Vasilev1-May-20 11:27
Petar Vasilev1-May-20 11:27 
Questionhow to add additional in php query or jquery Pin
captan389926-Apr-20 22:57
captan389926-Apr-20 22:57 
AnswerRe: how to add additional in php query or jquery Pin
Richard MacCutchan26-Apr-20 23:35
mveRichard MacCutchan26-Apr-20 23:35 
AnswerRe: how to add additional in php query or jquery Pin
Richard Deeming27-Apr-20 1:33
mveRichard Deeming27-Apr-20 1:33 
Questionsocket_send not working without break or exit Pin
Member 147929365-Apr-20 3:04
Member 147929365-Apr-20 3:04 
This is my code to connect java socket:-


$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);

socket_connect($socket, '127.0.0.1', 12345);

while(true)

{

    // read a line from the socket

    $line = socket_read($socket, 1024, PHP_NORMAL_READ);

    var_dump($line);

    $someArray = json_decode($line, true);

    $otp = $someArray["otp"];

   if($someArray["msg"] == "otp_generation")

  {

      $myObj = new \stdClass();

      $myObj->msg = "OTP RECEIVED NEED TO CONNECT";

      $send = json_encode($myObj);

      socket_send($socket, $send, strlen($send), 0);

   }

 exit;

}


When connection is established successfully server send one OTP to client and received successfully in client. Then i send data to server OTP RECEIVED acknowledgement, it also received in server. After OTP RECEIVED acknowledgement server send welcome msg to client. I cant get the welcome message. if i remove the (exit) soket_write is not working i can't send data to server. if i put exit data send to server successfully and socket is closed. What can i do for this type of issue.

I don't know what mistake i done.?
QuestionHow to share session cookies from a PHP application with my WordPress website, hosted on the same server and the same domain? Pin
mplusplus29-Dec-19 18:50
mplusplus29-Dec-19 18:50 
AnswerRe: How to share session cookies from a PHP application with my WordPress website, hosted on the same server and the same domain? Pin
who8mypnuts31-Dec-19 17:28
who8mypnuts31-Dec-19 17:28 
QuestionSubmit to view hyperlink using PHP? Pin
Member 829590119-Jul-19 11:11
Member 829590119-Jul-19 11:11 
Questionphp + validation ajax + ISSET() Pin
nelsonpaixaopinto16-May-19 13:51
nelsonpaixaopinto16-May-19 13:51 
QuestionFailover Architecture (Apache/TOMCAT) Pin
Member 143600218-May-19 4:21
Member 143600218-May-19 4:21 
Questionwhat is the error:mysqli_query() expects parameter 1 to be mysqli, null given in Pin
Amir karim30-Apr-19 8:29
Amir karim30-Apr-19 8:29 
AnswerRe: what is the error:mysqli_query() expects parameter 1 to be mysqli, null given in Pin
Richard MacCutchan30-Apr-19 22:39
mveRichard MacCutchan30-Apr-19 22:39 
AnswerRe: what is the error:mysqli_query() expects parameter 1 to be mysqli, null given in Pin
Member 1456979427-Aug-19 8:03
Member 1456979427-Aug-19 8:03 
Questionany latest api for currency converter free Pin
Member 1434851229-Apr-19 22:32
Member 1434851229-Apr-19 22:32 
AnswerRe: any latest api for currency converter free Pin
OriginalGriff29-Apr-19 22:34
mveOriginalGriff29-Apr-19 22:34 
AnswerRe: any latest api for currency converter free Pin
Richard MacCutchan29-Apr-19 22:35
mveRichard MacCutchan29-Apr-19 22:35 
QuestionUtilize webhook using PHP Webhook Listener Pin
Jassim Rahma18-Apr-19 6:04
Jassim Rahma18-Apr-19 6:04 
QuestionHaving Trouble moving my Wordpress site offline using MAMP Pin
Davstr15-Apr-19 9:02
Davstr15-Apr-19 9:02 
QuestionConvert the sql query into linq Pin
Member 1246113211-Apr-19 23:52
Member 1246113211-Apr-19 23:52 
AnswerRe: Convert the sql query into linq Pin
Richard MacCutchan12-Apr-19 0:05
mveRichard MacCutchan12-Apr-19 0:05 
Questionwhat is the error : SQL syntax; check the manual that corresponds to your MariaDB server version? Pin
Amir karim3-Apr-19 21:47
Amir karim3-Apr-19 21:47 
AnswerRe: what is the error : SQL syntax; check the manual that corresponds to your MariaDB server version? Pin
Peter_in_27803-Apr-19 22:02
professionalPeter_in_27803-Apr-19 22:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.