PDA

View Full Version : PHP Fileinfo functions not working



AlexDudko
31-Oct-2011, 22:36
I've installed fileinfo PECL extension but I still receive this error:
> Fatal error: Call to undefined function finfo_open() in
> /home/alex/public_html/mime.php on line 3
The strange thing is it's not working if PHP's used as an apache
module, but if I run
> php -r "phpinfo();" | grep "fileinfo"
in terminal I receive
> /etc/php5/conf.d/fileinfo.ini,
> fileinfo
> fileinfo support => enabled
SLED-11 SP1, php-5.2.14, apache-2.2.10
Is there a workaround to make it work?


--
AlexDudko
------------------------------------------------------------------------
AlexDudko's Profile: http://forums.novell.com/member.php?userid=100476
View this thread: http://forums.novell.com/showthread.php?t=447581

AlexDudko
31-Oct-2011, 23:16
And also in cli
> php -r "print_r(get_defined_functions());" | grep "finfo"
> [727] => finfo_open
> [728] => finfo_close
> [729] => finfo_set_flags
> [730] => finfo_file
> [731] => finfo_buffer
But it doesn't work with apache.


--
AlexDudko
------------------------------------------------------------------------
AlexDudko's Profile: http://forums.novell.com/member.php?userid=100476
View this thread: http://forums.novell.com/showthread.php?t=447581

malcolmlewis
31-Oct-2011, 23:30
On Mon, 31 Oct 2011 21:36:02 GMT
AlexDudko <AlexDudko@no-mx.forums.novell.com> wrote:

>
> I've installed fileinfo PECL extension but I still receive this error:
> > Fatal error: Call to undefined function finfo_open() in
> > /home/alex/public_html/mime.php on line 3
> The strange thing is it's not working if PHP's used as an apache
> module, but if I run
> > php -r "phpinfo();" | grep "fileinfo"
> in terminal I receive
> > /etc/php5/conf.d/fileinfo.ini,
> > fileinfo
> > fileinfo support => enabled
> SLED-11 SP1, php-5.2.14, apache-2.2.10
> Is there a workaround to make it work?
>
>
Hi
php5-fileinfo from where, it's not in the normal repositories?

--
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop
up 9:35, 3 users, load average: 0.01, 0.07, 0.11
GPU GeForce 8600 GTS Silent - Driver Version: 285.05.09

AlexDudko
31-Oct-2011, 23:56
I've rebuilt an OpenSUSE src package.


--
AlexDudko
------------------------------------------------------------------------
AlexDudko's Profile: http://forums.novell.com/member.php?userid=100476
View this thread: http://forums.novell.com/showthread.php?t=447581

malcolmlewis
01-Nov-2011, 00:02
On Mon, 31 Oct 2011 22:56:02 GMT
AlexDudko <AlexDudko@no-mx.forums.novell.com> wrote:

>
> I've rebuilt an OpenSUSE src package.
>
>
Hi
I would look at trying the second one in the list...
http://software.opensuse.org/search?q=php5-fileinfo&baseproject=SUSE%3ASLE-11%3ASP1&lang=en&exclude_debug=true

I'm assuming the first one in the above list must match your php
version.

--
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop
up 10:05, 3 users, load average: 0.31, 0.24, 0.17
GPU GeForce 8600 GTS Silent - Driver Version: 285.05.09

