Server side errors only happening on one machine?

Associate
Joined
2 Aug 2005
Posts
680
This is a very strange problem, we have an online assessment script which takes answers from a form, adds up 4 scales and displays a relevant answer page depending on the levels of the scales, for example:

include 'results' . $scale . '.inc.htm';

so the script will display the relevant include for the results. However I've just had one person say that they had some problems, and it seems that the include part of the script didn't work properly. So for example they had could not find results.inc.htm instead of resultsFOO.inc.htm. But this is only happening on one machine, is there any reason why this would happen?
 
Sorry about not providing much info. The line that's failing is with the include
Code:
include "pca$type" . '.inc.htm';
and the error is
Warning: main(pca.inc.htm): failed to open stream: No such file or directory.

Usually the include line would add the variable $type to the include file and display the file relating to the answers. So for example, the $type might = "ISFJ", therefor the include would be pcaISFJ.inc.htm

It looks like for some reason the $type variable isn't set to anything, but wouldn't this just add a '0'?

Thanks a lot for your help mate
 
No, there is a form with sets of radio boxes. They are laid out in pair choices, so one is worth 1 and the other 0. There formula basically says level1 is q1 + q2 + q3 etc. And then there is another formula that says if level1 > 5 then $type is foo. So the $type is determined by arithmetic, not user input as such. Is that safe?
 
It's ok I've managed to sort it now, it was a problem in my code. Sorry to be such a pain mate, I'm a total scripting noob, most of the stuff you said went whoosh over my head lol. I'll put my php cap back on again soon and try and get it right. I think my main problem is I'm not thinking efficient code up (although, it does work). Thanks again for your help.
 
Back
Top Bottom