Archive for the ‘FFMPEG’ Category

Fatal error: Call to undefined function mysqli_query() error in Rayzz script

Tuesday, March 18th, 2008

Rayzz Script Error –

Fatal error: Call to undefined function mysqli_query()

This can be fixed by recompiling php with mysqli support or second option is –

pico common/config.inc.php

Locate line —

$CFG[’db’][’abstraction’] = ‘mysqli’;

Replace mysqli with mysql

OSTube Installation Error.

Sunday, December 9th, 2007

OSTube Installation Error : The command line version of PHP could not be found. Please make sure that the cli version is installed, and that mysql.so is also activated for the cli.

Solution :
This error is generally caused due to - OpenBase Dir Enabled.

Login to WHM >> Security Center –
PHP open_basedir Tweak >>

Click the check box in front of domain for which you wish to Exclude Protection.

Then Save it.

PHPMOTION - Fatal error: phpSHIELD Loader - script loader checksum error [17] Encoded script was modified in

Sunday, December 9th, 2007

If you are getting an error with PHPshield or you are getting a “blank screen” read below.

This means you did not upload in Binary mode. The following files must be uploaded in binary

1) All files in the phpshiled folder

2) The file classes/config.php

If you FTP program has a function to set transfer mode, you should set to “binary” when you upload the files mentioned above. The main problem is that while you ftp program may correctly know that the files in the phpshield folder must be uploaded in binary, when it comes to the config.php file, because its a php file you ftp program will most likely upload it in ascii format. While this is ok for all other php files, config.php needs to be uploaded in binary.

Warning: dl() [function.dl]: Not supported in multithreaded Web servers

You need to turn off/disable Thread Safety this is done in your php.ini file on your server. If you dont have access to your server via SSH then ask your web host to do disable it for you.

extension_dir does not exists /usr/lib/php/extensions/no-debug-non-zts-200343.......

Your PHP was not setup correctly. There is a folder missing on your server. All you need to do is create a folder with the same given in your error message on your server. You will need SSH access to do this, or ask your host to do it. This directory ( Extensions directory) needs to actually exist on the server.


Warning: dl(): Dynamically loaded extensions aren't enabled

You need to set the value enable_dl On (i.e.enable_dl On ) in your php.ini file on your server. You need SSH access to change this file. If you don’t have such access, ask your web host to do it for you.

Any other errors you get mean that you are running your PHP in safe_mode On this needs to be set to safe_mode Off in your php.ini file

Warning: dl() has been disabled for security reasons in

The dl() function has been added to the list of disabled function on your server. You need to enable this (by removing it) in your php.ini file on the server.

BLANK SCREEN - when you load the setup or any other page

If you are getting a blank screen then you actually have any one of the problems above but your server is set to not show error notifications so you can see which error you are getting.

Solution:

The following files must be uploaded in binary

1) All files in the phpshiled folder

2) The file classes/config.php

The phpSHIELD loader has not been installed, or is not installed correctly

If you are getting this error and you know you have all the correct files uploaded etc, then you may want to check that your domain name is not setup on your server using capital letters.

Example: PhPMotion.com if this is how your domain name looks like in your control panel or on your server then you will get errors. Linux is case sensitive and domain names (hosting accounts) should not be created using capital letters. So delete the hosting account and recreate it with NO CAPS e.g. phpmotion.com

Clipshare - VideoCaptcha not working.

Thursday, November 15th, 2007

Clipshare - VideoCaptcha not working.

Solution - Compile PHP with GD and Freetype.

Clipshare - Not displaying guest error message even if guest limit is reached

Thursday, November 15th, 2007

Sometimes Clipshare do not display the error message for guest watch limit.

The error message should display like –

Sorry but you have exceeded the guest video limit for today. Please sign up to watch unlimited videos. Thank you.

You can add this line to .htaccess

php_value register_globals On

This will display the message if guest limit to watch video is reached.

PHPMOTION HOW TO

Thursday, November 15th, 2007

