metallithrax Posted March 11, 2009 Report Share Posted March 11, 2009 Hi, I want to run an offline copy of a website with a large database(200+ MB) from CD/DVD. I came across uniserver while looking for a solution. I have looked at the run from CD Oily Rag, but I don't want to copy the database across since there will be no writing to it by the end user. Will Uniserver do this? And if so, what additional changes will I need to make to enable me to do this? Any help appreciated Quote Link to comment Share on other sites More sharing options...
Ric Posted March 11, 2009 Report Share Posted March 11, 2009 I found your post interesting because I am currently working on a new plugin for Mona, will add this feature as a user option. However the following is a solution for 3.5 note you do need to write some small temp files to c drive. To prevent copying that large database these are the changes required: Assumes you are using uscd4.exe plugin 1] Prevent copying database: Edit File: udrive\plugins\uscd2\uscd\new_Server_Start.bat Delete the following lines::Copy complete database XCOPY "%CD%\udrive\usr\local\mysql\data" %ustemp%\mysql\data\ /s /q[/code]2] Prevent update MySQL path 1 Edit file: udrive\plugins\uscd2\uscd\cd_mode.plChange this block of code:#===MySQL@mpg=(); # clear arraypush(@mpg,"../../usr/local/mysql/bin/my-small.cnf"); # filepathpush(@mpg,"datadir = \"/usr/local/mysql/data/\""); # search forpush(@mpg,"datadir = \"$tpath/mysql/data/\""); # replace withpush(@mpg,"tmpdir = \"/tmp\""); # search forpush(@mpg,"tmpdir = \"$tpath/mysql/tmp\""); # replace withupdate_files(@mpg); # search replace save file#=== END MySQL[/code]To:#===MySQL@mpg=(); # clear arraypush(@mpg,"../../usr/local/mysql/bin/my-small.cnf"); # filepathpush(@mpg,"tmpdir = \"/tmp\""); # search forpush(@mpg,"tmpdir = \"$tpath/mysql/tmp\""); # replace withupdate_files(@mpg); # search replace save file#=== END MySQL[/code] 3] Prevent update MySQL path 2 Edit file: udrive\plugins\uscd2\uscd\us_mode.plChange this block of code:#===MySQL@mpg=(); # clear arraypush(@mpg,"../../usr/local/mysql/bin/my-small.cnf"); # filepathpush(@mpg,"datadir = \"/usr/local/mysql/data/\""); # search forpush(@mpg,"datadir = \"$tpath/mysql/data/\""); # replace withpush(@mpg,"tmpdir = \"/tmp\""); # search forpush(@mpg,"tmpdir = \"$tpath/mysql/tmp\""); # replace withupdate_files(@mpg); # search replace save file#=== END MySQL[/code]To:#===MySQL@mpg=(); # clear arraypush(@mpg,"../../usr/local/mysql/bin/my-small.cnf"); # filepathpush(@mpg,"tmpdir = \"/tmp\""); # search forpush(@mpg,"tmpdir = \"$tpath/mysql/tmp\""); # replace withupdate_files(@mpg); # search replace save file#=== END MySQL[/code]That’s all you need to change! All the bestRic Quote Link to comment Share on other sites More sharing options...
metallithrax Posted March 12, 2009 Author Report Share Posted March 12, 2009 Thanks for that, will try it when i'm back after the weekend Quote Link to comment Share on other sites More sharing options...
BananaAcid Posted April 5, 2009 Report Share Posted April 5, 2009 just as a thought: as mysql seems to be troublesome, you could export all mysql data and import it to a SQLite db. in that case you would not rely on the mysql server since the sqlite php extention messes with it.as structure and commands are the same, you would only need to batch replace the mysql_* commands to sqlite_* ones in the php files. downside: for every msql connection establishing, the replacement would be, for example, sqlite_open( string $filename ) i know, thats even more work... but could be usefull for a cd version... Quote Link to comment Share on other sites More sharing options...
BananaAcid Posted April 5, 2009 Report Share Posted April 5, 2009 ( for PHP 5.3.x and SQLite use SQLite3::open ( string $filename, int $flags= SQLITE3_OPEN_READONLY ) ) 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.