Foros del Web » Programando para Internet » PHP »

Mostrando datos desde Json a PHP

Estas en el tema de Mostrando datos desde Json a PHP en el foro de PHP en Foros del Web. Hola gente, estoy teniendo un problemita al mostrar unos datos que traigo desde Json a php La parte que los muestra es esta: @import url("http://static.forosdelweb.com/clientscript/vbulletin_css/geshi.css"); ...
  #1 (permalink)  
Antiguo 12/07/2013, 16:05
Avatar de colote  
Fecha de Ingreso: julio-2008
Ubicación: Rosario - Santa Fe - Argentina
Mensajes: 729
Antigüedad: 15 años, 9 meses
Puntos: 8
Mostrando datos desde Json a PHP

Hola gente, estoy teniendo un problemita al mostrar unos datos que traigo desde Json a php

La parte que los muestra es esta:


Código PHP:
Ver original
  1. require('json.php');
  2. include('conexion.php');
  3.  
  4. $json=new Services_JSON();
  5.  
  6.  
  7. $cad=$json->decode(stripslashes($_GET["cadena"]));
  8.  
  9. echo "<PRE>";
  10. var_dump($_GET["cadena"]);
  11. echo "</PRE>";
  12.  
  13.  
  14. echo $precio1=$cad->preciopes[0];
  15. echo $precio1=$cad->preciopes[1];
  16. echo $precio1=$cad->preciopes[2];


El problema es que desde mi Pc montado en el localhost
PHP Version 5.4.7 anda perfecto.

Y desde el sitio que tiene PHP Version 5.3.24
Me tira como resultado NULL

Alguien sabe si es algo de la configuracion ?

Desde ya muchas Gracias.

Saludos, Ricardo.
__________________
Mail: [email protected]
  #2 (permalink)  
Antiguo 12/07/2013, 19:27
Avatar de Triby
Mod on free time
 
Fecha de Ingreso: agosto-2008
Ubicación: $MX->Gto['León'];
Mensajes: 10.106
Antigüedad: 15 años, 8 meses
Puntos: 2237
Respuesta: Mostrando datos desde Json a PHP

Sí, podría ser algo en la configuración, intenta comparar ambos servidores usando en cada uno php_info()
__________________
- León, Guanajuato
- GV-Foto
  #3 (permalink)  
Antiguo 13/07/2013, 06:38
Avatar de colote  
Fecha de Ingreso: julio-2008
Ubicación: Rosario - Santa Fe - Argentina
Mensajes: 729
Antigüedad: 15 años, 9 meses
Puntos: 8
Respuesta: Mostrando datos desde Json a PHP

Código phpinfo():
Ver original
  1. PHP Version 5.4.7
  2.  
  3.  
  4. System  Windows NT RICARDO-PC 6.1 build 7601 (Windows 7 Home Premium Edition Service Pack 1) i586
  5. Build Date  Sep 12 2012 23:44:56
  6. Compiler    MSVC9 (Visual C++ 2008)
  7. Architecture    x86
  8. Configure Command   cscript /nologo configure.js "--enable-snapshot-build" "--disable-isapi" "--enable-debug-pack" "--without-mssql" "--without-pdo-mssql" "--without-pi3web" "--with-pdo-oci=C:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8=C:\php-sdk\oracle\instantclient10\sdk,shared" "--with-oci8-11g=C:\php-sdk\oracle\instantclient11\sdk,shared" "--enable-object-out-dir=../obj/" "--enable-com-dotnet=shared" "--with-mcrypt=static" "--disable-static-analyze" "--with-pgo"
  9. Server API  Apache 2.4 Handler Apache Lounge
  10. Virtual Directory Support   enabled
  11. Configuration File (php.ini) Path   C:\windows
  12. Loaded Configuration File   C:\xampp\php\php.ini
  13. Scan this dir for additional .ini files (none)
  14. Additional .ini files parsed    (none)
  15. PHP API 20100412
  16. PHP Extension   20100525
  17. Zend Extension  220100525
  18. Zend Extension Build    API220100525,TS,VC9
  19. PHP Extension Build API20100525,TS,VC9
  20. Debug Build no
  21. Thread Safety   enabled
  22. Zend Signal Handling    disabled
  23. Zend Memory Manager enabled
  24. Zend Multibyte Support  provided by mbstring
  25. IPv6 Support    enabled
  26. DTrace Support  disabled
  27. Registered PHP Streams  php, file, glob, data, http, ftp, zip, compress.zlib, compress.bzip2, phar
  28. Registered Stream Socket Transports tcp, udp
  29. Registered Stream Filters   convert.iconv.*, mcrypt.*, mdecrypt.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk, zlib.*, bzip2.*



Código phpinfo():
Ver original
  1. PHP Version 5.3.24
  2.  
  3.  
  4. System  Linux linux53.webhosting-network-services.com 2.6.32-358.6.1.el6.x86_64 #1 SMP Tue Apr 23 19:29:00 UTC 2013 x86_64
  5. Build Date  May 1 2013 15:17:44
  6. Configure Command    './configure' '--disable-fileinfo' '--disable-phar' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-intl' '--enable-libxml' '--enable-magic-quotes' '--enable-mbstring' '--enable-pdo=shared' '--enable-soap' '--enable-sockets' '--enable-wddx' '--enable-zend-multibyte' '--enable-zip' '--prefix=/usr/local' '--with-apxs2=/usr/local/apache/bin/apxs' '--with-bz2' '--with-curl=/opt/curlssl/' '--with-curlwrappers' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext' '--with-icu-dir=/usr' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libexpat-dir=/usr' '--with-libxml-dir=/opt/xml2' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mm=/opt/mm/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysql_config' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pic' '--with-png-dir=/usr' '--with-sqlite=shared' '--with-tidy=/opt/tidy/' '--with-xmlrpc' '--with-xpm-dir=/usr' '--with-xsl=/opt/xslt/' '--with-zlib' '--with-zlib-dir=/usr'
  7. Server API  Apache 2.0 Handler
  8. Virtual Directory Support   disabled
  9. Configuration File (php.ini) Path   /usr/local/lib
  10. Loaded Configuration File   /usr/local/lib/php.ini
  11. Scan this dir for additional .ini files (none)
  12. Additional .ini files parsed    (none)
  13. PHP API 20090626
  14. PHP Extension   20090626
  15. Zend Extension  220090626
  16. Zend Extension Build    API220090626,NTS
  17. PHP Extension Build API20090626,NTS
  18. Debug Build no
  19. Thread Safety   disabled
  20. Zend Memory Manager enabled
  21. Zend Multibyte Support  enabled
  22. IPv6 Support    enabled
  23. Registered PHP Streams  compress.zlib, compress.bzip2, dict, ftp, ftps, gopher, http, https, imap, imaps, pop3, pop3s, rtsp, smtp, smtps, telnet, tftp, php, file, glob, data, zip
  24. Registered Stream Socket Transports tcp, udp, unix, udg, ssl, sslv3, sslv2, tls
  25. Registered Stream Filters   zlib.*, bzip2.*, convert.iconv.*, mcrypt.*, mdecrypt.*, string.rot13, string.toupper, string.tolower, string.strip_tags, convert.*, consumed, dechunk

Aca puse los 2 para que lo vean, a ver si alguien me puede dar una mano.

Gracias !
__________________
Mail: [email protected]

Etiquetas: json
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 16:11.