Page 1 of 1

Variable include issue in global namespace.

PostPosted: 12. April 2011 11:16
by Elledan
Alright, I have this CMS I developed. I installed it without any issues on the production server, then I sent the client the admin panel (C++/Qt application) and the installation package for the development server. The code was as far as I can determine extracted correctly on the development webserver and the installation script was accessed without any troubles. That's where the issues start.

The client is running a XAMPP installation (tried latest and 1.7.1). When attempting to run the installation script, the configuration files containing essential variables are included normally (verified using an additional test script I had the client run, using require instead of include), the only issue is that the variables from the included script are then not available in the including script. Isset() reveals that they aren't even declared, let alone defined.

The installation script itself is a simple script, with no functions or classes, just straight-forward code running in the global namespace. It has worked fine for me on my local servers and various remote servers. The CMS has been installed on nearly a dozen individual servers by now without issues. The only thing different in this case as far as I can determine is the use of XAMPP instead of a regular Apache + PHP combo.

Any thoughts/feedback would be most welcome.

Re: Variable include issue in global namespace.

PostPosted: 12. April 2011 11:24
by Sharley
Is this perhaps a register_globals issue as in most of the recent versions of XAMPP it is turned Off in the php.ini file by default, including 1.7.1 - I just checked.

Re: Variable include issue in global namespace.

PostPosted: 12. April 2011 18:43
by Elledan
Sharley wrote:Is this perhaps a register_globals issue as in most of the recent versions of XAMPP it is turned Off in the php.ini file by default, including 1.7.1 - I just checked.

Nope, register globals is off on my development system and on most if not all hosts I have used . This should have no effect on the issue anyway, as in these scripts everything is global.