Skip to content

Conversation

@552020
Copy link
Collaborator

@552020 552020 commented May 17, 2024

I'm sharing this cause I didn't manage to run it with an index.php file and some php going on that page. Our previous PHP site was just html with no php.

In this branch I already added @dantol29 last branch on build response. Can one of you router expert tell me why this is not working.

In the configuration file I wrote
index index.php
cgi_path (with the path to the executable of the php interpreter)
cgi_ext .php

If you want to test you need to change the path to the executable of the php interpreter

@linear
Copy link

linear bot commented May 17, 2024

@552020 552020 requested review from dantol29 and lmangall and removed request for dantol29 May 17, 2024 18:50
@552020 552020 self-assigned this May 17, 2024
@552020 552020 marked this pull request as draft May 17, 2024 18:50
@dantol29
Copy link
Owner

I fixed the Router a bit. It should work. However, index.php is downloaded as file... @lmangall Do you know what may be the issue

@lmangall
Copy link
Collaborator

@dantol29 regarding the accidental downloading of the .php file

  • If this wasn't changed the path to interpreter was a macro, the config file directive was not used.
  • you would have to test in the Dockerfile Stefano prepared because we might not have a php interpreter on our machines (or brew install it).

I'll test it as well

@lmangall
Copy link
Collaborator

@552020 I am working on mostly POST, DELETE for the CGI with the script (database like with a json) we already have in main.
I pass the data from the body through a second pipe for the stdin of the CGI,
now exactly I am working on reading and saving the body of the request for a POST & CGi request

Are you doing something similar here ?

@552020
Copy link
Collaborator Author

552020 commented May 21, 2024

@552020 I am working on mostly POST, DELETE for the CGI with the script (database like with a json) we already have in main. I pass the data from the body through a second pipe for the stdin of the CGI, now exactly I am working on reading and saving the body of the request for a POST & CGi request

Are you doing something similar here ?

There will be a major change in main. We are kind of overwriting it cause merge main into the branch with the working CGI was causing to many problems.

This branch is only about writing a PHP website and should not change the logic of the server itself.

@lmangall
Copy link
Collaborator

Okay, thanks for the info.
I just solved something and managed to go through with a successful POST request with the "database" CGI script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants