php-windows Digest 19 Aug 2002 20:39:27 -0000 Issue 1297

Topics (messages 15340 through 15351):

Virtual Domain Security
        15340 by: apache

Page error
        15341 by: Manuel

Re: Getting Field Names in Microsoft SQL
        15342 by: Svensson, B.A.T. (HKG)
        15343 by: Svensson, B.A.T. (HKG)

Re: MUDAR DE OPERADOR E MANTER O SEU NUMERO DE TELEMOVEL
        15344 by: José Moreira
        15345 by: Svensson, B.A.T. (HKG)

upload video
        15346 by: Jamie Ingram
        15347 by: Svensson, B.A.T. (HKG)

Re: max_execute_time does not work on infinitely loop
        15348 by: Brian 'Bex' Huff

My Scripts are not seeing querystring vars.
        15349 by: Richard Vincent

Clear Cache or Ctrl-F5 equivalent
        15350 by: Syl

Windows and sockets and GTK oh my!
        15351 by: Steve

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
I would like to run virtual domains, but how do I secure them so those 
admins will not be able to access the rest of the files on my system...?

If anyone has had experince with this it would be greatly appreciated...

--- End Message ---
--- Begin Message ---
Hi.
I have installed PHP4, MySQL (3.23.49) and  Apache (2.0.36) over Windows XP.
I made a query and the result were greater than 145 rows.
A sentence "while" in a page must show all results but the web browser tell
me that can't take the page.

I try to limit de results to 40 or 50 and then the page is senb ok to the
web browser.

What is happend?
I verify MySQL execute the SQL sentence OK and quickly.
I verify PHP has the resultset OK.
Only when "while" is executing somthing happend. What?




--- End Message ---
--- Begin Message ---
> include 'db.php';
> $db = DB::connect($dsn);
> $strSQL = "SELECT * FROM {Table}";
> $row = $db->getRow($strSQL, DB_FETCHMODE_ASSOC);
>
> $field_names = array_keys($row);
>
> Iterate $field_names for the field names from the table.  This should work for
> any database that PHP can use.

Just a word of caution:

May be true as long as the column (filed) is not an aggregate (for ex SUM(), MAX(), 
isnull(), etc, etc) and do not miss the AS
keyword.
--- End Message ---
--- Begin Message ---
REMARK:

ID for a table should be nested out from sysobjects. Simply selecting from
syscolums are not recommended. One should make an inner join with sysobjects,
syscolumns and systypes, and an additional left join with sysindexkeys
and sysindexes if one wants to extract, yes you got it, the indexes too.

You, might also like to be careful about the owner ship (uid), and the object
type (type, xtype). Secondly: MS do not recommend one to use/depend on the
system tables.

SELECT o.Name AS 'Table', c.Name As 'Column', t.Name AS 'Type', i.Name AS 'Index'
FROM sysobjects o
INNER JOIN  syscolumns c on o.id = c.id
INNER JOIN systypes t on c.xtype = t.xtype
LEFT JOIN sysindexkeys ik on c.colid = ik.colid and ik.id = c.id
LEFT JOIN sysindexes i on i.indid = ik.indid and i.id = c.id

But as David remarked, it might be better to try to make it
platform independent (e.g. one less thing to change if/when
you need to move the system...).

