PHPMotion is a video sharing application and it also has functionalities for sharing images and music.
In this document I will install PHPMotion in an Ubuntu Linux server. The version of Ubuntu I used in 12.04 and it is 32bit.
While installing Ubuntu I installed the LAMP so that I already have the required Apache, PHP and MySQL. It can also be installed easily using apt-get.
The PHP version I used is 5.3.
Check the modules installed with PHP using the command
$ php –m
This command will list the PHP modules already installed. From this command I found that the GD Library is missing. To install GD library use the command:
$ sudo apt-get install php5-gd
Note: If you are at root user shell, just run the commands without sudo. Also in this doc I used pico editor to edit files, you can use any editor you like.
Also we need PHP curl library
$ sudo apt-get install php5-curl
Restart Apache after the installation
$ sudo service apache2 restart
To check details of PHP we can use the following script
$ sudo pico /var/www/info.php
Save the script in default apache root directory .i.e /var/www and open in a web-browser.
Next we have to install LAME mp3 encoder.
$ sudo apt-get install lame
Next we have to install Libogg and Libvorbis. First we have to install Libogg otherwise if we first try to install Libvorbis we will get error.
Also we need C compiler installed, otherwise we will get configure: error: no acceptable C compiler found in $PATH error while we try to compile Libogg and Libvorbis.
I am going to install the GCC compiler as do not have any C compiler installed in my computer.
$ sudo apt-get install gcc
If make is not installed, install make
$ sudo apt-get install make
Download Libogg
$ wget http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz
Extract the downloaded file
$ tar xzvf libogg-1.3.0.tar.gz
Now we are going to compile the libogg, go to the libogg-1.3.0 directory
$ cd libogg-1.3.0
$ sudo ./configure
$ sudo make
$ sudo make install
Download Libvorbis and compile it
$ wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz
$ tar xzvf libvorbis-1.3.3.tar.gz
$ cd libvorbis-1.3.3
$ sudo ./configure
$ sudo make
$ sudo make install
Install Mencoder and also Mplayer
$ sudo apt-get install mencoder
Install FFMpeg
$ sudo apt-get install ffmpeg
Install Flvtool2
$ sudo apt-get install flvtool2
Open PHP configuration file /etc/php5/apache2/php.ini and set the following:
open_basedir =
upload_max_filesize = 100M
post_max_size = 100M
(Note: PHPMotion suggests above two parameters value as 100M, but it depends on your need. If you want to upload files larger than 100M set it accordingly)
max_execution_time = 1500
session.gc_maxlifetime = 14000
safe_mode = Off
enable_dl = On
Restart apache to load the changes.
$ sudo service apache2 restart
Download PHPMotion 3.5 version and extract it.
$ unzip phpmotion.zip
Copy Phpmotion to the Apache web server. In this example, I will deploy PHPMotion to the default root folder of Apache.
$ sudo cp -rf * /var/www/
We have to change the permission of the cgi-bin folder of phpmotion application to 755
$ cd /var/www
$ sudo chmod -R 755 ./cgi-bin
Now we could start the setup of PHPMotion.
Open the URL for PHPMotion and click on Continue button
In the second step PHPMotion checks for required components. Oopssss…… error for PHPShield.
To resolve this issue go to the Instruction manual http://wiki.phpmotion.com/PHPShield53
Check the PHP extensions directory
pranabs@ubuntu:/var/www$ php -i | grep extension_dir
extension_dir => /usr/lib/php5/20090626+lfs => /usr/lib/php5/20090626+lfs
My PHP extensions directory is /usr/lib/php5/20090626+lfs , go to this directory
$ cd /usr/lib/php5/20090626+lfs
Check is there any phpshield loader
pranabs@ubuntu:/usr/lib/php5/20090626+lfs$ ls
curl.so gd.so mysqli.so mysql.so pdo_mysql.so pdo.so
Download the PHPShield loader from the link provided in http://wiki.phpmotion.com/PHPShield53
pranabs@ubuntu:/usr/lib/php5/20090626+lfs$ sudo wget http://downloads.phpmotion.com/phpshield-loaders/linux/i386/ixed.5.3
Now we have to add this new extension to PHP configuration file
$ cd /etc/php5/conf.d/
Create a new file ixed.5.3.ini
$ sudo pico ixed.5.3.ini
Add the line extension=ixed.5.3 to the new file and save it.
Restart Apache.
$ sudo service apache2 restart
Now go to the PHPMotion setup and refresh the page.
Now everything looks OK and we can continue the setup. Click on Continue button.
OMG… again some error. Its very simple just have to change permissions for some folders in PHPMotion.
pranabs@ubuntu:/var/www$ cd /var/www
pranabs@ubuntu:/var/www$ sudo chmod -R 777 addons
pranabs@ubuntu:/var/www$ sudo chmod -R 777 uploads
pranabs@ubuntu:/var/www$ sudo chmod -R 777 classes
pranabs@ubuntu:/var/www$ sudo chmod -R 777 logs
pranabs@ubuntu:/var/www$ sudo chmod -R 777 setup
pranabs@ubuntu:/var/www$ sudo chmod -R 777 pictures
pranabs@ubuntu:/var/www$ sudo chmod -R 777 temp
Click on the Check Again button after changing the permissions.
Click on Continue to proceed.
In this step we have to configure database connection to MySQL server. Connect to MySQL server and create the database and user.
mysql> create database phpmotion;
Query OK, 1 row affected (0.00 sec)
mysql> grant all privileges on phpmotion.* to 'phpmotion'@'localhost' identified by 'passw0rd';
Query OK, 0 rows affected (0.00 sec)
Enter the database details and click on Continue:
Enter the website information and other details and click Continue
Our setup is complete, remove the setup folder from PHPMotion root directory and click Login to Siteadmin to administer PHPMotion.
Installation is done, I can get the admin console:
But for proper functioning of this application we have to do some additional configurations.
Right now if we go to links like Video, Audios etc. we will get URL not found error
Also while uploading video the following error comes:
We have to change Apache config file to fix these issues
Open Apache config file /etc/apache2/sites-available/default and edit. My default file after editing looks as follows:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
<Directory "/var/www/cgi-bin">
AllowOverride None
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
save and restart Apache. Also make sure that .htaccess file is present in the PHPMotion root folder. i.e. in my case in /var/www folder.
Ooopssss Server error after restarting Apache
Lets check the Apache error log.
/var/www/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration, referer: http://mediaserver.mkcl.org/uploader.php
Error related to RewriteEngine i.e. mod_rewrite of Apache. May be it is not loaded by Apache. Lets check all the loaded modules of Apache.
pranabs@ubuntu:/var/www$ apachectl -t -D DUMP_MODULES
Loaded Modules:
core_module (static)
log_config_module (static)
logio_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
alias_module (shared)
auth_basic_module (shared)
authn_file_module (shared)
authz_default_module (shared)
authz_groupfile_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgi_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
mime_module (shared)
negotiation_module (shared)
php5_module (shared)
reqtimeout_module (shared)
setenvif_module (shared)
status_module (shared)
Rewrite module is not loaded, we have to enable rewrite module
pranabs@ubuntu:/var/www$ sudo a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
service apache2 restart
pranabs@ubuntu:/var/www$ sudo service apache2 restart
Now check whether rewrite module has been loaded or not
pranabs@ubuntu:/var/www$ apachectl -t -D DUMP_MODULES
Loaded Modules:
core_module (static)
log_config_module (static)
logio_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
alias_module (shared)
auth_basic_module (shared)
authn_file_module (shared)
authz_default_module (shared)
authz_groupfile_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgi_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
mime_module (shared)
negotiation_module (shared)
php5_module (shared)
reqtimeout_module (shared)
rewrite_module (shared)setenvif_module (shared)
status_module (shared)
Wow…. I can see the rewrite module.
Now all the links of PHPMotion site are working fine :) .
Also I found one issue, in the new user registration page, the captcha image is not getting displayed and new users unable to register to the site.
If I check the Apache error log I get the message:
PHP Warning: imagettfbbox(): Could not find/open font in /var/www/includes/captcha.php on line 53, referer: http://mediaserver.mkcl.org/join.php
I got the solution for this problem from PHPMotion Forum.
Open the file captcha.php located inside includes directory of PHPMotion root directory, i.e. in my case /var/www/includes/captcha.php
pranabs@ubuntu:~$ sudo pico /var/www/includes/captcha.php
Change the var $font = 'DoradoHeadline.ttf'; to var $font = './DoradoHeadline.ttf';
Save this file and and check again. This will resolve the issue.
That's all we have to do. Relax and enjoy your PHPMotion installation.
In this document I will install PHPMotion in an Ubuntu Linux server. The version of Ubuntu I used in 12.04 and it is 32bit.
While installing Ubuntu I installed the LAMP so that I already have the required Apache, PHP and MySQL. It can also be installed easily using apt-get.
The PHP version I used is 5.3.
Check the modules installed with PHP using the command
$ php –m
This command will list the PHP modules already installed. From this command I found that the GD Library is missing. To install GD library use the command:
$ sudo apt-get install php5-gd
Note: If you are at root user shell, just run the commands without sudo. Also in this doc I used pico editor to edit files, you can use any editor you like.
Also we need PHP curl library
$ sudo apt-get install php5-curl
Restart Apache after the installation
$ sudo service apache2 restart
To check details of PHP we can use the following script
$ sudo pico /var/www/info.php
Save the script in default apache root directory .i.e /var/www and open in a web-browser.
Next we have to install LAME mp3 encoder.
$ sudo apt-get install lame
Next we have to install Libogg and Libvorbis. First we have to install Libogg otherwise if we first try to install Libvorbis we will get error.
Also we need C compiler installed, otherwise we will get configure: error: no acceptable C compiler found in $PATH error while we try to compile Libogg and Libvorbis.
I am going to install the GCC compiler as do not have any C compiler installed in my computer.
$ sudo apt-get install gcc
If make is not installed, install make
$ sudo apt-get install make
Download Libogg
$ wget http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz
Extract the downloaded file
$ tar xzvf libogg-1.3.0.tar.gz
Now we are going to compile the libogg, go to the libogg-1.3.0 directory
$ cd libogg-1.3.0
$ sudo ./configure
$ sudo make
$ sudo make install
Download Libvorbis and compile it
$ wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz
$ tar xzvf libvorbis-1.3.3.tar.gz
$ cd libvorbis-1.3.3
$ sudo ./configure
$ sudo make
$ sudo make install
Install Mencoder and also Mplayer
$ sudo apt-get install mencoder
Install FFMpeg
$ sudo apt-get install ffmpeg
Install Flvtool2
$ sudo apt-get install flvtool2
Open PHP configuration file /etc/php5/apache2/php.ini and set the following:
open_basedir =
upload_max_filesize = 100M
post_max_size = 100M
(Note: PHPMotion suggests above two parameters value as 100M, but it depends on your need. If you want to upload files larger than 100M set it accordingly)
max_execution_time = 1500
session.gc_maxlifetime = 14000
safe_mode = Off
enable_dl = On
Restart apache to load the changes.
$ sudo service apache2 restart
Download PHPMotion 3.5 version and extract it.
$ unzip phpmotion.zip
Copy Phpmotion to the Apache web server. In this example, I will deploy PHPMotion to the default root folder of Apache.
$ sudo cp -rf * /var/www/
We have to change the permission of the cgi-bin folder of phpmotion application to 755
$ cd /var/www
$ sudo chmod -R 755 ./cgi-bin
Now we could start the setup of PHPMotion.
Open the URL for PHPMotion and click on Continue button
In the second step PHPMotion checks for required components. Oopssss…… error for PHPShield.
To resolve this issue go to the Instruction manual http://wiki.phpmotion.com/PHPShield53
Check the PHP extensions directory
pranabs@ubuntu:/var/www$ php -i | grep extension_dir
extension_dir => /usr/lib/php5/20090626+lfs => /usr/lib/php5/20090626+lfs
My PHP extensions directory is /usr/lib/php5/20090626+lfs , go to this directory
$ cd /usr/lib/php5/20090626+lfs
Check is there any phpshield loader
pranabs@ubuntu:/usr/lib/php5/20090626+lfs$ ls
curl.so gd.so mysqli.so mysql.so pdo_mysql.so pdo.so
Download the PHPShield loader from the link provided in http://wiki.phpmotion.com/PHPShield53
pranabs@ubuntu:/usr/lib/php5/20090626+lfs$ sudo wget http://downloads.phpmotion.com/phpshield-loaders/linux/i386/ixed.5.3
Now we have to add this new extension to PHP configuration file
$ cd /etc/php5/conf.d/
Create a new file ixed.5.3.ini
$ sudo pico ixed.5.3.ini
Add the line extension=ixed.5.3 to the new file and save it.
Restart Apache.
$ sudo service apache2 restart
Now go to the PHPMotion setup and refresh the page.
Now everything looks OK and we can continue the setup. Click on Continue button.
OMG… again some error. Its very simple just have to change permissions for some folders in PHPMotion.
pranabs@ubuntu:/var/www$ cd /var/www
pranabs@ubuntu:/var/www$ sudo chmod -R 777 addons
pranabs@ubuntu:/var/www$ sudo chmod -R 777 uploads
pranabs@ubuntu:/var/www$ sudo chmod -R 777 classes
pranabs@ubuntu:/var/www$ sudo chmod -R 777 logs
pranabs@ubuntu:/var/www$ sudo chmod -R 777 setup
pranabs@ubuntu:/var/www$ sudo chmod -R 777 pictures
pranabs@ubuntu:/var/www$ sudo chmod -R 777 temp
Click on the Check Again button after changing the permissions.
Click on Continue to proceed.
In this step we have to configure database connection to MySQL server. Connect to MySQL server and create the database and user.
mysql> create database phpmotion;
Query OK, 1 row affected (0.00 sec)
mysql> grant all privileges on phpmotion.* to 'phpmotion'@'localhost' identified by 'passw0rd';
Query OK, 0 rows affected (0.00 sec)
Enter the database details and click on Continue:
Enter the website information and other details and click Continue
Our setup is complete, remove the setup folder from PHPMotion root directory and click Login to Siteadmin to administer PHPMotion.
Installation is done, I can get the admin console:
But for proper functioning of this application we have to do some additional configurations.
Right now if we go to links like Video, Audios etc. we will get URL not found error
Also while uploading video the following error comes:
We have to change Apache config file to fix these issues
Open Apache config file /etc/apache2/sites-available/default and edit. My default file after editing looks as follows:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /var/www/cgi-bin/
<Directory "/var/www/cgi-bin">
AllowOverride None
Options Indexes FollowSymLinks Includes ExecCGI
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
save and restart Apache. Also make sure that .htaccess file is present in the PHPMotion root folder. i.e. in my case in /var/www folder.
Ooopssss Server error after restarting Apache
Lets check the Apache error log.
/var/www/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration, referer: http://mediaserver.mkcl.org/uploader.php
Error related to RewriteEngine i.e. mod_rewrite of Apache. May be it is not loaded by Apache. Lets check all the loaded modules of Apache.
pranabs@ubuntu:/var/www$ apachectl -t -D DUMP_MODULES
Loaded Modules:
core_module (static)
log_config_module (static)
logio_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
alias_module (shared)
auth_basic_module (shared)
authn_file_module (shared)
authz_default_module (shared)
authz_groupfile_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgi_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
mime_module (shared)
negotiation_module (shared)
php5_module (shared)
reqtimeout_module (shared)
setenvif_module (shared)
status_module (shared)
Rewrite module is not loaded, we have to enable rewrite module
pranabs@ubuntu:/var/www$ sudo a2enmod rewrite
Enabling module rewrite.
To activate the new configuration, you need to run:
service apache2 restart
pranabs@ubuntu:/var/www$ sudo service apache2 restart
Now check whether rewrite module has been loaded or not
pranabs@ubuntu:/var/www$ apachectl -t -D DUMP_MODULES
Loaded Modules:
core_module (static)
log_config_module (static)
logio_module (static)
mpm_prefork_module (static)
http_module (static)
so_module (static)
alias_module (shared)
auth_basic_module (shared)
authn_file_module (shared)
authz_default_module (shared)
authz_groupfile_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgi_module (shared)
deflate_module (shared)
dir_module (shared)
env_module (shared)
mime_module (shared)
negotiation_module (shared)
php5_module (shared)
reqtimeout_module (shared)
rewrite_module (shared)setenvif_module (shared)
status_module (shared)
Wow…. I can see the rewrite module.
Now all the links of PHPMotion site are working fine :) .
Also I found one issue, in the new user registration page, the captcha image is not getting displayed and new users unable to register to the site.
If I check the Apache error log I get the message:
PHP Warning: imagettfbbox(): Could not find/open font in /var/www/includes/captcha.php on line 53, referer: http://mediaserver.mkcl.org/join.php
I got the solution for this problem from PHPMotion Forum.
Open the file captcha.php located inside includes directory of PHPMotion root directory, i.e. in my case /var/www/includes/captcha.php
pranabs@ubuntu:~$ sudo pico /var/www/includes/captcha.php
Change the var $font = 'DoradoHeadline.ttf'; to var $font = './DoradoHeadline.ttf';
Save this file and and check again. This will resolve the issue.
That's all we have to do. Relax and enjoy your PHPMotion installation.
17 comments:
this helped me alot, it was very plain and understanding, however, when trying to upload a vid, it says select a channel but there isnt any and it wont let me go forward
First you have to login as admin, and create channel or category. We are not using PHPMotion, so I don't remember exactly where the options were.
hey dude thanks alot for your reply, got it working, i eventually had a captcha issue and your tut did its magic again, you surely helped me alot, thanks again
ADMIN you are my master does my PHPmotion yes ^_^ BY SLIVER
hi admin I installed PHPmotion v 3.5 in local host ubuntu 12 my problem and if I connect from another terminal (windows7) with internet explorer http:// 192.168.1.5/phpmotion I get this:
http://imageshack.us/a/img833/6973/48135642.jpg
I can not fix this error
ok it works http://imageshack.us/a/img833/6973/48135642.jpg txt admin
Thank you very much from Russia. Everything works on Ubuntu Server 12.04 .
Thank you!
Why can't I F'ing copy & paste from this page!!
Thank you! Great Job!
Congratulations for this post. Really great !!
Hey, thanks for the guide..
I have a question, when i upload a video, it says it is successfully uploaded and is now processed, but the video is nowhere to be found... what does this mean and how can i fix it?
thank you.
thank's very much.. I can do it all using apache webserver. but when I used Nginx server, the problem default in site-available. so when I go to audio the message :500 Internal Server Error
nginx/1.1.19
Excelente Post, paso a paso explica detalladamente todo lo que necesitamos para instalar PHPMotion. Solo que cuando subo un video no lo convierte al parecer pues me dice que el vido dura 0:00 y no reproduce nada, solo muestra la foto inicial del mismo.
When i upload video file i got this error.
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
what can do for solve this error.
Pranab'S Scrapbook: Installing Phpmotion Media Sharing Cms >>>>> Download Now
>>>>> Download Full
Pranab'S Scrapbook: Installing Phpmotion Media Sharing Cms >>>>> Download LINK
>>>>> Download Now
Pranab'S Scrapbook: Installing Phpmotion Media Sharing Cms >>>>> Download Full
>>>>> Download LINK
Post a Comment