[PHP] installing error

2007-05-25 Thread Rafael Mora

Hello does anyone know the correct way to install PHP and APACHE (last
versions both of them) on WinXP???, Im doing it with the installers and I
cannot even run phpinfo(); script, I see apache's error log and it says that
i cant find SAM directory

Thank you in advance
Rafa


Re: [PHP] installing error

2007-05-26 Thread Rafael Mora

Thank you very much for you answers!!! =), but Im trying to work with
PostgreSQL.

So Im gonna review your suggestions in order to see which would be the best
for me

Thank you very much!

Rafa


On 5/26/07, Sathyashrayan [EMAIL PROTECTED] wrote:




On 5/26/07, Tijnema [EMAIL PROTECTED] wrote:

 On 5/26/07, Richard Davey [EMAIL PROTECTED] wrote:
  Hi Rafael,
 
  Saturday, May 26, 2007, 12:38:15 AM, you wrote:
 
   Hello does anyone know the correct way to install PHP and APACHE
 (last
   versions both of them) on WinXP???, Im doing it with the installers
 and I
   cannot even run phpinfo(); script, I see apache's error log and it
 says that
   i cant find SAM directory
 
  http://wamp.corephp.co.uk
 
  Cheers,
 
  Rich



May be this helps.

http://www.tanguay.info/wamp/installPhp5.php5



--
War doesn't determine who is right, war determines who is left.
 Chinese
proverb


Re: [PHP] Re: installing error

2007-05-26 Thread Rafael Mora

thank you jared!, Im gonna try WAMPP!!, I hope this work, and a message for
php people: nice product but make it easy! lol

thank you
Rafa


On 5/26/07, Jared Farrish [EMAIL PROTECTED] wrote:


 Thank you very much for you answers!!! =), but Im trying to work with
 PostgreSQL.

I have never installed PostgreSQL, but I have installed Apache and PHP
together. Three suggestions:

1. Forget the installers. They are worthless, since all you're doing is
adding or editing a few config file lines, plus adding a PATH variable.
2. Where and how you change those files is important, though, so you need
to
google the version of php and apache you are installing and follow those
directions. It's tricky the first time, though. Be patient.
3. Start apache during your testing through a command-line. The error
reporting is much better on the command-line.

Also, really try not to put your PHP library in your System32 folder. This
is bad practice. Edit the PATH variable to point at where it should be
looking for the library.

 So Im gonna review your suggestions in order to see which would be the
best
 for me

WAMPP makes apache and php installation stupid easy (MySQL too, but you
don't seem to need it). Maybe, you might install WAMPP, uninstall MySQL,
and
install PostgreSQL... Never done it, but with some fiddling, it should
work.

--
Jared Farrish
Intermediate Web Developer
Denton, Tx

Abraham Maslow: If the only tool you have is a hammer, you tend to see
every problem as a nail. $$



[PHP] send a file or stream

2006-08-29 Thread Rafael Mora

Hi!

i want to send a file or output stream in a .php, but first compress it, I
tryed the example to compress files but how do i do to send as answer to the
http request??

Rafa


Re: [PHP] replace single and double quotes

2006-08-29 Thread Rafael Mora

Hi!

i want to send a file or output stream in a .php, but first compress it, I
tryed the example to compress files but how do i do to send as answer to the
http request??

Rafa


[PHP] Test!

2006-08-29 Thread Rafael Mora

Hello! this is a test, can anyone tell me if u are getting my emails??

Thank you


Fwd: [PHP] send a file or stream

2006-08-29 Thread Rafael Mora

-- Forwarded message --
From: Rafael Mora [EMAIL PROTECTED]
Date: Aug 29, 2006 11:09 PM
Subject: Re: [PHP] send a file or stream
To: Peter Lauri [EMAIL PROTECTED]

1. A user sends a request to your server to get a compressed file
2. You compress the file on the server
3. I want to send back the file to the user




On 8/29/06, Peter Lauri [EMAIL PROTECTED] wrote:


Do you mean the following:

1. A user sends a request to your server to get a compressed file
2. You compress the file on the server
3. You want to send back to compressed file to the server

It is number 3 you asking for?

In that case:

?php
header(Content-Type: application/octet-stream);
readfile(path_to_compressed_file);
?

/Peter


-Original Message-
From: Rafael Mora [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 30, 2006 2:34 AM
To: php-general@lists.php.net
Subject: [PHP] send a file or stream

Hi!

i want to send a file or output stream in a .php, but first compress it, I
tryed the example to compress files but how do i do to send as answer to
the
http request??

Rafa




Re: [PHP] send a file or stream

2006-08-29 Thread Rafael Mora

ok thank you Im going to test it!! =)

On 8/29/06, Peter Lauri [EMAIL PROTECTED] wrote:


  ?php
header(Content-Type: application/octet-stream);
readfile(path_to_compressed_file);
?



Should do it then… if you know the path to the file :)


 --

