Remotely call a PHP function?

My alliance in a game uses a tool to keep track of information. I am trying to make a program that allows me to simply copy information I want to submit to the system's clipboard and then push it to the "submit form" of the alliance's website.
At any rate, I have the clipboard part working. The part that isn't working is pushing the update to the server. The page I want is called:
spioparser.inc.php
The class declared in that PHP file is "Probeparser"
and the specific function in that file I want to call is "parseEntry($string,$flush=true)"
Is it even possible to have my java program open a connection to the server and send information to this function (this function will automatically insert it into the database.)?
The code I am using to try and connect to the server is this:
URL Gala = new URL("http://" +
                    "<username>:<password>@" +
                    "mtuogame.lhosting.info/GalaxyTool/secret/spioparser.inc.php");
               HttpURLConnection Connection =
                    (HttpURLConnection) Gala.openConnection();
               Connection.setDoInput(true);
               Connection.setDoOutput(true);
               Connection.setRequestProperty( "Content-type",
                    "application/x-www-form-urlencoded" );
               Connection.setRequestProperty( "Content-length",
                    Integer.toString(Input.length()));
               DataInputStream tmp = new DataInputStream(Connection.getInputStream());
               readInput(tmp); //reads all input until EOF
               PrintWriter out = new PrintWriter(Connection.getOutputStream());
               out.print(Input); //sends the report to server?Thanks.
-Kingdud

If you have things set up so that some HTTP request will call that function, then you can certainly call that HTTP request from Java code. As you already know.
But generally you can't just reach out over the network and run arbitrary executable code on somebody else's computer. (Think for a minute what security implications that would have.) Java or not, the answer is the same.

