Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Problem ze skryptami po aktualizacji php na serwerze do wersji 5.3
sylwekb
post 28.06.2013, 11:22:56
Post #1





Grupa: Zarejestrowani
Postów: 124
Pomógł: 0
Dołączył: 12.01.2006

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


Witam, po aktualizacji skryptów php na serwerze do wersji 5.3 pojawiły się błędy w kodzie strony, najprawdopodobniej niektóre funkcje zostały zmodyfikowane w nowej wersji php. Jaki kod trzeba wstawić aby nie generowało błędów?

  1.  
  2. Deprecated: Function mysql_db_query() is deprecated in /home/.../guestbook.php on line 499
  3.  
  4. Deprecated: mysql_db_query() [function.mysql-db-query]: This function is deprecated; use mysql_query() instead in /home/.../guestbook.php on line 499
  5.  
  6. Deprecated: Function mysql_db_query() is deprecated in /home/.../guestbook.php on line 585
  7.  
  8. Deprecated: mysql_db_query() [function.mysql-db-query]: This function is deprecated; use mysql_query() instead in /home/.../guestbook.php on line 585
  9.  
  10.  
  11. Deprecated: Function ereg_replace() is deprecated in /home/.../pb_library.php on line 120
  12.  
  13. Deprecated: Function eregi_replace() is deprecated in /home/.../pb_library.php on line 121
  14.  
  15. Deprecated: Function eregi_replace() is deprecated in /home/.../pb_library.php on line 122
  16.  
  17. Deprecated: Function eregi_replace() is deprecated in /home/.../pb_library.php on line 123
  18.  
  19. Deprecated: Function eregi_replace() is deprecated in /home/.../pb_library.php on line 124
  20.  
  21. Deprecated: Function eregi_replace() is deprecated in /home/.../pb_library.php on line 125
  22.  
  23. Deprecated: Function eregi_replace() is deprecated in /home/.../pb_library.php on line 126
  24.  
  25. Deprecated: Function eregi_replace() is deprecated in /home/.../pb_library.php on line 141
  26.  
  27. Deprecated: Function eregi_replace() is deprecated in /home/.../pb_library.php on line 142
  28.  
  29. Deprecated: Function eregi_replace() is deprecated in /home/.../pb_library.php on line 161
  30.  
  31. Deprecated: Function mysql_db_query() is deprecated in /home/.../pb_library.php on line 163
  32.  
  33. Deprecated: mysql_db_query() [function.mysql-db-query]: This function is deprecated; use mysql_query() instead in /home/.../pb_library.php
  34.  
  35.  
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 2)
CuteOne
post 28.06.2013, 11:26:45
Post #2





Grupa: Zarejestrowani
Postów: 2 958
Pomógł: 574
Dołączył: 23.09.2008
Skąd: wiesz, że tu jestem?

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


zamiast mysql_* używaj http://php.net/manual/en/book.pdo.php lub mysqli_*
zamiast eregi_replace używaj preg_replace()

Ten post edytował CuteOne 28.06.2013, 11:27:16
Go to the top of the page
+Quote Post
rocktech.pl
post 28.06.2013, 11:28:20
Post #3





Grupa: Zarejestrowani
Postów: 587
Pomógł: 131
Dołączył: 8.02.2010

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


Witam.

Na sam początek

  1. error_reporting = E_ALL ^ E_DEPRECATED


  1. error_reporting(E_ALL ^ E_DEPRECATED);


A potem przepisać z użyciem PDO ...


--------------------
Despite the tons of examples and docs, mod_rewrite is voodoo. Damned cool voodoo, but still voodoo. --Brian Moore

I never go looking for a sucker. I look for a Champion and make a sucker of of him. --Amarillo Slim


Home-made : js-gui-classes | Accordion | Tabs | Carousel / php-sms-classes | Obsługa bramki SMS MultiInfo | Obsługa bramki SMS Mobiltek
Go to the top of the page
+Quote Post

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 Wersja Lo-Fi Aktualny czas: 15.07.2025 - 05:04