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øyen; PHP Mailinglist
Assunto: Re: [PHP] From 24/7/2013 to 2013-07-24

On Fri, Jul 26, 2013 at 1:08 PM, Robert Cummings
wrote:

> On 13-07-26 11:42 AM, jomali wrote:
>
>> On Fri, Jul 26, 2013 at 5:18 AM, Karl-Arne Gjersøyen 
>> > >wrote:
>>
>>  Below is something I try that ofcourse not work because of rsosort.
>>> Here is my code:
>>> ---
>>> $lagret_dato = $_POST['lagret_dato'];
>>>  foreach($lagret_dato as $dag){
>>>
>>>  $dag = explode("/", $dag);
>>> rsort($dag);
>>>  $dag = implode("-", $dag);
>>>  var_dump($dag);
>>>
>>> What I want is a way to rewrite contents of a variable like this:
>>>
>>>  From 24/7/2013 to 2013-07-24
>>>
>>> Is there a way in PHP to do this?
>>>
>>> Thank you very much.
>>>
>>> Karl
>>>
>>>
>> $conv_date = str_replace('/', '-','24/7/2013'); echo date('Y-m-d', 
>> strtotime($conv_date));
>> Result: 2013-07-24
>>
>
> It would be better if you reformatted first since this is ambiguous 
> when you have the following date:
>
> 6/7/2013
>

> Here's a completely unambiguous solution:
>
> 
> $old = '24/7/2013';
>
> $paddy = function( $bit ){ return str_pad( $bit, 2, '0', 
> STR_PAD_LEFT ); };
> $new = implode( '-', array_map( $paddy, array_reverse( explode( 
> '/', $old ) ) ) );
>
> echo $new."\n";
>
> ?>
>
> Cheers,
> Rob.
> --
> E-Mail Disclaimer: Information contained in this message and any 
> attached documents is considered confidential and legally protected.
> This message is intended solely for the addressee(s). Disclosure, 
> copying, and distribution are prohibited unless authorized.
>

The original question was  about reformatting a European (Day/Month/Year)
date. Your solution does not address this problem. Mine assumes the European
date format explicitly.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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: Re: [PHP] From 24/7/2013 to 2013-07-24

On 7/26/2013 10:10 AM, Jim Giner wrote:
> I think you should change from using 'rsort' ( a SORT function) to 
> 'array_reverse', a simple reverse function.
> Your example of what you desire is wrong.
> 24-7-2013 will give you the 2013-24-7 that you want.

oops.
I meant to say "will NOT give you the 2013-2407 that you want".


--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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

2012-10-04 Thread Alejandro Michelin Salomon
Bastien:

curl_setopt($ch, CURLOPT_HTTPHEADER,
array(
'User-Agent: My Program',
'Accept-Encoding: gzip, deflate',
'POST ' . $sPost . ' HTTP/1.1',
'Host: ' . $sHost,
'Content-type: application/soap+xml; charset="utf-8"',
'Content-Length: ' . strlen($xml_builder) 
 ) --- This is missing
);

Alejandro M.S
-Mensagem original-
De: Bastien Koert [mailto:phps...@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: 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. This works fine and I receive the data as expected. The 
> issue I am facing is around posting XML data back as a synchronous 
> response to the post I receive. I am using the following code:
>
> function sendXMLConfirmation($data)
> {
>   /*
>* XML Sender/Client.
>*/
>   // Get our XML. You can declare it here or even load a file.
>
>
>   $xml_builder = '
> 
> 
> 
>
> 25412
> 
> 
> 
> 
>  transactType="response">
>
> '.$hash.'
> 
> '.date("Y-m-d H:m ").'
> 
> 
> 200
>
> Success
>
> CANDIDATE Data transfer was a success
> 
> 
> 
>  packetType="response">
>
> 1
>
SET
> 
> Manifest Data
> 
> 
> 
>
> 
>
> 
> 
> 
>
> 
> 
> 
>  ';
>
>
>   // We send XML via CURL using POST with a http header of text/xml.
> $ch = curl_init();
>
> $url =
> 'https://staging.somesite.com/Sprocessor/DispatchMessage.asmx';
>
> curl_setopt($ch, CURLOPT_URL, $url);
> curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);   // for https
> curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
> curl_setopt($ch, CURLOPT_TIMEOUT, 4);
> curl_setopt($ch, CURLOPT_POSTFIELDS, $xml_builder);
>
> - curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:
text/xml'));
> -   curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: close'));
>
> --- NEW 
> $sPost = '/Sprocessor/DispatchMessage.asmx';
> $sHost = ' https://staging.somesite.com';
>
> curl_setopt($ch, CURLOPT_HTTPHEADER,
> array(
> 'User-Agent: My Program',
> 'Accept-Encoding: gzip, deflate',
> 'POST ' . $sPost . ' HTTP/1.1',
> 'Host: ' . $sHost,
> 'Content-type: application/soap+xml; charset="utf-8"',
> 'Content-Length: ' . strlen($xml_builder) );
>
>  END NEW -
> //Execute the request and also time the transaction ( optional 
> )
>
> $start = array_sum(explode(' ', microtime()));
>
> $result = curl_exec($ch);
>
> curl_close($ch);
> // Print CURL result.
> echo $ch_result;
> }
>
>
> The endpoint recipient says they are not receiving the data and I am 
> at a loss to figure out why. Any insight would be appreciated.
>
> Thanks,
>
> --
>
> Bastien
>
> Cat, the other other white meat
>
> --
> PHP General Mailing List (http://www.php.net/) To unsubscribe, visit

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. This works fine and I receive the data as expected. The issue I am
facing is around posting XML data back as a synchronous response to the post
I receive. I am using the following code:

function sendXMLConfirmation($data)
{
  /*
   * XML Sender/Client.
   */
  // Get our XML. You can declare it here or even load a file.


  $xml_builder = '




25412






'.$hash.'
'.date("Y-m-d H:m
").'

200

Success

CANDIDATE Data transfer was a success





1
SET
Manifest
Data












 ';


  // We send XML via CURL using POST with a http header of text/xml.
$ch = curl_init();

$url =
'https://staging.somesite.com/Sprocessor/DispatchMessage.asmx';

curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);   // for https
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 4);
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml_builder);

- curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml'));
-   curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: close'));

--- NEW 
$sPost = '/Sprocessor/DispatchMessage.asmx';
$sHost = ' https://staging.somesite.com';

curl_setopt($ch, CURLOPT_HTTPHEADER,
array(
'User-Agent: My Program',
'Accept-Encoding: gzip, deflate',
'POST ' . $sPost . ' HTTP/1.1',
'Host: ' . $sHost,
'Content-type: application/soap+xml; charset="utf-8"',
'Content-Length: ' . strlen($xml_builder)
);

 END NEW -
//Execute the request and also time the transaction ( optional )

$start = array_sum(explode(' ', microtime()));

$result = curl_exec($ch);

curl_close($ch);
// Print CURL result.
echo $ch_result;
}


The endpoint recipient says they are not receiving the data and I am at a
loss to figure out why. Any insight would be appreciated.

Thanks,

-- 

Bastien

Cat, the other other white meat

--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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.
$xmlres = $client->__soapCall( 'ProXML', array( str_replace( ''."\n", '', $sXml )));

echo '', $xmlres, ''; // print the xml output or
var_export($xmlres, true) if $xmlres is an array.


SERVER:


class Receiver
{
public function ProXML ( $sXML )
{

libxml_use_internal_errors(true); // enabled use libxml errors

// try..catch to cacth simplexmlelement errors
try
{
$xml = new SimpleXMLElement( '' . $sXML ); // Try to create a xml object with the string
passed
} catch (Exception $e) {

$aErrors = libxml_get_errors(); // get errors

foreach ( $aErros as $oErro )
  {
switch ( $oErro->level )
{
case LIBXML_ERR_WARNING:
$sCod .= '' . $oErro->code .
'' . utf8_encode( 'warning: ' . $oErro->message ) .
'';
break;
case LIBXML_ERR_ERROR:
$sCod .= '' . $oErro->code .
'' . utf8_encode( 'Error: ' . $oErro->message ) .
 '';
break;
 case LIBXML_ERR_FATAL:
$sCod .= '' . $oErro->code .
'' . utf8_encode( ' Fatal Error: ' . $oErro->message ) .
 '';
 break;
}
 }
}

work here ...

}

}


