Reputation: 5283
I am trying to convert my existing website into PHP Desktop Application using PHP Desktop, everything is working fine but when i am trying to login i am using ajax call for login it does not responding. it does not even print any error message on php desktop console.
Upvotes: 3
Views: 2004
Reputation: 20645
It might be that your ajax code is making a request to http://127.0.0.1/some_resource, but phpdesktop web server is running at http://127.0.0.1:1673/ - as you can see in your console logs. PHP Desktop assigns a random web port to avoid conflicts with existing software. In a php script you can know the port by checking $_SERVER variable. If you want to set a fixed web server port then you can do so by editing settings.json file (see the Settings wiki page in phpdesktop project).
You have to check your ajax code to know what url it is trying to access, you can do this using Developer Tools window, you can open it in phpdesktop using mouse context menu.
You don't really have to set fixed web port if you can modify your ajax code to not use full paths with domain names and just the path like "/some_resource".
Upvotes: 2