Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-14-2006, 05:07 AM
jadkar jadkar is offline
 
Join Date: Feb 2006
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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.
Reply With Quote
  #2  
Old 03-14-2006, 11:53 AM
Trigunflame's Avatar
Trigunflame Trigunflame is offline
 
Join Date: Aug 2002
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by jadkar
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.
Im sorry but that doesnt make any sense. Vbulletins PHP code is cross portable between PHP4/5 and should not have anything to do with your problems.

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.
Reply With Quote
  #3  
Old 03-14-2006, 12:19 PM
jadkar jadkar is offline
 
Join Date: Feb 2006
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #4  
Old 03-14-2006, 01:22 PM
Trigunflame's Avatar
Trigunflame Trigunflame is offline
 
Join Date: Aug 2002
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.

Attached Files
File Type: php php5_to_php.php (1.3 KB, 7 views)
File Type: php php_to_php5.php (1.3 KB, 8 views)
Reply With Quote
  #5  
Old 03-14-2006, 01:31 PM
jadkar jadkar is offline
 
Join Date: Feb 2006
Posts: 42
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

^^^^

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:
Originally Posted by Trigunflame
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.

I'm sorry just some clarification questions.....

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
Reply With Quote
  #6  
Old 03-14-2006, 03:21 PM
Trigunflame's Avatar
Trigunflame Trigunflame is offline
 
Join Date: Aug 2002
Posts: 742
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad to know
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:44 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09433 seconds
  • Memory Usage 2,242KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (2)postbit_attachment
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_attachment
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete