Re: [PHP] Mysql / PostgreSQL with PHP

2002-01-28 Thread Ben-Nes Michael

Don't use MySQL its way to primitive.
Go for Postgresql.

I worked with both of them with PHP and they both fast, stable and supported
--
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 1:17 PM
Subject: [PHP] Mysql / PostgreSQL with PHP



 Hi everybody

 I'm not sure it is the best place for my question.

 Until now we were using PHP connecting to an oracle database. We are
 looking to change for an opensource database for the new applications.

 Do you know where I can find a recent and objective study comparing both
 with PHP to connect to it.

 Thanks and exceuse me if it is not the right forum to ask it

 Laurent Drouet



 --
 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]




Re: [PHP] mailing to 19000 users

2002-01-27 Thread Ben-Nes Michael

use mailman :)
http://www.gnu.org/software/mailman/mailman.html

every problem has a different solution
--
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--

- Original Message - 
From: Mostafa Al-Mallawani [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 28, 2002 8:23 AM
Subject: [PHP] mailing to 19000 users


 hi, does anyone know how to send mail to 19000 users using the mail()
 function, I need to create a mailing list of this number of users and
 looping on 19000 users takes up a heck of a lot of resources...any
 solutions? 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] Problems from php4.0.6 to 4.1.1 with sessions

2002-01-22 Thread Ben-Nes Michael

Hi All

In all my sessions sites when I had to move from the primary domain using
session to a secondary domain (like from www.domain.com to
secure.domain.com) I added the PHPSESID to the URL and the session in the
new site continued from the previous Domain.

in 4.1.1 when I move from the primary domain to the secondary one I still
can use the session until I click/submit without PHPSESID which then make
PHP loose the old session and start a new one.

Until now I didn't had to submit the PHPSESID every time but only once ( in
the first entrance to the secondary domain )

And Yes
register_globals = On

I dont make thing complex and so I use only:
session_start();
session_register(some_var);

a copy of the php.ini for the 4.1.1 is at:
http://www.canaan.co.il/users/miki/php-ini-4.1.1.txt

Thanks in Advance.

--
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--



-- 
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] PHP Chat REALTIME

2002-01-22 Thread Ben-Nes Michael

The server can controll the Refresh and the cache expiry through headers
sent when the page is requested by the client.

add this to expire client content every time a request for the same page is
sent.
header(Pragma: no-cache);

add this to refresh client content every 5 sec
meta http-equiv=Refresh
content=5;URL=http://www.doamin.com/page.phtml;.

--
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--

- Original Message -
From: Nuno Mariz [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, January 22, 2002 12:32 PM
Subject: [PHP] PHP Chat REALTIME


 I need to build a php-chat (online support system), but in realtime.
 I've develope a system that refresh in browser client in 5 seconds. But
 i need a system that works in realtime, what i meen is when a client or
 the server send a message, the browser refresh when a message was sent.
 All this without JAVA.

 thanx


 --
 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]




Re: [PHP] PHP Chat REALTIME

2002-01-22 Thread Ben-Nes Michael

I dont think its possible without Java programing.

If there is other solutions ill be glad to hear.
--
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--

- Original Message -
From: Nuno Mariz [EMAIL PROTECTED]
To: Ben-Nes Michael [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Tuesday, January 22, 2002 1:02 PM
Subject: Re: [PHP] PHP Chat REALTIME


That was not the problem, i need something that keep the conection
between client and server.

On Tue, 2002-01-22 at 10:51, Ben-Nes Michael wrote:
 The server can controll the Refresh and the cache expiry through headers
 sent when the page is requested by the client.

 add this to expire client content every time a request for the same page
is
 sent.
 header(Pragma: no-cache);

 add this to refresh client content every 5 sec
 meta http-equiv=Refresh
 content=5;URL=http://www.doamin.com/page.phtml;.

 --
 Canaan Surfing Ltd.
 Internet Service Providers
 Ben-Nes Michael - Manager
 Tel: 972-4-6991122
 http://sites.canaan.co.il
 --

 - Original Message -
 From: Nuno Mariz [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Tuesday, January 22, 2002 12:32 PM
 Subject: [PHP] PHP Chat REALTIME


  I need to build a php-chat (online support system), but in realtime.
  I've develope a system that refresh in browser client in 5 seconds. But
  i need a system that works in realtime, what i meen is when a client or
  the server send a message, the browser refresh when a message was sent.
  All this without JAVA.
 
  thanx
 
 
  --
  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]
 
 

--

  Nuno  Mariz
 Web Developer

WEBSOLUT - Soluções Internet
Email: [EMAIL PROTECTED]
http://websolut.net/people/nunomariz.html

As informações contidas neste email são confidenciais
para todos os efeitos e destinam-se apenas a quem foi enviado:
http://websolut.net/confidencialidade-responsabilidade.html


--
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] session.cookie_lifetime

