Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8278529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:02:51+00:00 2026-06-08T09:02:51+00:00

I shoot the following Post request to a remote apache server,hosting a small php

  • 0

I shoot the following Post request to a remote apache server,hosting a small php script:

The POST:

var request = $.ajax({
    type: 'POST',
    url: 'http://my.server.on.port/mmm.php',
    data: { abc: "abcdefghijklmnopqrstuvwxyz" } })
    .done(function(data) { alert("success :"+data.slice(0, 100)); });

request.fail(function(jqXHR, textStatus) {
    alert( "Request failed: " + request.reponseText + " " + request.status  +" " + request.statusText +" " +request.responseText  );
});

mmm.php script:

<?php echo json_encode(array("first"=>"XXXXX","last"=>"YYYYY")); ?>

httpd.conf:

ServerName my.server.on.port
DocumentRoot "/var/www/html"

<Directory "/var/www/html">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

NameVirtualHost "my.server.on.port"
Listen 80

<VirtualHost *:80>
    DocumentRoot "/var/www/html/QR/tst"
    ServerName "my.server.on.port:80"

    <Directory "/var/www/html/QR/tst">
            Options Indexes MultiViews FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
    </Directory>

    <Directory "/var/www/html/QR/tst/css/smoothness">
            Options Indexes MultiViews FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
    </Directory>
    <Directory "/var/www/html/QR/tst/development-bundle">
            Options Indexes MultiViews FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
    </Directory>
    <Directory "/var/www/html/QR/tst/development-bundle/ui">
            Options Indexes MultiViews FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
    </Directory>
    <Directory "/var/www/html/QR/tst/development-bundle/demos">
            Options Indexes MultiViews FollowSymLinks
            AllowOverride All
            Order allow,deny
            Allow from all
    </Directory>

</VirtualHost>

The reply from the server is 304. all files has 755 permission. No idia how to solve this. thanx!

HTTP/1.1 304 Not Modified
Date: Sat, 21 Jul 2012 08:45:38 GMT
Server: Apache/2.2.22 (Fedora)
Connection: close
ETag: "c0744-f7a-4c553071e0d4e"

this is the alert with the error:
alert

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T09:02:52+00:00Added an answer on June 8, 2026 at 9:02 am

    This Works for me (tested on chrome and IE):

     var request = $.ajax({
         type: "post",
         url: "mmm.php",
         data:"abcdefghijklmnopqrstuvwxyz",
         success:function(data){ alert("success: " +JSON.stringify(data)); },
         error:function(data){ alert("error "+JSON.stringify(data)); },
         statusCode:{
              200:function(){alert("200 OK");},
              304:function(){alert("304 Not Modified");},
              404:function(){alert("404 No Found");}},
         isModified:function(){alert("Something was modified");}
     });
    

    Thanks to anyone that helped!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am following the instructions on this page to create a PHP script which
I have the following short version of a tsql if else if.. IF @var
I have the following array: $my_array = array ( 'city' => $this->input->post('city'), 'country' =>
I appologize for this lengthy post. I have made it as small as possible
I have a situation where I want to make a request to third-party API(url
The following short Fortran90 program crashes as long as it contains the MPI_GET call.
Consider the following short program: #include <type_traits> #include <iostream> using namespace std; template <typename
I have been following a short tutorial to build a tab menu on my
Short question, is the following ok: struct X { A& x; A y; X()
Following problem: I want to render a news stream of short messages based on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.