$server = new SoapServer(null, array( 'uri' => 'tns: Server' ));

$server->setClass('Receiver');

$server->handle();




Alejandro M.S

-Mensagem original-
De: Phillip Baker [mailto:phil...@freewolf.net] 
Enviada em: quarta-feira, 8 de agosto de 2012 19:12
Para: php-general@lists.php.net
Assunto: [PHP] XML/PHP web service

Greetings all,

I am looking for some options here.

I am in need of creating a service on our web server that will always be
available and automated.
It will accept an XML file.

I will be checking to see if the XML file is valid and then passing it on to
another server.
But I need to accept this file without using a submit form.
I have never done anything like this and looking for ideas.

I am using a lamp environment and looking for suggestions.

I am looking to set this up so that our vendors can set up scripts to
automatically post XML files to our servers.

Blessed Be

Phillip

"In the Jim Crow South, for example, government failed and indeed refused to
protect blacks from extra-legal violence. Given our history, it's stunning
we fail to question those who would force upon us a total reliance on the
state for defense."
-- Robert J. Cottrol


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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_VERIFYHOST, false );

This to use SSL Certicade
curl_setopt ( $ch, CURLOPT_SSLCERT, Public Key );
curl_setopt ( $ch, CURLOPT_SSLCERTPASSWD, '');
curl_setopt ( $ch, CURLOPT_SSLCERTTYPE, 'PEM' ); --> Type o certificade
curl_setopt ( $ch, CURLOPT_SSLKEY, Private Key );
curl_setopt ( $ch, CURLOPT_SSLKEYPASSWD, Password of private key);


curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt ( $ch, CURLOPT_POST, true );
curl_setopt ( $ch, CURLOPT_PORT , 443 ); --> port
curl_setopt($ch, CURLOPT_POSTFIELDS, DATA HERE );


curl_setopt($ch, CURLOPT_HTTPHEADER,
array(
'User-Agent: Some name',
'Accept-Encoding: gzip, deflate',
'POST "some post data" HTTP/1.1', 
'Host: some host',
'Content-type: application/soap+xml; charset="utf-8"', The content type
'Content-Length: ', length of data

// This for soap action 
'SOAPAction: action here  ')
);

$xResult = curl_exec($ch);

Alejandro M.S.

-Mensagem original-
De: QI.VOLMAR QI [mailto:qi.vol...@gmail.com] 
Enviada em: segunda-feira, 26 de março de 2012 12:46
Para: PHP General
Assunto: [PHP] CURL -d

I have this lines:
curl -H "Content-Type: application/json" -d "hello world" \
 
"http://api.pusherapp.com/apps/17331/channels/test_channel/events?"\

The option -d is for data. But How I can set it on the PHP  CURL extension?
I have found that if I set something like array('Hello Word', 'name'
=> 'my_name'), for the POST data may occurs. Can you give me a  little help?

--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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, 
>> find/replace on the old short echo tags would do it.

>But I thought that 'change ...

Protected only in php 5.4.x, not in 5.3.x

Php 5.3 a prior, the only safe tag is http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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.
The main code only pass the type of format ant factory returns de right code
for the operation.

The main code remains untouched, when the factory chance each time a i need
other type of process or exportation results.

Alejandro M.S.

-Mensagem original-
De: Mike Mackintosh [mailto:mike.mackint...@angrystatic.com] 
Enviada em: terça-feira, 7 de fevereiro de 2012 16:57
Para: PHP General List
Assunto: [PHP] What's Your Favorite Design Pattern?

I was curious to see what everyones favorite design patterns were, if you
use any, and why/when have you used it?

Choices include slots and signals (observer), singleton, mvc, hmvc, factory,
commander etc..

Thanks,

--
Mike Mackintosh
PHP, the drug of choice - www.highonphp.com





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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
details.
qualifier  The qualifier. 
schema The owner. 
table_name The table name. 
column_nameThe column name.

I the first email you send: $outval = odbc_columns($conn, "DB#LIBNAME", "%",
"TABLENAME", "%");

$conn is truly a connection object ?

You check if has no errors in the connection processes?

Alejandro M.S.


-Mensagem original-
De: Cheryl Sullivan [mailto:csull...@shh.org] 
Enviada em: quinta-feira, 26 de janeiro de 2012 13:41
Para: Jim Giner; php-general@lists.php.net
Assunto: RE: [PHP] Re: Getting Column Names from an AS400 Database


Thanks for your response... I changed the $outval line to 

$outval = odbc_columns($rs, "DB#LIBNAME", "%", "TABLENAME", "%");

...but still got the same error - 

Warning: odbc_columns() expects parameter 1 to be resource, object given in
D:\WAMP\www\directory\filename.php on line 13


-Original Message-
From: Jim Giner [mailto:jim.gi...@albanyhandball.com]
Sent: Thursday, January 26, 2012 10:31 AM
To: php-general@lists.php.net
Subject: [PHP] Re: Getting Column Names from an AS400 Database

I'm thinking that it should read

$rs = $conn->execute($q);
$outval = odbc_columns($rs, "DB#LIBNAME", "%", "TABLENAME", "%");

You need to provide the results of the query to the odbc_columns, not the
connection object.
Just my guess since I've never used this. 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Notice: This communication, including attachments, may contain information
that is confidential and protected. It constitutes non-public information
intended to be conveyed only to the designated recipient(s). If you believe
that you have received this communication in error, please notify the sender
immediately by return e-mail and promptly delete this e-mail, including
attachments without reading or saving them in any manner. The unauthorized
use, dissemination, distribution, or reproduction of this e-mail, including
attachments, is prohibited and may be unlawful. Thank you.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RES: [PHP] Printing

2012-01-06 Thread Alejandro Michelin Salomon
Jim:

The TCPDF software library does not need php pdf functions. Is 100% php
code.
To use only put a require_once '/tcpdf/tcpdf.php'; lik this.

Create a new instance:
$pdf = new TCPDF( 'P', 'mm', 'A4', true, 'UTF-8', false);

And call the methods.

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 do I create a pdf with php?  Do I have to
have my host install a package or something?
- Original Message -
From: "Alejandro Michelin Salomon" 
To: "'Jim Giner'" 
Sent: Thursday, January 05, 2012 2:01 PM
Subject: RES: [PHP] Printing


> Jim:
>
> You do not need PDF printer drivers.
>
> This lib create a PDF file with 100% PHP code.
>
> When the creation is done, you chose what to do:
>
> Save a file to download or send directly to the browser.
>
> Example;
>
> // reset pointer to the last page
> $pdf->lastPage();
>
> //Close and output PDF document
>
> if ( trim( $sFile ) != '' )
>$pdf->Output( $sFile, 'F' ); // Save to file else
>$pdf->Output(); // Send to browser directly
>
>
> Alejandro MS
> -Mensagem original-
> De: Jim Giner [mailto:jim.gi...@albanyhandball.com]
> Enviada em: quinta-feira, 5 de janeiro de 2012 16:55
> Para: Alejandro Michelin Salomon
> Assunto: Re: [PHP] Printing
>
> I have several pdf printer drivers.  HOw do I use them in a hosted php
> script?
> - Original Message -
> From: "Alejandro Michelin Salomon" 
> To: "'Jim Giner'" 
> Cc: "Pgsql-General" 
> Sent: Thursday, January 05, 2012 1:50 PM
> Subject: RES: [PHP] Printing
>
>
>> Jim :
>>
>> TCPDF software library has excellent examples to teach you how to do
>> the work
>>
>> http://www.tcpdf.org/
>>
>> My legal documents mix images, barcode, etc. All the problems printing
>> go to space!!!!
>>
>> Alejandro MS
>>
>>
>> -Mensagem original-
>> De: Jim Giner [mailto:jim.gi...@albanyhandball.com]
>> Enviada em: quinta-feira, 5 de janeiro de 2012 16:46
>> Para: Alejandro Michelin Salomon
>> Assunto: Re: [PHP] Printing
>>
>> a pdf would solve the problem.
>> - Original Message -
>> From: "Alejandro Michelin Salomon" 
>> To: "'Jim Giner'" 
>> Cc: "Pgsql-General" 
>> Sent: Thursday, January 05, 2012 1:43 PM
>> Subject: RES: [PHP] Printing
>>
>>
>>> Jim:
>>>
>>> I think the problems is that trying to print directly from PHP is not
>>> a good idea.
>>>
>>> Example:
>>> My system is in a host that is located in other city, so the printer
>>> is near my, but the PHP code is running in other place almost 1800kms
>>> between the printer and the PHP system.
>>>
>>> My customer use the system a prints from html page generated. When a
>>> need specific printing, I create a PDF file on the fly with TCPDF
>>> software library.
>>> I use this lib to create a printable version of a legal document as
>>> PDF on the fly, open directly in the Firefox o IE
>>>
>>> Is your server running near the printer?
>>>
>>> Is so specific that create a PDF file does not resolve the problem?
>>>
>>> Alejandro MS
>>>
>>> -Mensagem original-
>>> De: Jim Giner [mailto:jim.gi...@albanyhandball.com]
>>> Enviada em: quinta-feira, 5 de janeiro de 2012 13:55
>>> Para: php-general@lists.php.net
>>> Assunto: Re: [PHP] Printing
>>>
>>>>
>>>
>>> I can't tell you much on this, because I don't use windows. You have
>>> to get the source at http://pecl.php.net/printer and compile it. I
>>> don't know the procedure, etc.
>>>
>>> --
>>> Nilesh Govindarajan
>>> http://nileshgr.com
>>>
>>> That was a short trip.  Clicked on the link for documentation and it
>>> takes me right back to the php manual pages that I'd already read.
>>> Clicked on the link to download the latest and it's a dead link.
>>>
>>> Does anyone print from their php websites??
>>>
>>>
>>>
>>> --
>>> PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
>>> http://www.php.net/unsub.php
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>>
>
>
>
>
> 




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

