2

I am attempting to create a simple application with laravel and wrapping it in phpdesktop to use locally without the need of a webserver(aside from the built-in php server).

Everything works great except this one thing.

If I launch the app.exe, i get 404's when vue/axios requests data from an endpoint, eg: /api/resource.
However, If I open the app in a browser while running the php server (localhost:8000) the resource is found and loaded correctly.

Is there a way around this? Or is this simply how phpdesktop is supposed to work?

Here are a few relavant settings from 'settings.json'

"web_server": {
    "listen_on": ["127.0.0.1", 0],
    "www_directory": "www/public",
    "index_files": ["index.html", "index.php"],
    "cgi_interpreter": "php/php-cgi.exe",
    "cgi_extensions": ["php"],
    "cgi_temp_dir": "",
    "404_handler": "/index.php",
    "hide_files": []
},
Beefjeff
  • 371
  • 4
  • 12
  • Adding some code would greatly increase the chance someone could offer you some advice. – PatrickSteele Feb 14 '18 at 02:27
  • See how to configure laravel with phpdesktop: https://github.com/cztomczak/phpdesktop/wiki/PHP-frameworks-support#laravel – Czarek Tomczak Feb 14 '18 at 07:54
  • @PatrickSteele If my problem was actually related to an issue with my code, I would have. I know it isn't because everything works when not using the phpdesktop executable. ;) – Beefjeff Feb 14 '18 at 10:07
  • @CzarekTomczak Everything is configured as you specified. – Beefjeff Feb 14 '18 at 10:21
  • What kind of requests are these? Mongoose web server only supports GET/POST. Enable debug console and see what logs say when these urls are accessed, see the Settings wiki page. – Czarek Tomczak Feb 18 '18 at 04:53

0 Answers0