Author Topic: Fehlermeldung bei /includes/functions.php  (Read 13358 times)

0 Members and 1 Guest are viewing this topic.

Offline Allround

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Fehlermeldung bei /includes/functions.php
« on: February 12, 2010, 02:10:54 PM »
Hallo,

Vor kurzem hat mein Provider einen Serverumzug gemacht. und nun kommt bei Neue Bilder und bei Userbilder (also wenn man den User anklickt in der onlineliste und dann seine hochgeladenen Bilder ansehen will folgende Fehleranzeige:

Quote
Deprecated: Function ereg() is deprecated in /data/multiserv/users/242214/projects/323379/www/includes/functions.php  on line 101

Deprecated: Function ereg() is deprecated in /data/multiserv/users/242214/projects/323379/www/includes/functions.php on line 154

Deprecated: Function ereg() is deprecated in /data/multiserv/users/242214/projects/323379/www/includes/functions.php on line 101

Deprecated: Function ereg() is deprecated in /data/multiserv/users/242214/projects/323379/www/includes/functions.php on line 101

Deprecated: Function ereg() is deprecated in /data/multiserv/users/242214/projects/323379/www/includes/functions.php on line 149

Wie bekomm ich das wieder weg?
« Last Edit: February 12, 2010, 06:07:54 PM by Rembrandt »

Rembrandt

  • Guest
Re: Fehlermeldung bei /includes/functions.php
« Reply #1 on: February 12, 2010, 06:11:11 PM »
....
Deprecated: Function ereg() is deprecated ...

PHP 5.3

Offline Allround

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Fehlermeldung bei /includes/functions.php
« Reply #2 on: February 12, 2010, 06:48:48 PM »
....
Deprecated: Function ereg() is deprecated ...

PHP 5.3

Ich kann kein Englisch.. kannst du mir da bissi helfen?

Offline Bommel

  • Full Member
  • ***
  • Posts: 114
    • View Profile
Re: Fehlermeldung bei /includes/functions.php
« Reply #3 on: February 12, 2010, 08:07:07 PM »
Hallo Allround,

diese Seite gibt es auch deutsch-sprachig: http://de.php.net/manual/de/function.ereg.php
Freundliche Grüße, Bommel

Nicht die Geduld mit mir verlieren, ich bin noch am Lernen./ Do not lose the patience with me, I am still in the learning. ;)

Offline Allround

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Fehlermeldung bei /includes/functions.php
« Reply #4 on: February 12, 2010, 11:11:13 PM »
Hallo Allround,

diese Seite gibt es auch deutsch-sprachig: http://de.php.net/manual/de/function.ereg.php

Trotzdem ist das meiste Englisch.. Ich bin mit PHP nicht so bewandert.. könnt Ihr mir Hier helfen und erklären, wie ich das Problem beheben kann?

Offline Jan-Lukas

  • Addicted member
  • ******
  • Posts: 1.289
    • View Profile
    • Discover the New World of Kindersurprise
Re: Fehlermeldung bei /includes/functions.php
« Reply #5 on: February 13, 2010, 12:29:55 AM »
Die Suchfunktion hier im Forum, spricht aber deutsch, und es gibt und gab noch mehr User mit diesem Problem.

dies z.B. ist eine davon, wenn es hilft OK, wenn nicht einfach deine Fehlermeldung in der Suche eingeben.

http://www.4homepages.de/forum/index.php?topic=26599.0
Danke Harald




Rembrandt

  • Guest
Re: Fehlermeldung bei /includes/functions.php
« Reply #6 on: February 18, 2010, 05:09:55 PM »
...
.... und erklären, wie ich das Problem beheben kann?
suche in der functions.php:

function get_basefile($path) {
  
$basename get_basename($path);
  
ereg("(.+)\?(.+)"$basename$regs);
  return isset(
$regs[1]) ? $regs[1] : $basename;
}

und ersetze es mit:

/* function get_basefile($path) {
  $basename = get_basename($path);
  ereg("(.+)\?(.+)", $basename, $regs);
  return isset($regs[1]) ? $regs[1] : $basename;
} */
function get_basefile($path) {
  
$basename get_basename($path);
  
preg_match("/\/?([^\/]+)/"$basename$regs);
  return isset(
$regs[1]) ? $regs[1] : $basename;
  }


suche:

function get_file_extension($file_name) {
  
ereg("(.+)\.(.+)"get_basefile($file_name), $regs);
  return 
strtolower($regs[2]);
}

und ersetze es mit:

/*function get_file_extension($file_name) {
  ereg("(.+)\.(.+)", get_basefile($file_name), $regs);
  return strtolower($regs[2]);
} */
function get_file_extension($file_name) {
  
preg_match("/([^\.]+)\.?([^\.]+)/" get_basename($file_name), $regs);
  return 
strtolower($regs[2]);
 }


suche:

function get_file_name($file_name) {
  
ereg("(.+)\.(.+)"get_basefile($file_name), $regs);
  return 
$regs[1];
}

und ersetze es mit:

/* function get_file_name($file_name) {
  ereg("(.+)\.(.+)", get_basefile($file_name), $regs);
  return $regs[1];
}*/
function get_file_name($file_name) {
  
preg_match("/([^\.]+)\.?([^\.]+)/"get_basename($file_name), $regs);
  return 
$regs[1];
}


alle angaben wie immer ohne gewähr  :)

spass beiseite, bitte testen!

mfg Andi

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Fehlermeldung bei /includes/functions.php
« Reply #7 on: February 19, 2010, 01:25:18 AM »
The simplest way to stop these messages is to replace in global.php:
error_reporting(E_ERROR E_WARNING E_PARSE);
with:
error_reporting(E_ERROR E_WARNING E_PARSE E_DEPRECATED);


@Rembrandt:
the only difference between ereg and preg_match is that ereg doesn't use delimiters. Therefore when converted to preg_match the only difference would be the added delimiters at the beginning and end of the REGEX string.
so a string "(.+)\.(.+)" would become: "/(.+)\.(.+)/" and NOT "/([^\.]+)\.?([^\.]+)/" ;)

P.S.
there are much more then these 3 changes required...better wait for the v1.7.8...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Rembrandt

  • Guest
Re: Fehlermeldung bei /includes/functions.php
« Reply #8 on: February 19, 2010, 05:55:18 AM »
...
the only difference between ereg and preg_match is that ereg doesn't use delimiters. ..
This is correct, but with delimiter set alone, it not works. ...hm...

Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Fehlermeldung bei /includes/functions.php
« Reply #9 on: February 19, 2010, 05:29:09 PM »
...better wait for the v1.7.8...

...  :mrgreen: ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...