2 ) Trocar o directory index do apache

DirectoryIndex index.html index.php adicionar index.php como um arquivo
padrão para ele procurar


Inglish:

Mateus:
To configure php on apache:
1) Add this lines in httpd.conf

Change this "D:\PHP\" to yours instalation data.
#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 PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

2 ) Change the directory index on apache

DirectoryIndex index.html index.php ==> add index.php to be a default
file to search


Alejandro M.S.
PAO/RS
Brasil

-Mensagem original-
De: Mateus Almeida [mailto:supor...@avanutri.com.br] 
Enviada em: segunda-feira, 19 de setembro de 2011 18:32
Para: php-general@lists.php.net
Assunto: [PHP] Installing PHP

Hello, I'm newbie and I'm trying to install PHP with Apache, but it doesn't
work. 

Every time I try to run a test I receive the message "Not Found The
requested URL /php/php-cgi.exe/test.php was not found on this server." OR
(when I try to change some options) "Forbidden You don't have permission to
access /php/php-cgi.exe/test.php on this server."

I've tried to copy the recommended configurations from some sites, but it
haven't worked. 

The machine runs Windows XP, I'm using an administrator account, no firewall
is blocking me, PHP and Apache are the most recent versions.

Thanks in advance.



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] REQUEST and COOKIE

2011-09-06 Thread ALEJANDRO ZAPIOLA
Seeing the $_REQUEST[] and it is a matrix that has the content of $_GET,
$_POST and $_COOKIE, I think this can be used maliciously into the script.
i.e.:
request1.php
location.href='request2.php'";
?>

In this case, I'm setting the variable 'name' with value 'Alejandro', then
redirects to request2.php
request2.php
?php
print_r($_COOKIE);
echo "";
print_r($_REQUEST);
echo "";
if(@$_REQUEST['name'] == "admin"){
echo "I am admin";
}else{
echo "You can not see this page";
}
?>

Here's the problem. The variable called 'name' is into REQUEST context, and
this is accessible by GET and POST methods, and it is accessible by the
COOKIE matrix as well. In this case, use Request is unsafe because I can
change the variable called 'name' via GET method and it's give me access as
admin.

Mi question is: I do not see the good practice of using COOKIE values into
of REQUEST, what I mean is that it can become in a programming bug. Also I
could not fin answers anywhere else.

thoughts?
Thanks!


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 you install?

I have the apache 2.2.17

This " php5apache2.dll " is for the version 2.0.x
And this " php5apache2_2.dll " for the version 2.2.x

Maybe the dll files is in the brong version.

Alejandro M.S.

-Mensagem original-
De: Jim Giner [mailto:jim.gi...@albanyhandball.com] 
Enviada em: segunda-feira, 4 de julho de 2011 09:40
Para: php-general@lists.php.net
Assunto: [PHP] Installing PHP

Hi all,
(Hopefully I posted this in a place that can/will help me)

I got curious about running php / apache on my own laptop in order to help
my devl process, instead of writing, uploading and testing on my site.

Found a nice pair of docs from "thesitewizard.com" that appeared to be
pretty well-written instructions on installing each of these systems.  btw-
I'm running XpSp2.  Chose the Apache 2.0 and PHP 5.2 (thread-safe?) per the
recommendations.

Went thru all instructions step-by-step, testing all the way.  Apache
works - PHP doesn't.  When I bring up IE and type in localhost I get the
default apache page as I was told I should see.  When I type
"localhost/test.php" I get a windows dialog asking what program should run
the php script.

In debugging I went to a cmd windows and ran "c:\php\php-cgi test.php" and
got the expected result from my script - so PHP works.

End result - they each work separately, but php is not working under apache.

As part of the docs instructions I added the following code to the apache
conf file:

1 - I chose the "configure apache to run php as an apache module.
2 - added "LoadModule php5_module "c:/php/php5apache2.dll" as last one of
those lines
3 - added "AddType application/x-httpd-php .php" as the last of those lines
4 - added "PHPIniDir "c:/php" as the last line of the conf file.

Upon adding these lines apache will no longer restart.  In fact adding any
ONE of these lines breaks Apache.

Ideas welcome.

And for those who still love the USofA, Happy Independence Day!





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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.

Alejandro M.S.

-Mensagem original-
De: Joshua Kehn [mailto:josh.k...@gmail.com] 
Enviada em: terça-feira, 10 de maio de 2011 12:19
Para: Andre Polykanine
Cc: php-general@lists.php.net
Assunto: Re: [PHP] Short tag: why is it bad practice?

On May 10, 2011, at 11:11 AM, Andre Polykanine wrote:

> Hi everyone,
> Many  times  I heard that the following two peaces of code are written
> in a bad manner:
> 1.
>  echo "Hello, world!";
> ?>
> 
> 2.
> 
> Your   e-mail:value="">
> ...
> 
> 
> As for now, I use both quite often. Why is this considered not kosher,
> I mean, good coding practice?
> Thanks!
> 
> -- 
> With best regards from Ukraine,
> Andre
> Skype: Francophile
> Twitter: http://twitter.com/m_elensule
> Facebook: http://facebook.com/menelion


Because short tags aren't always enabled and can cause things to break when
deploying code to different environments. Best practice dictates that your
code should be as environmentally independent as possible.

It's another few characters, why neglect it?

Regards,

-Josh

Joshua Kehn | josh.k...@gmail.com
http://joshuakehn.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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, deves fijarte en los .tpl para saber qual
Content-Type estan utilizando.

Otra cosa importante es saber si la información viene de una base de datos,
y si esta utiliza LATIN1 como conjunto
de caracteres o UTF-8. Para hacer las conversiones que fueren precisas

Alejandro M.S.

English version:
Lorena :

I work with portugues and use this in my code :
 http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
http://www.w3.org/1999/xhtml"; xml:lang="pt-br" lang="pt-br">





...

I never have problems with special characters like é or ú.
I use some .tpl, you have to look at .tpl to know what Content-Type the file
are using.

Other important thing if to know if the information is coming from the
database, and if is using LATIN1 CHARACTER SET
or UTF-8. To do the conversions that are needed.

Alejandro M.S.


-Mensagem original-
De: Lorena Monroy O. [mailto:lorenamon...@yahoo.com] 
Enviada em: quinta-feira, 17 de março de 2011 12:55
Para: php-general@lists.php.net
Assunto: [PHP] Acentos en tpl

