I do not see your contact script.Moving thread to Mods and Customizations section.

So I've modified your script (had to because I have custom required fields) and it works for me.So since I am not running Apache (I use IIS), I am going to say that it sounds like you might be having a problem with your .htaccess file (or with your Apache configuration).

Thanks ntozier for your response.I will check configuration.

Very welcome.  Please let me know how you make out on this.

20 days later

deepak12286 Did you ever past the "No input file specified" error Trying to post JSON to create a ticket?I am in the exact same boat as it appears we are using the same example script.I am using the stock .htaccess file that came with the latest version of osticket.Here is the response I am getting: HTTP/1.1 404 Not Found Date: Thu, 27 Mar 2014 15 GMT Server: Apache/2.2.22 (Ubuntu) X-Powered-By: PHP/5.3.10-1ubuntu3.10 Vary: Accept-Encoding Transfer-Encoding: chunked Content-Type: text/html No input file specified.My apache logs actually show a 404 error as /api/tickets.json does not exist?"POST /api/tickets.json HTTP/1.1" 404I think the htacess rewrite rule is supposed to be rewriting to http.php so maybe that is not working for some reason?

I think it's going to be related to api calls not getting handled properly under a fastcgi model of PHP.This guys went through some grief with crontab calls as fastcgi but his changes didn't seem to fix anything for me.http://uname.pingveno.net/blog/index.php/post/2013/06/29/osTicket,-wget,-crontab-and-FastCGII switched my php module to apache2 mod_php model just for kicks and the test api ticket creation worked. So it appears the way they are calling paths is not suited for certain types of apache and php models. 

You might want to try the example script that I included in: http://tmib.net/using-osticket-1812-api

7 months later

I am having the same issue and I have been struggling with it for 6 hours now!!!!I tried ntoziers link guide (http://tmib.net/using-osticket-1812-api) and I received the "No input file specified" error.  After I read the comment from jwhit3 I found out that my hosting has php as FastCGI and with no way to change it.  So after a lot of googling I changed the .htaccess file from RewriteRule ^(.*)$ %1/http.php/$1 to RewriteRule ^(.*)$ %1/http.php?$1 and now I do not have this error but the ticket is not submitted.If I go to the browser and enter the address www.mydomain.com/api/tickets.json I get a "URL not supported" error.  Then I googled some more and tried changing the get_path_info function of class osticket according to the suggestion both here http://uname.pingveno.net/blog/index.php/post/2013/06/29/osTicket,-wget,-crontab-and-FastCGI and here https://github.com/osTicket/osTicket-1.7/issues/538 but still no go!Since I am running out of ideas I would really appreciate any help!

I forgot to mention that I am using osTicket v1.9.4-RC5

You could try enabline mod_rewrite logging, to better understand what's happening.I'm using fastcgi too, but haven't had any problem when I tried API calls quite some time ago (1.8.X, IIRC).

5 days later

Ok, after a lot of trial and error I found a solution.I noticed that the cron that inserts tickets from the email works just fine so I decided to try accessing the api from the same server that the osTicket is installed.  I found a file names api_ticket_create.php in the scripts folder and when I typed the address in the browser it created a ticket.  So from my form on the other websites I use curl to access that file and then that file creates the ticket.  I don't know what the problem was but since it works I will leave it at that.Thanks to everybody!

5 years later

@Francois
This thread is 5 years old. Please do not be a necromancer.
Killing zombie thread with a head shot.

Write a Reply...