Forum Moderators: open

Message Too Old, No Replies

Problem with js web form buttons after moving app to new Debian Server

         

jrsmith83

12:41 am on Oct 14, 2017 (gmt 0)

5+ Year Member



First of all i'm a Sys Admin & my Systems Analyst doesn't know html, ajax, or javascript! My work inherited an old Debian 5.0 web server running Apache 2.2.9, PHP 5.0.51a-24+lenny1, & MySQL 5.0.51a. It runs a fairly simple person information database that we need to keep running so i've setup a virtuallized Debian 9.1 web server running Apache 2.4.25, php 7.0.19-1 & MariaDB 10.1.26. The webserver itself is operating fine. I've setup the sql database no problem, php is operating fine, I installed phpmyadmin & it's connecting just fine to the database with everything the same as the old server. After i moved the webserver files over I was getting some errors relating to the missing mysql api, so I got my systems analyst to update all of the php files to mysqli syntax.

I am able to query the database & look up person info. The problem is when I try and add or modify a user using the buttons "add" or "update" instead of it adding or updating, it's bringing up a text box window with what appears to be the info that it should be sending to the database.

I'm attaching a picture of the webform & text box that pops up after I click "add". I'm also adding a link to download the index.html & the two associated javascript files.

Any help will be super appreciated!


https://i.imgur.com/zFmS4Us.png
https://i.imgur.com/NPRGoPL.png

[edited by: engine at 4:32 pm (utc) on Oct 16, 2017]
[edit reason] Removed zip file for safety and security [/edit]

neroux

9:16 pm on Oct 20, 2017 (gmt 0)

5+ Year Member



It is just an assumption but it leaves the impression as if those buttons send an AJAX request to a PHP file and should display the subsequent response. Instead of executing that file and returning whatever the code is supposed to return however the webserver returns the file itself.

Considering that the PHP starts with <?, could it be the new setup has short_open_tag configured to false?

jrsmith83

2:48 pm on Oct 24, 2017 (gmt 0)

5+ Year Member



Thanks for the response. Yes, you were right! Easy as that...