Similar Messages

  • Can we call a php function into coldfusion coding?????????

    can we call a php function into coldfusion??
    if anybody knows that let me know....

    Nope, as IIS can only pass one page to one handler, so it gets passed to ColdFusion *or* PHP. The only way it would work is to have a page with an iFrame containing a PHP page, but that's not calling a PHP function from ColdFusion.
    Dare I ask what it is you're trying to achieve exactly? If it's an extremely complicated function that can't possibly be rewritten, you'd probably want to wrap it up in a webservice and call it from CF.

  • How to call a php function from java...

    helllo fellow java developers!
    Im trying to figure out how I can call a php function from my java code.
    I know it sounds a bit unintiutive, seeing how java is a rich programming language, BUT java simply cannot do the task that the php script can do. It simply acts differently.
    So I am trying to call a php function, that returns a string object, and capture that string object....
    is this possible?
    something like....
    String strMyString = phpFunction( strVariable )
    ???????/ any ideaS?

    idea #1 - come up with a better plan that doesn't involve invoking php from java.
    Give one example of something php can do that java can't.
    idea #2 - forget java, and just write it in php.
    Involving multiple frameworks/languages/runtime environments is a recipe for an overcomplicated solution that will be impossible to maintain.
    I'd say keep it simple and stupid, and stick with one language.
    If you're still hooked on the idea, maybe try [this link|http://www.infoq.com/news/2007/10/php-java-stack]

  • Calling php functions from sap

    hi all,
       I have to call the php functions from the r/3. my requirement is that I have to read the mail from the internet adress([email protected]) through php and then send its content in r/3.For that I have to write function in php which are rfc enabled and then call those function in r/3. Can anyone help me in calling the php function from r/3 and how to get the content of mail in r/3.I have to create php as a server and r/3 as client.
    regards
    ashish

    hi Anton,
    I have get have to read the read the internert mail in php hrough this class . I am sending you that code test_pop3.php. For this you even need pop3 class. I am  even sending you that code.It will be better if you give me your mail id. But I donot know how to create a rfc enabled function in php that can be read in r/3 .
    <?php
    test_pop3.php
    @(#) $Header: /home/mlemos/cvsroot/pop3/test_pop3.php,v 1.6 2005/10/18 17:44:46 mlemos Exp $
    ?><HTML>
    <HEAD>
    <TITLE>Read email attachments from pop3 server</TITLE>
    </HEAD>
    <BODY>
    <?php
         require("pop3.php");
      /* Uncomment when using SASL authentication mechanisms */
         require("sasl.php");
         $pop3=new pop3_class;
         $pop3->hostname="";             /* POP 3 server host name                      */
         $pop3->port=110;                         /* POP 3 server host port                      */
         $user="";          /* Authentication user name                    */
         $password="";                    /* Authentication password                     */
         $pop3->realm="";                         /* Authentication realm or domain              */
         $pop3->workstation="";                   /* Workstation for NTLM authentication         */
         $apop=0;                                 /* Use APOP authentication                     */
         $pop3->authentication_mechanism="USER";  /* SASL authentication mechanism               */
         $pop3->debug=0;                          /* Output debug information                    */
         $pop3->html_debug=0;                     /* Debug information is in HTML                */
         $pop3->join_continuation_header_lines=1; /* Concatenate headers split in multiple lines */
         if(($error=$pop3->Open())=="")
              echo "<PRE>Connected to the POP3 server "".$pop3->hostname."".</PRE>\n";
              if(($error=$pop3->Login($user,$password,$apop))=="")
                   echo "<PRE>User "$user" logged in.</PRE>\n";
                   if(($error=$pop3->Statistics($messages,$size))=="")
                        echo "<PRE>There are $messages messages in the mail box with a total of $size bytes.</PRE>\n";
                        $result=$pop3->ListMessages("",0);
                        if(GetType($result)=="array")
                             for(Reset($result),$message=0;$message<count($result);Next($result),$message++)
                                  echo "<PRE>Message ",Key($result)," - ",$result[Key($result)]," bytes.</PRE>\n";
                             $result=$pop3->ListMessages("",1);
                             if(GetType($result)=="array")
                                  for(Reset($result),$message=0;$message<count($result);Next($result),$message++)
                                       echo "<PRE>Message ",Key($result),", Unique ID - \"",$result[Key($result)],"\"</PRE>\n";
                                  if($messages>0)
                                            $var = 1;     
                                       if(($error=$pop3->RetrieveMessage($var,$headers,$body,-1))=="")
                                            for($line=0;$line<count($headers);$line++)
                                       if(($error=$pop3->RetrieveMessage(34,$headers,$body,-1))=="")
                                            echo "<PRE>Message 1:\n-Message headers starts below-</PRE>\n";
                                            for($line=0;$line<count($headers);$line++)
                                                 echo "<PRE>",HtmlSpecialChars($headers[$line]),"</PRE>\n";
                                                 echo "<PRE>-Message headers ends above-\n-Message body starts below-</PRE>\n";
                                            for($line=0;$line<count($body);$line++)
                                                 echo "<PRE>",HtmlSpecialChars($body[$line]),"</PRE>\n";
                                            echo "<PRE>-Message body ends above-</PRE>\n";
                                            if(($error=$pop3->DeleteMessage(1))=="")
                                                 echo "<PRE>Marked message 1 for deletion.</PRE>\n";
                                                 if(($error=$pop3->ResetDeletedMessages())=="")
                                                      echo "<PRE>Resetted the list of messages to be deleted.</PRE>\n";
                                  if($error==""
                                  && ($error=$pop3->Close())=="")
                                       echo "<PRE>Disconnected from the POP3 server "".$pop3->hostname."".</PRE>\n";
                             else
                                  $error=$result;
                        else
                             $error=$result;
         if($error!="")
              echo "<H2>Error: ",HtmlSpecialChars($error),"</H2>";
    ?>
    </BODY>
    </HTML>
    *******start of new php file********
    <?php
    pop3.php
    @(#) $Header: /home/mlemos/cvsroot/pop3/pop3.php,v 1.15 2005/10/18 17:43:25 mlemos Exp $
    class pop3_class
         var $hostname="";
         var $port=110;
         var $quit_handshake=0;
         var $error="";
         var $authentication_mechanism="USER";
         var $realm="";
         var $workstation="";
         var $join_continuation_header_lines=1;
         /* Private variables - DO NOT ACCESS */
         var $connection=0;
         var $state="DISCONNECTED";
         var $greeting="";
         var $must_update=0;
         var $debug=0;
         var $html_debug=0;
         var $next_token="";
         /* Private methods - DO NOT CALL */
         Function Tokenize($string,$separator="")
              if(!strcmp($separator,""))
                   $separator=$string;
                   $string=$this->next_token;
              for($character=0;$character<strlen($separator);$character++)
                   if(GetType($position=strpos($string,$separator[$character]))=="integer")
                        $found=(IsSet($found) ? min($found,$position) : $position);
              if(IsSet($found))
                   $this->next_token=substr($string,$found+1);
                   return(substr($string,0,$found));
              else
                   $this->next_token="";
                   return($string);
         Function SetError($error)
              return($this->error=$error);
         Function OutputDebug($message)
              $message.="\n";
              if($this->html_debug)
                   $message=str_replace("\n","<br />\n",HtmlEntities($message));
              echo $message;
              flush();
         Function GetLine()
              for($line="";;)
                   if(feof($this->connection))
                        return(0);
                   $line.=fgets($this->connection,100);
                   $length=strlen($line);
                   if($length>=2
                   && substr($line,$length-2,2)=="\r\n")
                        $line=substr($line,0,$length-2);
                        if($this->debug)
                             $this->OutputDebug("S $line");
                        return($line);
         Function PutLine($line)
              if($this->debug)
                   $this->OutputDebug("C $line");
              return(fputs($this->connection,"$line\r\n"));
         Function OpenConnection()
              if($this->hostname=="")
                   return($this->SetError("2 it was not specified a valid hostname"));
              if($this->debug)
                   $this->OutputDebug("Connecting to ".$this->hostname." ...");
              if(($this->connection=@fsockopen($this->hostname,$this->port,$error))==0)
                   switch($error)
                        case -3:
                             return($this->SetError("-3 socket could not be created"));
                        case -4:
                             return($this->SetError("-4 dns lookup on hostname \"$hostname\" failed"));
                        case -5:
                             return($this->SetError("-5 connection refused or timed out"));
                        case -6:
                             return($this->SetError("-6 fdopen() call failed"));
                        case -7:
                             return($this->SetError("-7 setvbuf() call failed"));
                        default:
                             return($this->SetError($error." could not connect to the host \"".$this->hostname."\""));
              return("");
         Function CloseConnection()
              if($this->debug)
                   $this->OutputDebug("Closing connection.");
              if($this->connection!=0)
                   fclose($this->connection);
                   $this->connection=0;
         /* Public methods */
         /* Open method - set the object variable $hostname to the POP3 server address. */
         Function Open()
              if($this->state!="DISCONNECTED")
                   return($this->SetError("1 a connection is already opened"));
              if(($error=$this->OpenConnection())!="")
                   return($error);
              $this->greeting=$this->GetLine();
              if(GetType($this->greeting)!="string"
              || $this->Tokenize($this->greeting," ")!="+OK")
                   $this->CloseConnection();
                   return($this->SetError("3 POP3 server greeting was not found"));
              $this->Tokenize("<");
              $this->must_update=0;
              $this->state="AUTHORIZATION";
              return("");
         /* Close method - this method must be called at least if there are any
         messages to be deleted */
         Function Close()
              if($this->state=="DISCONNECTED")
                   return($this->SetError("no connection was opened"));
              if($this->must_update
              || $this->quit_handshake)
                   if($this->PutLine("QUIT")==0)
                        return($this->SetError("Could not send the QUIT command"));
                   $response=$this->GetLine();
                   if(GetType($response)!="string")
                        return($this->SetError("Could not get quit command response"));
                   if($this->Tokenize($response," ")!="+OK")
                        return($this->SetError("Could not quit the connection: ".$this->Tokenize("\r\n")));
              $this->CloseConnection();
              $this->state="DISCONNECTED";
              return("");
         /* Login method - pass the user name and password of POP account.  Set
         $apop to 1 or 0 wether you want to login using APOP method or not.  */
         Function Login($user,$password,$apop=0)
              if($this->state!="AUTHORIZATION")
                   return($this->SetError("connection is not in AUTHORIZATION state"));
              if($apop)
                   if(!strcmp($this->greeting,""))
                        return($this->SetError("Server does not seem to support APOP authentication"));
                   if($this->PutLine("APOP $user ".md5("<".$this->greeting.">".$password))==0)
                        return($this->SetError("Could not send the APOP command"));
                   $response=$this->GetLine();
                   if(GetType($response)!="string")
                        return($this->SetError("Could not get APOP login command response"));
                   if($this->Tokenize($response," ")!="+OK")
                        return($this->SetError("APOP login failed: ".$this->Tokenize("\r\n")));
              else
                   $authenticated=0;
                   if(strcmp($this->authentication_mechanism,"USER")
                   && function_exists("class_exists")
                   && class_exists("sasl_client_class"))
                        if(strlen($this->authentication_mechanism))
                             $mechanisms=array($this->authentication_mechanism);
                        else
                             $mechanisms=array();
                             if($this->PutLine("CAPA")==0)
                                  return($this->SetError("Could not send the CAPA command"));
                             $response=$this->GetLine();
                             if(GetType($response)!="string")
                                  return($this->SetError("Could not get CAPA command response"));
                             if(!strcmp($this->Tokenize($response," "),"+OK"))
                                  for(;;)
                                       $response=$this->GetLine();
                                       if(GetType($response)!="string")
                                            return($this->SetError("Could not retrieve the supported authentication methods"));
                                       switch($this->Tokenize($response," "))
                                            case ".":
                                                 break 2;
                                            case "SASL":
                                                 for($method=1;strlen($mechanism=$this->Tokenize(" "));$method++)
                                                      $mechanisms[]=$mechanism;
                                                 break;
                        $sasl=new sasl_client_class;
                        $sasl->SetCredential("user",$user);
                        $sasl->SetCredential("password",$password);
                        if(strlen($this->realm))
                             $sasl->SetCredential("realm",$this->realm);
                        if(strlen($this->workstation))
                             $sasl->SetCredential("workstation",$this->workstation);
                        do
                             $status=$sasl->Start($mechanisms,$message,$interactions);
                        while($status==SASL_INTERACT);
                        switch($status)
                             case SASL_CONTINUE:
                                  break;
                             case SASL_NOMECH:
                                  if(strlen($this->authentication_mechanism))
                                       return($this->SetError("authenticated mechanism ".$this->authentication_mechanism." may not be used: ".$sasl->error));
                                  break;
                             default:
                                  return($this->SetError("Could not start the SASL authentication client: ".$sasl->error));
                        if(strlen($sasl->mechanism))
                             if($this->PutLine("AUTH ".$sasl->mechanism.(IsSet($message) ? " ".base64_encode($message) : ""))==0)
                                  return("Could not send the AUTH command");
                             $response=$this->GetLine();
                             if(GetType($response)!="string")
                                  return("Could not get AUTH command response");
                             switch($this->Tokenize($response," "))
                                  case "+OK":
                                       $response="";
                                       break;
                                  case "+":
                                       $response=base64_decode($this->Tokenize("\r\n"));
                                       break;
                                  default:
                                       return($this->SetError("Authentication error: ".$this->Tokenize("\r\n")));
                             for(;!$authenticated;)
                                  do
                                       $status=$sasl->Step($response,$message,$interactions);
                                  while($status==SASL_INTERACT);
                                  switch($status)
                                       case SASL_CONTINUE:
                                            if($this->PutLine(base64_encode($message))==0)
                                                 return("Could not send message authentication step message");
                                            $response=$this->GetLine();
                                            if(GetType($response)!="string")
                                                 return("Could not get authentication step message response");
                                            switch($this->Tokenize($response," "))
                                                 case "+OK":
                                                      $authenticated=1;
                                                      break;
                                                 case "+":
                                                      $response=base64_decode($this->Tokenize("\r\n"));
                                                      break;
                                                 default:
                                                      return($this->SetError("Authentication error: ".$this->Tokenize("\r\n")));
                                            break;
                                       default:
                                            return($this->SetError("Could not process the SASL authentication step: ".$sasl->error));
                   if(!$authenticated)
                        if($this->PutLine("USER $user")==0)
                             return($this->SetError("Could not send the USER command"));
                        $response=$this->GetLine();
                        if(GetType($response)!="string")
                             return($this->SetError("Could not get user login entry response"));
                        if($this->Tokenize($response," ")!="+OK")
                             return($this->SetError("User error: ".$this->Tokenize("\r\n")));
                        if($this->PutLine("PASS $password")==0)
                             return($this->SetError("Could not send the PASS command"));
                        $response=$this->GetLine();
                        if(GetType($response)!="string")
                             return($this->SetError("Could not get login password entry response"));
                        if($this->Tokenize($response," ")!="+OK")
                             return($this->SetError("Password error: ".$this->Tokenize("\r\n")));
              $this->state="TRANSACTION";
              return("");
         /* Statistics method - pass references to variables to hold the number of
         messages in the mail box and the size that they take in bytes.  */
         Function Statistics(&$messages,&$size)
              if($this->state!="TRANSACTION")
                   return($this->SetError("connection is not in TRANSACTION state"));
              if($this->PutLine("STAT")==0)
                   return($this->SetError("Could not send the STAT command"));
              $response=$this->GetLine();
              if(GetType($response)!="string")
                   return($this->SetError("Could not get the statistics command response"));
              if($this->Tokenize($response," ")!="+OK")
                   return($this->SetError("Could not get the statistics: ".$this->Tokenize("\r\n")));
              $messages=$this->Tokenize(" ");
              $size=$this->Tokenize(" ");
              return("");
         /* ListMessages method - the $message argument indicates the number of a
         message to be listed.  If you specify an empty string it will list all
         messages in the mail box.  The $unique_id flag indicates if you want
         to list the each message unique identifier, otherwise it will
         return the size of each message listed.  If you list all messages the
         result will be returned in an array. */
         Function ListMessages($message,$unique_id)
              if($this->state!="TRANSACTION")
                   return($this->SetError("connection is not in TRANSACTION state"));
              if($unique_id)
                   $list_command="UIDL";
              else
                   $list_command="LIST";
              if($this->PutLine("$list_command".($message ? " ".$message : ""))==0)
                   return($this->SetError("Could not send the $list_command command"));
              $response=$this->GetLine();
              if(GetType($response)!="string")
                   return($this->SetError("Could not get message list command response"));
              if($this->Tokenize($response," ")!="+OK")
                   return($this->SetError("Could not get the message listing: ".$this->Tokenize("\r\n")));
              if($message=="")
                   for($messages=array();;)
                        $response=$this->GetLine();
                        if(GetType($response)!="string")
                             return($this->SetError("Could not get message list response"));
                        if($response==".")
                             break;
                        $message=intval($this->Tokenize($response," "));
                        if($unique_id)
                             $messages[$message]=$this->Tokenize(" ");
                        else
                             $messages[$message]=intval($this->Tokenize(" "));
                   return($messages);
              else
                   $message=intval($this->Tokenize(" "));
                   $value=$this->Tokenize(" ");
                   return($unique_id ? $value : intval($value));
         /* RetrieveMessage method - the $message argument indicates the number of
         a message to be listed.  Pass a reference variables that will hold the
         arrays of the $header and $body lines.  The $lines argument tells how
         many lines of the message are to be retrieved.  Pass a negative number
         if you want to retrieve the whole message. */
         Function RetrieveMessage($message,&$headers,&$body,$lines)
              if($this->state!="TRANSACTION")
                   return($this->SetError("connection is not in TRANSACTION state"));
              if($lines<0)
                   $command="RETR";
                   $arguments="$message";
              else
                   $command="TOP";
                   $arguments="$message $lines";
              if($this->PutLine("$command $arguments")==0)
                   return($this->SetError("Could not send the $command command"));
              $response=$this->GetLine();
              if(GetType($response)!="string")
                   return($this->SetError("Could not get message retrieval command response"));
              if($this->Tokenize($response," ")!="+OK")
                   return($this->SetError("Could not retrieve the message: ".$this->Tokenize("\r\n")));
              for($headers=$body=array(),$line=0;;)
                   $response=$this->GetLine();
                   if(GetType($response)!="string")
                        return($this->SetError("Could not retrieve the message"));
                   switch($response)
                        case ".":
                             return("");
                        case "":
                             break 2;
                        default:
                             if(substr($response,0,1)==".")
                                  $response=substr($response,1,strlen($response)-1);
                             break;
                   if($this->join_continuation_header_lines
                   && $line>0
                   && ($response[0]=="\t"
                   || $response[0]==" "))
                        $headers[$line-1].=$response;
                   else
                        $headers[$line]=$response;
                        $line++;
              for($line=0;;$line++)
                   $response=$this->GetLine();
                   if(GetType($response)!="string")
                        return($this->SetError("Could not retrieve the message"));
                   switch($response)
                        case ".":
                             return("");
                        default:
                             if(substr($response,0,1)==".")
                                  $response=substr($response,1,strlen($response)-1);
                             break;
                   $body[$line]=$response;
              return("");
         /* DeleteMessage method - the $message argument indicates the number of
         a message to be marked as deleted.  Messages will only be effectively
         deleted upon a successful call to the Close method. */
         Function DeleteMessage($message)
              if($this->state!="TRANSACTION")
                   return($this->SetError("connection is not in TRANSACTION state"));
              if($this->PutLine("DELE $message")==0)
                   return($this->SetError("Could not send the DELE command"));
              $response=$this->GetLine();
              if(GetType($response)!="string")
                   return($this->SetError("Could not get message delete command response"));
              if($this->Tokenize($response," ")!="+OK")
                   return($this->SetError("Could not delete the message: ".$this->Tokenize("\r\n")));
              $this->must_update=1;
              return("");
         /* ResetDeletedMessages method - Reset the list of marked to be deleted
         messages.  No messages will be marked to be deleted upon a successful
         call to this method.  */
         Function ResetDeletedMessages()
              if($this->state!="TRANSACTION")
                   return($this->SetError("connection is not in TRANSACTION state"));
              if($this->PutLine("RSET")==0)
                   return($this->SetError("Could not send the RSET command"));
              $response=$this->GetLine();
              if(GetType($response)!="string")
                   return($this->SetError("Could not get reset deleted messages command response"));
              if($this->Tokenize($response," ")!="+OK")
                   return($this->SetError("Could not reset deleted messages: ".$this->Tokenize("\r\n")));
              $this->must_update=0;
              return("");
         /* IssueNOOP method - Just pings the server to prevent it auto-close the
         connection after an idle timeout (tipically 10 minutes).  Not very
         useful for most likely uses of this class.  It's just here for
         protocol support completeness.  */
         Function IssueNOOP()
              if($this->state!="TRANSACTION")
                   return($this->SetError("connection is not in TRANSACTION state"));
              if($this->PutLine("NOOP")==0)
                   return($this->SetError("Could not send the NOOP command"));
              $response=$this->GetLine();
              if(GetType($response)!="string")
                   return($this->SetError("Could not NOOP command response"));
              if($this->Tokenize($response," ")!="+OK")
                   return($this->SetError("Could not issue the NOOP command: ".$this->Tokenize("\r\n")));
              return("");
    ?>

  • PHP- Oracle not working- Call to undefined function OCILogon() ERROR

    Hi,
    I am trying to just do a test program to test php - oracle connection,
    My versions are: php5.2.1-Win32 and Oracle 10g
    I have made the following settings:
    1.) Uncommented the following lines in php.ini:
    extension=php_oci8.dll
    extension=php_oracle.dll
    2.) Set extension_dir = "C:\php-5.2.1-Win32\ext"
    Changed the httpd.conf file as: ADDED
    1.)LoadModule php5_module C:/php-5.2.1-Win32/php5apache2.dll
    2.)PHPIniDir "C:/Program Files/Apache Group/Apache2/conf-"
    3.) LoadFile "C:/php/php5ts.dll"
    4.)<IfModule php5_module>
    <Location />
    AddType text/html .php .phps
    AddHandler application/x-httpd-php .php
    AddHandler application/x-httpd-php-source .phps
    </Location>
    </IfModule>
    5.) AddType application/x-httpd-php .php
    AddType application/x-httpd-php .phtml
    AddType application/x-httpd-php-source .phps
    But when I am tryin to run the following program:
    <?php
    echo "<h1>OCI Test</h1>\n";
    $conn=OCILogon("system", "sheetal16", "orcl");
    $stmt = OCIParse($conn, "SELECT table_name FROM user_tables ORDER BY table_name");
    OCIExecute($stmt, OCI_DEFAULT);
    while (OCIFetch($stmt)) {
         $table_name = OCIResult($stmt, "TABLE_NAME");
         echo "$table_name<br />\n";
    OCIFreeStatement($stmt);
    OCILogoff($conn);
    ?>
    I am getting the following error:
    OCI Test
    Fatal error: Call to undefined function OCILogon() in C:\Program Files\Apache Group\Apache2\htdocs\test2.php on line 3
    Please help me to solve this problem.
    Thanks,
    Sheetal

    See Re: PHP- Oracle not working- Call to undefined function OCILogon() ERROR

  • Fatal error: Call to undefined function ocilogon() in d:\SITO\VENTST.php on

    Hi all,
    when I use this php script
    <?php
    $db_conn = ocilogon("venus_pkg","venus_pkg","ventst");
    ?>
    I get this error:
    Fatal error: Call to undefined function ocilogon() in d:\SITO\VENTST.php on line 3
    How to configure Apache 1.3.3 with PHP version 5 to use OCI?
    Thanks in advance

    Hi,
    Even I am facing the same problem. I have done all the above mentioned settings. I have set the php.ini file with the extension dirt to "php/ext" and also uncommented the extension=phpoci8.dll . we r using PHP5.2.0, Apache 2.2 and Oracle 10g and installed both the XE and the Client edition of oRACLE 10G on windows XP.
    Trying to execute the code:
    <?php
    echo "<h1>OCI Test</h1>\n";
    $conn=OCILogon("username", "password", "system");
    $stmt = OCIParse($conn, "SELECT * FROM employee ORDER BY name");
    OCIExecute($stmt, OCI_DEFAULT);
    while (OCIFetch($stmt)) {
         $table_name = OCIResult($stmt, "employee");
         echo "$table_name<br />\n";
    OCIFreeStatement($stmt);
    OCILogoff($conn);
    ?>
    and getting the error as:
    Debug Error: C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\test.php line 3 - Call to undefined function OCILogon()
    Please help me out solving this problem.

  • Fatal error: Call to undefined function add__custom_background() in /home4/dargonza/public_html/wp-content/themes/twentythirteen/functions.php on line 24

    Fatal error: Call to undefined function add__custom_background() in /home4/dargonza/public_html/wp-content/themes/twentythirteen/functions.php on line 24
    While practicing with HTML with WordPress Themes, I inserted a phrase (add_custom_background) in the wrong sentence.

    Its wordpress theme issue
    *issue in path location
    Try with wordpress forum
    *http://wordpress.org/support/
    May be try this
    *http://wordpress.org/support/topic/fatal-error-call-to-undefined-function-add_custom_background

  • How to retrieve a string value from a PHP function call

    Should this string be the return value of the PHP function?
    Or should it be embedded in the response HTML? Any examples?

    This is what I got so far:
    footer.mxml in Flex Builder 3:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute" creationComplete="ts_request()">
    <mx:Script>
    <![CDATA[
    public function ts_request():void {
    timestampRequest.send();
    ]]>
    </mx:Script>
    <mx:Canvas width="836" height="36"
    backgroundColor="#05075C">
    <mx:Label id="timestamp"
    text="{timestampRequest.lastResult.timestamp}" color="#FEFEFE"
    height="20" y="10" textAlign="left" width="221" x="10"/>
    </mx:Canvas>
    <mx:HTTPService id="timestampRequest" url="
    http://www.ABC.com/timestamp.php"
    useProxy="false" method="POST" />
    </mx:Application>
    Here is the timestamp.php on the www.ABC.com web server. I
    have tested the php by directly access it with
    "www.ABC.com/timestamp.php" and it shows the timestamp correctly:
    <?php
    putenv($timezone);
    $Return = "<timestamp>".date("m/d/Y H:i:s", time())."
    CST"."</timestamp>";
    print($Return);
    ?>
    When I run footer.mxml in Flex 3 Builder, I got an error:
    This file cannot be launched.
    Where did I do wrong?

  • Exception Handling when calling a PHP Webservice

    I followed a great tutorial on setting calling PHP services from ABAP ([Accessing arbitrary databases from within ABAP using a PHP data hub and web services|Accessing arbitrary databases from within ABAP using a PHP data hub and web services]).   Unfortunately I'm getting occassional CX_AI_SYSTEM_FAULT exceptions and I don't know how to handle them gracefully.
    I'm calling the web service ABAP code from an RFC function which for some reason doesn't allow TRY/CATCH statements (I get a message saying "During RFC/update, no exception classes can be used".) 
    I'd be happy enough just to ignore the error since it's currently dumping users out of order entry.
    To make matters more complicated, I can't TRY/CATCH my own RFC since I'm calling it from GuiXT
    I'd really appreciate help on this; I'm pretty stumped.
    Thanks,
    Lee

    Well, to answer my own question, I found an ugly workaround.
    Change attribute from "Remote-enabled" to "Normal Function", add the TRY/CATCH logic.  Then call this function from the "real" RFC.
    Off to program like it's 1979!
    Lee

  • Problem while calling an RFC Function Module in Background

    Hello,
    I have created a RFC function module for reading data from an external DB system. The FM calls an external RFC program (coded in C++ using RFC SDK), which delivers the required data. This external program is maintainged as an TCP RFC Connection in SM59.
    Further I have created a report, that calls the RFC function module to get the data from the external RFC programm.
    My problem is, when I call the report in foreground, everything works OK, the RFC connection works and data can be read from the external program.
    However, when I schedule the report to run in background as a job, the report is stating in the protocoll that there was a problem calling the defined RFC connection (although the connection is working properly at that time).
    More funny is, this particular problem with running in background occurs only in the productive system, in test and development system the report works correctly also while running as a job in background.
    Can you suggest the solution to this problem? Could it be something with authorisations or server settings?
    I will be on holiday for the next 6 weeks, so take your time to answer .
    Regards,
    Dusan.
    Edited by: Julius Bussche on Jan 22, 2009 7:19 PM
    Please read the forum rules about u r g e n t ...

    This is an external RFC server program, not a remote enabled ABAP RFC function module as the others seem to be assuming, right?
    Is it possible that your DEV and QAS systems only have one application server, but the PROD has many and dedicated one(s) for processing low priority background jobs?
    It might be that the target server of your TCP connection is not this BTC instance, and your RFC server is returning the data "locally" - so, into nirvana...
    Just guessing, but might be worth checking.
    Cheers,
    Julius

  • Calling a RFC Function Module

    Hello Guys,
    I have a question regarding calling a RFC function module.
    In BW - BI 7.0 I call a RFC function module:
    (The ABAP program in BW-BI 7.0 is below)
      CALL FUNCTION ''ZTESTFUNCTIONMODULE'  " Function module in ECC
         DESTINATION 'DECCLNT110'  " ECC system
        TABLES
          it_gl_item   = it_gl
          it_errlog_gl = it_errlog_gl.
    The 'ZTESTFUNCTIONMODULE'   is RFC enabled in the ECC system.
    The purpose is we retarct the data from BW to ECC.
    When I run the function module it always asks for the user id and password.
    The SAP logon screen appears and it asks for the user id and password.
    The destination is maintained in the SM59 transaction and also the user is maintained there. I think it should login automatically into remote system and return the tables. is it correct. How to skip the logon screen.
    Do I have to pass the user id and password in the function module. I think it should take the user id from the SM59 destination. Is it correct.
    Please advise. As always thanks for your help guys.

    Hi Senthil,
    I think you answered your query in your question itself
    The user ID and password need to be maintained in RFC destination in SM59.
    Go to SM59 and then click on test connection..if it does not ask for ID and passwoed that means correct ID and password is maintained in SM59 otherwise maintain it.
    Regards,
    Atish

  • Error -Call to undefined function: ocilogon() ( Php4.4+ Apache2.2 +Windows)

    1) Configured Php4.4 to have oci8 enabled with Apache2.2 on Windows 2000 ( service pack4). No error at the time of Apache start but when trying to connect to Oracle using Oracle Instant Client below error is thrown..
    "Fatal error: Call to undefined function: ocilogon() in C:\Apache2 \htdocs\star\dbconnect.php on line 7"
    Configuration steps..
    1) Uncommented "extension=php_oci8.dll" in php.ini to enable oci API's.
    2)Configured Oracle Instant client by adding path to Windows path variable as per it documentation.
    3)Copied all Php4.4 dlls( oci..etc) into the directory pointed by "PHPIniDir", which is configured in httpd.conf
    If i run phpinfo(), i dont see oci8 enabled in the output. I guess there is problem in the configuration? Any insights into the error is greatly appreciated..
    BTW, I did same configuartion on Windows XP and is working fine..

    Also, I dont see path value for path variable in phpinfo() ouput for Oracle Instant Client, which i updated in Windows?
    Below is the snippet of ouput from phpinfo().
    Apache Environment
    Variable Value
    HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*
    HTTP_ACCEPT_LANGUAGE en-us
    HTTP_ACCEPT_ENCODING gzip, deflate
    HTTP_USER_AGENT Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
    HTTP_HOST localhost
    HTTP_CONNECTION Keep-Alive
    PATH D:\CESi\isis\bin;D:\CESi\Gateway\mico-win32-bin\;D:\CESi\Gateway\;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Support Tools\
    SystemRoot C:\WINNT
    COMSPEC C:\WINNT\system32\cmd.exe
    PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
    WINDIR C:\WINNT
    SERVER_SIGNATURE <address>Apache/2.0.59 (Win32) PHP/4.4.4 Server at localhost Port 80</address>
    SERVER_SOFTWARE Apache/2.0.59 (Win32) PHP/4.4.4
    SERVER_NAME localhost
    SERVER_ADDR 127.0.0.1
    SERVER_PORT 80
    REMOTE_ADDR 127.0.0.1
    DOCUMENT_ROOT C:/Apache2/htdocs
    SERVER_ADMIN [email protected]
    SCRIPT_FILENAME C:/Apache2/htdocs/info.php
    REMOTE_PORT 4977
    GATEWAY_INTERFACE CGI/1.1
    SERVER_PROTOCOL HTTP/1.1
    REQUEST_METHOD GET
    QUERY_STRING no value
    REQUEST_URI /info.php
    SCRIPT_NAME /info.php
    Environment
    Variable Value
    ALLUSERSPROFILE C:\Documents and Settings\All Users
    CMM_CELL CSTAR_STAR
    CommonProgramFiles C:\Program Files\Common Files
    COMPUTERNAME STAR-SM-NR-PROD
    ComSpec C:\WINNT\system32\cmd.exe
    NUMBER_OF_PROCESSORS 2
    OS Windows_NT
    Os2LibPath C:\WINNT\system32\os2\dll;
    Path D:\CESi\isis\bin;D:\CESi\Gateway\mico-win32-bin\;D:\CESi\Gateway\;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Support Tools\
    PATHEXT .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
    PROCESSOR_ARCHITECTURE x86
    PROCESSOR_IDENTIFIER x86 Family 6 Model 11 Stepping 1, GenuineIntel
    PROCESSOR_LEVEL 6
    PROCESSOR_REVISION 0b01
    ProgramFiles C:\Program Files
    SMS_LOCAL_DIR C:\WINNT
    SystemDrive C:
    SystemRoot C:\WINNT
    TEMP C:\WINNT\TEMP
    TMP C:\WINNT\TEMP
    USERPROFILE C:\Documents and Settings\xwback
    windir C:\WINNT
    AP_PARENT_PID 884

  • Fatal error: Call to undefined function oci_connect()

    I get below error when I try to connect to oracle in PHP on SUSE 10. I orginally posted this question in PHP forum but I was advised to post it to Linux forum. so here is the error and other details.
    Fatal error: Call to undefined function oci_connect()
    I followed one of the documentation realed to this error and I get below error.
    /home/knaik # php -version
    PHP 5.2.5 with Suhosin-Patch 0.9.6.2 (cli) (built: Apr 23 2008 23:35:28)
    Copyright (c) 1997-2007 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies
    /home/knaik/oci8-1.3.5 # phpize
    Configuring for:
    PHP Api Version: 20041225
    Zend Module Api No: 20060613
    Zend Extension Api No: 220060519
    Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF
    environment variable is set correctly and then rerun this script.
    I was looking into below link. But I could not find oci8.so file after the OCI build.
    http://www.orware.net/tips-and-how-tos/plesk/46-oracle-oci8-php-installation.html
    ===================================================
    ===> In reply to my request *"mgogala's"* reply was as below.
    Install autoconf using yast. Check whether the package is installed by using:
    $>rpm -qa autoconf
    autoconf-2.59-5
    BTW, this is not a Linux forum. There is one on OTN, I'm sure that Frits Hoogland will gladly help you out.
    ====>
    I am not able to find "autoconf" rpm for Suse 10.
    Below is the exact version details of the O/S.
    #*more SuSE-release*
    SUSE Linux Enterprise Server 10 (i586)
    VERSION = 10
    PATCHLEVEL = 2
    #*uname -a*
    Linux osdvglobalopsdv02 2.6.16.60-0.21-smp #1 SMP Tue May 6 12:41:02 UTC 2008 i686 i686 i386 GNU/Linux
    Please let me know, from where can I download this RPM?
    Thanks
    Shelly

    btw, this is the oracle enterprise linux forum, the forum specific for oracle's linux distro, there is a general linux forum here: Generic Linux

  • Presence status not changed when using Lync 2010 Remote Call Control

    Hello,
    I'm currently testing the Remote Call Control functionality of Lync 2010. Call management works fine but I'm surprised that my presence status does not change to "In a Call" when the call is established.
    OriginatedEvent, DeliveredEvent and EstablishedEvent are forwarded correctly to Lync Client 2010. All responses are "200 OK".
    Is there something more to send to Lync Server 2010 so the status of the Lync Client gets correctly updated to "In a Call" ? Or is a plugin for the Lync Client necessary to achieve this ?
    Thank you in advance,
    Martin

    I think there's something missing from your scenario and I don't believe you would need a plugin for this.  It's been forever since I've set up RCC with Lync 2010 however.  I know this isn't what you're looking for, but I've used this product in
    the past to configure Lync and RCC with third party PBXs that don't support Lync/RCC but do have a TAPI interface.
    http://www.estos.com/products/drivers-middleware/callcontrolgateway400.html I've been able to get a free trial before and it worked like a charm for an old 3COM phone system.  If you can get a trial it might help you compare apples to apples provided
    you have a TAPI driver for your PBX.
    For more details on what happens behind the scenes, you might have some better luck in the MSDN dev forums:
    http://social.msdn.microsoft.com/Forums/en-US/home?category=uc
    Please remember, if you see a post that helped you please click "Vote As Helpful" and if it answered your question please click "Mark As Answer".
    SWC Unified Communications
    This forum post is based upon my personal experience and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

  • The FM "DD_DOMA_GET" not released for 'remote' calls.

    Hi,
    When I try to import RFCs from my CRM system in XI, I am getting the following exception:
    com.sap.aii.ibrep.sbeans.upload.RemoteUploadException: The function module "DD_DOMA_GET" not released for 'remote' calls.
    Solution please!!
    Regards,
    Mahesh.

    Hi,
      Making remote enabled will solve this,
    see my reply(Anirban) and jacob's reply in this thread(although this was with idoc)
    Unable to import SAP objects
    For, <i>We tried to make it Remote Enabled but it asks for "Access Key". How to go further?
    </i>
    You need a devloper access key for FM, in SE37
    you can get one in market place, follow this thread,
    Whats Development Key
    Regards,
    Anirban.