*From:* Rafael Mora [mailto:[EMAIL PROTECTED]
*Sent:* Wednesday, August 30, 2006 10:10 AM
*To:* Peter Lauri
*Subject:* Re: [PHP] send a file or stream



1. A user sends a request to your server to get a compressed file
2. You compress the file on the server
3. I want to send back the file to the user







On 8/29/06, *Peter Lauri* [EMAIL PROTECTED] wrote:

Do you mean the following:

1. A user sends a request to your server to get a compressed file
2. You compress the file on the server
3. You want to send back to compressed file to the server

It is number 3 you asking for?

In that case:

?php
header(Content-Type: application/octet-stream);
readfile(path_to_compressed_file);
?

/Peter


-Original Message-
From: Rafael Mora [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 30, 2006 2:34 AM
To: php-general@lists.php.net
Subject: [PHP] send a file or stream

Hi!

i want to send a file or output stream in a .php, but first compress it, I
tryed the example to compress files but how do i do to send as answer to
the
http request??

Rafa





Re: [PHP] send a file or stream

2006-08-29 Thread Rafael Mora

I test it and gave me this: xœ ÉÈ,V¢D…'Ôâ=(r)(??/§C0/¿D!1O!3·
¿¨$1¯D¡¸¤(3/] LÖ so the user should read that?? this is my code:


?php
$params = array('level' = 6, 'window' = 15, 'memory' = 9);

$texto_original = This is a test.\nThis is only a test.\nThis is not an
important string.\n;
//echo El texto original tiene  . strlen($texto_original) . 
caracteres.\n;

$da = fopen('stations.gzip', 'w');
stream_filter_append($da, 'zlib.deflate', STREAM_FILTER_WRITE, $params);
fwrite($da, $texto_original);
fclose($da);

header(Content-Type: application/octet-stream);
readfile(stations.gzip);



On 8/29/06, Peter Lauri [EMAIL PROTECTED] wrote:


?php
header(Content-Type: application/octet-stream);
readfile(path_to_compressed_file);
?



Should do it then. if you know the path to the file :)



_

From: Rafael Mora [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 30, 2006 10:10 AM
To: Peter Lauri
Subject: Re: [PHP] send a file or stream



1. A user sends a request to your server to get a compressed file
2. You compress the file on the server
3. I want to send back the file to the user







On 8/29/06, Peter Lauri [EMAIL PROTECTED] wrote:

Do you mean the following:

1. A user sends a request to your server to get a compressed file
2. You compress the file on the server
3. You want to send back to compressed file to the server

It is number 3 you asking for?

In that case:

?php
header(Content-Type: application/octet-stream);
readfile(path_to_compressed_file);
?

/Peter


-Original Message-
From: Rafael Mora [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 30, 2006 2:34 AM
To: php-general@lists.php.net
Subject: [PHP] send a file or stream

Hi!

i want to send a file or output stream in a .php, but first compress it, I
tryed the example to compress files but how do i do to send as answer to
the

http request??

Rafa







Re: [PHP] send a file or stream

2006-08-29 Thread Rafael Mora

Ok it works, but it returns me the same .php file, not the one I am creating



On 8/29/06, Peter Lauri [EMAIL PROTECTED] wrote:


You need to make sure that you are not outputting ANYTHING before you do
this. I might guess that you have a whitespace in the top of the script. As
soon as you output, the server can not send any more header information, and
the browser will think it is just text instead of treating it as an
octet-stream.



/Peter



_

From: Rafael Mora [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 30, 2006 10:25 AM
To: Peter Lauri
Cc: php-general@lists.php.net
Subject: Re: [PHP] send a file or stream



I test it and gave me this: xœ ÉÈ,V¢D…'Ôâ=(r)(??/§C0/¿D!1O!3·
¿¨$1¯D¡¸¤(3/] LÖ‑ so the user should read that?? this is my code:



?php
$params = array('level' = 6, 'window' = 15, 'memory' = 9);

$texto_original = This is a test.\nThis is only a test.\nThis is not an
important string.\n;
//echo El texto original tiene  . strlen($texto_original) . 
caracteres.\n;

$da = fopen('stations.gzip', 'w');
stream_filter_append($da, 'zlib.deflate', STREAM_FILTER_WRITE, $params);
fwrite($da, $texto_original);
fclose($da);

header(Content-Type: application/octet-stream);
readfile(stations.gzip);





On 8/29/06, Peter Lauri [EMAIL PROTECTED] wrote:

?php
header(Content-Type: application/octet-stream);
readfile(path_to_compressed_file);
?



Should do it then. if you know the path to the file :)



_

From: Rafael Mora [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 30, 2006 10:10 AM
To: Peter Lauri
Subject: Re: [PHP] send a file or stream



1. A user sends a request to your server to get a compressed file
2. You compress the file on the server
3. I want to send back the file to the user







On 8/29/06, Peter Lauri [EMAIL PROTECTED] wrote:

Do you mean the following:

1. A user sends a request to your server to get a compressed file
2. You compress the file on the server
3. You want to send back to compressed file to the server

It is number 3 you asking for?

In that case:

?php
header(Content-Type: application/octet-stream);
readfile(path_to_compressed_file);
?

/Peter


-Original Message-
From: Rafael Mora [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 30, 2006 2:34 AM
To: php-general@lists.php.net
Subject: [PHP] send a file or stream

Hi!

i want to send a file or output stream in a .php, but first compress it, I
tryed the example to compress files but how do i do to send as answer to
the

http request??

Rafa











Re: [PHP] send a file or stream

2006-08-30 Thread Rafael Mora

Hi!!

Well it works now, but with another issue, when I download it, it says that
it size is 0 bytes!!

i fwrite the file in a while, is it correct?

header()...
while()
{
 fwrite($da, $somevar1:$somevar2);
}
fclose($da);

readfile();

thanks



On 8/30/06, Peter Lauri [EMAIL PROTECTED] wrote:


Try this:

header(Pragma: public);
header(Expires: 0); // set expiration time
header(Cache-Control: must-revalidate, post-check=0, pre-check=0);
header(Content-Type: application/octet-stream);
header('Content-Disposition: attachment; filename=stations.gzip');
header(Content-Transfer-Encoding: binary);
header(Content-Length: .filesize(stations.gzip));
readfile(stations.gzip);

/Peter

PS! To maintain the list and its functionality, do not post same message
multiple times  DS!


-Original Message-
From: Rafael Mora [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 30, 2006 11:01 AM
To: Peter Lauri
Cc: php-general@lists.php.net
Subject: Re: [PHP] send a file or stream

Ok it works, but it returns me the same .php file, not the one I am
creating



On 8/29/06, Peter Lauri [EMAIL PROTECTED] wrote:

 You need to make sure that you are not outputting ANYTHING before you do
 this. I might guess that you have a whitespace in the top of the script.
As
 soon as you output, the server can not send any more header information,
and
 the browser will think it is just text instead of treating it as an
 octet-stream.



 /Peter



 _

 From: Rafael Mora [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, August 30, 2006 10:25 AM
 To: Peter Lauri
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] send a file or stream



 I test it and gave me this: xœ ÉÈ,V¢D…'Ôâ=(r)(??/§C0/¿D!1O!3·
 ¿¨$1¯D¡¸¤(3/] LÖ‑ so the user should read that?? this is my code:



 ?php
 $params = array('level' = 6, 'window' = 15, 'memory' = 9);

 $texto_original = This is a test.\nThis is only a test.\nThis is not an
 important string.\n;
 //echo El texto original tiene  . strlen($texto_original) . 
 caracteres.\n;

 $da = fopen('stations.gzip', 'w');
 stream_filter_append($da, 'zlib.deflate', STREAM_FILTER_WRITE, $params);
 fwrite($da, $texto_original);
 fclose($da);

 header(Content-Type: application/octet-stream);
 readfile(stations.gzip);





 On 8/29/06, Peter Lauri [EMAIL PROTECTED] wrote:

 ?php
 header(Content-Type: application/octet-stream);
 readfile(path_to_compressed_file);
 ?



 Should do it then. if you know the path to the file :)



 _

 From: Rafael Mora [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, August 30, 2006 10:10 AM
 To: Peter Lauri
 Subject: Re: [PHP] send a file or stream



 1. A user sends a request to your server to get a compressed file
 2. You compress the file on the server
 3. I want to send back the file to the user







 On 8/29/06, Peter Lauri [EMAIL PROTECTED] wrote:

 Do you mean the following:

 1. A user sends a request to your server to get a compressed file
 2. You compress the file on the server
 3. You want to send back to compressed file to the server

 It is number 3 you asking for?

 In that case:

 ?php
 header(Content-Type: application/octet-stream);
 readfile(path_to_compressed_file);
 ?

 /Peter


 -Original Message-
 From: Rafael Mora [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, August 30, 2006 2:34 AM
 To: php-general@lists.php.net
 Subject: [PHP] send a file or stream

 Hi!

 i want to send a file or output stream in a .php, but first compress it,
I
 tryed the example to compress files but how do i do to send as answer to
 the

 http request??

 Rafa










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




Re: [PHP] Query result column to array

2006-08-30 Thread Rafael Mora

Hi!!

What I do is just this:

$_ar = array();


  while($_field = mysql_fetch_row($_result))
  {$_aloft[$_field[0]] = $_field[1];}

  while(list($_key,$_val) = each($_ar))


On 8/30/06, Christopher Watson [EMAIL PROTECTED] wrote:


I'm looking for a native method for taking all of the values from one
column of a query result and creating an array of those values.
Procedurally, I'd tend to want to do this:

?php
$my_id_array = array();
$query_result = $_DB-query(SELECT my_id FROM my_table);
while ($row = $query_result-fetchRow())
   $my_id_array[] = $row['my_id'];
?

Heck, ColdFusion has the ValueList function which does exactly what I
want (of course, it returns a delimited list [string], not a native
array, but the one-step method is there).  Is there anything in
PHP-land that does that?  Or am I pretty much stuck using some
variation of the code above?

Christopher Watson
Principal Architect
The International Variable Star Index (VSX)
http://vsx.aavso.org

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




Re: [PHP] send a file or stream

2006-08-30 Thread Rafael Mora

I can download it, but when I see the file I downloaded has 0 bytes, and I
have readfile(stations.zip);




On 8/30/06, Peter Lauri [EMAIL PROTECTED] wrote:


But can you download it correctly? Is it just the download box that shows
0 bytes?

Or is it so that you actually is doing what you do below readfile()
without any argument? So that you are actually downloading something empty?
:)

/Peter



-Original Message-
From: Rafael Mora [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 30, 2006 8:00 PM
To: php-general@lists.php.net
Subject: Re: [PHP] send a file or stream

Hi!!

Well it works now, but with another issue, when I download it, it says
that
it size is 0 bytes!!

i fwrite the file in a while, is it correct?

header()...
while()
{
fwrite($da, $somevar1:$somevar2);
}
fclose($da);

readfile();

thanks



On 8/30/06, Peter Lauri [EMAIL PROTECTED] wrote:

 Try this:

 header(Pragma: public);
 header(Expires: 0); // set expiration time
 header(Cache-Control: must-revalidate, post-check=0, pre-check=0);
 header(Content-Type: application/octet-stream);
 header('Content-Disposition: attachment; filename=stations.gzip');
 header(Content-Transfer-Encoding: binary);
 header(Content-Length: .filesize(stations.gzip));
 readfile(stations.gzip);

 /Peter

 PS! To maintain the list and its functionality, do not post same message
 multiple times  DS!


 -Original Message-
 From: Rafael Mora [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, August 30, 2006 11:01 AM
 To: Peter Lauri
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] send a file or stream

 Ok it works, but it returns me the same .php file, not the one I am
 creating



 On 8/29/06, Peter Lauri [EMAIL PROTECTED] wrote:
 
  You need to make sure that you are not outputting ANYTHING before you
do
  this. I might guess that you have a whitespace in the top of the
script.
 As
  soon as you output, the server can not send any more header
information,
 and
  the browser will think it is just text instead of treating it as an
  octet-stream.
 
 
 
  /Peter
 
 
 
  _
 
  From: Rafael Mora [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, August 30, 2006 10:25 AM
  To: Peter Lauri
  Cc: php-general@lists.php.net
  Subject: Re: [PHP] send a file or stream
 
 
 
  I test it and gave me this: xœ ÉÈ,V¢D…'Ôâ=(r)(??/§C0/¿D!1O!3·
  ¿¨$1¯D¡¸¤(3/] LÖ‑ so the user should read that?? this is my code:
 
 
 
  ?php
  $params = array('level' = 6, 'window' = 15, 'memory' = 9);
 
  $texto_original = This is a test.\nThis is only a test.\nThis is not
an
  important string.\n;
  //echo El texto original tiene  . strlen($texto_original) . 
  caracteres.\n;
 
  $da = fopen('stations.gzip', 'w');
  stream_filter_append($da, 'zlib.deflate', STREAM_FILTER_WRITE,
$params);
  fwrite($da, $texto_original);
  fclose($da);
 
  header(Content-Type: application/octet-stream);
  readfile(stations.gzip);
 
 
 
 
 
  On 8/29/06, Peter Lauri [EMAIL PROTECTED] wrote:
 
  ?php
  header(Content-Type: application/octet-stream);
  readfile(path_to_compressed_file);
  ?
 
 
 
  Should do it then. if you know the path to the file :)
 
 
 
  _
 
  From: Rafael Mora [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, August 30, 2006 10:10 AM
  To: Peter Lauri
  Subject: Re: [PHP] send a file or stream
 
 
 
  1. A user sends a request to your server to get a compressed file
  2. You compress the file on the server
  3. I want to send back the file to the user
 
 
 
 
 
 
 
  On 8/29/06, Peter Lauri [EMAIL PROTECTED] wrote:
 
  Do you mean the following:
 
  1. A user sends a request to your server to get a compressed file
  2. You compress the file on the server
  3. You want to send back to compressed file to the server
 
  It is number 3 you asking for?
 
  In that case:
 
  ?php
  header(Content-Type: application/octet-stream);
  readfile(path_to_compressed_file);
  ?
 
  /Peter
 
 
  -Original Message-
  From: Rafael Mora [mailto:[EMAIL PROTECTED]
  Sent: Wednesday, August 30, 2006 2:34 AM
  To: php-general@lists.php.net
  Subject: [PHP] send a file or stream
 
  Hi!
 
  i want to send a file or output stream in a .php, but first compress
it,
 I
  tryed the example to compress files but how do i do to send as answer
to
  the
 
  http request??
 
  Rafa
 
 
 
 
 
 
 
 
 

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






Re: [PHP] send a file or stream

2006-08-31 Thread Rafael Mora

Thank you very much Curt!, I'm tests right now with this. The client is not
a web browser, it is an application that calls the .php file with $_GET
params, and the app waits to receive the file compressed, this is the way I
want it to work!

I'll let u know about this. But anyway thank you

Rafa

PS: what is that ob_start though?


On 8/31/06, Curt Zirzow [EMAIL PROTECTED] wrote:


On 8/29/06, Rafael Mora [EMAIL PROTECTED] wrote:
 Hi!

 i want to send a file or output stream in a .php, but first compress it,
I
 tryed the example to compress files but how do i do to send as answer to
the
 http request??

Unlike my recent posts, this could be a candidate for using ob_*

There is no need to compress it first, just use ob_start('ob_gzhandler');

if the client supports a compression method, no special things are
needed and the content sent is compressed otherwise it is sent without
compression.

see http://php.net/ob-gzhandler for more info.

HTH,
Curt.

Curt.



Re: [PHP] Error Handling Library?

2006-08-31 Thread Rafael Mora

Hi!, u can extend the exception class and handle ur own errors, If u need
help let me know!

Rafa


On 8/31/06, Jay Paulson [EMAIL PROTECTED] wrote:


I've been doing some research and was wondering if anyone out there has
written a library for error handling?  I haven't found anything as of yet
but would love to hear suggestions!

Thanks!

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




Re: [PHP] How do I call an class?

2006-09-08 Thread Rafael Mora

Hi!

I think u are confused, the variable name doesnt have anything to do with
the Class name...


So you can have something like this:

$myvar = new shuttle();
$jjj = new ISS();

u just need to be sure that u are using the exact name of the class, it
doesnt matter the variable name,

hope u get clear!

bye, from Venezuela
Rafa


On 9/8/06, Sr. Paulo Ricardo [EMAIL PROTECTED] wrote:


Good morning.





How do I call an class?





It's correct?



$Class  = new Class();



or



$class = new Class();





Att,

'É um orgulho ter você como nosso cliente'


Paulo Ricardo
Programador (Desenvolvedor)

ArgoHost.net
Hospedagem Web com Facilidade
http://www.argohost.net/ http://www.argohost.net
Suporte Telefônico: (85) 3264-9944 / (11) 4063-4844
E-mail:  mailto:[EMAIL PROTECTED] [EMAIL PROTECTED]







Re: [PHP] How to effectuate translations

2006-09-29 Thread Rafael Mora

Hi!, well u can write ur messages in differents files, and like a make a
class where u can put a method like getMessage($_type), this class could
contains the language already selected, and just load the messages for that
language in a array(or another easy to use PHP data structure).

What do you think??

I know nothing about this, but I hope this help u

Rafa


On 9/29/06, AR [EMAIL PROTECTED] wrote:


Hi,

I'm coding this software that has several files for several languages,
so that users can chose the one that suits him.

My question is what is the best way to integrate this in the PHP code,
i. e., to make it work.

Any help would be appreciated.

Warm regards,
Augusto Reis

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