Yes I thought so too. I was just ruling out the distant possibility there was something anomalous in the path name.
Indeed I am going off mime type detection, seeing how easily it can trip up. It's not a big deal, they are all my own files and there are only a handful of file types to deal with. So checking the extensions will be fine, as you suggest. I'm already implementing it.
Thanks for your help !
Well hehe, I got it at last. And boy, this is embarrassing.
First. inspired by ginerjm's first reply, I dispensed with the XMLHttpRequest and used a simple form with a POST action, and I saw the same thing again. Then I realized that mac_gyver's question
was exactly the right thing to ask. Suddenly everything fell into place.
See images. The first shows that the test has worked ok. The input data is echoed back to the form via PHP. But in the network tab I see test.php which appears to be a link. Thinking this would give some interesting information, I blithely click on it an get the screen with the error - image 2. Yep, that's what I do, when I see a link I click on it 🙄 I had long noticed the extra browser tab but somehow never realized this means that test.php has been executed a second time, this time without parameters. Of course that would produce these errors. Derp.
So that's all it was - seeing errors when there were none. I feel like a right idiot now 😲
Thanks both of you for the reactions. They were really helpful.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.