php-windows Digest 17 Jan 2002 07:28:36 -0000 Issue 956

Topics (messages 11473 through 11482):

Re: New PHP
        11473 by: Nicole Amashta
        11474 by: Ross Fleming

parsing string/xml
        11475 by: Sandeep Murphy

Using PUT method for upload
        11476 by: Stevens, Julian C
        11477 by: Piotr Pluciennik
        11478 by: Manuel Lemos

Copying a file across the network.
        11479 by: Ryan Marrs
        11480 by: Tino Didriksen

Re: Mysql connection
        11481 by: Brad Thomas

Page not found
        11482 by: Titus Cheung

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 ---
http://www.phpbuilder.com is also a really good site with plenty of examples
and explanations.

Nicole Amashta
www.aeontrek.com

"Burrito" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I'm thinking of making the conversion from Cold Fusion.  I am NOT a
> programmer and so Cold Fusion has been very easy for me to use.  However
due
> to cost and a few other factors, I"m thinking PHP might be a good switch.
> Some the deciding factors will be its ease of use and how good these
forums
> are.  The Cold Fusion forums have proven to be a fantastic resource for
> problems and so I would need these forums to be as good or better for me
to
> justify changing languages...this leads me to my first php question.  I
have
> a database set up using MySQL on my windows 2000 server using an ODBC
driver
> for my connection.  My datasource name is "test," my database name is
> "testdatabase" and I have a table named "testtable".  My username is
> "usernametest" and my password is "passwordtest"  How would I run a simple
> query to insert a row in my testtable table that has two fields, one
called
> testfield1 the other called testfield2.  Then, how would I run another
query
> to select that row and print it on my html page?  I have scanned over the
> manual (VERY BRIEFLY) and didn't see anything related to the database
> integration.
>
> My apologies for this totally mundane question, but as I said above, this
> messages serves a two-fold purpose and the first is to see how good these
> forums are :)
>
> any help you can provide is greatly appreciated,
>
> thx in advance for your time,
>
> Burrito
>
>
>


--- End Message ---
--- Begin Message ---
Better still download the PDF version of the manual.  It's basically the
website in PDF form.  Acroread still lets you search it, but u don't
need to be online to do it.  That's my bible anyway. :)

Ross

Nicole Amashta wrote:
> 
> One of the best resources for PHP is the php.net site. I use it religiously!
> Go to http://www.php.net (which I'm sure you've already visited), and type
> in the search box "mysql" (without the quotes). Then you will be brought to
> the page that coveres all the php-mysql functions to use. They are very
> simple to use. If you need examples, you should find plenty there in the
> "comments" sections that follow the function definitions.
> 
> Nicole Amashta
> www.aeontrek.com
> 
> ==================
> "Burrito" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > I'm thinking of making the conversion from Cold Fusion.  I am NOT a
> > programmer and so Cold Fusion has been very easy for me to use.  However
> due
> > to cost and a few other factors, I"m thinking PHP might be a good switch.
> > Some the deciding factors will be its ease of use and how good these
> forums
> > are.  The Cold Fusion forums have proven to be a fantastic resource for
> > problems and so I would need these forums to be as good or better for me
> to
> > justify changing languages...this leads me to my first php question.  I
> have
> > a database set up using MySQL on my windows 2000 server using an ODBC
> driver
> > for my connection.  My datasource name is "test," my database name is
> > "testdatabase" and I have a table named "testtable".  My username is
> > "usernametest" and my password is "passwordtest"  How would I run a simple
> > query to insert a row in my testtable table that has two fields, one
> called
> > testfield1 the other called testfield2.  Then, how would I run another
> query
> > to select that row and print it on my html page?  I have scanned over the
> > manual (VERY BRIEFLY) and didn't see anything related to the database
> > integration.
> >
> > My apologies for this totally mundane question, but as I said above, this
> > messages serves a two-fold purpose and the first is to see how good these
> > forums are :)
> >
> > any help you can provide is greatly appreciated,
> >
> > thx in advance for your time,
> >
> > Burrito
> >
> >
> >
> 
> --
> PHP Windows 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]
--- End Message ---
--- Begin Message ---
Hi,

I have an xml output with tags like <sessionid>123</sessionid>
<user>sands</sands>  

I could parse the output using expat to display it the way i want or as a
string but what I need is to store the values separately in different
variables like $id for sessionid, $user for user and so on.. to be
manipulated later...

Any suggestions??

TIa,

