The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
PHP5 SQL dump into PHP vB installation
Hey everyone, I'm hoping I'm not the only one who has had this issue before.
Basically my "PROD" forum is being hosted using php5 and MySQLi. The site is running fine...no issues. I've decided to make a "DEV/UAT" site. I had some free space on another hosting service. Unfortunately, this hosting service uses php4 e(extentions are .php) and MySQL. I loaded VBulletin on "DEV" using .php insteadof .php5. I have the site loaded fine into "DEV" however, when I tried to do a dump from "PROD" into "DEV" I ran into issues. Obviously this didn't work becasue although the database came up OK in "DEV" all the links on my site now refrence .php5. I thought I would be slick and open the "dump" file in Word Pad and do a find/replace on .php5 and replace it with .php. Well, this worked I got all my threads and forums up, but I lost a lot all of my nav bars and other things here and there. There must have been "logic" code in the database and I changed all .php5 refrences and I shouldn't have. This leave me with this questions.... Is there anyway to import a .php5 database into a .php installation and have it work properly?? If so is there a tool/script to convert the table data?? Pleae let me know, if this doesn't work I think I'm going to have to scrap the whole idea. |
#2
|
||||
|
||||
Quote:
However SQL code ported between 1 mySQL server setup and other very often will create problems if they are parts of the SQL code that are incompatible with each other. |
#3
|
|||
|
|||
Well.....thanks for your quick reply, this is driving me nuts. I'll try and explain it a little differently....
PROD Environment = .php5 / MySQLi (file extension I'm using for php5 = .php5) DEV Environment = .php4 / MySQL (file extension I'm using for php4 = .php) OK, So I built DEV using a different download package from vBulletin. Meaning I specified the files to have a ".php" extension. I did this because my DEV hosting service was having problems with ".php5", and I knew that was because they are using php4. With that said I knew my first issue was going to be the PROD didn't match DEV, which is bad in itself; but I forged forward. I was able to get DEV up and running just fine. I even loaded all my custom templates and styles from PROD with no problem. So as it stood everything looked good in DEV, except I had a completely "empty" forum, no users, forums, threads, etc. (remember this is a fresh install on DEV) I figured my next step is to import the entire database from PROD onto my DEV MySql instance. Now I'm completely new to this product (including MySQL & MyphpAdmin) and exporting and importing databases was a learning expirence in itself. I used "BigDump.php to get the task done. Next the database from PROD is loaded into DEV, time to test it out. I bring up DEV and bam!! Everything looks good!! Forum structure is there exactly from PROD, my style still looks preserved. Problem comes when I click on any link. I get a "page can't be displayed - IE error" when I look at the page that's trying to load I see my problem. All the pages that are trying to load have an extension of ".php5" on the end of them. I figure..Damn! this must be because the database was from my ".php5" installation from PROD. You see, I had no idea what kind of data was in the vBulletin database. I was under the impression it's only data like thread content, users, etc. Obviously "whole" page links are kept in there because it's bringing over ".php5" extensions. So this problem seems easy.... just bring open my 23meg SQL dump from PROD in WordPad and do a "find/replace" on ".php5" replacing with ".php". I do this successfully. Now my entire dumped database from PROD has NO mention of .php5 EVERYTHING has been replaced with .php. I reload the database back into DEV and get interesting results. Now all my page links work however my top nav bar is missing, and it seems all the "GUI" button graphics are gone, and a few other strange things. At this point I maybe messing with something that can't be done. Basically all I'm trying to do is take ALL my data from PROD and move it to DEV but the versions on each are different and I'm wondering is there a "documented" way of doing this correctly. Again, I greatly appreciate your quick reply and any further help you or anyone else can give would be greatly appreciated. Here is a link to my DEV forum where you can see first hand the strange results..... http://tj.jadkarmotors.com/TJForum/index.php This is what PROD looks like.... http://www.tuner-junction.com Thanks again |
#4
|
||||
|
||||
Ive created two scripts.. that i have tested on my local forum.
1. Dump your existing database to your DEV forum; use the appropriate script I have attached to convert your templates to either .php or .php5. 2. Place these files in your forum root directory. |
#5
|
|||
|
|||
^^^^
Are you kidding me I haven't even tested these yet but the fact that you put together some scripts for me to try blows me away!!! I genuinely appreciate your help with this. I will try right away. Thanks again!! Quote:
1) I made a new dump from PROD and imported it into DEV. 2) I moved your scripts into my "root" forum directory. Now, do you just want me to run this script from a browser? or do I need to load it as a plug-in or something to that matter. I'm assuming you just mean from a browser, but I'm trying to figure out why I'm getting a 404 right now while doing that, I figure I'll just verify my actions with you first and trouble-shoot the 404 after. --------------------------------------------------------------------------------------- Trigunflame - It worked!!! Thanks so much, huge help. I wish I could give rep points here!!! :banana: On more thing, I hate to make you work some more however I really would love to understand as well as fix What exactly was the issue? I understand it's a template table, however when I did a "find/replace" I messed everything up. Were there ".php5" extentions that still needed to stay in the dump even though I'm not using php5? I assumed that by replacing all I would be all set, obvioudsly I was wrong. THanks again |
#6
|
||||
|
||||
Glad to know
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|