Can't install php-devel ):

SimonTheMime

Verified User
Joined
Feb 18, 2010
Messages
22
Ola sisters and brothers,

I'm adding a video module to my site, and have thus far installed the necessary programs for it (ffmpeg being one of them). I've come across a problem in installing ffmpeg-php however because I require the tool phpize to install it.

Phpize command is provided by php-devel. However, when trying to install php-devel, I am faced with:

Code:
# yum -y install php-devel
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * addons: mirrors.netdna.com
 * base: mirror.steadfast.net
 * extras: holmes.umflint.edu
 * rpmforge: fr2.rpmfind.net
 * updates: mirrors.xmission.com
addons                                                            |  951 B     00:00
base                                                              | 2.1 kB     00:00
c5-testing                                                        |  951 B     00:00
extras                                                            | 1.1 kB     00:00
rpmforge                                                          | 1.1 kB     00:00
updates                                                           | 1.9 kB     00:00
Excluding Packages in global exclude list
Finished
Reducing CentOS-5 Testing to included packages only
Finished
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-devel.i386 0:5.2.10-1.el5.centos set to be updated
--> Processing Dependency: php = 5.2.10-1.el5.centos for package: php-devel
--> Processing Dependency: automake for package: php-devel
--> Running transaction check
---> Package automake.noarch 0:1.9.6-2.1 set to be updated
---> Package php-devel.i386 0:5.2.10-1.el5.centos set to be updated
--> Processing Dependency: php = 5.2.10-1.el5.centos for package: php-devel
--> Finished Dependency Resolution
php-devel-5.2.10-1.el5.centos.i386 from c5-testing has depsolving problems
[b]  --> Missing Dependency: php = 5.2.10-1.el5.centos is needed by package php-devel-5.2.10
-1.el5.centos.i386 (c5-testing)
Error: Missing Dependency: php = 5.2.10-1.el5.centos is needed by package php-devel-5.2.1[/b]
0-1.el5.centos.i386 (c5-testing)
 You could try using --skip-broken to work around the problem
 You could try running: package-cleanup --problems
                        package-cleanup --dupes
                        rpm -Va --nofiles --nodigest
I edited out php* from /etc/yum.conf while attempting to install php-devel

I know that DA needs to control anything php-related, and so I'm really trying to proceed with caution here. Can anybody give me some tips? I've put up my phpinfo: http://www.ballotorthebullet.com/phpinfo.php
 

scsi

Verified User
Joined
Aug 19, 2008
Messages
4,695
Thats not how you install it. You have to install it via source and compile it into php. Check the custombuild section or search the forum.
 

floyd

Verified User
Joined
Mar 29, 2005
Messages
5,310
Follow my instructions for installing ffmpeg on CentOS. I think it is posted here somewhere.
 

SimonTheMime

Verified User
Joined
Feb 18, 2010
Messages
22
Follow my instructions for installing ffmpeg on CentOS. I think it is posted here somewhere.
This?

Code:
# Install FFMPEG on CentOS
cd /root
echo "[dag]" > /etc/yum.repos.d/dag.repo
echo "name=Dag RPM Repository for Red Hat Enterprise Linux" >> /etc/yum.repos.d/dag.repo
echo "baseurl=http://apt.sw.be/redhat/el\$releasever/en/\$basearch/dag" >> /etc/yum.repos.d/dag.repo
echo "gpgcheck=0" >> /etc/yum.repos.d/dag.repo
echo "enabled=1" >> /etc/yum.repos.d/dag.repo

yum -y install ffmpeg ffmpeg-devel flvtool2 mencoder
wget http://internap.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.3.1.tbz2
tar -xjf ffmpeg-php-0.5.3.1.tbz2
cd ffmpeg-php-0.5.3.1/
phpize
./configure
make
make install
# Note in my php.ini file I have extension_dir = "/usr/local/lib/php/extensions" 
# so therefore I copy the ffmpeg.so to that. You need to check your own extension_dir
cp /usr/local/lib/php/extensions/no-debug-non-zts-20060613/ffmpeg.so /usr/local/lib/php/extensions/
echo "extension=ffmpeg.so" >> /etc/php.ini
service httpd restart
Also, where can I find php-devel source? I can't seem to find it on google anywhere or php.net
 

floyd

Verified User
Joined
Mar 29, 2005
Messages
5,310
That's it.

How do you know you don't have phpize? Did you run:

Code:
whereis phpize
 

SimonTheMime

Verified User
Joined
Feb 18, 2010
Messages
22
That's it.

How do you know you don't have phpize? Did you run:

Code:
whereis phpize
Ahhh there it is, thank you! Now upon ./configure && make, all goes well until:

Code:
# ./configure && make
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ANSI C... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
configure: error: Cannot find php-config. Please use --with-php-config=PATH
I searched online for a solution, and it looks like I need php-devel for this?
 

floyd

Verified User
Joined
Mar 29, 2005
Messages
5,310
Evidently you do not have /usr/local/bin/ in your path.

Code:
echo $PATH
 

SimonTheMime

