Author Topic: WebsiteBaker check script(s)  (Read 3018 times)


  • Guest
WebsiteBaker check script(s)
« on: February 23, 2010, 12:54:24 PM »

I am currently working on a script, that should display many issues, that are very common with WebsiteBaker installations.

I just want to ask, what you perhaps think about it.
I know, there is a script for WB 2.7, but the problem is, that it somehow needs MySQL-database, and with new WebsiteBaker installation there are (besides solved upgrade-script problems, but there is an error shown...) no real database problem anymore in common.

What I think this scripts should do:

1.) Script: Precheck

This one everybody can download, and just use on the new webspace, where WebsiteBaker should be installed. that is not really necessary, but some people don't like to upload 3000 files before seeing "ah, it doesn't work...".

2.) Script: Checking WB installation

This is somehow "extended" precheck, and WebsiteBaker should (not need, but should, otherwise it will display an issue) be installed. It also should check if all files are properly installed, if all folders have correct access and permission.
So an example: Template upload is not working in WB 2.8.1 -> upload check-wb281.php to the FTP server, where WB is installed -> Script says "/templates" has incorrect permission, it's FTP-user, it should be PHPuser.
Most people know what to do, perhaps some extend help inside the script.
Perhaps it would be also nice to "check" (via MD5 hashes) if all files are correct, but I don't know how to do such a script.... I know how it is working, but I don't know how to produce for 3000 files MD5 hashes and correct files and have them in a correct way, like 'framework/index.php, dfjes4fj34jf;' I just don't manually insert 3000 files and MD5 hashes, and for the next WB version the same again...

3.) Script: Checking WB database + modules/templates

This script is mostly for incorrect but "somehow" running WB installations. This is just an extended script, that gains all installed modules/templates/... with it's versions. But perhaps WebBird already made that.

For all:
I am no (good) programmer, but that scripts shouldn't be that big problem.
I stic to existing LGPL scripts (e.g. TypoLight), and perhaps include one or two existing LGPL scripts. But it's nothing I don't want to say before and in the scripts itself.
All are OOP and need PHP5, because I'm simply too stupid to program PHP4.
The scripts should also produce some code, that simply can be copy&pasted in the forum here - or zipped, but that's an option.

Just let me know whishes / critics (not about OOP, if that's an issue another one needs to program them, not because I don't like it but I can't) / no-gos.

It will be done when it's done, approximately in 1-2 weeks.

Yours Michael
« Last Edit: February 23, 2010, 01:15:53 PM by Waldschwein »

Offline crnogorac081

  • Posts: 1995
  • Gender: Male
Re: WebsiteBaker check script(s)
« Reply #1 on: February 23, 2010, 01:23:25 PM »
nice,  it could be like "first aid kit" when you have some problem, and to use that script instead to search forum and ask common questions..

I like the idea
UI / UX Designer


  • Guest
Re: WebsiteBaker check script(s)
« Reply #2 on: February 23, 2010, 02:23:08 PM »

Yes, exactly.  :wink:

Just a very rough screenshot how it could look.

Yours Michael

Edit: Of course it will also include a phpinfo() output, just hidden per default.

[gelöscht durch Administrator]
« Last Edit: February 23, 2010, 02:25:55 PM by Waldschwein »


  • Guest
Re: WebsiteBaker check script(s)
« Reply #3 on: February 23, 2010, 06:51:57 PM »

Quote from: Waldschwein
Perhaps it would be also nice to "check" (via MD5 hashes) if all files are correct, but I don't know how to do such a script
Simply use the steps sketched here.

a) recursive loop through all folders of a WB 2.8.1 standard installation (PHP: glob, scandir ...)
b) create MD5 hash for each text file (CSS, JS, HTML, PHP) incl. the rel. path to the file (PHP: md5_file)
c) adapt the Typolight script to use the inputs from the text file (or copy it to array) - done

« Last Edit: February 23, 2010, 07:01:36 PM by doc »


  • Guest
Re: WebsiteBaker check script(s)
« Reply #4 on: February 24, 2010, 10:43:01 AM »

thanks very much doc. It will run then with PHP4, my IDE runs on 4.4.8 right now, just some problems with some PHP5 stuff like "$ok = in_array($fileperms, $this->filePermissions);", but I will find a solution there (I hope).
scandir is no problem (of course I have PHP5 here...), as it's just a tool for me, the users wont see it. The best is here to hardcode everything in one single file, because such a script with several files is sometimes quite a problem...

Yes, the first line of the script is "error_reporting(E_ALL);"  :-D

Yours Michael
« Last Edit: February 24, 2010, 10:45:37 AM by Waldschwein »