2001-10-04 Thread Ben-Nes Michael

Hi All

I configured apache + php on debian system

The problem is that session is not destroyed when the browser closed.

the php.ini is /usr/local/lib and working ( i tried to see if its affecting
by putting engine = On to Off )

in php.ini this is set to 0 = session.cookie_lifetime = 0

/tmp is allright and apache write the session with the right permission

I tried this script, but the counter keep growing even if I close all
browser windows ( tried mozilla  ie on two computers )
?
session_register(count);
$count++;
echo $count;
?

i configured php with
./configure --with-pgsql --with-apxs=/usr/local/apache/bin/apxs --enable-sys
vshm=yes --enable-sysvsem=yes --enable-trans-sid

and also without --enable-trans-sid

any ideas ?

--
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--



-- 
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] Does PHP supports ..BMP images...

2001-09-03 Thread Ben-Nes Michael

What do you want to do to the BMP Images ?


- Original Message - 
From: Girish P [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, September 01, 2001 10:55 AM
Subject: [PHP] Does PHP supports ..BMP images...


HI ,
  PHP is not able to load bmp images... is there any setting to be
done in ini file???
 
TIA
Girish

--
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--




-- 
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] session and global

2001-08-30 Thread Ben-Nes Michael

if
global $var;
is called from within a function and $var exist outside the nested function
then the $var will be available to the function.
example

$var = hello world;

function say_hello() {
global $var;
echo $var;
}
will echo hello world

while

$var = hello world;

function say_hello() {
echo $var;
}
wont echo hello world

--
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--

- Original Message -
From: jacky [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 30, 2001 11:40 AM
Subject: [PHP] session and global


Hi folks
I just wonder as I saw someone useing session with global and some don't.
What is the reason to use session together with global?
Like this:
session_start();
global $test
session_register('test');

I look up in manual using keyword global, but could not find anything near
this.
Jack



-- 
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] GUI for PHP

2001-08-30 Thread Ben-Nes Michael

htmlkit rule :) and it for free to.

it have all what editor need + an ftp client build in which make life very
easy.
--
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--

- Original Message -
From: Nic Skitt [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, August 29, 2001 12:23 PM
Subject: Re: [PHP] GUI for PHP


 Although.

 PHAKT is an addon to Macromedia Ultradev that handles PHP in a GUI
 environment. If you do a search for PHAKT on http://askhiran.com you
 should find the relevant links.

 As with most GUI scripting tools, a good deal more code is written than is
 needed and I would have to agree with Matthew that hand coding is the way
 forward. I use PrimalScript. Its pretty nifty and you can store your own
 code snippets to speed up coding. Plus it has intellisense style help
while
 writing your code which comes in handy.

 Hope that helps

 Nic Skitt
 http://ultradevfaq.com



 Matthew A. Schneider [EMAIL PROTECTED] wrote in message
 00a001c13106$a13bcc20$[EMAIL PROTECTED]">news:00a001c13106$a13bcc20$[EMAIL PROTECTED]...
  As someone who has little programming experience I'd have to say jump
 right
  in and forget the GUI (I'm not aware of any IDE for PHP). PHP is
pretty
  easy (to learn, becoming a master is something else I suspect) and there
 is
  always outstanding support either by reading this newsgroup's archive or
  posting a question if you don't find an answer. I've been dabbling for
 close
  to a year now and have yet had a need to post any questions. I have
  invariably found the solution after a quick search.
 
  There are a number of good books as well. For the novice (I speak with
 some
  authority here) try Julie C. Meloni's PHP Essentials.
 
  If you're looking for an editor try PHPEd,
  http://www.soysal.com/PHPEd/index.php3
 
  And listen to what the experts (not me) have to say.
 
  Good luck,
 
  Matt
 
  - Original Message -
  From: Eric [EMAIL PROTECTED]
  To: Php-General (E-mail) [EMAIL PROTECTED]
  Sent: Wednesday, August 29, 2001 6:12 PM
  Subject: [PHP] GUI for PHP
 
 
   Does anyone have any suggestions for GUI PHP programming software.  I
am
  new
   the PHP and would like to make the learning experience as quick and
 simple
   as possible.
  
   Thanks for your help,
   Eric JT Harlow
   www.sisgrate.com
   Phone: 360 891 6991
   Fax: 360 891 6865
   Email: [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 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] addcslashes(), strange behavior

2001-08-29 Thread Ben-Nes Michael

Hi All

I did

echo ord (\n);
which return 10

so I tried to do this with no success
echo addcslashes (hello\nworld, \10);
returning: hello newline world

while doing:
echo addcslashes (hello\nworld, \9);
returned me what I wanted: hello\nworld which mean the string hold
hello\\nworld

Its look like a bug, ord say /n = 10 while addsclashes replace /n using /9
as ASCII value.
What is the list opinion ?

--
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--



-- 
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] Re: comparing scripts performance

2001-08-29 Thread Ben-Nes Michael

Thanks from Israel :)

 it helps, though I hope they will develope a function that returns speed,