Change player logo

To change the player logo simply change the file /images_s/playerlogo.png
You can create your own image with the same name but it must be a png file and not gif, jpeg etc

recover admin password (forgot admin password)

If you have forgotten your admin password

1) Unzip and upload the file attached at the end of this post, into your /siteadmin folder (via FTP)

2) Open it in your browser

e.g. www.yourdomain.com/siteadmin/recover.php

No mysql information-error E001

If you have followed all the steps on setting up your mysql information both on your server and also in the /classes/config.inc.php file and you get an error

No mysql information-error E001

The reason for this is that you have open_basedir restrictions on your hosting account which are preventing the contents of the file /classes/config.inc.php from being read by phpmotion

Solution:

You need to disable open_basedir restrictions on your account. If you have a Plesk server this is done in the vhost.conf file for the specific domain name. If you have any other type of control panel, check with the documentation on how to disable openbase_dir restriction

Large video files being cut short

there could be many reasons why this is happening ( server side issues)

1) For a start ensure that you dont have (Process Resource Monitor) installed on your server. This is a tool that basically monitors cpu/resource usage on your server and will disable mencoder if its using too much cpu. If you dont want to uninstall this application then ensure that you have correctly added mencoder to the exclude list.

2) Make sure that you have enough time set for your max_execution_time in your php.ini file ( try something like 300)

Allow full screen on video

open the file templates/inner+play.htm

FIND:

param name=allowFullScreen value=”false”

to

CHANGE IT TO:

param name=allowFullScreen value=”true”

This currently only works with Internet Explorer and not FireFox

Videos or Thumbs not showing

If you can upload videos and they are not showing then there could be a variety of reasons as to why this is the case. The list below is not a complete exhaustive one but will help debug the most common problems.

1) Missing Requirements

If you run the tester.php script and get “fail” on the first 3 items on the list then video will not convert. You should check that you have these requirements installed. If you have a dedicated server or a VPS you can check yourself by logging in as root and running

which ffmpeg

which mencoder

which flvtool2

If you get a path showing then you have the modules installed, if not then you need to set these up. Click here for help with this.

Ensure that the file paths that you get are the same ones as specified in your admin area.

2) NO CLI support

CLI (command line interface) is the means by which the videos are converted in the background so that users don’t have to wait while they are converted. When a video finishes uploading, CLI is used to run convertor.php in the background which goes to work converting the video.

You need to check that you have CLI support. to do this follow the steps below

a) Open convertor.php and edit the two sections below to include your own email address and remove the // (commenting)

//CHECK POINT 1\\
//mail("you@yourdomain.com", "PHPmotion - Check Point 1", "Loaded OK", "From: Server “);

and also


//CHECK POINT 6\\
//mail("you@yourdomain.com", "PHPmotion - Check Point 6", "SCRIPT LOADED TO THE END", "From: Server “);

b) upload a video and when uploading is completed you should get 2 emails from your server, if you get both emails it means that you have CLI support and the convertor.php was loaded correctly and as such this is not your current problem. If you dont get the emails then you don’t have CLI for PHP and you should:

1) try and change the path to php in the file /classes/config.inc.php to /usr/local/bin/php

2) if step (1) does not resolve the problem try this alternative solution. http://phpmotion.com/forum/index.php?topic=954.0

3) Check your logs

You can also check your log file which is created in the folder /logs. To enable logging do the following

a) Edit the file classes/config.inc.php and change logging to yes as shown below

$log_encoder = "yes"; //change to "yes" to create a log file of encoding (created in /logs)

b) upload a video and then download the log file. If you are getting errors and you decide to post a question in the forum, remember to include your log file.

MySQL error - DEFAULT CHARSET=latin1

If you are getting a mysql error on (DEFAULT CHARSET=latin1).

1) download the file attached at the end of this post and unzip it

2) Delete the mysql.sql file thats inside your SQL folder in you downloaded version of PHPmotion replace the one downloaded.

