Welcome to Geeklog Sunday, August 09 2020 @ 10:34 am EDT

Geeklog Forums

Mediagallery 1.5.1


Status: offline

richard.bkk

Forum User
Junior
Registered: 27/09/08
Posts: 21
With one of our websites which has MediaGallery 1.5.1 installed we get the following error when we try to add a picture to a media album.

PHP Formatted Code

Fatal error: Call to undefined function: stripos() in /home/hosting/public_html/domain/mediagallery/getid3/getid3/getid3.php on line 17


Does anybody knows where this problem comes from, we had no problems with installation ....?

By the way we run Geeklog 1.5.1 ...
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
stripos is only available as of PHP 5. My guess is you're on an older version.

bye, Dirk
 Quote

Status: offline

richard.bkk

Forum User
Junior
Registered: 27/09/08
Posts: 21
True my hosting is not yet upgraded to PHP 5, is it possible to work around it?
 Quote

Guest

Anonymous
Change to another host which in 2008 has PHP 5+.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: richard.bkk

is it possible to work around it?


If it does what I think it does (trying to protect a file against direct execution), then you could either change the stripos to a plain strpos if you're on Unix/Linux with a filesystem that is case-sensitive. Otherwise, also use strpos but stick an strtolower in there, like we do in Geeklog 1.5.1 now. For example:
PHP Formatted Code
if (strpos(strtolower($_SERVER['PHP_SELF']), 'lib-plugins.php') !== false) {
    die('This file can not be used on its own!');
}

bye, Dirk
 Quote

Status: offline

::Ben

Forum User
Full Member
Registered: 14/01/05
Posts: 1569
Location:la rochelle, France
Mediagallery 1.5.1 is a security fix for windows servers.


v1.5.1 - September 2008
[fix] Security vulnerability fix - RFI on Windows servers.


::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
 Quote

Guest

Anonymous
Quote by: cordiste

Mediagallery 1.5.1 is a security fix for windows servers.
So what?

 Quote

Status: offline

::Ben

Forum User
Full Member
Registered: 14/01/05
Posts: 1569
Location:la rochelle, France
So what?


If you are not on windows server try mediagallery 1.5.0 witch is php4 compatible.

::Ben
I'm available to customise your themes or plugins for your Geeklog CMS
 Quote

Status: offline

jmucchiello

Forum User
Full Member
Registered: 29/08/05
Posts: 985
Quote by: richard.bkk

True my hosting is not yet upgraded to PHP 5, is it possible to work around it?

Place this in you lib-custom.php:
PHP Formatted Code

if (!function_exists('stripos'))
{
    require_once('PHP/Compat.php');

    PHP_Compat::loadFunction('stripos');
}
 
 Quote

All times are EDT. The time is now 10:34 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content