[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: libxml_us

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('&' => '&', "'" => ''',

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 As

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 Docu

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 Alejandr

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] Class mysqli not found

2010-10-06 Thread Alejandro Michelin Salomon
Sueandant : mysqli is set of functions not a class. The name to connect is mysqli_connect /** * * * @version $Id$ * @copyright 2010 */ $mysqli = mysqli_connect ("localhost", "root", "woodcote", "testDB"); if (mysqli_connect_errno()) { printf("Connect failed: %s\n", mysqli_connect_error());

RES: [PHP] Class mysqli not found

2010-10-06 Thread Alejandro Michelin Salomon
Sorry, but it is a class... C:\php\ext folder has the php_mysql.dll and php_mysqli.dll ? Alejandro M.S. -Mensagem original- De: Alejandro Michelin Salomon [mailto:amichel...@hotmail.com] Enviada em: quarta-feira, 6 de outubro de 2010 17:34 Para: 'sueandant' Cc: &#

RES: [PHP] I am a Windows programmer and getting started on PHP

2010-11-19 Thread Alejandro Michelin Salomon
Daevid Vincent: I never use XAMP and those type of installations. Is very simple install Apache on windows ( takes 3 minutes ), and php too. Install php is simples, run the msi package, the installer configures httpd.conf Then you make the changes that you need to php.ini and is complete. (

ENC: RES: [PHP] I am a Windows programmer and getting started on PHP

2010-11-19 Thread Alejandro Michelin Salomon
De: Alejandro Michelin Salomon [mailto:amichel...@hotmail.com] Enviada em: sexta-feira, 19 de novembro de 2010 14:45 Para: 'a...@ashleysheridan.co.uk' Assunto: RES: RES: [PHP] I am a Windows programmer and getting started on PHP Daevid Vincent: For me is no problem if Lin

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 , to not have two xml start tag in the soap message. $xm

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
gmail.com] Enviada em: quinta-feira, 4 de outubro de 2012 15:49 Para: Alejandro 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 wrote: > Bastien: > > -Mensagem original- > De: Bast

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 Gjersøy

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 [ma

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 'P

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 : http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";> http://www.w3.org/1999/xhtml"; xml:lang="pt-br" lang="pt-br"> ... Nunca e tenido problemas con caracteres especiales como é o ú. Y utilizo varios .tpl,

RES: [PHP] Printing

2012-01-06 Thread Alejandro Michelin Salomon
. The library has a folder with a lot of examples. 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

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 d

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 made

RES: [PHP] '

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] 'Ashley Sheridan wrote: >> You can set it in php.ini itself, or possibly from .htaccess. failing that,

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, CURLOPT_SSL_VERI

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 , 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 , and forgive configuration options. Alej

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 #E