php-windows Digest 8 Apr 2001 15:02:37 -0000 Issue 533

Topics (messages 6563 through 6564):

Re: Looping through records and finding the next
        6563 by: Bob Hall

Security Win2000/PHP4/Apache 3.1.19 - help!
        6564 by: Steve Prentice

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]


----------------------------------------------------------------------


>Is there a way to use count a recordset in php.
>I realize ASP has a seperate object which is called recorset and then you
>can run thruogh all the records before it reaches the end
>
>I have successfully done this with while looping through the record. Is
>there a way to say that the next page should contain the next row in a
>recordset.
>
>if i loop through the table and currently am at position 2. Is there a way
>to set the pointer to 1 more and automatically subdiving the webpages so
>that page 1 = row 2 and the next row should be page 2. (i hope you
>understand me)
>
>lars E

Sir, in PHP, the results of a query are stored in a resource which 
your code refers to with an integer. This resource is very much like 
a recordset, e.g you can do something similar to the VB code
    Do Until rst.EOF
       ...
    Loop
by using code that refers to the resource's integer inside a while 
loop. Exactly which functions are used depends on which database you 
are calling. With ODBC, I think the resource is created with
    $int_variabel = odbc_exec($tilknytning_id, $sql_streng)
The functions intended for your database will run a lot faster than 
the ODBC functions. Check the documentation at php.net for the 
functions that work with your database.

If you post to the php-db list, you'll get help from people who know 
a lot more about using PHP with databases than I do.

Lykke til,
Bob Hall

Know thyself? Absurd direction!
Bubbles bear no introspection.     -Khushhal Khan Khatak




Hiya All,

I'm hoping someone can give me some pointers here.

We've got running Win2000 with Apache 3.1.19 (mod_ssl) and PHP4 (&
ChilliASP). And as such our system seems totally unprotected in the way that
a user could run a php script and delete anything on the system that they
fancied (on a test it was quite happy to delete text.txt from /winnt/).

I can see it's slightly possible to restrict PHP usage on IIS to home
directories, but we're totally stumped on how we can make our sort of
installation more secure considering we don't have users in UserManager
because Apahce / ftp-servrU don't work with that type of a system.

Has anyone got any good ideas because this seems to be a very important
issue, and we can't be the only people running win32 apache and php.

All help gratefully appreciated,

Steve




Reply via email to