Hola a todos
Tengo un formulario que tiene dos paneles (.tpl), el cual maneja variables
que vienen de php con la funcion setVariable, pero en el panel del menu me
carga las tildes correctamente y a la derecha me las carga como un rombo con
interrogación. Manejo Firefox y probe cambiando la configuración de
caracteres de UTF-8 a Occidental, pero a la izquierda se ve mal y a la
derecha se ve bien.
Si modifico en el codigo por ó ahi se ve bien, pero en otros combos
no... como puedo hacer que en ese tpl se vea bien sin modificarlo desde el
codigo.
Gracias

 Lorenita   Ing. Electrónica U. Bosque Ing. de Sistemas U. Bosque
Especialista en Telecomunicaciones Móviles U.Distrital


  


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Probem with go-pear.bat

2011-03-13 Thread Alejandro Crosa
Hi...I try install pear by executing the go-pear.bat file, but I get a follow  
message:
 
The go.pear.phar.dll is not a image valid of  windows.
 
Please, any help is important for me.
 
Thanks.
 
Alejandro


  

[PHP] Help for pear

2011-03-13 Thread Alejandro Crosa
HiI try execute the go-pear.bat file to open the pear set up, but I get the 
error messaje
 
The go-pear.phar.dll is not a valid image of windows.
 
Any help is very important form me.
 
Thanks 


  

[PHP] Problems with pear install

