Go Back   CodingForums.com > :: Server side development > PHP > Post a PHP snippet

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rating: Thread Rating: 7 votes, 5.00 average.
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-23-2012, 03:47 PM   PM User | #226
chump2877
Senior Coder

 
chump2877's Avatar
 
Join Date: Dec 2004
Location: the U.S. of freakin' A.
Posts: 2,549
Thanks: 15
Thanked 131 Times in 124 Posts
chump2877 is on a distinguished road
that line should read: $currentTime = (float)end($times[2]);
__________________
Regards, R.J.

---------------------------------------------------------

Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
[Related videos and tutorials are also available at my YouTube channel]
chump2877 is offline   Reply With Quote
Old 02-23-2012, 03:49 PM   PM User | #227
bedo1975
New Coder

 
Join Date: Feb 2012
Posts: 29
Thanks: 1
Thanked 0 Times in 0 Posts
bedo1975 is an unknown quantity at this point
sur but my result with this line is "0" i was try this :

$currentTime = $numTimes;

I know it's the incorrect value, but with this I see the progress conversion bar works .

I don't know why $currentTime = (float)end($times[2]); always return '0'
bedo1975 is offline   Reply With Quote
Old 02-23-2012, 03:56 PM   PM User | #228
chump2877
Senior Coder

 
chump2877's Avatar
 
Join Date: Dec 2004
Location: the U.S. of freakin' A.
Posts: 2,549
Thanks: 15
Thanked 131 Times in 124 Posts
chump2877 is on a distinguished road
Quote:
Originally Posted by bedo1975 View Post
I don't know why $currentTime = (float)end($times[2]); always return '0'
I don't know why either because that is the correct code
__________________
Regards, R.J.

---------------------------------------------------------

Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
[Related videos and tutorials are also available at my YouTube channel]
chump2877 is offline   Reply With Quote
Old 02-23-2012, 09:56 PM   PM User | #229
cana888
New Coder

 
Join Date: Feb 2012
Posts: 15
Thanks: 4
Thanked 0 Times in 0 Posts
cana888 is an unknown quantity at this point
my apache error logs, how to fix that?

