[SOLVED] - Strange problem with POST data |
Hi Insite, irealized that it wasn't working with ion-auth package. I followed the instruction step by step and, when i have tried to log in, the post data dont arrive at controller.
In this morning i builded a new VM with deb 105. In this evening, i'lltry a new installati on with ci4 by composer....
I tested on a new debian 10.5, and the post data not work....
I think that my problem still in my "approach" to CI4. I explain you what i do: In the new debian box install apache2, php, mysql (mariadb). I make the configuration for apache2 (document root, ecc) In the directory configurated, run the command " composer create-project codeigniter4/appstarter" After this command, rename env to.env and I change Cienvironment to development I set the base_url "http://www.mysite.com" and remove "index.php" I set the ht access and the site works fine... Is it correct?
in your web browser you can hit F-12 keyboard key and then click on the console tab
this will show you what is going on when you post data or it will show errors. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
In the console tab i haven't any error.
In the network, when i submit the form i have this response: General: Request URL: http://www.xxxxxxxx.com/test/send Request Method: POST Status Code: 200 OK Remote Address: 192.168.10.200:80 Referrer Policy: no-referrer-when-downgrade Response header: Cache-control: no-store, max-age=0, no-cache Connection: Keep-Alive Content-Encoding: gzip Content-Length: 254 Content-Type: text/html; charset=UTF-8 Date: Sun, 27 Sep 2020 05:25:48 GMT Keep-Alive: timeout=5, max=100 Server: Apache/2.4.43 (Debian) Vary: Accept-Encoding Request Header: Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9 Accept-Encoding: gzip, deflate Accept-Language: it-IT,it;q=0.9,en-US;q=0.8,en;q=0.7 Cache-Control: max-age=0 Connection: keep-alive Content-Length: 39 Content-Type: application/x-www-form-urlencoded Cookie: debug-bar-theme=dark; debug-bar-position=bottom; debug-bar-tab=ci-history; debug-bar-state=minimized Host: www.xxxxxxxxxx.com Origin: http://www.xxxxxxxx.com Referer: http://www.xxxxxxxx.com/test Upgrade-Insecure-Requests: 1 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 Form data: name: Mario lastname: Rossi submit: submit
Code: Add routes Learning CI4 from my works, from errors and how to fix bugs in the community Love CI & Thanks CI Teams
No nc..... it doesn't work...
I tried step by step the news tutorial.... nothing As you can look in the response http, the form data are present.... If is possible, can i upload my appstarter directory? Is there anyone that can test my app?
Now you post one more:
1. Your Routes 2. Your Controller Test 3. Your View and then, every one will help you Learning CI4 from my works, from errors and how to fix bugs in the community Love CI & Thanks CI Teams (09-27-2020, 03:01 AM)nc03061981 Wrote: Now you post one more:My file now: Routes.php: PHP Code: <?php namespace Config; My controller Test.php: PHP Code: <?php View test_1.php PHP Code: Test 1 si post View test_2.php: PHP Code: Test 2 nessun post The output html: Code: Test 1 si post Nome: The header with inspector at 192.168.10.200/test/send: Code: General: From the inspector, the method seems POST and the form data present...... Mahhh.......
First you run:: http://192.168.10.200/test/send
if right, it echo view test_1 Test 1 si post Nome: Cognome: Test: Learning CI4 from my works, from errors and how to fix bugs in the community Love CI & Thanks CI Teams
if i run directly http://192.168.10.200/test/send, i haven't any error.
The output is: Test 1 si post Nome: Cognome: Test: datiinarrivo datiinarrivo is correct because i set it directly In this case, with the chrome ispector, i have this header: Request URL: http://192.168.10.200/test/send Request Method: GET Status Code: 200 OK Remote Address: 192.168.10.200:80 Referrer Policy: no-referrer-when-downgrade If i arrive to http://192.168.10.200/test/send, from http://192.168.10.200/test, the request is in POST: Request URL: http://192.168.10.200/test/send Request Method: POST Status Code: 200 OK Remote Address: 192.168.10.200:80 Referrer Policy: no-referrer-when-downgrade The form data in this case, are present: name: Mario lastname: Rossi submit: submit |
Welcome Guest, Not a member yet? Register Sign In |