Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Brak funkcji yaml_parse()
Nicc0
post
Post #1





Grupa: Zarejestrowani
Postów: 44
Pomógł: 1
Dołączył: 18.01.2013

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


Witam. Zainstalowałem na swoim serwerze (nginx) rozszerzenie YAML (dokładnie to: klik) wszystko wygląda w porządku tzn. po wpisaniu komendy "php --re yaml" w konsola, zwraca mi ona:

Edit: Spoiler nie działa :/

[APACHE] pobierz, plaintext
  1. Extension [ <persistent> extension #43 yaml version 1.2.0 ] {
  2.  
  3. - Dependencies {
  4. Dependency [ date (Optional) ]
  5. }
  6.  
  7. - INI {
  8. Entry [ yaml.decode_binary <ALL> ]
  9. Current = '0'
  10. }
  11. Entry [ yaml.decode_timestamp <ALL> ]
  12. Current = '0'
  13. }
  14. Entry [ yaml.decode_php <ALL> ]
  15. Current = '1'
  16. }
  17. Entry [ yaml.output_canonical <ALL> ]
  18. Current = '0'
  19. }
  20. Entry [ yaml.output_indent <ALL> ]
  21. Current = '2'
  22. }
  23. Entry [ yaml.output_width <ALL> ]
  24. Current = '80'
  25. }
  26. }
  27.  
  28. - Constants [25] {
  29. Constant [ integer YAML_ANY_SCALAR_STYLE ] { 0 }
  30. Constant [ integer YAML_PLAIN_SCALAR_STYLE ] { 1 }
  31. Constant [ integer YAML_SINGLE_QUOTED_SCALAR_STYLE ] { 2 }
  32. Constant [ integer YAML_DOUBLE_QUOTED_SCALAR_STYLE ] { 3 }
  33. Constant [ integer YAML_LITERAL_SCALAR_STYLE ] { 4 }
  34. Constant [ integer YAML_FOLDED_SCALAR_STYLE ] { 5 }
  35. Constant [ string YAML_NULL_TAG ] { tag:yaml.org,2002:null }
  36. Constant [ string YAML_BOOL_TAG ] { tag:yaml.org,2002:bool }
  37. Constant [ string YAML_STR_TAG ] { tag:yaml.org,2002:str }
  38. Constant [ string YAML_INT_TAG ] { tag:yaml.org,2002:int }
  39. Constant [ string YAML_FLOAT_TAG ] { tag:yaml.org,2002:float }
  40. Constant [ string YAML_TIMESTAMP_TAG ] { tag:yaml.org,2002:timestamp }
  41. Constant [ string YAML_SEQ_TAG ] { tag:yaml.org,2002:seq }
  42. Constant [ string YAML_MAP_TAG ] { tag:yaml.org,2002:map }
  43. Constant [ string YAML_PHP_TAG ] { !php/object }
  44. Constant [ string YAML_MERGE_TAG ] { tag:yaml.org,2002:merge }
  45. Constant [ string YAML_BINARY_TAG ] { tag:yaml.org,2002:binary }
  46. Constant [ integer YAML_ANY_ENCODING ] { 0 }
  47. Constant [ integer YAML_UTF8_ENCODING ] { 1 }
  48. Constant [ integer YAML_UTF16LE_ENCODING ] { 2 }
  49. Constant [ integer YAML_UTF16BE_ENCODING ] { 3 }
  50. Constant [ integer YAML_ANY_BREAK ] { 0 }
  51. Constant [ integer YAML_CR_BREAK ] { 1 }
  52. Constant [ integer YAML_LN_BREAK ] { 2 }
  53. Constant [ integer YAML_CRLN_BREAK ] { 3 }
  54. }
  55.  
  56. - Functions {
  57. Function [ <internal:yaml> function yaml_parse ] {
  58.  
  59. - Parameters [4] {
  60. Parameter #0 [ <required> $input ]
  61. Parameter #1 [ <optional> $pos ]
  62. Parameter #2 [ <optional> &$ndocs ]
  63. Parameter #3 [ <optional> array $callbacks ]
  64. }
  65. }
  66. Function [ <internal:yaml> function yaml_parse_file ] {
  67.  
  68. - Parameters [4] {
  69. Parameter #0 [ <required> $filename ]
  70. Parameter #1 [ <optional> $pos ]
  71. Parameter #2 [ <optional> &$ndocs ]
  72. Parameter #3 [ <optional> array $callbacks ]
  73. }
  74. }
  75. Function [ <internal:yaml> function yaml_parse_url ] {
  76.  
  77. - Parameters [4] {
  78. Parameter #0 [ <required> $url ]
  79. Parameter #1 [ <optional> $pos ]
  80. Parameter #2 [ <optional> &$ndocs ]
  81. Parameter #3 [ <optional> array $callbacks ]
  82. }
  83. }
  84. Function [ <internal:yaml> function yaml_emit ] {
  85.  
  86. - Parameters [4] {
  87. Parameter #0 [ <required> $data ]
  88. Parameter #1 [ <optional> $encoding ]
  89. Parameter #2 [ <optional> $linebreak ]
  90. Parameter #3 [ <optional> array $callbacks ]
  91. }
  92. }
  93. Function [ <internal:yaml> function yaml_emit_file ] {
  94.  
  95. - Parameters [5] {
  96. Parameter #0 [ <required> $filename ]
  97. Parameter #1 [ <required> $data ]
  98. Parameter #2 [ <optional> $encoding ]
  99. Parameter #3 [ <optional> $linebreak ]
  100. Parameter #4 [ <optional> array $callbacks ]
  101. }
  102. }
  103. }
  104. }
