1 (edited by JavaMan 08/03/2017 08:32:51 pm)

Topic: Ajax (Javascript request) Stopped after updating Apache

Hello all,

I am running FA 2.3, it was working until I updated to Apache 2.4.
A am geting JS error:

JsHttpRequest.js:56 Uncaught Error: JsHttpRequest: JavaScript code generated by backend is invalid!
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /gl/inquiry/gl_account_inquiry.php
on this server.<br />
</p>
<p>Additionally, a 403 Forbidden
error was encountered while trying to use an ErrorDocument to handle the request.</p>
<hr>
<address>Apache/2.4.27 (cPanel) OpenSSL/1.0.2k mod_bwlimited/1.4 Server at  Port 80</address>
</body></html>


    at JsHttpRequest.t._error (JsHttpRequest.js:56)
    at XMLHttpRequest.xr.onreadystatechange (JsHttpRequest.js:104)


I tried installing fresh FA 2.4 but it's having the same problem.

Please advice me

Re: Ajax (Javascript request) Stopped after updating Apache

Please help me

Re: Ajax (Javascript request) Stopped after updating Apache

In php.ini set the following:

always_populate_raw_post_data = -1

These posts might be useful:

https://frontaccounting.com/punbb/viewtopic.php?id=6852
https://frontaccounting.com/punbb/viewtopic.php?id=6451

Hope you have tested using the latest FA 2.3.26 and FA 2.4.2 (Re-Release).

Re: Ajax (Javascript request) Stopped after updating Apache

Hello, apmuthu
Thanks for your respond.
I have tried this points but I still have the same problem

Re: Ajax (Javascript request) Stopped after updating Apache

When you changed from Apache 2.2 to 2.4 you will need to change the "allow,deny" directives to "Require all granted" in the apache conf file. See what changes need to be done on such migration. Also see if the file ownership and permissions of the webroot and below are available for the webserver process.

https://serverfault.com/questions/739427/script-to-migrate-apache-2-2-to-2-4-configuration-files
https://www.digitalocean.com/community/tutorials/migrating-your-apache-configuration-from-2-2-to-2-4-syntax
http://httpd.apache.org/docs/current/upgrading.html

Re: Ajax (Javascript request) Stopped after updating Apache

POST /gl/inquiry/journal_inquiry.php?JsHttpRequest=0-xml 403 (Forbidden)
load @ JsHttpRequest.js:108
JsHttpRequest.t.send @ JsHttpRequest.js:38
JsHttpRequest.query @ JsHttpRequest.js:86
JsHttpRequest._request @ utils.js:15
JsHttpRequest.request @ utils.js:6
e.onclick @ inserts.js:92
JsHttpRequest.js:56 Uncaught Error: JsHttpRequest: JavaScript code generated by backend is invalid!
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /gl/inquiry/journal_inquiry.php
on this server.<br />
</p>
<p>Additionally, a 403 Forbidden
error was encountered while trying to use an ErrorDocument to handle the request.</p>
<hr>
<address>Apache/2.4.27 (cPanel) OpenSSL/1.0.2k mod_bwlimited/1.4 Server at Port 80</address>
</body></html>


    at JsHttpRequest.t._error (JsHttpRequest.js:56)
    at XMLHttpRequest.xr.onreadystatechange (JsHttpRequest.js:104)
JsHttpRequest.t._error @ JsHttpRequest.js:56
xr.onreadystatechange @ JsHttpRequest.js:104

Re: Ajax (Javascript request) Stopped after updating Apache

Delete the js cache files in <FA webroot>/company/#/js_cache/#/*.js

Re: Ajax (Javascript request) Stopped after updating Apache

I deleted them and I get the same 3 errors

Re: Ajax (Javascript request) Stopped after updating Apache

@JavaMan, Check file permissions, and change all to 0755. If still happens change it to 0777.  Than try again.

If you are Linux Localhost user shell command

sudo chmod -R 777 /var/www/html/FA 
Subscription service based on FA
HRM CRM POS batch Themes

Re: Ajax (Javascript request) Stopped after updating Apache

@kvvaradha

also not working and the same error after doing that.

Re: Ajax (Javascript request) Stopped after updating Apache

Try a new install of FA 2.4 and see if that works.

Re: Ajax (Javascript request) Stopped after updating Apache

I tried and get the same error

Re: Ajax (Javascript request) Stopped after updating Apache

What OS and version are you hosting your FA? Is your OS fully updated? Provide Apache/PHP/MySQL versions.

Re: Ajax (Javascript request) Stopped after updating Apache

CENTOS 6.9 x86_64 kvm
Apache/2.4.27 (cPanel) OpenSSL/1.0.2k mod_bwlimited/1.4
PHP 5.4 (can activate php 7)
mysql  5.6.35

Re: Ajax (Javascript request) Stopped after updating Apache

Contact offline - PM.