php-windows Digest 22 Nov 2002 13:27:49 -0000 Issue 1452

Topics (messages 17073 through 17082):

Re: documentation questions
        17073 by: Mikey
        17074 by: Darren Reynolds
        17075 by: Mikey
        17082 by: Cam Dunstan

Re: Extensions
        17076 by: Mic Cartmel

mysql command problem
        17077 by: Gareth Thomas

case sensitive
        17078 by: milisphp
        17080 by: Scott Carr

Re: Question from a total newb
        17079 by: boots

sockets problem
        17081 by: Gareth Thomas

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 ---
> working on a little project for myself here that had some general
> questions
> about since am just getting started on the planning phase.  the first
> function that i'm going to be working on will eventuall take user input in
> the form of a directory path on the machine.  [snip]

Which machine?  If you meran the client machine then you are looking at the
wrong technology - PHP is server side only.

> what i'm hoping that someone could help me with was a pointer to some
> documentation that might help me learn what i need to get this
> done.  also,
> if anyone can think of an easier way to accomplish what i've outlined i'm
> definitely open to suggestions ... :)

At the risk of sounding trite, have you tried the manual?

regards,

Mikey


--- End Message ---
--- Begin Message ---
----- Original Message -----
From: "Mikey" <[EMAIL PROTECTED]>
Sent: Thursday, November 21, 2002 1:39 PM
Subject: RE: [PHP-WIN] documentation questions


> Which machine?  If you meran the client machine then you are looking at
the
> wrong technology - PHP is server side only.

everything will be running on my desktop, available to the internal LAN
only, therefore the server-side nature of things won't be a problem.

> At the risk of sounding trite, have you tried the manual?

problem with that is i've got no idea where to start looking in the manual.
i've managed to find specific functions that will accomplish a few key
things. apart from that tho, i'm flying completely blind.  not looking for a
handout or anything, its more a case of wanting to know if someone else has
had something similar come up and found a particular section of the
documentation / function to be useful ... :D

--- End Message ---
--- Begin Message ---
> everything will be running on my desktop, available to the internal LAN
> only, therefore the server-side nature of things won't be a problem.

IMHO you are using a sledgehammer to crack a nut.  If you are running
everything on your desktop, why not just write a quick Perl script that will
do what you want?  You could even use VB (runs off quickly to wash his
hands) to do this sort of thing for you, much more simply and with a more
windows-like interface.  (Although Perl would be best for the pattern
matching you mentioned, if a little unwieldy to start.)  By using PHP you
are introducing a whole new set of problems and complexities that you will
need to master.

> > At the risk of sounding trite, have you tried the manual?
>
> problem with that is i've got no idea where to start looking in
> the manual.
> i've managed to find specific functions that will accomplish a few key
> things. apart from that tho, i'm flying completely blind.  not
> looking for a
> handout or anything, its more a case of wanting to know if
> someone else has
> had something similar come up and found a particular section of the
> documentation / function to be useful ... :D

Is this your first attempt at programming?  I don't mean to be rude, but
questions like "scan until you find this particular pattern of characters,
then take everything before that and move it into *this* variable" appear to
show that you do not understand how to make a for loop and put an if
condition in it.  If this is that case, then I recommend doing a search for
a tutorial and going through that before you even begin your project -
practice on something smaller that you will be able to complete.

http://www.devshed.com/Server_Side/PHP should have a few articles to get you
started.

If however, you do know how to program, then I really don't see why you
can't find the relevant sections in the manual...

regards,

Mikey
"If you give someone a program, you will frustrate them for a day. If you
teach them how to program, you will frustrate them for a lifetime."


--- End Message ---
--- Begin Message ---
Darren,
As others have said, PHP is not really the right tool for client side work
even if the client machine is also the server.  Having said that, the
general style of task you are trying to achieve is frequently tackled by the
use of Recursive functions - functions that call themselves from "within"
themselves. This technique is not by any means limited to PHP, most
languages can do it.   In pseudocode it might look a bit like this



function brain_explode ($directoryname)

do{
get a filename and size and type (from path $directoryname)

if (the file type is of type directory) {
brain_explode;     // call "myself" again before I have finished THIS
iteration
} else {
echo the filename and size
}

} until there are no more files to list

end_of_function.


"until there are no more files to list" might in your instance be "until the
sought after pattern is found"



I dubbed this function brain_explode, plagiarised from Dash`s earlier mail,
because recursive functions, if let loose on really deep tree like
structures of any type (directories, websites, relational databases, linked
lists - whatever) can consume large amounts of memory.  Every time they
recurse (call themselves) a totally new environment and set of variables is
created for another instance of the function to run in while the parent
function (and IT`S parents/grandparents) are still running (of course).  So
a tree structure 5 levels deep will potentially trigger 5 instances of the
function running at the same time.  If large arrays are involved (such as
SQL result sets) your brain could explode.


Hope this helps




----- Original Message -----
From: "Darren Reynolds" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 22, 2002 5:35 AM
Subject: [PHP-WIN] documentation questions