3) Upload new SQL folder to your FTP

4) Try and follow setup steps as normal

mysql download

Taken from PHPMOTION FORUMS

ERROR: Failed to mkdir “/path/tp/templates c/: No such file or directory

Wednesday, November 14th, 2007

Reason for this error is wrong path in cgi-bin/uu_default_config.pm

Check the value of temp_dir and upload_dir.

Flength File Help “Failed To Find Flength File”

Wednesday, November 14th, 2007

Flength File Help “Failed To Find Flength File”

Assuming the script is set up properly, you are probably dealing with some kind of write-caching. Some servers perform write-caching which prevents writing out the flength file or the entire CGITemp file during the upload. The flength file or the CGITemp file do not actually hit the disk until the upload is complete, making it worthless for reporting on progress during the upload. This may be fixed using a .htaccess file assuming your host supports them. Here is a link to an excellent tutorial on using .htaccess files. I strongly recommend giving it a quick read before attempting to install your own .htaccess file.

www.freewebmasterhelp.com/tutorials/htaccess

1. A mod_security module for Apache.

To fix it just create a file called .htaccess (that’s a period followed by “htaccess”) and put the following lines in that file. Upload the file into the directory where the Uber-Uploader CGI “.pl” scripts resides, or in some directory above it (like your server’s DOCUMENT_ROOT, i.e. the top-level of your webspace). htaccess files must be uploaded as ASCII mode, not BINARY. You may need to CHMOD the htaccess file to 644 or (RW-R–R–).


# Turn off mod_security filtering.
SecFilterEngine Off

# The below probably isn’t needed,
# but better safe than sorry.
SecFilterScanPOST Off

If the above method does not work, try putting the following lines into the file


SetEnvIfNoCase Content-Type \
“^multipart/form-data;” “MODSEC_NOPOSTBUFFERING=Do not buffer file uploads”


mod_gzip_on No

2. “Performance Cache” enabled on OS X SERVER.

If you’re running OS X Server and the progress bar isn’t working, it could be because of “performance caching.” Apparently if ANY of your hosted sites are using performance caching, then by default, all sites (domains) will attempt to. The fix then is to disable the performance cache on all hosted sites.

What FFMPEG-PHP can do and how to use the most out of it

Thursday, June 7th, 2007

You’ve probably heard of ffmpeg-php and it’s wide usability mostly in sites that involve with videos such as YouTube or any other similar site. Here’s a bit of an introduction to it and how to use it.

First thing, you’ve got to check that your web hosting provider actually has ffmpeg & ffmpeg-php extension installed on your account and then you could get started with ffmpeg. You can check if it’s installed by creating a PHP script and executing the following code:

extension_loaded(’ffmpeg’) or die(”ffmpeg extension not loaded”);

If you get “ffmpeg extension not loaded” then your web hosting provider does not have ffmpeg installed, if you get nothing, then you’re one the good track!

ffmpeg-php is very simple to learn, what it is pretty much is an interface that works with the ffmpeg software to make it easier for PHP developers to access.

Like any object in PHP, you’ll have to start with creating a new instance of it. You can do that by using the following line:

$ffmpegInstance = new ffmpeg_movie(“/path/to/movie/”);

Now that you’ve had that, you can use that instance to use the many features of ffmpeg-php which are from knowing the duration of the movie/audio in seconds to retrieving the bitrate of the movie/audio file.

Once here, it’s pretty much like object oriented programming, ex:
$ffmpegInstance->getDuration(); // Gets the duration in secs.
$ffmpegInstance->getVideoCodec(); // What type of compression/codec used

This can be very helpful when coding anything that has to do with uploading videos because you can know a lot of information about it.

Installing FFMPEG – :)

Thursday, June 7th, 2007

A lot of people are getting hiring people to install FFMPEG as they think it’s a difficult task, but it’s much easier than you think if you follow these instructions. You should have root access & basic Linux knowledge to the server to follow these instructions.