2011-03-13 Thread Alejandro Crosa
Hi
    I can`t open the pear set up executing the go-pear.bat file.
 
Alejandro


  

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
'PNG', '', 'T', false, 300 );

With this tcpdf i create a legal documents for Brazilian government.

Alejandro MS
-Mensagem original-
De: Tom Barrett [mailto:t...@miramedia.co.uk] 
Enviada em: sexta-feira, 11 de fevereiro de 2011 06:55
Para: php-general@lists.php.net
Assunto: [PHP] Bar Charts in PDFs

Hi

I need to generate some PDF reports (1000s). Part of the report is a set of
bar charts (the results of a questionnaire). Each question has the same 5
answers (v.bad, bad, ok ,good, v.good) and the chart is the % distribution
of the answers.

My plan is to create a HTML version, using "some graph drawing"* (saving a
copy of the HTML to disk), creating a PDF version using html2pdf (saving a
copy to disk and emailing to the recipient).

I think html2pdf can handle this. But I have not had much success finding
something to draw my graphs. Any (free) simple libraries out there I could
be pointed towards?

Thanks!
Tom


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 [mailto:li...@euca.us] 
Enviada em: quinta-feira, 20 de janeiro de 2011 01:14
Para: php-general@lists.php.net
Assunto: [PHP] email address syntax checker

Hi Guys,

I'm waddling my way through database interaction and thought someone on 
the list may already have a simple email checker that they'd like to 
share...

you know, looking for the @ char and dots etc..

I did a quick search of the archives and found a couple elaborate 
things.. but
I'm looking for something simple. This job will have trusted users and
the checker is more to help them catch mistakes when registering.

Thanks!,
Donovan


-- 
D Brooke

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 Linux is case sensitive, because all my files ( php, 
JavaScript, html, images, etc ) are lowercase as default.

For my each directory has is own name, and i never use especial characters in 
file names. And chmod i use only in the production server that is a Ubuntu 
Linux,

for some folders that need write access.

 

I run my code on windows in development time, and Linux in production time, 
code runs in both OS, because the rules that i use are good for windows and 
Linux too.

 

Alejandro M.S.

 

De: a...@ashleysheridan.co.uk [mailto:a...@ashleysheridan.co.uk] 
Enviada em: sexta-feira, 19 de novembro de 2010 12:33
Para: Alejandro Michelin Salomon; 'Daevid Vincent'
Cc: php-general@lists.php.net
Assunto: Re: RES: [PHP] I am a Windows programmer and getting started on PHP

 

The reason you might run it on a vm is because not all operating systems are 
created equal. Things that work in Linux won't necessarily work on windows, and 
vice versa. If you're developing on the same type of platform as the live 
server, there is less chance of a problem rearing its head.

For example, the file system is one major area of windows/linux problems. 
Windows isn't case sensitive, while Linux is. In windows, you can have a file 
and a directory with the same name, but not so on Linux. Windows heavily 
restricts the characters you can use in a filename, Linux is much more relaxed.

There is also the problem of all the various modules. Chmod has no real 
function on windows, but is very important on Linux.

It's worth bearing in mind all these issues as you develop.

Thanks,
Ash
http://www.ashleysheridan.co.uk

----- Reply message -
From: "Alejandro Michelin Salomon" 
Date: Fri, Nov 19, 2010 16:13
Subject: RES: [PHP] I am a Windows programmer and getting started on PHP
To: "'Daevid Vincent'" 
Cc: 


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. (
enable a extension is just cut off ";" in front of the line, in the php.ini,
and restart apache ).

Simples, fast, get up and running apache and php on windows.

If you need mysql, download the mysql server. Run the installer. The
installer configure the database server.

When i start with php ( 4.0x ), apache is configured manually.
Now is automatic.

All the php developers that i know are windows users. OS is not a problem to
use php.
What install a VM to run linux? If i could run php on windows directly?

Alejandro M.S.

-Mensagem original-
De: Daevid Vincent [mailto:dae...@daevid.com] 
Enviada em: quinta-feira, 18 de novembro de 2010 19:55
Para: 'Keerat Singh'; php-general@lists.php.net
Assunto: RE: [PHP] I am a Windows programmer and getting started on PHP

> -Original Message-
> Subject: [PHP] I am a Windows programmer and getting started 
> on PHP. What is the easiest way of getting started? Most of 
> the stuff I encounter seems to be very Linux specific.
> 
> I am a Windows programmer and getting started on PHP. What is 
> the easiest way of 
> getting started? Most of the stuff I encounter seems to be 
> very Linux specific.

Personally, I would avoid XAMP and those hacks to run apache and PHP on
your XP (or vista or win7 or whatever). I'd say the vast majority of PHP
developers are LAMP developers so get used to Linux at least enough to move
around the file-system and know where to put files (/var/www/ or
~/public_html etc). With that in mind, I would look for either a pre-built
VM. VirtualBox is free and VERY easy/robust. Also VMWare is outstanding and
they have a free "player" and eight bajillion pre-made VM appliance setups:

http://www.virtualbox.org/
http://www.munkyonline.com/articles/lamp-ubuntu-server-on-virtualbox.html

http://www.vmware.com/products/player/
http://www.vmware.com/appliances/directory/cat/0?k=lamp

I also strongly suggest you setup your VM to use samba shares so it's easy
to edit/save/view your files without some tedious FTP or SCP step.

-Daevid.

P.S. I'd also limit your email subject lines to a simple sentence or less.
Not a paragraph!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





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. (
enable a extension is just cut off ";" in front of the line, in the php.ini,
and restart apache ).

Simples, fast, get up and running apache and php on windows.

If you need mysql, download the mysql server. Run the installer. The
installer configure the database server.

When i start with php ( 4.0x ), apache is configured manually.
Now is automatic.

All the php developers that i know are windows users. OS is not a problem to
use php.
What install a VM to run linux? If i could run php on windows directly?

Alejandro M.S.

-Mensagem original-
De: Daevid Vincent [mailto:dae...@daevid.com] 
Enviada em: quinta-feira, 18 de novembro de 2010 19:55
Para: 'Keerat Singh'; php-general@lists.php.net
Assunto: RE: [PHP] I am a Windows programmer and getting started on PHP

> -Original Message-
> Subject: [PHP] I am a Windows programmer and getting started 
> on PHP. What is the easiest way of getting started? Most of 
> the stuff I encounter seems to be very Linux specific.
> 
> I am a Windows programmer and getting started on PHP. What is 
> the easiest way of 
> getting started? Most of the stuff I encounter seems to be 
> very Linux specific.

Personally, I would avoid XAMP and those hacks to run apache and PHP on
your XP (or vista or win7 or whatever). I'd say the vast majority of PHP
developers are LAMP developers so get used to Linux at least enough to move
around the file-system and know where to put files (/var/www/ or
~/public_html etc). With that in mind, I would look for either a pre-built
VM. VirtualBox is free and VERY easy/robust. Also VMWare is outstanding and
they have a free "player" and eight bajillion pre-made VM appliance setups:

http://www.virtualbox.org/
http://www.munkyonline.com/articles/lamp-ubuntu-server-on-virtualbox.html

http://www.vmware.com/products/player/
http://www.vmware.com/appliances/directory/cat/0?k=lamp

I also strongly suggest you setup your VM to use samba shares so it's easy
to edit/save/view your files without some tedious FTP or SCP step.

-Daevid.

P.S. I'd also limit your email subject lines to a simple sentence or less.
Not a paragraph!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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: 'php-general@lists.php.net'
Assunto: RES: [PHP] Class mysqli not found

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());
 exit();
} else {
 printf("Host information: %s\n", mysqli_get_host_info($mysqli));
}


Try adodb lib for php ( http://adodb.sourceforge.net/ ), is great layer on top 
of php db functions.

Alejandro M.S.

-Mensagem original-
De: sueandant [mailto:hollandsath...@tiscali.co.uk] 
Enviada em: quarta-feira, 6 de outubro de 2010 17:27
Para: sstap...@mnsi.net
Cc: PHP
Assunto: Re: [PHP] Class mysqli not found

Thanks Steve.   Here's the php file:



When I run this small program I get a Fatal Error: Class mysqli not found 
error message.


- Original Message - 
From: "Steve Staples" 
To: "sueandant" 
Cc: "PHP" 
Sent: Wednesday, October 06, 2010 9:09 PM
Subject: Re: [PHP] Class mysqli not found


> On Wed, 2010-10-06 at 21:00 +0100, sueandant wrote:
>> I'm still fighting a losing battle in my attempts to get PHP speak to 
>> mysqli.   I can access MySql via the prompt. Apache and PHP are installed 
>> and working.   In Apache's config file PHPIniDir is set to "C:\php", 
>> which is where I unzipped the binary download files, and set LoadModule 
>> php5_module C:\php\php5apache2_2.dll.   In php.ini I have uncommented the 
>> mysql.dll and mysqli.dll extensions and set extension_dir = 
>> "C:\php\ext\".   I have edited the environment variables to include 
>> C:\php  and C:php\ext.
>>
>> I am running Vista Home Premium 32 bit with SP2, Apache 2.2, PHP 5.3.3 
>> and MySql Server 5.1.
>>
>> What have I missed?
>
> How are you connecting to the mysql?  What does your connection string
> look like from your php file?  Can you cut and paste it here for us to
> trouble shoot (if it is the apache->php->mysql connection problem)
>
>
> Steve
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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());
 exit();
} else {
 printf("Host information: %s\n", mysqli_get_host_info($mysqli));
}


Try adodb lib for php ( http://adodb.sourceforge.net/ ), is great layer on top 
of php db functions.

Alejandro M.S.

-Mensagem original-
De: sueandant [mailto:hollandsath...@tiscali.co.uk] 
Enviada em: quarta-feira, 6 de outubro de 2010 17:27
Para: sstap...@mnsi.net
Cc: PHP
Assunto: Re: [PHP] Class mysqli not found

Thanks Steve.   Here's the php file:



When I run this small program I get a Fatal Error: Class mysqli not found 
error message.


- Original Message - 
From: "Steve Staples" 
To: "sueandant" 
Cc: "PHP" 
Sent: Wednesday, October 06, 2010 9:09 PM
Subject: Re: [PHP] Class mysqli not found


> On Wed, 2010-10-06 at 21:00 +0100, sueandant wrote:
>> I'm still fighting a losing battle in my attempts to get PHP speak to 
>> mysqli.   I can access MySql via the prompt. Apache and PHP are installed 
>> and working.   In Apache's config file PHPIniDir is set to "C:\php", 
>> which is where I unzipped the binary download files, and set LoadModule 
>> php5_module C:\php\php5apache2_2.dll.   In php.ini I have uncommented the 
>> mysql.dll and mysqli.dll extensions and set extension_dir = 
>> "C:\php\ext\".   I have edited the environment variables to include 
>> C:\php  and C:php\ext.
>>
>> I am running Vista Home Premium 32 bit with SP2, Apache 2.2, PHP 5.3.3 
>> and MySql Server 5.1.
>>
>> What have I missed?
>
> How are you connecting to the mysql?  What does your connection string
> look like from your php file?  Can you cut and paste it here for us to
> trouble shoot (if it is the apache->php->mysql connection problem)
>
>
> Steve
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 em: terça-feira, 5 de outubro de 2010 09:01
Para: 'sueandant'
Cc: php-general@lists.php.net
Assunto: RES: [PHP] Connecting to MySql with PHP

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 M.S.
-Mensagem original-
De: sueandant [mailto:hollandsath...@tiscali.co.uk] 
Enviada em: segunda-feira, 4 de outubro de 2010 18:08
Para: php-general@lists.php.net
Assunto: [PHP] Connecting to MySql with PHP

I am running PHP 5.3.3, with Apache 2.0 Handler and MySql Server 5.1.   My
OS is Vista Home Premium 32 bit with SP2.

MySql works fine from the command prompt, Apache is running and PHP works.
But I cannot access the mysqli classes.   This simple program:



produces this error message:

Warning: mysqli::mysqli() [mysqli.mysqli]: [2002] A connection attempt
failed because the connected party did not (trying to connect via
tcp://localhost:3306) in C:\Apache\htdocs\mysqlconnect.php on line 3

Warning: mysqli::mysqli() [mysqli.mysqli]: (HY000/2002): A connection
attempt failed because the connected party did not properly respond after a
period of time, or established connection failed because connected host has
failed to respond. in C:\Apache\htdocs\mysqlconnect.php on line 3

Fatal error: Maximum execution time of 30 seconds exceeded in
C:\Apache\htdocs\mysqlconnect.php on line 3

I guess PHP cannot find the mysqli classes.   I've checked the phpinfo()
output and discovered :

  Configuration File (php.ini) Path  C:\Windows  
  Loaded Configuration File  C:\PHP\php.ini  


I don't know if this ok.   I've tried changing the location of the loaded
file to C:\Windows\php.ini, but to no avail, and I don't know how to change
the location of the config file.

I am obviously doing something wrong, but I don't know what.   Can anyone
help?

Ironically, everything worked perfectly before I upgraded to PHP 5.3.3!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 M.S.
-Mensagem original-
De: sueandant [mailto:hollandsath...@tiscali.co.uk] 
Enviada em: segunda-feira, 4 de outubro de 2010 18:08
Para: php-general@lists.php.net
Assunto: [PHP] Connecting to MySql with PHP

I am running PHP 5.3.3, with Apache 2.0 Handler and MySql Server 5.1.   My
OS is Vista Home Premium 32 bit with SP2.

MySql works fine from the command prompt, Apache is running and PHP works.
But I cannot access the mysqli classes.   This simple program:



produces this error message:

Warning: mysqli::mysqli() [mysqli.mysqli]: [2002] A connection attempt
failed because the connected party did not (trying to connect via
tcp://localhost:3306) in C:\Apache\htdocs\mysqlconnect.php on line 3

Warning: mysqli::mysqli() [mysqli.mysqli]: (HY000/2002): A connection
attempt failed because the connected party did not properly respond after a
period of time, or established connection failed because connected host has
failed to respond. in C:\Apache\htdocs\mysqlconnect.php on line 3

Fatal error: Maximum execution time of 30 seconds exceeded in
C:\Apache\htdocs\mysqlconnect.php on line 3

I guess PHP cannot find the mysqli classes.   I've checked the phpinfo()
output and discovered :

  Configuration File (php.ini) Path  C:\Windows  
  Loaded Configuration File  C:\PHP\php.ini  


I don't know if this ok.   I've tried changing the location of the loaded
file to C:\Windows\php.ini, but to no avail, and I don't know how to change
the location of the config file.

I am obviously doing something wrong, but I don't know what.   Can anyone
help?

Ironically, everything worked perfectly before I upgraded to PHP 5.3.3!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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 DocumentRoot
#
# This should be changed to whatever you set DocumentRoot to
#


Search for DirectoryIndex, and add index.php to the list

#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#

DirectoryIndex index.html index.php


Add on the end of the file this lines :

My php installation folder is D:/PHP/, change D:/PHP/ to your installation
folder.

#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
PHPIniDir "D:/PHP/" 

# Php as Apache module
LoadModule php5_module "D:/PHP/php5apache2_2.dll" 

Restart apache.

Browse to localhost

Alejandro M.S.

-Mensagem original-
De: Col Day [mailto:colind...@aol.com] 
Enviada em: segunda-feira, 4 de outubro de 2010 06:31
Para: php-general@lists.php.net
Assunto: [PHP] New to PHP and struggling with the basics

Hi all,

Working with the PHP5 for Dummies book (yup real noob, feel free to ridicule
(after telling me what I've done wrong)) and have installed Apache 2.2 and
PHP 5.3.3 onto a laptop running Vista. (yes I know!!!).

I've had Apache running fine with my basic web site created using Serif's
Webplus10 but wanted to experiment with PHP as I want an uploadable area on
my website for my friends and family to submit video/photos.

I've checked the install of PHP using php -v and I get the output that

PHP 5.3.3 (cli) (built: Jul 21 2010 20:10:20)

but when I try and go to the test.php file (below) I get an http 403 webiste
requires you to log in. Error message.



PHP Test


This is an HTML line
This is a PHP line";
 phpinfo();
?>



This is the text of the test.php file which I have plonked down in
/apache/htdocs

What have I missed?

the Dummies book is quoting PHP 5.0.0 as the latest release so not too far
away really.

Thanks for your help.

Cheers.

Col Day



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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
Assunto: [PHP] converting a mysql date value

Hello,
I've got dates stored in a mysql database. The field is of type date
so the value is something like: "2010-09-29" I'm wanting to display
them as in U.S. dates as in month, day, year. I had a function that
did this, now it is not working and I am perplexed as to why. Here's
my echo statement:



The $row['date'] is coming out of the mysql database. Here's the
sqlDateFormat function:

function sqlDateFormat($value) {
$date = $value;
$date = strtotime($date);
$date = date('m-d-y', $date);
return $date;
}

I'd appreciate any suggestions as to why this isn't working.
Thanks.
Dave.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



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

return strtr( $sText, $trans );
}

When read xml CompEntities
function CompEntities( $sText )
{
$trans = array('&'  => '&',
   ''' => "'",
   '"' => '"',
   '<'   => '<',
   '>'   => '>' );

return strtr( $sText, $trans );
}

Alejandro M.S.
-Mensagem original-
De: robert mena [mailto:robert.m...@gmail.com] 
Enviada em: segunda-feira, 20 de setembro de 2010 17:08
Para: php-general@lists.php.net
Assunto: [PHP] Invalid chars in XML

Hi,

I am trying to parse a XML file with simplexml_load but it gave me error.
 While inspecting the contents I found a & inside the value of a tag.
something & something.

After I've removed the & everything went fine.  So which chars I should not
put in my file?   Should I use some conversion function like html_entities?

Does the receiver of the XML has to do anything to convert is back?


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[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_use_internal_errors(true);
$xDocXml = 'test-file.xml'; // xml

$xmldoc = new DOMDocument();
$bErro = $xmldoc->load( $xDocXml ); // loads xml

if ( $bErro )
{
$return = $xmldoc->schemaValidate( 'nfe_v2.00.xsd' );

if ( !$return )
{
$aErros = libxml_get_errors();

$sErro = '';
foreach ( $aErros as $oErro )
{
switch ( $oErro->level )
{
case LIBXML_ERR_WARNING:
$sErrosErro .= ' Atenção ' . $oErro->code . ": \n";
break;
case LIBXML_ERR_ERROR:
$sErro .= ' Erro ' . $oErro->code . ": \n";
break;
case LIBXML_ERR_FATAL:
$sErro .= ' Erro Fatal ' . $oErro->code . ": \n";
break;
}

$sErro .= '' . "\n";
$sErro .= $oErro->message;
$sErro .= ' Line: ' . $oErro->line . "\n";
$sErro .= ' Column: ' . $oErro->column . "\n";
$sErro .= ' Level: ' . $oErro->level . "\n";
}
echo '';
echo $sErro;
echo '';
} else
echo 'VALID';
}

Result a this moment:

Erro 1839: 

Element '{http://www.portalfiscal.inf.br/nfe}IE': [facet 'pattern'] The
value '' is not accepted by the pattern 'ISENTO|[0-9]{0,14}'.
 Line: 59
 Column: 0
 Level: 2
 Erro 1824: 

Element '{http://www.portalfiscal.inf.br/nfe}IE': '' is not a valid value of
the atomic type '{http://www.portalfiscal.inf.br/nfe}TIeDest'.
 Line: 59
 Column: 0
 Level: 2

This is the rule that fails :



Tipo Inscrição Estadual do
Destinatário








In the xml file the line 59 has : 

The pattern for this tag is : 

When i change this  to  work ok, buts each document that has
ISENTO fails validation.

I attached a small rar file with the test case.

How to change the pattern to meets the requirements: or value ISENTO ou
number [0-9]{0,14} or empty ?

Thanks in advance

Alejandro M.S.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] linux console on the PHP

2009-04-13 Thread Alejandro Esteban Galvez
Hi people. If you known any method for grant access to one user to the console 
of linux, using the php, can you tell me that please? I going to try explain 
me! I need one interface PHP, and the interface must show me one linux console 
and take me the control of this console.

Excuse me, for my english, I speak little english.

Bye



---
Alejandro Esteban Galvez
Administrador de Red IPICHMC Rimed,
Radio-Aficionado CL2AEG
Linux User #472120 - http://i18n.counter.li.org/
Correo: alejan...@infomed.sld.cu
Correo y Jabber: alejan...@ipichmc.rimed.cu
www.ipichmc.rimed.cu
---





---
Red Telematica de Salud - Cuba

  CNICM - Infomed




[PHP] Sobre Login PHP

2009-04-11 Thread Alejandro Esteban Galvez

Saludos colegas, los otros dias, estuve escribiendo acerca de esto, y bueno ya 
tengo una parte ahora necesito que cuando se cierre el navegador, se cierre la 
sesion de login tambien.  Saludos


---
Alejandro Esteban Galvez
Administrador de Red IPICHMC Rimed,
Radio-Aficionado CL2AEG
Linux User #472120 - http://i18n.counter.li.org/
Correo: alejan...@infomed.sld.cu
Correo y Jabber: alejan...@ipichmc.rimed.cu
www.ipichmc.rimed.cu
---





---
Red Telematica de Salud - Cuba

  CNICM - Infomed




[PHP] PHP and Send Mail

2009-04-08 Thread Alejandro Esteban Galvez
Hi!, I am making a web system and i need known how send a mail using PHP 

Bye



---
Alejandro Esteban Galvez
Administrador de Red IPICHMC Rimed,
Radio-Aficionado CL2AEG
Linux User #472120 - http://i18n.counter.li.org/
Correo: alejan...@infomed.sld.cu
Correo y Jabber: alejan...@ipichmc.rimed.cu
www.ipichmc.rimed.cu
---





---
Red Telematica de Salud - Cuba

  CNICM - Infomed




[PHP] About Login on PHP

2009-04-08 Thread Alejandro Esteban Galvez
Hi!, I am making a system in php for linux. This system take a control of my 
LDAP server, and login for the LDAP server too. How I can do that the login 
expires past two minutes, when the user part of the system, and when the user 
close your Internet Explorer???

Bye


---
Alejandro Esteban Galvez
Administrador de Red IPICHMC Rimed,
Radio-Aficionado CL2AEG
Linux User #472120 - http://i18n.counter.li.org/
Correo: alejan...@infomed.sld.cu
Correo y Jabber: alejan...@ipichmc.rimed.cu
www.ipichmc.rimed.cu
---





---
Red Telematica de Salud - Cuba

  CNICM - Infomed




[PHP] PHP code to analize email HELP

2005-01-09 Thread Alejandro Marín Uribe
Hi all

I really need help. I have an idea about to create a piece of code that it 
analyze an email, extract certain data (this email contains Name, email and 
telephone of a person in a standar html) and insert this data in MySQL 
database. It this posible?

I'm a newbie in PHP/MySQL, any ideas?

Thanks,

excuse my english 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Help with ereg()

2003-03-11 Thread Alejandro
Hi all. I'm trying to deal with Regular Expressions, but somehow it is
getting more difficult. I´m trying to do the folowing:

Read a text and get all of the PHP code out of it, highlight it and then
print all in nice HTML. I'm using this to get the PHP code:

ereg("<\?.*\?>",$Text,$PHP_code);

It works, yeah, but on a situation like this:


This is some other no php code




Thanks anyway

[PHP] A small problem

2003-03-11 Thread Alejandro
Hi all in the PHP list. I'm trying to deal with Regular Expressions, but somehow it is 
getting more difficult. I´m trying to do the folowing:

Read a text and get all of the PHP code out of it, highlight it and then print all in 
nice HTML. I'm using this to get the PHP code:

ereg("<\?.*\?>",$Text,$PHP_code);

It works, yeah, but on a situation like this:


This is some other no php code


It returns everything. What i really need is to get the contents between , 
and only that. I can imagine the RegExp is diung it right, because ideed there are , but it is not clever enough to take the PHP 
UP TO THE FIRST COINDICENCE OF ?>, and so on, and so on...

Can anyone help me? I would appreciate it very much.

Thanks anyway


[PHP] Re: PHP and DB2 on AS400

2003-03-07 Thread Alejandro Trujillo J.
I never do that, but, you can do it with the ODBC that is supported in 
Windows PHP version, that is my idea for you.



--
Alejandro Trujillo J.
Cube Systems LTDA.
web : csltda.com
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: problem in writing into an html text file

2003-02-27 Thread Alejandro Trujillo J.
what software are you using ???

--
Alejandro Trujillo J.
Cube Systems LTDA.
web : csltda.com
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] apache don´t understand php!!----¡¡apache no entiende php!!

2001-11-15 Thread Alejandro

I have a problem:I have a php page wich runs well when I run it, but when I
run a html page and links the php file, the source code is seen on the
screen. It´s like apache wouldn't understand php!!. Any ideas? Thanks


Hola!.tengo un problema y es que tengo una página .php que, cuando la llamo
por separado, funciona de maravilla, pero cuando la enlazo desde un .htm,
aparece el código a pelo, es decir, no reconoce el php. ¿¿Podeis
ayudarme??.¡¡Es muy urgente!!. Gracias y un saludo



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] RE: help with dbase!!!

2001-10-27 Thread Alejandro Viana

It has only 1 table . Thanks



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] help with dbase!!!

2001-10-27 Thread Alejandro Viana

I'm trying to read a record from a dbase data base so I've previously
opened it successfully. The problem is that I call the function
dbase_get_record, but it returns no records. The database is ok because I
call the funcion dbase_numfields and dbase_numrecords and they give me
correct information. Would you help me, please?. Here is the source code
that fails.

[EMAIL PROTECTED]


Estoy intentando leer un registro de una base de datos dbase, por lo que
antes la he abierto con éxito. el problema residen en que llamo a la función
dbase_get_record, pero no me devuelve ningún registro. La base de datos está
bien, porque llamo a la función dbase_numfields y dbase_numrecords y me dan
información correcta. ¿Me podríais ayudar, por favor?. Ahí va el código
fuente:

[EMAIL PROTECTED]



Source code- Código fuente:

Error al abrir la base de datos");
}else{
   printf ("Base de datos abierta");
   $num_registros=dbase_numrecords($descriptor);
   $num_campos=dbase_numfields($descriptor);
   for ($i=1;$i<=$num_registros;$i++){
  $registro= dbase_get_record ($descriptor, $i);
  for ($j=0;$j<$num_campos;$j++){
 printf ("Fila %d,Campo %d vale %S", $i, $j, $registro[$j]);
  }
   }
   dbase_close($descriptor);
   printf ("Base de datos cerrada");
}
?>











[PHP] help with data base!!!

2001-10-26 Thread Alejandro Viana

I'm trying to read a record from a dbase data base so I've previously
opened it successfully. The problem is that I call the function
dbase_get_record, but it returns no records. The database is ok because I
call the funcion dbase_numfields and dbase_numrecords and they give me
correct information. Would you help me, please?. Here is the source code
that fails.

[EMAIL PROTECTED]


Estoy intentando leer un registro de una base de datos dbase, por lo que
antes la he abierto con éxito. el problema residen en que llamo a la función
dbase_get_record, pero no me devuelve ningún registro. La base de datos está
bien, porque llamo a la función dbase_numfields y dbase_numrecords y me dan
información correcta. ¿Me podríais ayudar, por favor?. Ahí va el código
fuente:

[EMAIL PROTECTED]



Source code- Código fuente:

Error al abrir la base de datos");
}else{
   printf ("Base de datos abierta");
   $num_registros=dbase_numrecords($descriptor);
   $num_campos=dbase_numfields($descriptor);
   for ($i=1;$i<=$num_registros;$i++){
  $registro= dbase_get_record ($descriptor, $i);
  for ($j=0;$j<$num_campos;$j++){
 printf ("Fila %d,Campo %d vale %S", $i, $j, $registro[$j]);
  }
   }
   dbase_close($descriptor);
   printf ("Base de datos cerrada");
}
?>











[PHP] Help! ¡Ayuda!

2001-10-26 Thread Alejandro Viana

I'm trying to read a record from a dbase data base so I've previously
opened it successfully. The problem is that I call the function
dbase_get_record, but it returns no records. The database is ok because I
call the funcion dbase_numfields and dbase_numrecords and they give me
correct information. Would you help me, please?. Here is the source code
that fails.

[EMAIL PROTECTED]


Estoy intentando leer un registro de una base de datos dbase, por lo que
antes la he abierto con éxito. el problema residen en que llamo a la función
dbase_get_record, pero no me devuelve ningún registro. La base de datos está
bien, porque llamo a la función dbase_numfields y dbase_numrecords y me dan
información correcta. ¿Me podríais ayudar, por favor?. Ahí va el código
fuente:

[EMAIL PROTECTED]



Source code- Código fuente:

Error al abrir la base de datos");
}else{
   printf ("Base de datos abierta");
   $num_registros=dbase_numrecords($descriptor);
   $num_campos=dbase_numfields($descriptor);
   for ($i=1;$i<=$num_registros;$i++){
  $registro= dbase_get_record ($descriptor, $i);
  for ($j=0;$j<$num_campos;$j++){
 printf ("Fila %d,Campo %d vale %S", $i, $j, $registro[$j]);
  }
   }
   dbase_close($descriptor);
   printf ("Base de datos cerrada");
}
?>





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] urlencode

2001-09-07 Thread Alejandro Molina

Hi,
I need to know wich is the best way to send variables through an URL,that if
the variables are of the string type, and what if the variable has spaces
like $string='this is a test'.
I have read about the use of urlencode(), but I have a strange behaviour
using this function, sometimes it work and sometimes not.
for an example I send the variable $user='user 1', and in the url there
appears user=user+1 (which I think is correct) but when I read the variable
in the php page it displays user+1 (doesn´t it has to return to user '1'?).

Thanks

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.268 / Virus Database: 140 - Release Date: 8/7/01


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Hello! PHP

2001-03-16 Thread Celestino Roberto Alejandro

Hello, i'm working with PHP, and i need use a classes that this company have developed 
in java, can i use it from php?
...yes, i know that i can, but, when i make the configuration of the php.ini, run the 
hello example, all rights, but, when i make a class
that use a frame of awt, for show a window, doesn't work, WHY?, the errors are, of 
Null pointer, and not found classes, but?, i need copy all classes of the basic 
structure of java, in my java.classpath?...where i can found more info?
:-)
Robert 



[PHP] Error working

2001-03-15 Thread Celestino Roberto Alejandro

Hello..i'm veri tired, and i am going to require your help.
I need to make some operations with a cuadratic curve. But with the current php 
code... 

 

... i get this error: 

Warning: java.lang.ClassNotFoundException: java.awt.geom.QuadCurve2D.Double 

Can anybody help me? ,
please if you can't, only one person can reply this email, because i write too and 
never, never, reply me, dont know or another problem?
:-)...bye,



[PHP] (rac)MCAL, doubt, again

2001-03-15 Thread Celestino Roberto Alejandro

Hi...
..where i can found documentation abour the use and the installation of MCAL library 
in Solaris plattform?

Robert Celestino.



[PHP] (rac)Php dobut with an extension

2001-03-14 Thread Celestino Roberto Alejandro

Hey !! How are you
I've tried to do run PHP with JAVA support enabled, (in a Win32 plattform in
this case), and when i uncommented the extension=php_java.dll, all is ok,
then i configure the [JAVA] section, with...

[Java]
java.home = c:\java
java.library = c:\java\jre\bin\classic\jvm.dll
java.library.path = c:\user\php\extensions\
java.class.path="c:\user\php\extensions\php_java.jar;c:\usr\php\java\classes
";

...then, when i run an example as...
///Java
class uno{
 public int numberer(){
   return 800;
 }
 public static void main(String[] args){
  System.out.println("Hello WORLD! Rober trying");
 }
}
/
and   i put the .class in c:\usr\php\java\classes (my class path...i suppose
:-))
/Php
numberer();
  print "Right Loaded and called\n";

?>
///
..then this run, and say...

/*OUTPUT*/
Robert Celestino
security properties not found. using defaults.
Loaded
...and Died...Why?...(...i wait but, some is bad, because its wait, and
wait, and wait).
..If you can help my.THANKS!



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




php-general@lists.php.net

2001-03-12 Thread Celestino Roberto Alejandro

Hello..i'm trying PHP&JAVA
..we can in my .java file import javax.swing classes, and the how i can do
that runnin it with php, don't say the Error...of
javax.swinng...etc..can't loaded...!
thanks...
Roberto Celestino


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] (doubt)PHP console run

2001-03-12 Thread Celestino Roberto Alejandro

Hello..friend...
..i have a doubt? how i can do for run php in console mode, or better say,
that run script in my shell not in a browser...
..and, you give me a hand an i get the arm, how i can get the argument of
the line of command?exist ARGV or ARGC?

Roberto Celestino
El sitio, "Tu portal en Internet"

- Original Message -
From: "Nick Davies" <[EMAIL PROTECTED]>
To: "Harshdeep S Jawanda" <[EMAIL PROTECTED]>
Cc: "Peter Sabaini" <[EMAIL PROTECTED]>; "PHP General"
<[EMAIL PROTECTED]>
Sent: Monday, March 12, 2001 10:35 AM
Subject: Re: [PHP] Mailing List


> On Mon, 12 Mar 2001, Harshdeep S Jawanda wrote:
>
> > Hi,
> >
> > Harshdeep S Jawanda wrote:
> >
> > > I suppose you must already have tried sending mail to
> > > [EMAIL PROTECTED] by now.
> >
> > I tried this address and it worked for me.
> >
>
> Obviously ;)
>
> > --
> > Regards,
> > Harshdeep Singh Jawanda.
> >
> >
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] (doubt)MCAL installation

2001-03-12 Thread Celestino Roberto Alejandro

How i can get further information about the installation of MCAL extension
in a Solaris 2.7 environment?

  Roberto Celestino
Universidad Nacional de la Matanza



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] GTK-PHP install doubt?

2001-03-08 Thread Celestino Roberto Alejandro

Friends,
 i get the source of the GTK-PHP module, or library, as you want to say,
but, when i going to do, the steps that describe in their
ebpage( http://gtk.php.net/), i do

phpize
./configure
make (This failed)
make install (obviously failed)

When i do the make, this say that the function  php_if_gdk_window_new_dc in
php_gtk_types.c have too many arguments to function
zend_hash_get_current_key_ex (316line)
and all-recursive Error.
Why could be this?
Thanks.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] [PHP-ES] (roberto celestino)MCAL! set-up.

2001-03-08 Thread Celestino Roberto Alejandro

Dear's partners...
 I download the source of the Mcal library and Drivers, and i have found a
doubt, because when i compile it, ever,  show an error  that can't give me
compile, then, i cant have correctly installed this library...
..I make the SF (structure of files), that this describe in its README, in
this say
...make..
../libmcal/
../libmcal/icap/
../libmcal/dummy/
..Are icap an dummy drivers for MCAL (Modular Calendar Acces Library), and
when i compile (also describe in README)
i give the option
./configure --with-icap
./ make (failed)
./ make install (also failed, obvious)
the error that i found is like the next:
/*OUTPUT*/
gcc -O0 -Wall -g  -I.  -c  mcal.c
In file included from mcal.c:37:
drivers.c:1: parse error before `-'
drivers.c:1: stray '\' in program
drivers.c:1: stray '\' in program
mcal.c: In function `cal_getdriver':
mcal.c:68: `driver_registry' undeclared (first use in this function)
mcal.c:68: (Each undeclared identifier is reported only once
mcal.c:68: for each function it appears in.)
*** Error code 1
make: Fatal error: Command failed for target `mcal.o'
/*\OUTPUT*/
..and i have another doubt?, why if i want compile the driver alone (Ex:
icap), this also give some errors...?
Thanks, and Sorry..!
I'm running in a Solaris 2.7, thanks!

Celestino, Roberto Alejandro
Argentina, Universidad Nacional de la Matanza


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] (roberto)Standar of modules of PHP3 ...how i can make a extension in C/c++ for this version?

2001-02-14 Thread Celestino Roberto Alejandro

Hello..
..how i can make a extension for this version of PHP3?
..Thanks
:-)



[PHP] (robert)HELLO...all doubts about XML/APACHE/PERL/PHP/MOD

2001-02-13 Thread Celestino Roberto Alejandro

Hello...'m new in this list,and for this...Hello Hello to all people.
...and begin, with my first doubt...
..We (I, a friend, for the our job, need make application with xml, =
better say, migrate a current system of news, to the structured of XML, =
and procceses it with XLS, for generate directly the out, ..but, what is =
the problem? (: matter)!!..we are developing with PHP3!, and reading the =
specification only after vsion>4 support XLS, with Sablatron, and Expat =
as parser of xml...but, i think? Why i can do this? if, the chief dont =
like Perl...(: i suggest he, that we can make an script that take the =
file xml, etc..and generate the out, with an interface with php =
script...but say no!...and after, try make with php...then i think in =
can i install PHP4 and PHP3 and run together?...HOW?
...Somebody know how work Xalan(: xml.apache.org...?)...
...How i can make a module for PHP3?(:_not PHP4!)
Thanks...and=20
..GOOD LUCK.
Roberto Celestino.



Re: [PHP] Help with IMAP_open please

2001-01-16 Thread Alejandro Garin


--- Dezider Góra <[EMAIL PROTECTED]> wrote:
> I always get this error when trying to connect to
> the mailbox. I have
> installed uw imap server.
> 
> Warning: Couldn't open stream {localhost:143} in
> /home/httpd/html/webmail/mailbox.php on line 12
> 
> Affected line is:
> 
> $connection = IMAP_Open("{localhost:143}", $name,
> $psw);

Try with :

$connection = IMAP_Open("{localhost:143}INBOX", $name,
$psw);

regards

=
==
Ing. Alejandro Garín
Telecom Internet

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Zend Optimizer

2001-01-15 Thread Alejandro Garin

--- Marcus Ouimet <[EMAIL PROTECTED]> wrote:
> I have download the Zend Optimizer (Running Apache
> 1.3.14 and PHP 4.04) and untarred it. Then I copied
> the ZendOptimizer.so to usr/local/Zend/lib Then I
> edited the PHP.ini and added:
> 
> zend_optimizer.optimization_level=15 
>
zend_extension="/usr/local/Zend/lib/ZendOptimizer.so"
> 
> 
> Somewhere near the top. Then I restarted the server
> using apachectl restart. I also tried stopping and
> starting as well. It still isn't running? Any ideas.
> Is there anything else that needs to be done?
> 

with phpinfo() you see:

This program makes use of the Zend scripting language
engine:
Zend Engine v1.0.3, Copyright (c) 1998-2000 Zend
Technologies
with Zend Optimizer v0.99, Copyright (c)
1998-2000, by Zend Technologies


regards


=
==
Ing. Alejandro Garín
Telecom Internet

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] simple division.. but how?

2001-01-15 Thread Alejandro Garin


--- [EMAIL PROTECTED] wrote:
> if you want to do
> 10 / 3 
> i want it to show 3 and not 3.3
> 
> how do I control that?
> 

$a= 10/3;

echo (int)$a;
echo $a;


Result
3
3.3


regards


=
====
Ing. Alejandro Garín
Telecom Internet

__
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] How does PHP handle %20 (blank spaces)

2001-01-15 Thread Alejandro Garín

> There is no problem if the search string is say, "ABC". However, it will
> give a problem
> if the string is "Mr ABC". I display this string at every page so that
> users know
> what they searched for. 
> For example:
> You search for: $searchstring
> 

Try urlencode/urldecode. 

regards



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]