memory or even performance detail on parts of the script.

Like:

The for() took 3ms and consumed ... memory
the while() took 2ms and consumed ... memory
...
...

 you might want to add this to each of the scripts and see:
 ?
 //very first line of the script
 echo Script started at: . date(D M j g:i:s T Y);
 //very last line of the script
 echo Script ended at: . date(D M j g:i:s T Y);
 ?

 btw, check the microtime() it have exatly what you're looking for.

 Greetings from Lebanon ;)

  Is there a way to compare between two scripts ?
 
  like how much time took every script or how much memory/resources it
used.
 
--
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--


-- 
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] Re: imagemagick and file size

2001-08-23 Thread Ben-Nes Michael

Yep, I know.
I just wrote the function as a general description.

thanks for the tip on strlen, thats what I need.


- Original Message -
From: Richard Lynch [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Thursday, August 23, 2001 2:01 AM
Subject: [PHP] Re: imagemagick and file size


  function example() {
   $convert = cat $userfile | /usr/X11R6/bin/convert - $type:-;
   return `$convert`;
  }
 
  the returned binary value is uploaded to the DB.
 
  My main problem is that I don't know how to measure the decreased image
 size
  while its stored in the variable.

 Use http://php.net/strlen on your binary value.  Use
http://php.net/filesize
 on your input file.

 Also, you either typed too fast, or you left out the global statement or
 something.  The code as posted won't work, unless backtick operates in
 global space or something really weird...

--
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--


-- 
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] upload binary using postgres

2001-08-23 Thread Ben-Nes Michael

Hi

Im using php to upload Binary data into bytea field in postgres DB.
The problem is that when I query what I uploaded I discover that it hold
only 13 characters and not the whole binary file

I tried manual insert more then 13 characters successfully.
I tried to do addslashes($data);

but still :(
$slashed_data = addslashes($data);
$sql = insert into files (image_id, bin_data, filename, filesize, filetype)
values ('$image_id', '$slashed_data', '$new_name', '$filesize',
'$filetype');;

I tried strlen($slashed_data); before the insert to be sure that that the
binary is bigger then 13 characters and yes, its 4KB ( the tested file );

Any ideas ?

--
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--



-- 
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] imagemagick and file size

2001-08-22 Thread Ben-Nes Michael

Hi

I decrease image size using imagemagick with the following command:
function example() {
 $convert = cat $userfile | /usr/X11R6/bin/convert - $type:-;
 return `$convert`;
}

the returned binary value is uploaded to the DB.

My main problem is that I don't know how to measure the decreased image size
while its stored in the variable.

--
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--



-- 
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] Re: The secrecy of PHP code

2001-08-14 Thread Ben-Nes Michael

its a problem because the code is not compiled into binary file, and then
every one who can browse the directory ( using ftp for example ) can view
your code.

