![]() |
| PHP Script Not Working After Migrating To HMS |
|
Hobartimus
|
I am having a strange issue with a PHP script that I have been using for years at another hosting company. It is a simple file download script which allows visitors to download a file from a specific directory without being able to view the contents of that directory.
It is comprised of four items... index.php
downloadfile.php
download_success.php
and the outbox directory which contains files available for download. So, I have uploaded these files to my HMS webspace and set permissions as normal, but when I try to retrieve a file I get the following error...
"Line 7" being $link = "/outbox/$filename"; I am just at a complete loss because I have never had trouble with this script in the years I have been using it. Could it have anything to do with server settings here at HMS? |
|||||||||||||||||||
|
|
||||||||||||||||||||
| Difference |
|
comprug
Forum Regular
|
Howard - sorry about your troubles with PHP. Honestly, I don't know what broke the script with HMS, but usually, I do this:
Thanks |
||||||||||||||
|
|
|||||||||||||||
|
Hobartimus
|
Thanks for the suggestion, but I just tried it and got the same error.
I'm totally stumped. |
||||||||||||
|
|
|||||||||||||
|
dbodner
|
It sounds like your previous host had register globals turned on. You can do this in the HMS control panel, under PHP Settings. The code suggestion comprug posted should work, but your entire script is likely designed around register globals being turned on, so you probably want to toggle them on in the control panel, then try your original script.
|
||||||||||||
|
|
|||||||||||||
|
Hobartimus
|
That did the trick.
Thanks a bunch! |
||||||||||||
|
|
|||||||||||||
| PHP Script Not Working After Migrating To HMS |
|
||
|


