Page 1 of 1

Prblem uploading file

Posted: Wed Oct 08, 2003 12:55 pm
by kenyaz
I am trying to get an application to work under PHP on our windows server.

The file, when uploaded, is supposed to be a key file and so it is just text however the extension for it is .PHP.

Uploading to my root folder and view the key.php file displays as it should.

However, when I upload into a folder, it shows differently and in not the format that it is supposed so that it is recognized by the program.

For example:

Properly loaded in Root folder:
-----------BEGIN KEY-----------
asdfadasdasdasdasdasd
asdasdasdasdasd
-----------END KEY--------------

Uploaded into the Application folder, the same file shows as:
-----------BEGIN KEY-----------asdfadasdasdasdasdasd
asdasdasdasdasd-----------END KEY--------------

Any ideas how to make this work? Seems to only display like this when it is in any folder other the the root folder.

Thanks

Posted: Wed Oct 08, 2003 4:20 pm
by Gen-ik
Without seeing the code (or part of it) it's hard to tell what the problem might be. At the moment I would say it has something to do with newline and carriage-return characters (\n\r).

Posted: Wed Oct 08, 2003 4:44 pm
by kenyaz
Thanks, the code is basically what I listed above, it is really a text file with the PHP extension. That's it. For some darn reason though, when it is uploaded to inside of a folder, it changes the format.

Posted: Wed Oct 08, 2003 7:45 pm
by kenyaz
Figured something out. No idea how to make it work though.

If I turn off the php extension for that folder, the I can pull the key up as it should be. But I need php to run on that folder. Is there anyways to disable it for one file?

Posted: Sat Oct 11, 2003 10:26 am
by kenyaz
Does anyone have any idea how why this happens?

Yesterday I installed a different PHP application on our server and it has a license file and it reads correctly.

But this one in this particular directory does not. There must be something simple that is wrong.

Posted: Sat Oct 11, 2003 11:12 am
by Wizard
In some sites is big problems to upload avatars.

Posted: Sat Oct 11, 2003 5:01 pm
by qads
you could upload the file to a temp folder, open it and format to your needs, after that save it where ever you want it to be and delete the temp file.