• Welcome to PHPVIBE Forums. Please log in.
avatar_Marius P.

[ Video Sharing CMS v4 ] Manually upgrading from PHPVibe 3.3 to PHPVIBE 3.4

Started by Marius P.,

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Marius P.Topic starter


Manual changes apply to :


- vibe_config.php
- .htaccess (main in root)
- database





root/vibe_config.php:
Add



define( 'page', 'read' );
define( 'embedcode', 'embed' );

after


// SEO url structure



Save the vibe_config.php file and keep it.



.htaccess file : (main one, near load.php)


Add
RewriteRule ^embed/([^/]*)/$ /embed.php?id=$1 [L]
After
RewriteBase /





Database changes:





ALTER TABLE  `#db-prefix#videos` ADD  `token` VARCHAR( 255 ) NOT NULL AFTER  `id` ;
ALTER TABLE  `#db-prefix#videos` ADD  `tmp_source` MEDIUMTEXT NOT NULL AFTER  `source` ;
ALTER TABLE  `#db-prefix#videos` CHANGE  `pub`  `pub` INT( 11 ) NOT NULL DEFAULT  '0';
CREATE TABLE IF NOT EXISTS `#db-prefix#ads` (
  `ad_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `ad_spot` varchar(64) NOT NULL DEFAULT '',
  `ad_type` varchar(64) NOT NULL DEFAULT '0',
  `ad_content` longtext NOT NULL,
  `ad_title` varchar(64) NOT NULL,
  `ad_pos` varchar(64) NOT NULL,
  PRIMARY KEY (`ad_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ;


CREATE TABLE IF NOT EXISTS `#db-prefix#pages` (
  `pid` int(11) NOT NULL AUTO_INCREMENT,
  `menu` int(11) NOT NULL DEFAULT '0',
  `date` text COLLATE utf8_swedish_ci NOT NULL,
  `title` varchar(300) COLLATE utf8_swedish_ci NOT NULL,
  `pic` longtext COLLATE utf8_swedish_ci NOT NULL,
  `content` longtext COLLATE utf8_swedish_ci NOT NULL,
  `tags` varchar(500) COLLATE utf8_swedish_ci NOT NULL,
  PRIMARY KEY (`pid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci AUTO_INCREMENT=0 ;



Replace BEFORE using the sql code #db-prefix# to your actual prefix , ex : vibe_


Overwrite all files except /vibe_config.php
Chmod the new now folder /rawmedia to writeable (ex: 0777)

Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Marius P.Topic starter

If you are not familiar with sql you can use this:


1. Create a file called up.php


with the following content:



<?php  error_reporting(E_ALL); 
//Vital file include
require_once("load.php");


$db->query("ALTER TABLE  `".DB_PREFIX."videos` ADD  `token` VARCHAR( 255 ) NOT NULL AFTER  `id`");
$db->query("ALTER TABLE  `".DB_PREFIX."videos` ADD  `tmp_source` MEDIUMTEXT NOT NULL AFTER  `source`");
$db->query("ALTER TABLE  `".DB_PREFIX."videos` CHANGE  `pub`  `pub` INT( 11 ) NOT NULL DEFAULT  '0'");
$db->query("CREATE TABLE IF NOT EXISTS `".DB_PREFIX."ads` (
  `ad_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `ad_spot` varchar(64) NOT NULL DEFAULT '',
  `ad_type` varchar(64) NOT NULL DEFAULT '0',
  `ad_content` longtext NOT NULL,
  `ad_title` varchar(64) NOT NULL,
  `ad_pos` varchar(64) NOT NULL,
  PRIMARY KEY (`ad_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=0 ");




$db->query("CREATE TABLE IF NOT EXISTS `".DB_PREFIX."pages` (
  `pid` int(11) NOT NULL AUTO_INCREMENT,
  `menu` int(11) NOT NULL DEFAULT '0',
  `date` text COLLATE utf8_swedish_ci NOT NULL,
  `title` varchar(300) COLLATE utf8_swedish_ci NOT NULL,
  `pic` longtext COLLATE utf8_swedish_ci NOT NULL,
  `content` longtext COLLATE utf8_swedish_ci NOT NULL,
  `tags` varchar(500) COLLATE utf8_swedish_ci NOT NULL,
  PRIMARY KEY (`pid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COLLATE=utf8_swedish_ci AUTO_INCREMENT=0 ");


$db->debug();
?>



2. Upload up.php in your PHPVibe root (near load.php)
3. Run up.php in browser, ex: yourinstall.com/up.php it should show you an errorless debug.
4. Delete up.php from server.


this php file will make the sql changes for the upgrade.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Noel

--
Never execute code written on a Friday or a Monday.
  •  

Marius P.Topic starter

Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Marius P.Topic starter

Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Noel

Congratulations with the new release!! ... But I can not find it :/
--
Never execute code written on a Friday or a Monday.
  •  

Marius P.Topic starter

Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Noel

Got it... phpvibe_cms.zip

Let make some backups 1st and than install it.

Will report back.
--
Never execute code written on a Friday or a Monday.
  •  

Marius P.Topic starter

Ok, I'm here for another 2h , after that going in vacation, no more internet.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Noel

Update done (no problems)
Now it's testing time....

Will report back
--
Never execute code written on a Friday or a Monday.
  •  

Marius P.Topic starter

Make sure the two crons have execute permissions set, videocon.php and cron.php and the php bin path it's set in admin.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Noel

Till now I've not been using the crons.
Any extra info on how to set this up?

The Scheduled tasks (Crons management) is showing: No crons yet
How do I add the crons to this?

Also.. Have a nice holiday! You (and rest of team) deserves it!
--
Never execute code written on a Friday or a Monday.
  •  

Marius P.Topic starter

Thank you! Same to you!
If you don't use the cron, but use conversion with ffmpeg, you need to setup the videocron.php to be executable from php.


You also need exec and shell_exec enabled for ffmpeg (plus de actual ffmpeg and plugins).


Just try, if it doesn't work, you'll know why and what to do :)
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Noel

That should be okay on my server.
QuoteYou also need exec and shell_exec enabled for ffmpeg (plus de actual ffmpeg and plugins).

I'm getting this with videocron.php: Warning: Unknown column 'tmp_source' in 'field list' in /var/www/clients/client1/web102/web/lib/class.ezsql.php on line 249

Going to give it some more testing tomorrow.
I will get it working!

One more question. How do I add a scheduled task to the admin?
--
Never execute code written on a Friday or a Monday.
  •  

Marius P.Topic starter

My bad!


run this in bd:


ALTER TABLE `vibe_videos` ADD `tmp_source` MEDIUMTEXT NOT NULL AFTER `source` ;



change vibe_ to your prefix.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Marius P.Topic starter

I've updated the db.sql in setup and first post here...idk how I've missed that :|
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Noel

That fixed the warning!
Does FFMPEG leave a log? Looks like something is not working here as the uploaded MP4 does not convert.
Where does it get moved to after conversion?
--
Never execute code written on a Friday or a Monday.
  •  

Marius P.Topic starter

It doesn't convert .mp4, I've added a skip to it for .mp4 files as per the discussions in development, just the other formats in .mp4

It uploads to /rawmedia and moves to /media if you don't change the folders in admin.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Marius P.Topic starter

You can edit lib/upload-ffmpeg.php

and change

if($ext !== "mp3" && $ext !== "mp4") {





to




if($ext !== "mp3") {



and you get the same processing/conversion/recoding for .mp4 files.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Noel

Will do..

And now.. it's time for you to shutdown that PC and go on your holiday!

L8ter......
--
Never execute code written on a Friday or a Monday.
  •  

Marius P.Topic starter

Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Noel

You to.. Happy Holidays


And.. My PHP5 is not in "/usr/bin/php5"
Will change it to the correct place.
--
Never execute code written on a Friday or a Monday.
  •  

Noel

LOL...

I'm testing this on one of my servers that does not have FFMPEG :-)
And me thinking .. w.t.f. can be wrong ......
Pffff.. who needs a holiday now :-/
--
Never execute code written on a Friday or a Monday.
  •  

Fleswodka

  •  

Marius P.Topic starter

Quote from: interbizmedia on
MARIO TYTYTY you rock!! love to see its your passion!!


Thank you! Please report any issue with this so I can patch it before New Year's.

Quote from: Noel on
Pffff.. who needs a holiday now :-/

I honestly do, I have 5 months of work straight on 3 projects and I really need a break, and Alex and Natali from here as well.
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

Similar topics (7)