[APACHE] pobierz, plaintext


czyli jest ok, funkcję istnieją. Problem polega na tym, że PHP zwraca mi taki o to błąd:

Fatal error: Call to undefined function yaml_emit() in

Pytanie do was, co robię źle? Uprzedzam, że maszyna jest ta sama biggrin.gif (sprawdzałem), dodałem również do php.ini extension=yaml.so w odpowiednim miejscu (też sprawdzałem), więc co jest zemną nie tak?

Ten post edytował Nicc0 21.06.2015, 02:05:10
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi (1 - 5)
KsaR
post
Post #2





Grupa: Zarejestrowani
Postów: 520
Pomógł: 102
Dołączył: 15.07.2014
Skąd: NULL

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


Hm a skopiowałeś skądś kod? (Nawet sama nazwe funkcji czy cos).
Ja mam taki błąd zawsze gdy skopiuje coś z PHP.net, nie chodzi tu o yaml ktorego nie uzywalem nigdy, tylko ogolnie jaki kolwiek kod.

Tak więc jeżeli skopiowales.
Lepiej przepisz recznie cala linijke a stara skasuj(mi tak pomoglo w takich wypadkach niestandardowych).


--------------------
Go to the top of the page
+Quote Post
Nicc0
post
Post #3





Grupa: Zarejestrowani
Postów: 44
Pomógł: 1
Dołączył: 18.01.2013

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


Niestety, nic nie pomogło :/

Edit: Poradziłem sobie w inny sposób, użyłem Spyc. I wszystko działa jak powinno.

Ten post edytował Nicc0 21.06.2015, 12:13:19
Go to the top of the page
+Quote Post
com
post
Post #4





Grupa: Zarejestrowani
Postów: 3 034
Pomógł: 366
Dołączył: 24.05.2012

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


Ksar to masz dziwnego manuala wink.gif bo u innych działa normalnie biggrin.gif
Go to the top of the page
+Quote Post
KsaR
post
Post #5





Grupa: Zarejestrowani
Postów: 520
Pomógł: 102
Dołączył: 15.07.2014
Skąd: NULL

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


Cytat(com @ 21.06.2015, 18:49:55 ) *
Ksar to masz dziwnego manuala wink.gif bo u innych działa normalnie biggrin.gif

No dziwne, bo mam tak gdy kopiuje coś z php.net z innych stron tak nie mam,
Najczesciej wystarczy skasować spacje w moim przypadku, jesli to nie pomagalo to przepisac na nowo linijke ktora wygladala "na oko" tak samo tongue.gif.

Raz nawet mialem ze undefined fuction rand() -,-


--------------------
Go to the top of the page
+Quote Post
com
post
Post #6





Grupa: Zarejestrowani
Postów: 3 034
Pomógł: 366
Dołączył: 24.05.2012

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


no to dziwna sprawa, może kwestia przeglądarki/os smile.gif
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 Aktualny czas: 20.08.2025 - 08:01