LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 08-25-2011, 01:34 PM   #1
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
ffmpeg-php issue


been beating my head against the wall trhing to install ffmpeg-php,

php version 5.2.17 compiled from source with compile options
Code:
'./configure' '--with-apxs2=/usr/sbin/apxs' '--with-mysql=/usr/local' '--with-kerberos=/usr' '--enable-cli' '--with-zlib-dir=/usr' '--enable-exif' '--enable-ftp' '--enable-mbstring' '--enable-mbregex' '--enable-sockets' '--with-curl' '--with-openssl=/usr' '--with-xmlrpc' '--with-xsl=/usr' '--with-pear' '--with-iconv' '--with-gd' '--with-jpeg-dir=/opt/local' '--with-png-dir=/opt/local' '--with-freetype-dir=/opt/local' '--with-mysql=/usr' '--with-mysqli=/usr/lib/mysql/mysql_config'
compiled and installed lame-3.97,libogg-1.1.3,libvorbis-1.1.2
compiled mplayer with --prefix=/usr
compiled ffmpeg 0.8.2 with --prefix=/usr --enable-shared

ffmpeg-php
ran phpize
./configure
make
su -c 'make install'

make test fails or skips all tests and restarting apache fails to load the modules

any suggestions?
Attached Files
File Type: txt php_test_results_20110825_1853.txt (155.9 KB, 35 views)

Last edited by frieza; 08-25-2011 at 01:57 PM.
 
Old 08-25-2011, 04:49 PM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Hi,

Can you give us more details. Like your distro and what is the error you get when you tr to start apache?

Regards
 
Old 08-25-2011, 05:14 PM   #3
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Original Poster
Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
destro is fedora 14

cat error_log | grep ffmpeg gives
Code:
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/ffmpeg.so' - /usr/lib/php/modules/ffmpeg.so: undefined symbol: register_ffmpeg_movie_class in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/ffmpeg.so' - /usr/lib/php/modules/ffmpeg.so: undefined symbol: register_ffmpeg_movie_class in Unknown on line 0
 