AlexDudko
01-Nov-2011, 08:56
malcolmlewis;2150357 Wrote:
> On Mon, 31 Oct 2011 22:56:02 GMT
> AlexDudko <AlexDudko@no-mx.forums.novell.com> wrote:
>
> >
> > I've rebuilt an OpenSUSE src package.
> >
> >
> Hi
> I would look at trying the second one in the list...
> 'software.opensuse.org: Search Results'
> (http://software.opensuse.org/search?q=php5-fileinfo&baseproject=SUSE%3ASLE-11%3ASP1&lang=en&exclude_debug=true)
>
> I'm assuming the first one in the above list must match your php
> version.
>
> --
> Cheers Malcolm °¿° (Linux Counter #276890)
> openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop
> up 10:05, 3 users, load average: 0.31, 0.24, 0.17
> GPU GeForce 8600 GTS Silent - Driver Version: 285.05.09

It suggests to change php version to the OpenSUSE latest 5.3.8 with
vendor change, though I have 5.2.14.


--
AlexDudko
------------------------------------------------------------------------
AlexDudko's Profile: http://forums.novell.com/member.php?userid=100476
View this thread: http://forums.novell.com/showthread.php?t=447581

malcolmlewis
02-Nov-2011, 16:34
On Tue, 01 Nov 2011 07:56:02 GMT
AlexDudko <AlexDudko@no-mx.forums.novell.com> wrote:

>
> malcolmlewis;2150357 Wrote:
> > On Mon, 31 Oct 2011 22:56:02 GMT
> > AlexDudko <AlexDudko@no-mx.forums.novell.com> wrote:
> >
> > >
> > > I've rebuilt an OpenSUSE src package.
> > >
> > >
> > Hi
> > I would look at trying the second one in the list...
> > 'software.opensuse.org: Search Results'
> > (http://software.opensuse.org/search?q=php5-fileinfo&baseproject=SUSE%3ASLE-11%3ASP1&lang=en&exclude_debug=true)
> >
> > I'm assuming the first one in the above list must match your php
> > version.
> >
> It suggests to change php version to the OpenSUSE latest 5.3.8 with
> vendor change, though I have 5.2.14.
>
>
Hi
So what happens if you grab the php5 src rpm for the installed version
and rebuild that rpm, it should produce the php5-fileinfo rpm.

--
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop
up 2 days 2:35, 5 users, load average: 0.01, 0.02, 0.05
GPU GeForce 8600 GTS Silent - Driver Version: 285.05.09

AlexDudko
02-Nov-2011, 21:46
I simply can't download it. When I try it asks for authorization and my
usual Novell account data doesn't work. So I'm not permitted to do
that.
May be it's just a Novell problem? It happens that sometimes I can't
post here (though I'm logged in it still requires authorization).


--
AlexDudko
------------------------------------------------------------------------
AlexDudko's Profile: http://forums.novell.com/member.php?userid=100476
View this thread: http://forums.novell.com/showthread.php?t=447581

malcolmlewis
02-Nov-2011, 22:04
On Wed, 02 Nov 2011 20:46:02 GMT
AlexDudko <AlexDudko@no-mx.forums.novell.com> wrote:

>
> I simply can't download it. When I try it asks for authorization and
> my usual Novell account data doesn't work. So I'm not permitted to do
> that.
> May be it's just a Novell problem? It happens that sometimes I can't
> post here (though I'm logged in it still requires authorization).
>
>
Hi
Clear all the Novell cookies from your browser cache.

--
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop
up 2 days 8:08, 5 users, load average: 0.12, 0.13, 0.13
GPU GeForce 8600 GTS Silent - Driver Version: 285.05.09

AlexDudko
03-Nov-2011, 06:46
I did but authorization is still required. And my Novell account data
isn't valid to download the package. It's strange, but at the moment I
can't download anything from Novell.


--
AlexDudko
------------------------------------------------------------------------
AlexDudko's Profile: http://forums.novell.com/member.php?userid=100476
View this thread: http://forums.novell.com/showthread.php?t=447581

AlexDudko
03-Nov-2011, 07:06
I've cleared cookies and generated new credentials according to this'
note ' (http://support.novell.com/linux/sources.html#code10note) but
anyway I receive:
> 403 Forbidden
>
> Access to this page is restricted because of access control policies.


--
AlexDudko
------------------------------------------------------------------------
AlexDudko's Profile: http://forums.novell.com/member.php?userid=100476
View this thread: http://forums.novell.com/showthread.php?t=447581

malcolmlewis
03-Nov-2011, 14:14
On Thu, 03 Nov 2011 06:06:02 GMT
AlexDudko <AlexDudko@no-mx.forums.novell.com> wrote:

>
> I've cleared cookies and generated new credentials according to this'
> note ' (http://support.novell.com/linux/sources.html#code10note) but
> anyway I receive:
> > 403 Forbidden
> >
> > Access to this page is restricted because of access control
> > policies.
>
>
Hi
Weird, normally cleaning them out works. Did you try an alternative
browser, or perhaps different machine?

Can you provide the download link your trying to use.

--
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop
up 3 days 0:18, 5 users, load average: 0.11, 0.25, 0.23
GPU GeForce 8600 GTS Silent - Driver Version: 285.05.09

AlexDudko
03-Nov-2011, 16:46
Here is the link
https://nu.novell.com/repo/$RCE/SLE11-SP1-SDK-Updates/sle-11-i586/rpm/src/
Yes, I tried other browser and computer. Yes, I was able to log in to
SLED updates page but not to the SDK updates.


--
AlexDudko
------------------------------------------------------------------------
AlexDudko's Profile: http://forums.novell.com/member.php?userid=100476
View this thread: http://forums.novell.com/showthread.php?t=447581

malcolmlewis
03-Nov-2011, 17:57
On Thu, 03 Nov 2011 15:46:01 GMT
AlexDudko <AlexDudko@no-mx.forums.novell.com> wrote:

>
> Here is the link
> https://nu.novell.com/repo/$RCE/SLE11-SP1-SDK-Updates/sle-11-i586/rpm/src/
> Yes, I tried other browser and computer. Yes, I was able to log in to
> SLED updates page but not to the SDK updates.
>
>
Hi
That link requires your mirror credentials to login.

Had a look at the source and I have the feeling that fileinfo is not
available for that release, can't see it in the configure output.

--
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop
up 3 days 4:01, 6 users, load average: 0.93, 0.93, 0.94
GPU GeForce 8600 GTS Silent - Driver Version: 285.05.09

AlexDudko
03-Nov-2011, 21:36
Hi, Malcolm!
I gave up trying to configure Novell's PHP and compiled my own instance
of Apache+PHP. Of course everything is included.
Fortunately I had enough time in late September to wipe away SLED from
my notebooks and install another much more stable and reliable OS on
them. I've left only one installation on my personal laptop just for
testing (of course not the primary installation), but after installing
several drivers, PHP and many other things from sources, Document
Foundation's LibreOffice only because Novell's versions are **** there's
not much left of SLED.
I had to change my hosting provider as well because they use SLES on
their server (that's why I wanted to keep and configure my SLED - to be
able to test scripts in the native environment) and fileinfo and some
other functions are not available there.


--
AlexDudko
------------------------------------------------------------------------
AlexDudko's Profile: http://forums.novell.com/member.php?userid=100476
View this thread: http://forums.novell.com/showthread.php?t=447581

malcolmlewis
03-Nov-2011, 21:47
On Thu, 03 Nov 2011 20:36:02 GMT
AlexDudko <AlexDudko@no-mx.forums.novell.com> wrote:

>
> Hi, Malcolm!
> I gave up trying to configure Novell's PHP and compiled my own
> instance of Apache+PHP. Of course everything is included.
> Fortunately I had enough time in late September to wipe away SLED from
> my notebooks and install another much more stable and reliable OS on
> them. I've left only one installation on my personal laptop just for
> testing (of course not the primary installation), but after installing
> several drivers, PHP and many other things from sources, Document
> Foundation's LibreOffice only because Novell's versions are ****
> there's not much left of SLED.
> I had to change my hosting provider as well because they use SLES on
> their server (that's why I wanted to keep and configure my SLED - to
> be able to test scripts in the native environment) and fileinfo and
> some other functions are not available there.
>
>
Hi
My only concern would be keeping up with with the security issues, one
of the bonuses is that CVE fixes aren't public and are fixed
before anyone gets wind of issues from the distributions.

My suggestion is pull the version from the distro that your running....

Best of luck and will always be lurking ;)

--
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 11.4 (x86_64) Kernel 2.6.37.6-0.7-desktop
up 3 days 7:46, 5 users, load average: 0.13, 0.15, 0.14
GPU GeForce 8600 GTS Silent - Driver Version: 285.05.09