using virtualmin pro 3.29

I installed phpwebsite on to test it out and ran into one really scary problem (scary if you don’t back your server up)

I chose the domain through virtualmin pro and clicked install scripts, then selected phpwebsite and clicked show install options, chose "install in root of domain"[–be careful with that option) then clicked install now - very fast and no problems.

then I clicked the link and continued with the setup of phpwebsite. I chose all available modules, since I was just testing, and wanted to see what they were. I then received an error under building extra modules during the setup process , which according to phpwebsite has to do with usually memory settings, so I decided to uninstall phpwebsite as reccomended by phpwebsites directions on their site. This is where I ran into a problem. When I went back to virtualmin and chose uninstall script, it removed "everything", I mean everything from that domains public html folder, I doubt this has anything to do with virtualmin but I guess it could, I will leave that up to the pros.

Anyways, I restored my gig of files from a backup and chose the default setting during the next install, which is to put phpwebsite into a folder named phpwebsite, so hopefully if I have to uninstall, it wont take the rest of my public html files with it.

maybe this will help someone else. I was lucky because I had a fressh backup for a lot of files.

Hey William,

Yes, this could be a problem! It is not a bug, and this is the expected behavior (I mean, there was no intention to do otherwise), but it probably ought to warn both about installing into the public_html top directory and about removing a script from that directory. The assumption that the script installer makes is that if you’re dropping something into the base directory, you intend for that script to be the whole site.

It’s never going to be safe to install a script into the base directory if you plan to have other stuff there–the odds of something getting over-written (index.html, images directory, etc.) are very very high. So, we probably do need to warn folks about that. It’s safe to expect a warning both on install and uninstall in the next release.

Hi William,
The next release of Virtualmin will protect you from this, by checking if you are installing a script into a directory that already contains files (apart from index.*), and showing a warning at install time about how they will be deleted if the script is removed.

I would recommend always putting scripts into sub-directories, unless you are creating a website that will only be used for hosting a single blog or whatever…

Great, thanks guys, ya now I know - installing into a folder is a much better idea:)

During the install, I wasn’t able to select all the modules and complete the install successfully, so as recommended I installed just the core modules which worked fine.

Again, I am thinking this has to do with phpwebsite, but if I come up with any answers to these problems I am having I will post them and if anyone else knows that would be grreaatt.

After the install I selected modules one at a time and installed them. I was unable to install the modules 1.1.1 FAQ and 0.8.2 Stevens Scheduler I would get "an error occurred" on a blank page in the browser. Which according to phpwebsite this is a safety measure to conceal the actual database error.

To see the database error, you have to turn show database errors to true by opening database.php and find define(‘SHOW_DB_ERRORS’, FALSE); and change it to true - remember to turn it back to false when your done to protect your site.

so far thats as far as I have gotten, now it shows the database error which is Greek to me, but I will keep working on it.

this is the databse error that faq install now shows:

DB Error: unknown error
CREATE TABLE phpwebsite_mod_faq_questions ( id int(10) NOT NULL PRIMARY KEY, owner varchar(20), editor varchar(20), ip text, label text, groups mediumtext, created int(11), updated int(11), hidden int(1), approved int(1), answer text, hits int(10), numScores int(10), avgScore double(1, 2), totalScores int(10), compScore double(2, 1), contact varchar(100)) [[nativecode=1427 ** For float(M,D), double(M,D) or decimal(M,D), M must be]= D (column ‘avgScore’).]]