To prevent this ( as root ) I chroot every user that log to ftp to another
directory so they cant go out and browse the /etc /php-directories or what
ever.

The problem still stays if you open php to system commands like `echo
/etc/passwd` or using system() 

--
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--

- Original Message -
From: Soeren Nielsen [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 14, 2001 10:56 AM
Subject: [PHP] Re: The secrecy of PHP code



 James Shaker [EMAIL PROTECTED] wrote in message
 [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 
  Greetings,
  [snip] calculations and I code them in PHP
  for use on a website are they safe from being
  viewed or taken?

 If your php-code is on a web-server which gives access to other than you
 they can read your code. An example could be other people being hosted
 on the same server..

 Regards,
 Søren




 --
 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]




Re: [PHP] qwestion about %E6%E2%E0%F7%EA%E0

2001-08-14 Thread Ben-Nes Michael

As I recall MySQL is not case sensitive

did you use --with-charset=koi8_ru ( or what ever) when you did ./configure
?

snip form INSTALL-SOURCE file of mysql-3.23.40

   * By default, *MySQL* uses the ISO-8859-1 (Latin1) character set. To
 change the default set, use the `--with-charset' option:
  shell ./configure --with-charset=CHARSET
 `CHARSET' may be one of `big5', `cp1251', `cp1257', `czech',
 `danish', `dec8', `dos', `euc_kr', `gb2312', `gbk', `german1',
 `hebrew', `hp8', `hungarian', `koi8_ru', `koi8_ukr', `latin1',
 `latin2', `sjis', `swe7', `tis620', `ujis', `usa7', or
 `win1251ukr'.  *Note Character sets::.

--
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--

- Original Message - 
From: BRACK [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 14, 2001 11:28 AM
Subject: [PHP] qwestion about %E6%E2%E0%F7%EA%E0


 Hi
 
 I'm doing the script for searching the mySQL db in Russian 
 language. but output of textform 
 http://localhost/indexr.php3?search_idea=%E6%E2%E0%F7%EA
 %E0 is not the same as 
 http://localhost/indexr.php3?search_idea=%C6%C2%C0%D7%CA
 %C0 (this is the same word but first is lower case and second is 
 upper case) so search becomes case sencitive, I don't want to 
 have case sencitive search so, how can I tell to program that both 
 of above are the same word?
 
 Thank you for help,
 
 Youri
 
 -- 
 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]




Re: [PHP] PHP: mysql_query()

2001-08-14 Thread Ben-Nes Michael

You cant do this.

Its even recommended to drop the `;' from the end of the sql command.

You can go around using array to store the sql statements and use foreach to
run mysql_query with thee sql statement.

But I don't think its right way to do thing !

If you intention was to do update one after other then you should use locks
or use Postgres :)

--
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--

- Original Message -
From: lallous [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 14, 2001 12:59 PM
Subject: [PHP] PHP: mysql_query()


 Actually the mysql_query() seems to accept only one statement at a time.

 Any work around so i can do query suchs:

 mysql_query(
 SELECT 1+1;
 SHOW DATABASES;
 USE database1;
 SELECT * FROM table1;
 );

 Just multiple commands seperated with ';' ? (as if using the Mysql command
 prompt)



 --
 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]




Re: [PHP] PHP: mysql_query()

2001-08-14 Thread Ben-Nes Michael

For that MySQL team designed the Mysql client to get input from file and
execute it.

do
system ( mysql  sql.fie);
or
`mysql  sql.fie`;

dont forget to use -D and -p if User is required.

- Original Message -
From: lallous [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, August 14, 2001 1:29 PM
Subject: Re: [PHP] PHP: mysql_query()


 No actually I have a .SQL file that is a complete dump of my database.
 All i want to do is the execute with mysql_query() the whole .SQL which
will
 create databases and tables and fillin fields!

 Ben-Nes Michael [EMAIL PROTECTED] wrote in message
 004701c124a0$e690c860$[EMAIL PROTECTED]">news:004701c124a0$e690c860$[EMAIL PROTECTED]...
  You cant do this.
 
  Its even recommended to drop the `;' from the end of the sql command.
 
  You can go around using array to store the sql statements and use
foreach
 to
  run mysql_query with thee sql statement.
 
  But I don't think its right way to do thing !
 
  If you intention was to do update one after other then you should use
 locks
  or use Postgres :)
 
  --
  Canaan Surfing Ltd.
  Internet Service Providers
  Ben-Nes Michael - Manager
  Tel: 972-4-6991122
  http://sites.canaan.co.il
  --
 
  - Original Message -
  From: lallous [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Tuesday, August 14, 2001 12:59 PM
  Subject: [PHP] PHP: mysql_query()
 
 
   Actually the mysql_query() seems to accept only one statement at a
time.
  
   Any work around so i can do query suchs:
  
   mysql_query(
   SELECT 1+1;
   SHOW DATABASES;
   USE database1;
   SELECT * FROM table1;
   );
  
   Just multiple commands seperated with ';' ? (as if using the Mysql
 command
   prompt)
  
  
  
   --
   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 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] IE Download twice from DB - MAJOR disaster to db users