Maybe you are looking for

  • Older ipod and a new windows laptop...why can't I use my ipod on it?

    I have an old ipod, version 3.1.1 with the clickwheel and have always downloaded song on my mac. i just purchased a new pc laptop and tried to hook up my ipod but it said it won't work on a pc. is it because its so old?

  • RFC to XI error

    Hi All, My scenario is SAP 4.6 RFC to XI 3.0 to SAP 4.6 RFC...I created function Z_SEND_PCARD_PAYMENTS in 4.6 but when it gets to XI I get the following message in XI log...JCO.Server could not find server function 'Z_SEND_PCARD_PAYMENTS'....The only

  • 11g BI Publisher Report - Disable Schedule option

    Hi, Currently we have moved our BI Publisher catalog objects to the BI catalog and security is controlled through the web catalog for the BI publisher reports also. As part of it, we have given 'Read' only access to the BI publisher report and the us

  • Mac Lion 10.7.3, LR 4.1, CS6, Canon 5D Mark III and all the plug ins upgraded! Need the RAW update!

    My workflow has tripple because nothing wants to run smoothly! I am so bent because Adobe, Canon, Apple and every other plug-in software provider can't seam to get on the samer fricken page and I've spent BIG $ over the last 2 months trying to make e

  • How to make a TOC link to comments?

    Hi, I've annotated several PDF documents with GoodReaer, and have used their annotation tools to insert comments within certain blocks of text.  I've been using the same categories for these comments, so that they essentially function as tags.  I'm p