Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
aespinal
Hangin' Around



Joined: Nov 12, 2006
Posts: 41

PostPosted: Tue Aug 07, 2012 7:42 am Reply with quote

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 [ Only registered users can see links on this board! Get registered or login! ] com/videos/sample.mpg
new url [ Only registered users can see links on this board! Get registered or login! ] com/videos/sample.mpg
 
View user's profile Send private message
hicuxunicorniobestbuildpc
The Mouse Is Extension Of Arm



Joined: Aug 13, 2009
Posts: 1122

PostPosted: Tue Aug 07, 2012 7:56 am Reply with quote

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.
 
View user's profile Send private message
aespinal







PostPosted: Tue Aug 07, 2012 8:20 am Reply with quote

I just did that, but when importing the tables back, received this error:
#1050 - Table 'nuke_video_stream' already exists
 
hicuxunicorniobestbuildpc







PostPosted: Tue Aug 07, 2012 8:34 am Reply with quote

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
 
aespinal







PostPosted: Wed Aug 08, 2012 4:11 pm Reply with quote

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...
 
hicuxunicorniobestbuildpc







PostPosted: Wed Aug 08, 2012 4:18 pm Reply with quote

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
 
aespinal







PostPosted: Wed Aug 08, 2012 4:54 pm Reply with quote

Please see errors: [ Only registered users can see links on this board! Get registered or login! ]
 
neralex
Site Admin



Joined: Aug 22, 2007
Posts: 1772

PostPosted: Wed Aug 08, 2012 5:17 pm Reply with quote

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 
View user's profile Send private message
neralex







PostPosted: Fri Aug 10, 2012 12:40 pm Reply with quote

I have try a look in the source code of your video module and your videos are stored with following URL in your database:
[ Only registered users can see links on this board! Get registered or login! ]

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.
 
hicuxunicorniobestbuildpc







PostPosted: Fri Aug 10, 2012 2:49 pm Reply with quote

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.
 
killing-hours
RavenNuke(tm) Development Team



Joined: Oct 01, 2010
Posts: 438
Location: Houston, Tx

PostPosted: Fri Aug 10, 2012 8:13 pm Reply with quote

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 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©