sandeep
--- End Message ---
--- Begin Message ---
I'm using Apache 1.3.20 and PHP 4.1.1 on Windows NT 4 to run a website that 
users can upload files to. 
I am currently using an HTML form  with an <INPUT type="FILE" ...> field.
However, for auditing purposes, I need to restrict where users are allowed to 
upload FROM as well as TO.
The HTML form offers a browse button that can roam around the entire 
filesystem and I can see no way of restricting this.
I have put together a PHP script that enables me to offer a restricted browse 
function which then returns the name of the selected file to the calling 
program.
My question is can I use PHP to upload the file, without using the HTML form 
method?

The PHP manual suggest PUT as an alternative upload method, but I can't see 
how to implement it.
The manual has an example PUT request which looks like this:

PUT /path/filename.html HTTP/1.1

But where and how do I run this command, and where does it get the name of the 
file I want to upload (assuming /path/filename.html is the target location on 
the webserver).

Can anyone enlighten me please? In general I have found the PHP manual 
excellent, but I can't seem to follow this section.

Thanks,

Julian



********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
--- End Message ---
--- Begin Message ---
> I am currently using an HTML form  with an <INPUT
> type="FILE" ...> field.
> However, for auditing purposes, I need to restrict
> where users are allowed to 
> upload FROM as well as TO.
> The HTML form offers a browse button that can roam
> around the entire 
> filesystem and I can see no way of restricting this.

Browsing the filesystem with browse button is true,
but for the client side. You canīt browse server
filesystem using this method. So - why not to use it,
itīs working and is easy and currently working for
you. You should only write some code for access
control and authorization.

Greetings

Piotr

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
--- End Message ---
--- Begin Message ---
Hello,

Julian C Stevens wrote:
> 
> I'm using Apache 1.3.20 and PHP 4.1.1 on Windows NT 4 to run a website that
> users can upload files to.
> I am currently using an HTML form  with an <INPUT type="FILE" ...> field.
> However, for auditing purposes, I need to restrict where users are allowed to
> upload FROM as well as TO.
> The HTML form offers a browse button that can roam around the entire
> filesystem and I can see no way of restricting this.
> I have put together a PHP script that enables me to offer a restricted browse
> function which then returns the name of the selected file to the calling
> program.
> My question is can I use PHP to upload the file, without using the HTML form
> method?
> 
> The PHP manual suggest PUT as an alternative upload method, but I can't see
> how to implement it.
> The manual has an example PUT request which looks like this:
> 
> PUT /path/filename.html HTTP/1.1
> 
> But where and how do I run this command, and where does it get the name of the
> file I want to upload (assuming /path/filename.html is the target location on
> the webserver).

AFAIK, the PUT method is not for uploading via form, but rather some
page editors like Netscape Composer and Amaya.

To upload via form, use method POST with encoding type set to
multipart/form-data .

You may find an example here:

http://phpclasses.UpperDesign.com/browse.html/package/1

Regards,
Manuel Lemos
--- End Message ---
--- Begin Message ---
I've run across a rather difficult problem to solve.  I'm at the point that
I don't care how the solution comes, so long as it works.  I need to be able
to upload/copy a file (potentially as large as 1gig) from a user's machine
to this local network.  I've exhausted my efforts trying post uploads, and
have decided that is not the path I need to go.  Then I thought I might use
the administrative share to copy the file from the local network, but
unfortunately some of these machines are win98 and some are win2k.  The
win98 machines do not contain an administrative share, thus making that
solution impossible.  Does anyone have any suggestions?  I'd like to keep
the code as much PHP as I can, allowing me to insert some data into the SQL
server at a later time.  I wouldn't mind a JavaScript/PHP combination if
anyone has any recommendations.

Thanks,
Ryan

--- End Message ---
--- Begin Message ---
The method for moving 1gb is known as FTP.
Seriously, using PHP for that is downright silly.

--|--
Tino Didriksen
http://ProjectJJ.dk/


--- End Message ---
--- Begin Message ---
> > Warning: MySQL Connection Failed: Can't connect to MySQL server on
> > 'localhost' (10061) in c:\program files\apache
> > group\apache\htdocs\db_connect.php on line 3

<snip>

This error means the MySQL server isn't running.
Try starting the server and try again.


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

I have installed both Apache and PHP on my computer in the following
directories:
d:\program files\apache group\apache
d:\documents and settings\administrator\desktop\mydir\yo\php4

I then edited d:\program files\apache group\apache\conf\httpd.conf as per
the instructions listed on:
http://hotwired.lycos.com/webmonkey/00/44/index4a_page9.html?tw=programming

However, as soon as I tried to access the file http://localhost/phpinfo.php,
I saw a page not found error.
I tested by viewing the other files in the htdocs document root directory
such as http://localhost/index.html.ca and was able to see them okay.  So
yes my Apache server is running and I double check on the httpd.conf file's
setting but didn't find anything wrong.  Any ideas?

Thanks


--- End Message ---

Reply via email to