PHP AJAX Live Search not working

General support questions
Post Reply
OST
Posts: 1
Joined: 2017/04/26 07:44:32

PHP AJAX Live Search not working

Post by OST » 2017/04/26 08:10:57

Hello,

This my first post.

I'm not sure which group I should post in, so please tell me if I'm in the wrong place.

I'm an e-learning developer, but I put the files on a LAMP server, (setup by the company server team).

I really do not know much about Linux, I use WinSCP to upload files.

I have worked out how to find the Linux version: 3.10.0-327.36.3.el7.x86_64 / CentOS Linux release 7.2.1511 (Core)

My question is:
I wanted to use a 'live search' in a web page.
I found exactly what I needed on the w3schools site at PHP AJAX Live Search https://www.w3schools.com/php/php_ajax_livesearch.asp
(A .html file calls a .php file, that reads an .xml file, it sounds complicated, but its actually very simple and works perfectly.)

I copied the LiveSearch code from w3schools and ran it on my local PC using XAMPP, and it worked.
I then put the same files on a Linux (LAMP) server using exactly the same names and folder structure, and it did not work. (The page shows the search box, but no results are returned.)

So I know the Live Search works perfectly on w3Schools and in XAMPP, but not on the LAMP server.

Can anyone suggest what the problem could be, and how it can be rectified?

Thank you.

Peter
Cardiff, Wales, UK
(Sunny, but cold)

Post Reply