Hi I was wondering if anyone could help me by explaining how I would get install files to automatically delete off the web server once the install is complete.
I have a CMS like PHP-Nuke called Zentri. Once the setup.php and the files in the /install folder have been completed I need a script to delete the setup.php from the root folder and the install folder from the root directory.
Any help on this would be great thanks.
Install file self deletion
Started by folonex, Jul 31 2005 02:01 PM
7 replies to this topic
#1
Posted 31 July 2005 - 02:01 PM
#3
Posted 31 July 2005 - 04:57 PM
lol the thing is we did make the script but for some reason our script won't read the
rmdir -i (directory) function or whatever it is...It won't read the -i
and that guide didn't help but thanks for the reply.
rmdir -i (directory) function or whatever it is...It won't read the -i
and that guide didn't help but thanks for the reply.
#4
Posted 01 August 2005 - 03:46 AM
After installation why not make the installer make a new file, such as install.lock and in the install script before it does the installation process checks whether install.lock is in the install folder.
If does find it then it then it'll fail to run the installation. This will stop any one from installing you're CMS again, unless the install.lock file is changed or deleted.
If does find it then it then it'll fail to run the installation. This will stop any one from installing you're CMS again, unless the install.lock file is changed or deleted.
#5
Posted 01 August 2005 - 11:38 AM
Well, it sounds like you're trying to run a shell command (which can't be ran on all systems due to restrictrions), so i'd recommend using the unlink function. In the least, it can delete the install file (maybe not the whole directory, but the files the thing that matters).
And soft, doing that would still leave the install file there, which could cause potential hacking problems. I'm pretty sure somebody who knows what they're doing would know how to get around a simple lock file check.
And soft, doing that would still leave the install file there, which could cause potential hacking problems. I'm pretty sure somebody who knows what they're doing would know how to get around a simple lock file check.
#6
Posted 01 August 2005 - 12:13 PM
You could go the phpbb route and cause an error if the install directory exists
#7
Posted 01 August 2005 - 01:08 PM
Starnge! As that is how IPB does it! You run the installer and it creates a file called install.LOCK then if someone goes to install/index.php inside that file it checks whether install.LOCK is there ,if it is then it'll throw an error.
#8
Posted 01 August 2005 - 02:22 PM
Thanks for the reply to this, but the other coder is being picky and wants the script to delete the install folder after the install process.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
