migrate from apache 2.0 to nginx and php8.0 (issue encountered)

Please report bugs and any annoyances here. Kindly include all possible details: steps to reproduce, expected result, actual result, screenshots, ... etc.
Post Reply
sacgtdev
Veteran Member
Posts: 77
Joined: 2020-06-10 11:14

migrate from apache 2.0 to nginx and php8.0 (issue encountered)

Post by sacgtdev » 2023-03-25 09:44

I migrate from apache to nginx web server with php8.0 for Appgini 5.97, I encountered an issue when performing insert/delete records. The page will be redirected to 404 page while the record was successfully entered. But, there was no ownership record registered in membership_userrrecord table. Moreover,  when I batch delete the record, the error message returned as 'connection error'.
I don't think it is the database credential error. It seems that either the Appgini 5.97 not compatible for php8.0 or there is misconfiguration in nginx config.
Does anyone have any idea how to resolve this issue?

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1832
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: migrate from apache 2.0 to nginx and php8.0 (issue encountered)

Post by jsetzer » 2023-03-25 15:41

insert/delete records. The page will be redirected to 404 page while the record was successfully entered. But, there was no ownership record registered in membership_userrrecord table
Narrowing down:

For insert:
Check if TABLENAME_after_insert hook returns true. If not, set_record_owner will not be called.

Perhaps there is a broken redirect or failing PHP code in your after_insert hook.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

sacgtdev
Veteran Member
Posts: 77
Joined: 2020-06-10 11:14

Re: migrate from apache 2.0 to nginx and php8.0 (issue encountered)

Post by sacgtdev » 2023-03-26 15:01

I realize the problem arises due to the audit log in the hooks files. This is verified by uncommenting the audit log related functions in the hooks file such as table_after_change(), etc ..

The 404 error was not found when the app was deployed in apache web server. But, upon migrate to nginx web server, it returns 404 errors upon CRUD operations and the record also does not have record ownership assigned.

Hmm.. what could be the root cause?

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1832
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: migrate from apache 2.0 to nginx and php8.0 (issue encountered)

Post by jsetzer » 2023-03-26 15:55

Sorry, I don't know "the audit log". But if commenting out solved the problem, this is the best place to start your research, check logfiles or ask the vendor/programmer of that code.
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

Post Reply