> working on a little project for myself here that had some general
questions
> about since am just getting started on the planning phase.  the first
> function that i'm going to be working on will eventuall take user input in
> the form of a directory path on the machine.  what i need it to do then is
> recursively scan each directory under the user specified directory and
> generate an array containing that information (something along the lines
> <drive>:\\<path_to_files>\<filenames>).  the discs the program will be
> scanning all have the exact same naming structure, so once the array for
the
> disc has been read i wanna scan each line and tell the program something
> like "scan until you find this particular pattern of characters, then take
> everything before that and move it into *this* variable.  and so on and so
> forth line by line until the entire array has been parsed.  once i get
that
> taken care of i can then start to write the sql update statements to get
> those variables put into the tables / etc i've made.
>
> what i'm hoping that someone could help me with was a pointer to some
> documentation that might help me learn what i need to get this done.
also,
> if anyone can think of an easier way to accomplish what i've outlined i'm
> definitely open to suggestions ... :)
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--- End Message ---
--- Begin Message ---
Try this URL for mcrypt:

http://dev.deepsource.ch/index.php?Category=1&SubCategory=0

----- Original Message ----- 
From: "Gary Hayers" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, November 22, 2002 4:59 AM
Subject: [PHP-WIN] Extensions


> Any idea where I can get the extensions php_mcal.dll and php_mcrypt.dll
> from as a windows binary?
> 
> TIA
> 
> Regards,
> 
> Gary
> 
> 
> 
> -- 
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
--- End Message ---
--- Begin Message ---
Hi,

I have a Mysql command that when run in PHP does not work and yet when executed 
directly in MySQL works fine. The query is:

$query = "UPDATE zone SET current_socket = '' WHERE current_socket LIKE 'R%'";
$result = mysql_query($query);

Anyone have any idea why this wont work in PHP?

Thanks in advance for any help.

Gareth

--- End Message ---
--- Begin Message ---
Hi there,
 
I'm currently developing web sites in both Windows and Linux. The
problem is that I always got an error when I'm trying to run websites
that were developt on Windows in the Linux machine, the thing is about
case sensitivity. Can anyone tell me how to make PHP case sensitive when
I'm developing under Windows? That's also include the file name.
 
Thanks,
Hansen
--- End Message ---
--- Begin Message ---
Steppin out on a limb here, but I believe PHP just uses the underlying File
System calls.  If they are case-sensitive then PHP will.  If not, then no.

-- 
Scott Carr
Documentation Maintainer
http://documentation.openoffice.org
OpenOffice.org


Quoting milisphp <[EMAIL PROTECTED]>:

> Hi there,
> 
> I'm currently developing web sites in both Windows and Linux. The
> problem is that I always got an error when I'm trying to run websites
> that were developt on Windows in the Linux machine, the thing is about
> case sensitivity. Can anyone tell me how to make PHP case sensitive when
> I'm developing under Windows? That's also include the file name.
> 
> Thanks,
> Hansen
> 


-------------------------------------------------
This mail sent through IMP: http://horde.org/imp/
--- End Message ---
--- Begin Message ---
"Joe Finlinson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I am using a machine running Windows XP pro... I managed to install IIS
just
> fine.  However, it seems that I am having major traumas getting PHP,
Apache,

If you have IIS installed, then you have to make sure it is either not
running, or that IIS and Apache are listening on different ports. Both
webservers assume that they should listen on port 80 which is the default
for http web servers.

In IIS, you can change the port using the appropriate Service and
Application panel in the Computer Management tool. I suggest changing the
port to something like 81. Remember to restart the server so that IIS uses
the new port.

For Apache, modify the line that reads "port 80" in the main configuration
portion of the apache/conf/httpd.conf file. Remember to restart the Apache
server so that it uses the new port. You can do so in the Services control
panel or by typing:
  net stop apache
  net start apache
from a command line.

My Free Advice:

(1) If you want to run Apache, then uninstall IIS. It is not necessary to do
so, as long as they are on differing ports, but as each requires
administration (especially security!) it requires twice the work on your
part.

(2) Turn IIS off while you are using Apache. You can do so in the
appropriate services panel.

(3) If my two suggestions are not an option, then change IIS's port to
something else, perhaps 81. This would make Apache the default webserver on
your machine. (ie. requests to http://yourmachine/ would be served by Apache
while requests to  http://yourmachine:81/ would be served by IIS.

Hope it helps.


--- End Message ---
--- Begin Message ---
Hi,

I realise that sockets is still 'experimental' but any help will be much appreciated. 
I am developing a queue system to send commands across from a server to a client using 
sockets. Problem is that the I keep getting a 'connection reset by peer' error after 
the first command is sent. The server script itself is in a loop which I believe 
should maintain the socket connection. I am using socket_write() to send the data 
across the socket, and I am wondering if I should be using socket_send()? Does anyone 
have any ideas or experience of doing this?

My PHP version is 4.2.3. My server software is running on Windows and client software 
on Linux although eventually both will be on Linux.

Thanks.

Gareth

--- End Message ---

Reply via email to