stualk Posted March 9, 2007 Share Posted March 9, 2007 Does anyone know how best I can go about putting a database driven website onto CD? I regularly copy websites to CD but when there's a mysql database behind it, it is rather difficult! I bought a programme called MicroWeb Server but it's immensly complicated to use and configure and i'm after a simpler way of doing it. Can any one give me some advice please? Quote Link to comment Share on other sites More sharing options...
Wuhtzu Posted March 9, 2007 Share Posted March 9, 2007 Well if it is just for backup you can easily export both the structure and data of your database and keep it in a text-file called site_date.sql and then if you need to restore at some point you can import the site_date.sql again... But if you want your sites to actually work with the database from a CD I can't see a way round Quote Link to comment Share on other sites More sharing options...
stualk Posted March 9, 2007 Author Share Posted March 9, 2007 Oh flip! I want it to basically work so that if someone puts the cd into the cd drive it opens up the website as it would if it they were viewing the site online. It's basically for people who have a PC but don't have the internet (yes there are some!). They can enquire to have the website sent to them on CD but it's almost entirely database driven so I need a solution and fast. Does anyone know of a decent programme on the web for doing this? There seem to be several but i've yet to find a simple one! Quote Link to comment Share on other sites More sharing options...
gazever Posted March 9, 2007 Share Posted March 9, 2007 I guess flat file databases may be easier to implement, how are they running php from a cd anyway? Quote Link to comment Share on other sites More sharing options...
stualk Posted March 9, 2007 Author Share Posted March 9, 2007 Well the good thing about MicroWeb Server is that it appears to have all the relevant files on there to run php. E.g. there's a php.ini file and all the stuff to run mysql. It's just very difficult to configure it - like rocket science in fact! Quote Link to comment Share on other sites More sharing options...
gazever Posted March 9, 2007 Share Posted March 9, 2007 Well I think my best advice to you then, is learn rocket science Quote Link to comment Share on other sites More sharing options...
redarrow Posted March 9, 2007 Share Posted March 9, 2007 This can be done just think what your asking and doing ok. I have done this before but the php side of things was run via a hosted server and i encript all relevent information to that server on the cd of course the user had to have a internet line to get the cd to work. The only other way is that you convert all the information to html and show that on cd but of course i think the user will have a internet line. The project i had was that the manger of a large pub and agency wanted a cd that could be put in the drive and then use the files within the cd to do all that was needed. All i done was set up a hosting account and a database and the cd would update the database via the files/form's any php code needed was included via the iframe html statement to get the php pages to be included from the server to the cd. So yes can be done if the users of the cd has the internet. Quote Link to comment Share on other sites More sharing options...
stualk Posted March 9, 2007 Author Share Posted March 9, 2007 I see what you're saying and yes that would work. The problem is though that some of the people this is aimed at may well have the internet but they might not necessarily be connected when they put the CD in. Basically what i'm getting at is that they're pretty old and unless the CD does the work for them they won't know what to do! Quote Link to comment Share on other sites More sharing options...
gazalec Posted March 9, 2007 Share Posted March 9, 2007 an open source program called EasyPHP might be the solution i dont know how good you are at programming but our college added a script that made each student able to access it through our own designated hard drive, so i dont know if you would be able to somehow load easyphp with the CD then it effectively turns your pc into a web server, currently that is how i am testing my PHP scripts, a possible solution Quote Link to comment Share on other sites More sharing options...
madhatter301 Posted March 9, 2007 Share Posted March 9, 2007 You MAY be able to use software such as Xampp. It is an all in one apache server with php mysql etc.... and it can be extracted from ZIP then just run from a local machine without install, so technically I think you would be able to put it onto cd and run from there. Im not 100% sure but it may require you to run a setup.bat file before the service will work, in which case it will not be able to write the config files to the CD meaning you would have to get the customer to copy the entire CD to HD, then run setup, then start the server to browse the site. I know it certainly works from USB pen drives, but thats bcoz the small config script is able to write to them. Anyway have a look, you may be able to work something out. Edit: I just looked on the site and if you make sure the xampp folder is in the root directory of the CD it shouldnt need "setting up". Good luck. Quote Link to comment Share on other sites More sharing options...
stualk Posted April 2, 2007 Author Share Posted April 2, 2007 Has anyone ever used XAMPP? It seems to work fine in principle and does everything I want it to but when I put it on a CD it becomes more difficult. As it comes with its over version of mysql and apache you have to start each of those programs at the time of making the CD autostart. That's where i'm struggling as I don't know how to make those autostart. Has anyone ever done this or know how to do it? Quote Link to comment Share on other sites More sharing options...
trq Posted April 2, 2007 Share Posted April 2, 2007 If you know a little bit about Linux you could easily achieve this. Just make a liveCD distro (or even use something like slax), install Apache, PHP, Mysql, Firefox and anything else you may need. Of course doing it this way you actually need to boot into the CD, but this can (if done correctly) give the impression of one application. Quote Link to comment Share on other sites More sharing options...
stualk Posted April 16, 2007 Author Share Posted April 16, 2007 Ok, i've managed to configure XAMPP in the way I want it to work and almost everything works fine. A big problem I had was that I didn't realise XAMPP ran php5 so I had to open the php.ini file and turn global variables on due to the way the website that runs on the cd is programmed. The only problem i've got is that there is a product search option on the cd which doesn't seem to work. It works fine on the web but not on the cd and yet all the settings are the same and i'm using the same pages etc. Is anyone familiar with XAMPP who might be able to help or does anyone know from the above description what could be causing the problem? Surely if it works on the web it would work on the CD too? Or can you not have forms on a CD? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.