PHP page code
-
Hello, i've recently started building my first php based website, when suddenly i noticed something strange. The whole point of php being secure evolves around the idea that its a server side scripting language right? Well.. I was clicking through my site, lots of php pages, then i went to the xmb-forum part of my site, and i clicked on logout, and suddenly, it gives me a download window for downloading index.php!!! It didn't hit me untill about 10 seconds later when i had already dismissed the dialog. If i had downloaded it, would i have seen the source? Because this is kind of disturbing, i mean, obviously it only happens like one time in a thousand or something, it seems to be some weird bug, maybe due to the server i'm using? I still don't see how it could mess up like that... If someone could mimic the situation, they could view every php source they wanted. I also want to state that i had this happen before, but then it was usually due to the site being made improperly and it always gave u the download for the php page, but this time was when i pressed logout on xmb forum so.. i tried again but all was fine. Does anyone have any clue as to why it might do this? :wtf: Kuniva --------------------------------------------
-
Hello, i've recently started building my first php based website, when suddenly i noticed something strange. The whole point of php being secure evolves around the idea that its a server side scripting language right? Well.. I was clicking through my site, lots of php pages, then i went to the xmb-forum part of my site, and i clicked on logout, and suddenly, it gives me a download window for downloading index.php!!! It didn't hit me untill about 10 seconds later when i had already dismissed the dialog. If i had downloaded it, would i have seen the source? Because this is kind of disturbing, i mean, obviously it only happens like one time in a thousand or something, it seems to be some weird bug, maybe due to the server i'm using? I still don't see how it could mess up like that... If someone could mimic the situation, they could view every php source they wanted. I also want to state that i had this happen before, but then it was usually due to the site being made improperly and it always gave u the download for the php page, but this time was when i pressed logout on xmb forum so.. i tried again but all was fine. Does anyone have any clue as to why it might do this? :wtf: Kuniva --------------------------------------------
Update Apache :) Also make sure your files end in PHP not INC, PHP3, etc.. Actually make sure your web server recognizes PHP as a server side script. Then make sure your files are all PHP in extension. Why it's only prompting you to download every so often, probably becuz IE is caching your request/result. If it happens once and then not again, try deleting your temp internet files and accessing that page again, it should prompt you to download your script. If this is the case, then it's your server that setup wrong. Cheers :) How do I print my voice mail?