Code:
PHP Deprecated:  Comments starting with '#' are deprecated in /etc/php5/apache2/conf.d/mcrypt.ini on line 1 in Unknown on line 0
[Thu Feb 23 13:54:23 2012] [notice] Apache/2.2.14 (Ubuntu) PHP/5.3.2-1ubuntu4.14 with Suhosin-Patch configured -- resuming normal operations
[Thu Feb 23 13:54:32 2012] [error] [client 192.168.217.1] PHP Warning:  Division by zero in /home/www/YouTubeToMp3Converter.class.php on line 103, referer: http://192.$
[Thu Feb 23 13:54:32 2012] [error] [client 192.168.217.1] PHP Notice:  ob_flush(): failed to flush buffer. No buffer to flush. in /home/www/YouTubeToMp3Converter.class$
[Thu Feb 23 13:54:32 2012] [error] [client 192.168.217.1] PHP Notice:  ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush. in /home/www/Yo$
[Thu Feb 23 13:54:32 2012] [error] [client 192.168.217.1] PHP Notice:  ob_flush(): failed to flush buffer. No buffer to flush. in /home/www/YouTubeToMp3Converter.class$
[Thu Feb 23 13:54:32 2012] [error] [client 192.168.217.1] PHP Notice:  ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush. in /home/www/Yo$
[Thu Feb 23 13:54:32 2012] [error] [client 192.168.217.1] PHP Notice:  ob_flush(): failed to flush buffer. No buffer to flush. in /home/www/YouTubeToMp3Converter.class$
[Thu Feb 23 13:54:32 2012] [error] [client 192.168.217.1] PHP Notice:  ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush. in /home/www/Yo$
[Thu Feb 23 13:54:32 2012] [error] [client 192.168.217.1] PHP Notice:  ob_flush(): failed to flush buffer. No buffer to flush. in /home/www/YouTubeToMp3Converter.class$
[Thu Feb 23 13:54:32 2012] [error] [client 192.168.217.1] PHP Notice:  ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush. in /home/www/Yo$
[Thu Feb 23 13:54:32 2012] [error] [client 192.168.217.1] PHP Notice:  ob_flush(): failed to flush buffer. No buffer to flush. in /home/www/YouTubeToMp3Converter.class$
[Thu Feb 23 13:54:32 2012] [error] [client 192.168.217.1] PHP Notice:  ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush. in /home/www/Yo$
[Thu Feb 23 13:54:32 2012] [error] [client 192.168.217.1] PHP Notice:  ob_flush(): failed to flush buffer. No buffer to flush. in /home/www/YouTubeToMp3Converter.class$
[Thu Feb 23 13:54:32 2012] [error] [client 192.168.217.1] PHP Notice:  ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush. in /home/www/Yo$
[Thu Feb 23 13:54:32 2012] [error] [client 192.168.217.1] PHP Notice:  ob_flush(): failed to flush buffer. No buffer to flush. in /home/www/YouTubeToMp3Converter.class$
[Thu Feb 23 13:54:32 2012] [error] [client 192.168.217.1] PHP Notice:  ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush. in /home/www/Yo$
[Thu Feb 23 13:54:32 2012] [error] [client 192.168.217.1] PHP Notice:  ob_flush(): failed to flush buffer. No buffer to flush. in /home/www/YouTubeToMp3Converter.class$
[Thu Feb 23 13:54:33 2012] [error] [client 192.168.217.1] PHP Notice:  ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush. in /home/www/Yo$
[Thu Feb 23 13:54:33 2012] [error] [client 192.168.217.1] PHP Notice:  ob_flush(): failed to flush buffer. No buffer to flush. in /home/www/YouTubeToMp3Converter.class$
[Thu Feb 23 13:54:33 2012] [error] [client 192.168.217.1] PHP Notice:  ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush. in /home/www/Yo$
[Thu Feb 23 13:54:33 2012] [error] [client 192.168.217.1] PHP Notice:  ob_flush(): failed to flush buffer. No buffer to flush. in /home/www/YouTubeToMp3Converter.class$
[Thu Feb 23 13:54:33 2012] [error] [client 192.168.217.1] PHP Notice:  ob_end_flush(): failed to delete and flush buffer. No buffer to delete or flush. in /home/www/Yo$
[Thu Feb 23 13:54:33 2012] [error] [client 192.168.217.1] PHP Notice:  ob_flush(): failed to flush buffer. No buffer to flush. in /home/www/YouTubeToMp3Converter.class$
cana888 is offline   Reply With Quote
Old 02-23-2012, 10:26 PM   PM User | #230
chump2877
Senior Coder

 
chump2877's Avatar
 
Join Date: Dec 2004
Location: the U.S. of freakin' A.
Posts: 2,549
Thanks: 15
Thanked 131 Times in 124 Posts
chump2877 is on a distinguished road
Turn off error reporting...none of those things are worth troubleshooting or will cause the code to fail....

Error reporting is already turned off by default in index.php:

PHP Code:
ini_set('display_errors',0); 
__________________
Regards, R.J.

---------------------------------------------------------

Help spread the word! Like my YouTube-to-Mp3 Conversion Script on Facebook !! :)
[Related videos and tutorials are also available at my YouTube channel]
chump2877 is offline   Reply With Quote
Old 02-24-2012, 01:12 PM   PM User | #231
umang.goyal
New Coder

 
Join Date: Feb 2012
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
umang.goyal is an unknown quantity at this point
Hi,
i have been trying to run this script on my laptop with xampp for windows.
i have done everything(latest ffmpeg.exe, latest php script of your app) and have setup it as said in instructions but still i am not getting it work for me..when ever i try to convert a youtube video it stuck on the page where is shows downloading video, it never progress. i have even checked in the video folder video size is always zero kb and process freezes there only. No error is shown neither any log. Please can you help me sort out the problem.

