A script i'm working on is behaving real strange. It is more or less
the same as dozens of others that work aok.
Info is posted from one script to another, the second script does some
work (nothing too taxing, just checks the input and updates/moves a
couple of files) then redirects to the first script.
Its one of these second scripts I'm having trouble with. As I was
writing it, instead if redirecting to the initial script I would just
echo out the variables etc.. that I was interested in, make sure all
was well and gradually work through it that way. When everything was
doing as expected I just stuck in the header("locatio n: ...") line.
The script redirects ok but doesn't complete the tasks. If I remark
(//) the redirect line out, everything completes successfully. Now, I
know what one or two of you may be thinking, move the redirect line
down to the end of the script, well I can assure it is. Very last
couple of lines, right at bottom.
header("Locatio n: ../home.php?ps=4&s ub=6");
exit;
?>
As I say I have written about 20 of these scripts with redirects and
no problem.
The site is on a managed server and the version is 4.2.3, I've asked
them to update PHP in the the past but they won't.
--Tea BREAK--
ok, i've just worked out what the matter was. I am about as
intelligent as the doughnut I just ate (not nearly).
The second script that redirected to the first one placed some files
in a folder. When the first script was executed again it deleted the
contents of the same folder, so i was left wondering why the files
hadn't copied over. Friday tomorrow.
;)
Hope it can cheer someones day up (and maybe help some other
unfortunate).
the same as dozens of others that work aok.
Info is posted from one script to another, the second script does some
work (nothing too taxing, just checks the input and updates/moves a
couple of files) then redirects to the first script.
Its one of these second scripts I'm having trouble with. As I was
writing it, instead if redirecting to the initial script I would just
echo out the variables etc.. that I was interested in, make sure all
was well and gradually work through it that way. When everything was
doing as expected I just stuck in the header("locatio n: ...") line.
The script redirects ok but doesn't complete the tasks. If I remark
(//) the redirect line out, everything completes successfully. Now, I
know what one or two of you may be thinking, move the redirect line
down to the end of the script, well I can assure it is. Very last
couple of lines, right at bottom.
header("Locatio n: ../home.php?ps=4&s ub=6");
exit;
?>
As I say I have written about 20 of these scripts with redirects and
no problem.
The site is on a managed server and the version is 4.2.3, I've asked
them to update PHP in the the past but they won't.
--Tea BREAK--
ok, i've just worked out what the matter was. I am about as
intelligent as the doughnut I just ate (not nearly).
The second script that redirected to the first one placed some files
in a folder. When the first script was executed again it deleted the
contents of the same folder, so i was left wondering why the files
hadn't copied over. Friday tomorrow.
;)
Hope it can cheer someones day up (and maybe help some other
unfortunate).