> -----Original Message-----
> From: David Hollister [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, August 18, 2002 4:57 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Re: Getting Field Names in Microsoft SQL
> 
> 
> The "select * from [tablename]" approach for MS SQL may be problematic if
> you have very large tables even if you only return one row.  You don't have
> an accessible index for "select *".  It also gives you no information about
> table data types.  That's why I suggested using a "select [name] from
> syscolumns where id = [your_table_id]".  If you are using MS SQL, you've
> already made a platform choice (or had it jammed down your throat), and I
> don't believe that one select statement determines portability.  It all
> depends on your requirements.  
> 
> Dave
> 
> -----Original Message-----
> From: Brad Thomas [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, August 16, 2002 9:35 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Re: Getting Field Names in Microsoft SQL
> 
> "R.S. Herhuth" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> >
> > I'm trying to build a dynamic script that basically extracts all of the
> > fields in a MS SQL database...I just can't seem to figure out how to get
> > at the field names themselves.  I am using the mssql_fetch_array
> > followed by the $row['field_name'] in an array.  But I would like to
> > make the field_name dynamic (i.e. not knowing the field_names ahead of
> > time) which would make the script adaptable to any table in the
> > database.  So if I get the field's value by $row['field_name'] how do I
> > get at the field's name?
> >
> > thanks,
> > Ron
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
--- End Message ---
--- Begin Message ---
MUDAR DE OPERADOR E MANTER O SEU NUMERO DE TELEMOVEL
-----Mensagem original-----
De: Ivan Santos [mailto:[EMAIL PROTECTED]]
Enviada: segunda-feira, 19 de Agosto de 2002 12:15
Para: '[EMAIL PROTECTED]'
Assunto: MUDAR DE OPERADOR E MANTER O SEU NUMERO DE TELEMOVEL


Está descontente com o seu operador móvel (Optimus, TMN ou Vodafone)?

Sabia que PODE MUDAR DE OPERADOR E MANTER O SEU NÚMERO DE TELEMÓVEL?

APENAS TEM DE MUDAR DE OPERADOR E DIZER QUE QUER FICAR COM O SEU NÚMERO!

Desde o dia 1 de Janeiro de 2002 que foi implementada em Portugal a
PORTABILIDADE DE NÚMERO ENTRE OPERADORES MÓVEIS, isto é, os números de
telefone são pertença dos clientes e SÃO INDEPENDENTES DOS OPERADORES.

OS PREFIXOS JÁ NÃO CORRESPONDEM AOS OPERADORES:
- o 93 não quer dizer Optimus
- o 96 não quer dizer TMN
- o 91 não quer dizer Telecel/Vodafone

Já reparou como os operadores deixaram de falar e fazer referência aos
prefixos? Os operadores não falam deste assunto porque têm medo de perder
clientes.

Durante o processo de consulta e deliberação levado a cabo pela ANACOM
(ex-ICP) os 3 operadores móveis (Optimus, TMN ou Vodafone) opuseram-se à
portabilidade do número por medo de perderem clientes.

A maior parte das pessoas continua sem saber que pode mudar de operador e
ficar com o mesmo número de telemóvel !

Para mais informações:
- site da ANACOM (Autoridade Nacional de Comunicações) -
  http://www.anacom.pt
- número verde (grátis) da ANACOM - 800.206.665

Para mais informações sobre o processo que levou à portabilidade:

http://www.anacom.pt/template13.jsp?categoryId=35254

--- End Message ---
--- Begin Message ---
> Assunto: MUDAR DE OPERADOR E MANTER O SEU NUMERO DE TELEMOVEL
>
>
> Está descontente com o seu operador móvel (Optimus, TMN ou Vodafone)?

As always when it comes to programming, php no exception, we all can fall into these 
pits.


> Sabia que PODE MUDAR DE OPERADOR E MANTER O SEU NÚMERO DE TELEMÓVEL?

No, you can't operate a string value onto a numerical value. Not even telepathic.

> APENAS TEM DE MUDAR DE OPERADOR E DIZER QUE QUER FICAR COM O SEU NÚMERO!

As far as I know there are no MUD (Multi User Dungeon) extension for php - yet.

> Desde o dia 1 de Janeiro de 2002 que foi implementada em Portugal a

Well, php is 2000, and for sure 2002 safe - including in Portugal to.

> PORTABILIDADE DE NÚMERO ENTRE OPERADORES MÓVEIS, isto é, os números de
> telefone são pertença dos clientes e SÃO INDEPENDENTES DOS OPERADORES.

Yes, it also portable between a variety of operating system like UNIX, NT, etc...

> OS PREFIXOS JÁ NÃO CORRESPONDEM AOS OPERADORES:
> - o 93 não quer dizer Optimus
> - o 96 não quer dizer TMN
> - o 91 não quer dizer Telecel/Vodafone


Yes, of course you can use any webserver you like.

> Já reparou como os operadores deixaram de falar e fazer referência aos
> prefixos? Os operadores não falam deste assunto porque têm medo de
> perder clientes.

weather you want a client or driven server script is up to your own choice

> Durante o processo de consulta e deliberação levado a cabo pela ANACOM
> (ex-ICP) os 3 operadores móveis (Optimus, TMN ou Vodafone) opuseram-se à
> portabilidade do número por medo de perderem clientes.

Yes, "maga klienter blir det - tankte inte pa det!" ("Many client it will be -
didn't consider that." : internal Swedish joke...)

> A maior parte das pessoas continua sem saber que pode mudar de operador
> e ficar com o mesmo número de telemóvel !

As I said: no MUD so far....
--- End Message ---
--- Begin Message ---
Any one come across this one:
I am trying to write the php code to upload a video file. The code works
fine for images, text etc, but video comes out twice the size and
unreadable.
Any ideas?


--
----------------------------------------------------------------------------
-----------------------------------------
Jamie Ingram


--- End Message ---
--- Begin Message ---
> Any one come across this one:
> I am trying to write the php code to upload a video file. The code works
> fine for images, text etc, but video comes out twice the size and
> unreadable.
> Any ideas?

You are uploading the file in UTF-8. The moon has a bad phase with the
solar activities for uploading today. The stars say you will be rich soon.
You will receive a present.
--- End Message ---
--- Begin Message ---

The ini setting is actually this:

max_execution_time

Not "max_execute_time." It defaults to 30 seconds... so Im not sure why 
your service hangs even after 5 minutes... are you using milliseconds 
instead of seconds?  set it to something small like '5' and do some more 
tests...

also check out the set_time_limit() function

-- 

Brian 'Bex' Huff
[EMAIL PROTECTED]
Phone: 952-903-2023
Fax: 952-829-5424


--- End Message ---
--- Begin Message ---
Hello,

I recently installed PHP on my win 2000 server and it appeared to be working
great .. but I have recently detected one problem. It's not seeing
querystring variable info and instatiating variables inside the script that
correspond to the querystring....

Any ideas .. Please help.

Richard Vincent


--- End Message ---
--- Begin Message ---
How do I refresh the cache -- i.e. send the equivalent of a Cntrl-F5 for MS
IE -- when I use fopen(http ....) so that I can get the latest update of the
page I wish to open?

 Syl


--- End Message ---
--- Begin Message ---
Hello everybody;

I've got a PHP-GTK chat application which works 100% under UNIX.
However, I've been trying to port it to Windows and I've come across
some socket strangeness.

Namely, if I open a socket with fsockopen and hten set it non-blocking, I
can read from the socket once, then write to it once, but after that the
socket appears to no longer function (it will never read again).

If I leave the socket blocking, it works fine, however the socket will
eventually block on fread() since there is no apparent way to check to see
if there is data to be read *before* running fread().


I've come to the conclusion that the only possible way to work around this
is to use the new experimental "sockets" library.  However, the PHP
executable that I have from http://gtk.php.net does not include the
"sockets" library.  I'm wondering if anyone on this list has a PHP
executable with sockets and GTK?  And if not, would anyone be interested
in building such a thing for me (possibly for money)?  I've tried to build
it on my own, but have met with nothing but fruseration :-)


If anyone can help, please let me know -- thanks so much! :-)


Steve Conley

--- End Message ---

Reply via email to