1. Create a directory to do our work in
mkdir ~/ffmpeg
cd ~/ffmpeg

2. Get all the source files
wget http://www3.mplayerhq.hu/MPlayer/releases/codecs/ essential-20061022.tar.bz2
wget http://rubyforge.org/frs/download.php/9225/ flvtool2_1.0.5_rc6.tgz
wget http://easynews.dl.sourceforge.net/sourceforge/ lame/lame-3.97.tar.gz
wget http://superb-west.dl.sourceforge.net/sourceforge/ ffmpeg-php/ffmpeg-php-0.5.0.tbz2
wget http://downloads.xiph.org/releases/ ogg/libogg-1.1.3.tar.gz
wget http://downloads.xiph.org/releases/ vorbis/libvorbis-1.1.2.tar.gz

3. Extract all the source files
bunzip2 essential-20061022.tar.bz2; tar xvf essential-20061022.tar
tar zxvf flvtool2_1.0.5_rc6.tgz
tar zxvf lame-3.97.tar.gz
bunzip2 ffmpeg-php-0.5.0.tbz2; tar xvf ffmpeg-php-0.5.0.tar
tar zxvf libogg-1.1.3.tar.gz
tar zxvf libvorbis-1.1.2.tar.gz

4. Create the codecs directory & import them
mkdir /usr/local/lib/codecs/
mv essential-20061022/* /usr/local/lib/codecs/
chmod -R 755 /usr/local/lib/codecs/

5. Install SVN/Ruby (Depends on OS, this is for RHEL/CentOS)
yum install subversion
yum install ruby
yum install ncurses-devel

6. Get the latest FFMPEG/MPlayer from the subversion
svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer

7. Compile LAME
cd ~/ffmpeg/lame-3.97
./configure
make
make install

8. Compile libOGG
cd ~/ffmpeg/libogg-1.1.3
./configure
make
make install

9. Compile libVorbis
cd ~/ffmpeg/libvorbis-1.1.2
./configure
make
make install

10. Compile flvtool2
cd ~/ffmpeg/flvtool2_1.0.5_rc6
ruby setup.rb config
ruby setup.rb setup
ruby setup.rb install

11. Compile MPlayer
cd ~/ffmpeg/mplayer
./configure
make
make install

12. Compile FFMPEG
cd ~/ffmpeg/ffmpeg
./configure –enable-libmp3lame –enable-libogg –enable-libvorbis –disable-mmx –enable-shared
echo ‘#define HAVE_LRINTF 1′ >> config.h
make
make install

13. Finalize the codec setups
ln -s /usr/local/lib/libavformat.so.50 /usr/lib/libavformat.so.50
ln -s /usr/local/lib/libavcodec.so.51 /usr/lib/libavcodec.so.51
ln -s /usr/local/lib/libavutil.so.49 /usr/lib/libavutil.so.49
ln -s /usr/local/lib/libmp3lame.so.0 /usr/lib/libmp3lame.so.0
ln -s /usr/local/lib/libavformat.so.51 /usr/lib/libavformat.so.51

14. Compile FFMPEG-PHP
cd ~/ffmpeg/ ffmpeg-php-0.5.0
phpize
./configure
make
make install

15. Install FFMPEG-PHP (make sure the php.ini path is correct.)
echo ‘extension=/usr/local/lib/php/extensions/ no-debug-non-zts-20020429/ffmpeg.so’ >> /usr/local/Zend/etc/php.ini

16. Restart Apache to load FFMPEG-PHP (Depends on OS, this is for RHEL/CentOS)
service httpd restart

17. Verify if it works
php -r ‘phpinfo();’ | grep ffmpeg

If you get a few lines such as
ffmpeg
ffmpeg support (ffmpeg-php) => enabled
ffmpeg-php version => 0.5.0
ffmpeg.allow_persistent => 0 => 0

Then everything is installed and working. FFMPEG, FFMPEG-PHP, MPlayer, MEncoder, flv2tool, LAME MP3 encoder & libOGG.