Old 08-26-2011, 03:06 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/modules/ffmpeg.so' - /usr/lib/php/modules/ffmpeg.so: undefined symbol: register_ffmpeg_movie_class in Unknown on line 0
How comes, that the ffmpeg-php extension is installed in /usr/lib/php/modules/ffmpeg.so?
According to your php configure options, php is installed under /usr/local (the default location if you haven't used a --prefix=...), so the extension should be installed under /usr/local/lib/php/extensions/...

Also why don't you try to install ffmpeg-php from svn (version 0.6.3) and see if it helps

Regards
 
Old 08-26-2011, 02:03 PM   #5
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Original Poster
Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
tried installing from svn
the results of nm /usr/lib/php/modules/ffmpeg.so
Code:
00002840 t .L103
00002900 t .L126
00002ba0 t .L127
00002ad8 t .L128
00002c88 t .L129
00002a10 t .L130
000027ea t .L97
00004018 a _DYNAMIC
00004120 a _GLOBAL_OFFSET_TABLE_
         w _Jv_RegisterClasses
00004004 d __CTOR_END__
00004000 d __CTOR_LIST__
0000400c d __DTOR_END__
00004008 d __DTOR_LIST__
00003bc4 r __FRAME_END__
00004010 d __JCR_END__
00004010 d __JCR_LIST__
000043c0 A __bss_start
         w __cxa_finalize@@GLIBC_2.1.3
000036f0 t __do_global_ctors_aux
000014e0 t __do_global_dtors_aux
00004014 d __dso_handle
         w __gmon_start__
000015a9 t __i686.get_pc_thunk.bx
00001856 t __i686.get_pc_thunk.cx
000043c0 A _edata
         U _efree
         U _emalloc
00004568 A _end
00003728 T _fini
00001148 T _init
         U _object_init_ex
00001bf0 t _php_alloc_ff_frame
00001ef0 T _php_convert_frame
00001cf0 T _php_create_ffmpeg_frame
00001c60 t _php_free_av_frame
00001cb0 t _php_free_ffmpeg_frame
000025e0 T _php_resample_frame
         U _safe_emalloc
         U _zend_get_parameters_array_ex
         U _zend_list_addref
         U _zval_copy_ctor_func
         U _zval_ptr_dtor
         U add_property_resource_ex
         U av_free
         U av_log_set_callback
         U av_malloc
         U av_register_all@@LIBAVFORMAT_53
         U avcodec_alloc_frame@@LIBAVCODEC_53
         U avcodec_init@@LIBAVCODEC_53
         U avcodec_version@@LIBAVCODEC_53
         U avpicture_alloc@@LIBAVCODEC_53
         U call_user_function_ex
000043c0 b completed.5530
         U convert_to_long
         U display_ini_entries
000043c4 b dtor_idx.5532
         U executor_globals
00003330 T ffmpeg_errorhandler
00004400 B ffmpeg_frame_class_entry
000043c8 b ffmpeg_frame_class_entry_ptr
00004320 D ffmpeg_frame_class_methods
00003380 T ffmpeg_hide_errors
00004200 D ffmpeg_module_entry
00001570 t frame_dummy
00001840 T get_module
00003390 T img_convert
00003450 T img_resample
000036b0 T img_resample_close
00003530 T img_resample_full_init
00003630 T img_resample_init
00004260 d ini_entries
000043e0 B le_ffmpeg_frame
000043cc b le_gd
         U malloc@@GLIBC_2.0
         U php_error_docref0
         U php_gd_gdImageSetPixel
         U php_info_print_table_end
         U php_info_print_table_row
         U php_info_print_table_start
         U php_verror
00001d80 T register_ffmpeg_frame_class
         U register_ffmpeg_movie_class
         U sws_freeContext@@LIBSWSCALE_2
         U sws_getContext@@LIBSWSCALE_2
         U sws_scale@@LIBSWSCALE_2
         U zend_error
         U zend_fetch_list_dtor_id
         U zend_fetch_resource
         U zend_hash_find
         U zend_ini_long
         U zend_register_ini_entries
         U zend_register_internal_class
         U zend_register_list_destructors_ex
         U zend_register_long_constant
         U zend_register_resource
         U zend_register_string_constant
         U zend_unregister_ini_entries
         U zend_wrong_param_count
00002e40 T zif_crop
00002360 T zim_ffmpeg_frame_ffmpeg_frame
00001860 T zim_ffmpeg_frame_getHeight
00001b00 T zim_ffmpeg_frame_getPresentationTimestamp
00001940 T zim_ffmpeg_frame_getWidth
00001a20 T zim_ffmpeg_frame_isKeyFrame
00002730 T zim_ffmpeg_frame_resize
00001fd0 T zim_ffmpeg_frame_toGDImage
000015b0 T zm_info_ffmpeg
000016a0 T zm_shutdown_ffmpeg
000016d0 T zm_startup_ffmpeg
the server originally had a version of php installed from the repositories
now i have a compiled version of php since i had to downgrade frpm php 5.3 to php 5.2, the path probably stuck from the original php.ini

Last edited by frieza; 08-26-2011 at 02:05 PM.
 
Old 08-26-2011, 02:15 PM   #6
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Original Poster
Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
now i get in /var/log/httpd/error_log
Code:
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules ffmpeg.so' - /usr/lib/php/modules/ffmpeg.so: undefined symbol: php_gd_gdImageSetPixel in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/modules ffmpeg.so' - /usr/lib/php/modules/ffmpeg.so: undefined symbol: php_gd_gdImageSetPixel in Unknown on line 0
 
Old 08-26-2011, 04:32 PM   #7
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Quote:
the server originally had a version of php installed from the repositories
now i have a compiled version of php since i had to downgrade frpm php 5.3 to php 5.2, the path probably stuck from the original php.ini
I think that you're still using the old php (installed in /usr) when you're compiling ffmpeg-php, and the old php.ini when you're running php through apache.
Your self-compiled php should be located in /usr/local, the php.ini in /usr/local/lib/php.ini and the extension in /usr/local/lib/php/extensions/...
 
Old 08-27-2011, 12:46 PM   #8
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Original Poster
Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
phpinfo() output
http://img52.imageshack.us/img52/3420/phpinfo.jpg
 
Old 08-27-2011, 01:14 PM   #9
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
The phpinfo shows that apache uses the php 5.2.17 module that was compiled against it
As you see the php.ini is located in /usr/local/lib, so php is installed in /usr/local (as I've already told you). So the ffmpeg extension should be installed also there and not in /usr/lib
You can try to clean the sources directory and redo the procedure again using the full path to phpize
Code:
make distclean
/usr/local/bin/phpize clean
/usr/local/bin/phpize
./configure
make
sudo make install
 
1 members found this post helpful.
Old 08-27-2011, 01:37 PM   #10
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Original Poster
Rep: Reputation: 406Reputation: 406Reputation: 406Reputation: 406Reputation: 406
thanks, i missed that i was looking at the wrong php.ini, /usr/local/lib/php.ini didn't exist, so copying it to the right place got things working
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Install ffmpeg for PHP ( ffmpeg-php extension ) shlomi.s Linux - Software 2 02-02-2010 12:52 AM
issue with ffmpeg-php and gd module loading on fedora 12 darkgaro Linux - Software 1 01-19-2010 02:45 PM
Help me in installing ffmpeg, ffmpeg-PHP, Mplayer, Mencoder, flv2tool, LAME MP3 Encod mitesh.ever Red Hat 5 05-16-2009 12:14 PM
Does the latest version of ffmpeg not work with ffmpeg-php? whitey4900 Linux - Software 0 08-04-2008 05:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 09:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration