how to post file to Apache AB

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Here is my insert.php,

$ cat insert.php
$mysqli = mysqli_connect("localhost", "joeuser", "somepass", "testDB");

if (mysqli_connect_errno()) {
         printf("Connect failed: %s\n", mysqli_connect_error());
} else {
         $sql = "INSERT INTO testTable (testField) VALUES
         $res = mysqli_query($mysqli, $sql);

         if ($res === TRUE) {
                 echo "A record has been inserted.";
         } else {
                 printf("Could not insert record: %s\n",


$ cat insert_post.txt

Is this correct here?

$ ab -p ./insert_post.txt http://local/Sites/insert.php

Is the insert_post.txt and insert.php required to be in the same subdir?

Re: how to post file to Apache AB

MacRules wrote:
Quoted text here. Click to load it

ab is an apache program.  Try one of the Apache newsgroups.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Re: how to post file to Apache AB

Quoted text here. Click to load it

     No, the insert_post.txt file should be local to the machine
where you are running ab -- it will send that data to the php script
running on the server.

     Best regards!

Customer Service                       Software Workshop Inc.                      "software that fits!" (TM)
Toll Free (877) 635-1968(x-211) /

Site Timeline