2001-08-13 Thread Ben-Nes Michael

Hi - All db users read this !!

I know it download it twice because in Netscape it take half of the time and
also I see it start in the left bottom bar.

I read that IE first read the headers fully ( including the file ) and then
ask it again for opening.
While Netscape read the file only once.

Any ideas ?
If I download from db twice while using IE means that all php servers that
serve file from phtml cause the same problem, and that's  a Major Problem :(

Every one in the list that use db to store files should try to download the
files with IE and Mozilla while measuring the time its take !!!

Ill probably open a bug if no one will have idea how to disable double
reading of the file or how to guess when IE read the headers and when its
reading the file itself.

 How do you know it downloads them twice?  What are you seeing?

 Also, if you want it downloaded, Content-type should be
 application/octet-stream.  Perhaps that's causing the browser snag it and
 try to display it on top of the download...  Sounds like how MS would code
 it.

  Hi All
 
  I store files on MYSQL server but when I try to pull them out ( show
them
 on
  screen or download ) with IE it download them twice before showing them
up
  :(
 
  I played with the headers (adding, removing) with no success.
  by the way in Netscape its work fine.
 
  here is the last code tried:
 
  ?
  $query =  select * from files where issue_id='$id';
  $result = mysql_query ($query)
   or die (Invalid query);
 
   $data = @MYSQL_RESULT($result,0, file_data);
   $type = @MYSQL_RESULT($result,0, file_type);
   $file_name = @MYSQL_RESULT($result,0, file_name);
   $file_size = @MYSQL_RESULT($result,0, file_size);
 
   // # To force save file
   file://header(Content-disposition: attachment;
 filename=\$file_name\);
 
   Header(Content-type: $type);
   header(Content-Length: $file_size);
   header(Content-Disposition: inline; filename=$file_name);
 
   echo $data;
  ?
 
  --
  Canaan Surfing Ltd.
  Internet Service Providers
  Ben-Nes Michael - Manager
  Tel: 972-4-6991122
  http://sites.canaan.co.il
  --



-- 
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] IE Download twice from DB - MAJOR disaster to db users

2001-08-13 Thread Ben-Nes Michael

very amusing indeed.

Go learn php and when youll have answer send it or stfu.

you might start with your own site: www.PHPBeginner.com
and then go to http://logos.uoregon.edu/explore/socioling/politeness.html to
learn how to behave !

Its amazing how many people are rude !

- Original Message -
From: Maxim Maletsky [EMAIL PROTECTED]
To: 'Ben-Nes Michael' [EMAIL PROTECTED]; Richard Lynch
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, August 13, 2001 12:12 PM
Subject: RE: [PHP] IE Download twice from DB - MAJOR disaster to db users



 why don't you do some testing first.
 write these two lines:

 ?

 mail(
 '[EMAIL PROTECTED]',
 'visiting myself',
 Sucked off $PHP_SELF on $HTTP_USER_AGENT
 );

 sleep(2);  // just for the sake of it

 ?

 go to the page with several different browsers and catch your emails, see
 how many times it loads it.


 Cheers,
 Maxim Maletsky

 www.PHPBeginner.com




 -Original Message-
 From: Ben-Nes Michael [mailto:[EMAIL PROTECTED]]
 Sent: Monday, August 13, 2001 5:56 PM
 To: Richard Lynch; [EMAIL PROTECTED]
 Subject: [PHP] IE Download twice from DB - MAJOR disaster to db users
 Importance: High


 Hi - All db users read this !!

 I know it download it twice because in Netscape it take half of the time
