Strange behavior web component with PHP / Mysql

Hi there!

just a simple question for a behavior of web component.Got Text.

I use a php file to communicate with Mysql Database. It works fine. I use Theaifun way to get an Http response code and to konw how the server react to my query.

Then, when web component got text, i look for the http response code. Once again, it works fine.

Here are my blocks

As you can see, if i have a 210 response code, it loads a procedure, 300 and 301 response code are error, and if there is another response code, it shows me it in a notification (for dev purpose).

If i use this PHP code, it works and shows me responses code 211as it is supposed to do :

However, if i just add one field in my mysql query (field called descriptionAppli), it do not show response code 211 but 200 that is no where in my php code:

So it’s really related to this field sql :

Field descriptionAppli is set as longtext. All other fields can be read without this troubleshooting

But once again, the results works because i got my JSON datas, it’s juste that i don’t understand with i get this http response code…

If you have any idea?

Best regards!

Are you receiving response code 210 and 211?

View response codes

Open the link, and see the meaning of 200 and 201 codes

Put 2 // and comment out your header command (so it won’t be executed). And in the Kodular blocks, check Response Code.


The header string.

There are two special-case header calls. The first is a header that starts with the string "HTTP/" (case is not significant), which will be used to figure out the HTTP status code to send. For example, if you have configured Apache to use a PHP script to handle requests for missing files (using the ErrorDocument directive), you may want to make sure that your script generates the proper status code.

Thx! Going to look forward to all you linked :slight_smile:

1 Like