Verified User
Joined
Feb 18, 2010
Messages
22
Code:
whereis php-config
Same place as phpize.
Ah beautiful, so I was able to run it with:

./configure --with-php-config=/usr/local/bin/php-config && make

However, for the make it hits me with the error:

Code:
...
/root/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function 'zim_ffmpeg_frame_toGDImage':
/root/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: 'PIX_FMT_RGBA32' undeclared (first use
in this function)
/root/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: (Each undeclared identifier is reported
 only once
/root/ffmpeg-php-0.6.0/ffmpeg_frame.c:336: error: for each function it appears in.)
/root/ffmpeg-php-0.6.0/ffmpeg_frame.c: In function 'zim_ffmpeg_frame_ffmpeg_frame':
/root/ffmpeg-php-0.6.0/ffmpeg_frame.c:421: error: 'PIX_FMT_RGBA32' undeclared (first use
in this function)
make: *** [ffmpeg_frame.lo] Error 1
 

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
Okay, it's time for me to recreate my wiki, from scratch. If I do, we'll have a place to start putting instructions such as these. Please see this thread.

Jeff
 

SimonTheMime

Verified User
Joined
Feb 18, 2010
Messages
22
!

I'm hoping you can still help. I executed:

cp /usr/local/lib/php/extensions/no-debug-non-zts-20060613/ffmpeg.so /usr/local/lib/php/extensions/
echo "extension=ffmpeg.so" >> /usr/local/lib/php.ini
service httpd restart

Upon restart, my websites went down. I wasn't sure, so I rebooted the server, still not up, and service httpd restart now gives me:

Code:
# service httpd restart
Stopping httpd:                                             [FAILED]
Starting httpd: [Thu Feb 18 12:20:11 2010] [warn] module php5_module is already loaded, s
kipping
[Thu Feb 18 12:20:11 2010] [warn] NameVirtualHost 66.79.186.85:443 has no VirtualHosts
Please help, don't know what just happened. DirectAdmin still functions on the domains/ip:2222.

In worst case scenario, I have a backup I can go back to.
 

scsi

Verified User
Joined
Aug 19, 2008
Messages
4,695
Well whys it not starting? Check the apache error log.
 

floyd

Verified User
Joined
Mar 29, 2005
Messages
5,310
Right after a restart:
Code:
tail -100 /var/log/httpd/error_log
 

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
I use:
Code:
# service httpd restart ; tail -f /var/log/httpd/error_log
This restarts apache then shows me all the lines in the error log beginning immediately after the restart, until I use Control-C to exit.

Jeff
 

SimonTheMime

Verified User
Joined
Feb 18, 2010
Messages
22
Well whys it not starting? Check the apache error log.
Code:
[Thu Feb 18 12:25:13 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Feb 18 12:25:13 2010] [warn] module php5_module is already loaded, skipping
[Thu Feb 18 12:25:14 2010] [warn] RSA server certificate CommonName (CN) `localhost' does
 NOT match server name!?
/usr/sbin/httpd: symbol lookup error: /usr/local/lib/php/extensions/ffmpeg.so: undefined
symbol: register_ffmpeg_frame_class
[Thu Feb 18 12:26:02 2010] [warn] RSA server certificate CommonName (CN) `localhost' does
 NOT match server name!?
[Thu Feb 18 12:26:02 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Feb 18 12:26:02 2010] [warn] module php5_module is already loaded, skipping
[Thu Feb 18 12:26:03 2010] [warn] RSA server certificate CommonName (CN) `localhost' does
 NOT match server name!?
/usr/sbin/httpd: symbol lookup error: /usr/local/lib/php/extensions/ffmpeg.so: undefined
symbol: register_ffmpeg_frame_class
[Thu Feb 18 12:26:13 2010] [warn] RSA server certificate CommonName (CN) `localhost' does
 NOT match server name!?
[Thu Feb 18 12:26:13 2010] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Thu Feb 18 12:26:13 2010] [warn] module php5_module is already loaded, skipping
[Thu Feb 18 12:26:14 2010] [warn] RSA server certificate CommonName (CN) `localhost' does
 NOT match server name!?
/usr/sbin/httpd: symbol lookup error: /usr/local/lib/php/extensions/ffmpeg.so: undefined
symbol: register_ffmpeg_frame_class
This is what it tells me.

Edit: Ah thanks for the tail. This whole time I've been using vim to view this kind of stuff.
 

nobaloney

NoBaloney Internet Svcs - In Memoriam †
Joined
Jun 16, 2003
Messages
26,119
Location
California
There are other neat things you can do... for example, to see only errors, you can do:
Code:
service httpd restart ; tail -f /var/log/httpd/error_log | grep error
There's currently an interesting magazine on the local newsstands:Linux Shell Handbook. In the US it's a Linux Pro Magazine Special; in the rest of the world it's a Linux Magazine Special.

Jeff
 

floyd

Verified User
Joined
Mar 29, 2005
Messages
5,310
Comment out the ffmpeg stuff at the end of php.ini and restart. Something is wrong with your ffmpeg.so
 
Top