Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Uruchomienie Prediction Football na PHP 7
jwr
post
Post #1





Grupa: Zarejestrowani
Postów: 20
Pomógł: 0
Dołączył: 28.06.2014

Ostrzeżenie: (0%)
-----


Witam,

Posiadam oprogramowanie Prediction Football, które kilka lat temu było rozwijane przez John'a Astill'a. Tego projektu już nie ma w sieci. Musiałem zwiększyć wersję PHP na serwerze na PHP 7 i niestety to oprogramowanie przestało działać. Pojawiają się takie błędy:

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; UserType has a deprecated constructor in /home/xxx/websites/mojadomena.pl/typer/usertypeclass.php on line 9

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; User has a deprecated constructor in /home/xxx/websites/mojadomena.pl/typer/userclass.php on line 9

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Message has a deprecated constructor in /home/xxx/websites/mojadomena.pl/typer/msgclass.php on line 2

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; MessageList has a deprecated constructor in /home/xxx/websites/mojadomena.pl/typer/msgclass.php on line 36

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Dbase has a deprecated constructor in /home/xxx/websites/mojadomena.pl/typer/dbasefunctions.php on line 8

Fatal error: Uncaught Error: Call to undefined function mysql_pconnect() in /home/xxx/websites/mojadomena.pl/typer/dbasefunctions.php:123 Stack trace: #0 /home/xxx/websites/mojadomena.pl/typer/dbasefunctions.php(55): Dbase->connect() #1 /home/xxx/websites/mojadomena.pl/typer/dbasedata.php(7): Dbase->Dbase() #2 /home/xxx/websites/mojadomena.pl/typer/index.php(11): require_once('/home/xxx/w...') #3 {main} thrown in /home/xxx/websites/mojadomena.pl/typer/dbasefunctions.php on line 123

usertypeclass.php:

  1. class UserType {
  2.  
  3. // Contructor for the user class.
  4. function UserType() {
  5. }


userclass.php:

  1. class User {
  2. // The basedir for this league
  3. var $basedir;


msgclass.php:

  1. class Message {
  2. // The message type e.g. Error, Warning, Info
  3. var $type;


  1. class MessageList {
  2. // Array of current messages.
  3. var $currentMessages;


dbasefunctions.php:

  1. class Dbase {
  2.  
  3. // MySQL Version number
  4. var $mysqlver;


Czy jest możliwe, aby to oprogramowanie działało na PHP 7?
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
jwr
post
Post #2





Grupa: Zarejestrowani
Postów: 20
Pomógł: 0
Dołączył: 28.06.2014

Ostrzeżenie: (0%)
-----


Cytat(viking @ 7.08.2020, 12:38:27 ) *
Przeczytaj jeszcze raz mój post #4. Zwłaszcza ostatnie zdanie. Zaraz bana dostaniesz (IMG:style_emoticons/default/smile.gif) Mod łaskawy ale bez przesady.


Czemu masz chamskie zachowanie do mnie? Wydaje się, że to forum jest od pomocy. Założyłem kulturalnie temat i poprosiłem o pomoc. Masz jakiś problem ze sobą? (IMG:style_emoticons/default/facepalmxd.gif)

Regulmin forum przedstawia:

3. Zasady panujące na forum:

f. Każdy użytkownik forum powinien starać się traktować innych uczestników dyskusji tak samo, jak sam chciałby być traktowany. Oczekując szacunku, pamiętajmy o okazywaniu go innym.

3. Odpowiadanie na pytania:

a. Odpisując na czyjeś pytanie starajmy się być konstruktywni i pomocni. Komentarze typu: "popieram przedmówcę" niewiele wnoszą do dyskusji.
b. Odpowiadając trzymajmy się ściśle tematu. Pytającemu na pewno na tym zależy.
c. Jeżeli nie znasz odpowiedzi, nie pisz nic. Po prostu czekaj.

4. Formułowanie treści wiadomości (postów).

a. Bądź profesjonalny i ostrożny w tym co mówisz o innych. Unikaj jak ognia obrażania uczestników dyskusji. Ostateczny skutek takich działań może być tylko jeden: zablokowanie Tobie dostępu do forum przez administratora.

b. Bądź ostrożny pisząc z humorem lub sarkazmem. Bez osobistego kontaktu Twój żart może być odebrany jako złośliwa krytyka.

@nospor,

Nie zmieniałem nic w tej linii. Ta linia jest tak ustawiona w tym kodzie od początku.

Oryginalny kod:

  1. function connect() {
  2. global $globalPersistent;
  3.  
  4. if ($globalPersistent == true) {
  5. $this->link = mysql_pconnect($this->host, $this->username, $this->password)
  6. or die("Could not connect to $this->host\n".mysql_error());
  7. } else {
  8. $this->link = mysql_connect($this->host, $this->username, $this->password)
  9. or die("Could not connect to $this->host\n".mysql_error());
  10. }
  11. mysql_query("set names 'latin1'");
  12. }
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 15.10.2025 - 21:19