Author |
Message |
aespinal
Hangin' Around
![](modules/Forums/images/avatars/gallery/blank.gif)
Joined: Nov 12, 2006
Posts: 41
|
Posted:
Tue Aug 07, 2012 7:42 am |
|
I have the HTTP Video Stream Module By Steezmatic Designs.
Since all the videos posted are stored in a new server, I need to change the url in the database.
How do I write the command to change old url to new url?
Example:
old url http://oldsite com/videos/sample.mpg
new url http://newsite com/videos/sample.mpg |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm
![](modules/Forums/images/avatars/5ed231554a8492e2e09da.gif)
Joined: Aug 13, 2009
Posts: 1123
|
Posted:
Tue Aug 07, 2012 7:56 am |
|
Since you already uploaded all your videos to the new server, then you need to backup the tables from your(old server) phpMyadmin to export all Video Stream tables. Now Open those tables with a decent editor and use search and replace option to find the old url to be replaced. Now import all your mod sql tables to the new server in phpMyadmin. I hope I explain properly. Let me know. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
aespinal
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Aug 07, 2012 8:20 am |
|
I just did that, but when importing the tables back, received this error:
#1050 - Table 'nuke_video_stream' already exists |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Aug 07, 2012 8:34 am |
|
Method 1: Just delete all new tables and import the old one or
Method 2: you need to Add DROP TABLE statement to your tables when u backed them up from your old tables choosing Custom - display all possible options. Let me know.
Example
Code:DROP TABLE IF EXISTS `nuke_video_stream`;
CREATE TABLE IF NOT EXISTS `nuke_video_stream` (
|
The first line needed to be included when u export your old data tables.
Code:DROP TABLE IF EXISTS `nuke_video_stream`;(This means it will delete exist tables.)
|
Note: I suppose you have NO videos in the new one otherwise we need to use another methode to update them like this example:
Code:ALTER TABLE `nuke_video_stream` bla bla
UPDATE `nuke_video_stream` bla bla
|
|
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
aespinal
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Aug 08, 2012 4:11 pm |
|
I changed the url with your help, dropping the tables and then importing the corrected one, but now the Video Stream does not show any video... |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Aug 08, 2012 4:18 pm |
|
Open config.php
Search for this line to turn Error on
Code:$display_errors = false;
|
Change to
Code:$display_errors = true;
| //This should only be used (set to "true") when testing locally and not in a production environment
Note: After getting any warning or error bring everything how it was before
Code:$display_errors = false;
|
Let me know what kind of error u get ![Shocked](modules/Forums/images/smiles/icon_eek.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
aespinal
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Wed Aug 08, 2012 4:54 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
neralex
Site Admin
![](modules/Forums/images/avatars/201442295664a46e4575d46.jpg)
Joined: Aug 22, 2007
Posts: 1775
|
Posted:
Wed Aug 08, 2012 5:17 pm |
|
The theme is written with a old standard of code. Take a look into the themes of the RN package und rebuild your theme. But please, turn off your error reporting on a live used page! |
Last edited by neralex on Fri Aug 10, 2012 12:40 pm; edited 1 time in total |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
neralex
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Aug 10, 2012 12:40 pm |
|
I have try a look in the source code of your video module and your videos are stored with following URL in your database:
http://videos.godcityonline.com/xxxxx.mpg
You can replace the links with phpmyadmin to the new path of your videos. BTW - you don't use a RavenNuke, it looks like an old phpnuke version. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
hicuxunicorniobestbuildpc
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Fri Aug 10, 2012 2:49 pm |
|
aespinal, I noticed you don't have RavenNuke, this is an old phnuke version. I thought u had a 2.4. That is why u have many errors like this: Deprecated: Function eregi_replace() is deprecated
Sorry it is useless to help you running an unsafe version of phpnuke.
Disculpe pero la version de phpnuke instalada no es segura y es un perdida de tiempo.
You should uprade to RavenNuke asap. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
killing-hours
RavenNuke(tm) Development Team
![](modules/Forums/images/avatars/18f54b284d120ece8c103.gif)
Joined: Oct 01, 2010
Posts: 438
Location: Houston, Tx
|
Posted:
Fri Aug 10, 2012 8:13 pm |
|
Write a simple script to pull the data in then replace the "old" with the "new".
I.e.
Code:$oldData = $db->sql_query('SELECT uniquieID, your_column FROM '.$prefix.'_your_table');
while($replaceEm = $db->sql_fetchrow($oldData){
$uniquieID = $replaceEm['uniquieID'];
$oldUrl = $replaceEm['your_column'];
$newURL = str_replace('http://www.oldsite.com', 'http://www.newsite.com', $oldUrl);
$updateDB = $db->sql_query('UPDATE '.$prefix.'_your_table SET your_column="'.$newURL.'" WHERE uniquieID='.$uniquieID.' LIMIT 1);
}
|
Make sure you have a backup before doing anything so that in the event something goes wrong you can start over. |
_________________ Money is the measurement of time - Me
"You can all go to hell…I’m going to Texas" -Davy Crockett |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|