[PHP] Valid Xml not validate with xsd

2010-09-16 Thread Alejandro Michelin Salomon
Hi: I am working with a xml document that is validate with a schema. Within php the xml does not validate, but if i use a external validator the same xml validates with no problems. My Php is now 5.2.14, but i test with 5.3.1 and the same problem. I create a small program as example:

RES: [PHP] Invalid chars in XML

2010-09-21 Thread Alejandro Michelin Salomon
Hi I am working with xml, in portuguese, and i have many problems with special characters. I find this code to work with this problem... When create xml ExpandEntities : function ExpandEntities( $sText ) { $trans = array('' = 'amp;', ' = 'apos;',

RES: [PHP] converting a mysql date value

2010-09-29 Thread Alejandro Michelin Salomon
David : Try this : $a = explode('-', '2010-01-23'); $b = array( $a[1], $a[2], $a[0] ); echo implode( '/', $b); // 01/23/2010 Alejandro M.S. -Mensagem original- De: David Mehler [mailto:dave.meh...@gmail.com] Enviada em: quarta-feira, 29 de setembro de 2010 16:12 Para: php-general

RES: [PHP] New to PHP and struggling with the basics

2010-10-04 Thread Alejandro Michelin Salomon
Col Day : Go to : C:\Arquivos de programas\Apache Software Foundation\Apache2.2\conf or the folder in your machine. Search for this file = httpd.conf Search for DocumentRoot D:/webroot put your work folder in my case D:/webroot. Search for this line and apply the same changes make in

RES: [PHP] Connecting to MySql with PHP

2010-10-05 Thread Alejandro Michelin Salomon
Sueandant : Goto your my.ini file In my case located in C:\Arquivos de programas\MySQL\MySQL Server 5.1 Search is this configuration option is enabled = skip-networking And comment to enabled listen on a TCP/IP port. Default port 3306 Or Put = enable-named-pipe to enable named pipes Alejandro

RES: [PHP] Connecting to MySql with PHP

2010-10-05 Thread Alejandro Michelin Salomon
Sueandant : Reading more carefully your email, and search for this error in the net. Y find this page http://coreygilmore.com/blog/2009/11/20/fix-php-5-3-hang-on-windows/ Try this Alejandro M.S. -Mensagem original- De: Alejandro Michelin Salomon [mailto:amichel...@hotmail.com] Enviada

RES: [PHP] email address syntax checker

2011-01-21 Thread Alejandro Michelin Salomon
Donovan: Try this function EmailCheck ( $sEmail ) { $regexp=/^[a-z0-9]+([_\\.-][a-z0-9]+)*@([a-z0-9]+([\.-][a-z0-9]+)*)+\\.[a-z ]{2,}$/i; if ( !preg_match($regexp, $sEmail) ) return false; return true; } Alejandro M.S. -Mensagem original- De: Donovan Brooke

RES: [PHP] Bar Charts in PDFs

2011-02-11 Thread Alejandro Michelin Salomon
Tom: You can try: http://www.tcpdf.org/ to generate pdf. And http://jpgraph.net/ To generate chart. EX: to add a image to a pdf document: $pdf-Image( '/home/peter/test.png', 127.78, 15, // left and right 74.93, 6.42, // width and height

RES: [PHP] Acentos en tpl

2011-03-18 Thread Alejandro Michelin Salomon
Lorena : Yo trabajo con idioma portugués y utilizo esto en mi código : !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Strict//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd; html xmlns=http://www.w3.org/1999/xhtml; xml:lang=pt-br lang=pt-br head meta http-equiv=Content-Encoding content=gzip

RES: [PHP] Short tag: why is it bad practice?

2011-05-11 Thread Alejandro Michelin Salomon (Hotmail)
Andre : As Joshua says, the only php tags that always is enabled is ?php ?, this is the default php tag, and never can be disabled. This ? ? is enabled if short_open_tag is on And this % % is enabled if asp_tags is on But the default is off for both. Use this ?php ?, and forgive configuration

RES: [PHP] Installing PHP

2011-07-04 Thread Alejandro Michelin Salomon (Hotmail)
Jim: In my Windows the install adds the lines : #BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL PHPIniDir C:\PHP\ LoadModule php5_module C:\PHP\php5apache2_2.dll AddHandler application/x-httpd-php .php #END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL Where is the apache version that

RES: [PHP] Installing PHP

2011-09-20 Thread Alejandro Michelin Salomon (Hotmail)
Mateus: Para configurar o php no apache : 1) Adicionar estas linhas no httpd.conf Troca D:\PHP\ pelos dados da tua instalação. #BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL PHPIniDir D:\PHP\ LoadModule php5_module D:\PHP\php5apache2_2.dll AddHandler application/x-httpd-php .php #END

RES: [PHP] Printing

2012-01-06 Thread Alejandro Michelin Salomon
. Alejandro MS -Mensagem original- De: Jim Giner [mailto:jim.gi...@albanyhandball.com] Enviada em: quinta-feira, 5 de janeiro de 2012 17:13 Para: Alejandro Michelin Salomon Assunto: Re: [PHP] Printing I don't know what you mean. How do I create a pdf with php? Do I have to have my host

RES: [PHP] Re: Getting Column Names from an AS400 Database

2012-01-26 Thread Alejandro Michelin Salomon
Cheryl: In the PHP Manual ; resource odbc_columns ( resource $connection_id [, string $qualifier [, string $schema [, string $table_name [, string $column_name ) Lists all columns in the requested range. Parameters connection_id The ODBC connection identifier, see odbc_connect() for

RES: [PHP] What's Your Favorite Design Pattern?

2012-02-07 Thread Alejandro Michelin Salomon
Mike: My favorite are singleton ( database connection configuration ), and factory. Factory i use when need one code exporting or doing different process. Basically y have a base class with general code and a specific class that extend the base class with code specific to the process to be

RES: [PHP] '?=' with PHP5.3.10

2012-03-05 Thread Alejandro Michelin Salomon
Leste Wrote: -Mensagem original- De: Lester Caine [mailto:les...@lsces.co.uk] Enviada em: segunda-feira, 5 de março de 2012 08:18 Para: php-general@lists.php.net Assunto: Re: [PHP] '?=' with PHP5.3.10 Ashley Sheridan wrote: You can set it in php.ini itself, or possibly from .htaccess.

RES: [PHP] CURL -d

2012-03-26 Thread Alejandro Michelin Salomon
Hi try this : $ch = curl_init(); curl_setopt ( $ch, CURLOPT_URL, URL HERE ); curl_setopt ( $ch, CURLOPT_FOLLOWLOCATION, 1 ); curl_setopt ( $ch, CURLOPT_HEADER, 1 ); curl_setopt ( $ch, CURLOPT_TIMEOUT, 10); curl_setopt ( $ch, CURLOPT_SSL_VERIFYPEER, false ); curl_setopt ( $ch,

RES: [PHP] XML/PHP web service

2012-08-09 Thread Alejandro Michelin Salomon
Philip : Try this: Client: $client = new SoapClient( null, array( 'encoding' = 'utf-8', 'soap_version' = SOAP_1_2, 'trace' = 1, 'uri' = 'tns: Server', 'location' = 'php server URL here')); // Cut off ?xml version=1.0 encoding=utf-8?, to not have two xml start

RES: [PHP] cURL issues posting to an end point

2012-10-04 Thread Alejandro Michelin Salomon
Bastien: -Mensagem original- De: Bastien Koert [mailto:phps...@gmail.com] Enviada em: quinta-feira, 4 de outubro de 2012 11:54 Para: PHP-General Assunto: [PHP] cURL issues posting to an end point Hi All, I have a page that receives third party data into my app, xml data via https post.

RES: [PHP] cURL issues posting to an end point

2012-10-04 Thread Alejandro Michelin Salomon
Michelin Salomon Cc: PHP-General Assunto: Re: [PHP] cURL issues posting to an end point On Thu, Oct 4, 2012 at 1:35 PM, Alejandro Michelin Salomon amichel...@hotmail.com wrote: Bastien: -Mensagem original- De: Bastien Koert [mailto:phps...@gmail.com] Enviada em: quinta-feira, 4 de outubro

RES: [PHP] From 24/7/2013 to 2013-07-24

2013-07-26 Thread Alejandro Michelin Salomon
Use this: echo preg_replace('#(\d{2})/(\d{2})/(\d{4})#' , \\3-\\2-\\1, '24/07/2013' ); RESULT = 2013-07-24 Alejandro M.S -Mensagem original- De: Jim Giner [mailto:jim.gi...@albanyhandball.com] Enviada em: sexta-feira, 26 de julho de 2013 11:12 Para: php-general@lists.php.net Assunto:

RES: [PHP] From 24/7/2013 to 2013-07-24

2013-07-26 Thread Alejandro Michelin Salomon
jomali: Use this: echo preg_replace('#(\d{2})/(\d{2})/(\d{4})#' , \\3-\\2-\\1, '24/07/2013' ); RESULT = 2013-07-24 Alejandro M.S -Mensagem original- De: jomali [mailto:jomali3...@gmail.com] Enviada em: sexta-feira, 26 de julho de 2013 17:38 Para: Robert Cummings Cc: Karl-Arne