and
 also I see it start in the left bottom bar.

 I read that IE first read the headers fully ( including the file ) and
then
 ask it again for opening.
 While Netscape read the file only once.

 Any ideas ?
 If I download from db twice while using IE means that all php servers that
 serve file from phtml cause the same problem, and that's  a Major Problem
:(

 Every one in the list that use db to store files should try to download
the
 files with IE and Mozilla while measuring the time its take !!!

 Ill probably open a bug if no one will have idea how to disable double
 reading of the file or how to guess when IE read the headers and when its
 reading the file itself.

  How do you know it downloads them twice?  What are you seeing?
 
  Also, if you want it downloaded, Content-type should be
  application/octet-stream.  Perhaps that's causing the browser snag it
and
  try to display it on top of the download...  Sounds like how MS would
code
  it.
 
   Hi All
  
   I store files on MYSQL server but when I try to pull them out ( show
 them
  on
   screen or download ) with IE it download them twice before showing
them
 up
   :(
  
   I played with the headers (adding, removing) with no success.
   by the way in Netscape its work fine.
  
   here is the last code tried:
  
   ?
   $query =  select * from files where issue_id='$id';
   $result = mysql_query ($query)
or die (Invalid query);
  
$data = @MYSQL_RESULT($result,0, file_data);
$type = @MYSQL_RESULT($result,0, file_type);
$file_name = @MYSQL_RESULT($result,0, file_name);
$file_size = @MYSQL_RESULT($result,0, file_size);
  
// # To force save file
file://header(Content-disposition: attachment;
  filename=\$file_name\);
  
Header(Content-type: $type);
header(Content-Length: $file_size);
header(Content-Disposition: inline; filename=$file_name);
  
echo $data;
   ?
  
   --
   Canaan Surfing Ltd.
   Internet Service Providers
   Ben-Nes Michael - Manager
   Tel: 972-4-6991122
   http://sites.canaan.co.il
   --



 --
 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 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] IE Download twice from DB - apologies

2001-08-13 Thread Ben-Nes Michael

ohh I'm sorry

after reading it more deeply I realized that I misunderstood it.

I thought you offered me to send my self email to suck of and then sleep on
it. :(

Sorry English is not my primary language.

any way I thank you for the help but it wont work as the content is not
loaded twice in IE only the headers.
I think once for checking and evaluating and second to the download itself.

?
mail(
'[EMAIL PROTECTED]',
'visiting myself',
Sucked off $PHP_SELF on $HTTP_USER_AGENT
 );

sleep(2);  // just for the sake of it
?



-- 
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] IE Download twice from DB

2001-08-09 Thread Ben-Nes Michael

Hi All

I store files on MYSQL server but when I try to pull them out ( show them on
screen or download ) with IE it download them twice before showing them up
:(

I played with the headers (adding, removing) with no success.
by the way in Netscape its work fine.

here is the last code tried:

?
$query =  select * from files where issue_id='$id';
$result = mysql_query ($query)
 or die (Invalid query);

 $data = @MYSQL_RESULT($result,0, file_data);
 $type = @MYSQL_RESULT($result,0, file_type);
 $file_name = @MYSQL_RESULT($result,0, file_name);
 $file_size = @MYSQL_RESULT($result,0, file_size);

 // # To force save file
 //header(Content-disposition: attachment; filename=\$file_name\);

 Header(Content-type: $type);
 header(Content-Length: $file_size);
 header(Content-Disposition: inline; filename=$file_name);

 echo $data;
?

--
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--



-- 
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] PHP ext

2001-08-09 Thread Ben-Nes Michael

look at the apache conf file and not in php.ini file


- Original Message - 
From: Boaz Yahav [EMAIL PROTECTED]
To: PHP General (E-mail) [EMAIL PROTECTED]
Sent: Thursday, August 09, 2001 4:00 PM
Subject: [PHP] PHP ext


Hi

Where in php.ini do you set it so that .html files will also run php?

Sincerely

  berber

--
Canaan Surfing Ltd.
Internet Service Providers
Ben-Nes Michael - Manager
Tel: 972-4-6991122
http://sites.canaan.co.il
--



-- 
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]