Thanks & Regards,
Umang Goyal
umang.goyal is offline   Reply With Quote
Old 02-24-2012, 01:18 PM   PM User | #232
bedo1975
New Coder

 
Join Date: Feb 2012
Posts: 29
Thanks: 1
Thanked 0 Times in 0 Posts
bedo1975 is an unknown quantity at this point
what is your youtube url umang.goyal ?
bedo1975 is offline   Reply With Quote
Old 02-24-2012, 01:40 PM   PM User | #233
umang.goyal
New Coder

 
Join Date: Feb 2012
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
umang.goyal is an unknown quantity at this point
here is the URL of the video i am trying to download.

Code:
http://www.youtube.com/watch?v=ipNB-ijxHiI&feature=g-vrec&context=G29d7a2aRVAAAAAAAACA
umang.goyal is offline   Reply With Quote
Old 02-24-2012, 01:42 PM   PM User | #234
bedo1975
New Coder

 
Join Date: Feb 2012
Posts: 29
Thanks: 1
Thanked 0 Times in 0 Posts
bedo1975 is an unknown quantity at this point
I have test with this url :

http://www.youtube.com/watch?v=ipNB-ijxHiI&

it's works !
bedo1975 is offline   Reply With Quote
Old 02-24-2012, 01:51 PM   PM User | #235
umang.goyal
New Coder

 
Join Date: Feb 2012
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
umang.goyal is an unknown quantity at this point
let me try again. thanks for the reply

can you tell me if i need to set some permissions for the directories? or you could send me the source files you are using...i would really appreciate that.
Thansk & regards,
Umang Goyal
umang.goyal is offline   Reply With Quote
Old 02-24-2012, 02:00 PM   PM User | #236
bedo1975
New Coder

 
Join Date: Feb 2012
Posts: 29
Thanks: 1
Thanked 0 Times in 0 Posts
bedo1975 is an unknown quantity at this point
I've set permission on mp3,videos,logs folder to 0777

in this time I can't send you my file coz I debug it, I've a few problem with the conversion progress bar !
bedo1975 is offline   Reply With Quote
Old 02-24-2012, 02:04 PM   PM User | #237
umang.goyal
New Coder

 
Join Date: Feb 2012
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
umang.goyal is an unknown quantity at this point
i did the same. used filezilla and set the permissions to 0777 for all those directories. Still no progress
btw, i just had a thought if there would be a problem with permissions then it would have never created flv files within that video folder with size 0kb.

anyways thanks for the help.

Thanks & Regards,
Umang Goyal
umang.goyal is offline   Reply With Quote
Old 02-24-2012, 02:06 PM   PM User | #238
bedo1975
New Coder

 
Join Date: Feb 2012
Posts: 29
Thanks: 1
Thanked 0 Times in 0 Posts
bedo1975 is an unknown quantity at this point
are you sure that ffmpeg are correctly installed ? ffmpeg-php too ?

Have you look at the config file, if the path of folder, and ffmpeg are correct ?
bedo1975 is offline   Reply With Quote
Old 02-24-2012, 02:09 PM   PM User | #239
umang.goyal
New Coder

 
Join Date: Feb 2012
Posts: 10
Thanks: 1
Thanked 0 Times in 0 Posts
umang.goyal is an unknown quantity at this point
ffmpeg-php? i guess no for that.
i have downloaded the ffmpeg-64.exe from the suggested URL and have copied it into the folder where all the script files for the youtubetomp3 converter are saved. let me see about the ffmpeg-php.
umang.goyal is offline   Reply With Quote
Old 02-24-2012, 02:11 PM   PM User | #240
bedo1975
New Coder

 
Join Date: Feb 2012
Posts: 29
Thanks: 1
Thanked 0 Times in 0 Posts
bedo1975 is an unknown quantity at this point
perhaps is your config.class :

// Constants
const _TEMPVIDDIR = 'videos/';
const _SONGFILEDIR = 'mp3/';
const _FFMPEG = 'ffmpeg-64.exe';
const _LOGSDIR = 'logs/';

be sure you have the correctly path value
bedo1975 is offline   Reply With Quote
Reply

Bookmarks

Tags
audio, class, conversion, dailymotion, ffmpeg, free youtube mp3 script, free youtube script, mp3, php, script, video, youtube, youtube to mp3, youtube to mp3 php script, youtube to mp3 script

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 08:09 AM.


Advertisement
Log in to turn off these ads.