php-windows Digest 2 Oct 2001 05:18:17 -0000 Issue 784

Topics (messages 9633 through 9642):

Re: copying files...? Nope, uploading
        9633 by: Mike Flynn

COM again
        9634 by: Jørg V. Bryne
        9640 by: Alain Samoun

Re: Trouble with Xitami+PHP+Win
        9635 by: Lluís de Yzaguirre

Re: php vs asp
        9636 by: Martin Lindhe
        9639 by: Alain Samoun

using OLEDB?
        9637 by: Chen Wei, Lian

Looking for a PHP/MySQL Developer for short project
        9638 by: Doug Daulton

Re: Code did not work on Explorer but worked on PHP coder.
        9641 by: leo g. divinagracia iii

php.ini
        9642 by: jtjohnston

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 ---
You don't "copy" files from a user's PC through the web.  The web doesn't allow the 
"copying" of files.  What you can do, if the user's browser supports it, is support 
file UPLOADS through the form.  PHP has robust support for this and I've used it just 
fine for a whole bunch of different stuff.  Takes a little time to get the hang of it, 
but once you understand what's going on, it's a snap.

To begin, check out:
http://www.php.net/manual/en/features.file-upload.php
Then do some searches on the web for "php file upload" .. I'm sure all the big sites 
(devshed, zend, phpbuilder) have plenty of articles on PHP file uploads.

If you'd like some sample code, just ask.

-Mike

At 01:07 PM 10/1/2001 +0200, you wrote:
>I want to copy a file from a users PC (via a form) to a specific folder on the 
>webserver and store the file name in the Database.
>I have tried to use the copy($string, $path) function but I keep getting errors. 
>
>Does anyone know a simplat solution for this? Do I have to copy the contents of the 
>file to a temp file on the server first? If so how?
>Or is there another function to do what I require?
>
>thanks,
>
>Andrew




              -=- Mike Flynn - Burlington, VT -=-
[EMAIL PROTECTED]  http://www.mikeflynn.net/  * Give blood *
 ...maintaining lawns, watching televised sports, birthing
 children, listening to Top 40 music, and collecting
 stuffed animals...


--- End Message ---
--- Begin Message ---
I'm having some trouble getting around with COM objects. Is there any way
that one can list the methods/properties of an instanciated COM object?

Also. I'm having trouble getting an ASP-script to work, so maybe someone
could help me translate? I've been staring at it for so long that I don't
see anymore :-)

(And of course, good links appreciated)

-Jørg

---
<%

 '
 ' Logon to the Axapta COM interface
 '
 Set Axapta = Server.CreateObject("AxaptaConnector.Axapta")
 Axapta.Logon "usah", "pass", "level", ""

 '
 ' run Query
 '
 Set myRecord = Axapta.CreateRecord("CustTable")
 Axapta.ExecuteStmt "select * from %1 where %1.Name == '" &
Request.Form("Username") & "' && %1.WebPassword == '" &
Request.Form("Password") & "'",myRecord

 '
 ' Show result
 '
 if myRecord.Found then
  Session("AccountNum") = myRecord.Field("AccountNum")
  if Request.Form("ID")<>"" then
   Response.Redirect "/public.asp?id=" & Request.Form("PageID")
  else
   Response.Redirect "/public.asp?keyword=memberpage"
  end if
 else
  Response.redirect "/retry.asp?ERR=" & Server.URLEncode("Bad username")
 end if

 Axapta.Logoff
 Set Axapta = Nothing

%>
---


--- End Message ---
--- Begin Message ---
> I'm having some trouble getting around with COM objects. Is there any way
> that one can list the methods/properties of an instanciated COM object?
Read the doc if available.
> 
> Also. I'm having trouble getting an ASP-script to work, so maybe someone
> could help me translate? I've been staring at it for so long that I don't
> see anymore :-)

You are not the only one ;( , what you need to do to get help:
- Provide your OS and PHP version.
- Test your system with some code that show COM connections are working (See
for example: http://www.phpbuilder.com/columns/alain20001003.php3
- Provide the VB or ASP code if available, as you did.
- Provide the PHP code that you have tested.

Now, regarding the ASP code, it seems that it is invoked via a DCOM
connection, DCOM should be enabled when compiling the PHP version that you
are using. You may also want to have a look at the ADODB code from John Lim:
http://php.weblogs.com/com_php

Alain


> 
> (And of course, good links appreciated)
> 
> -Jørg
> 
> ---
> <%
> 
>  '
>  ' Logon to the Axapta COM interface
>  '
>  Set Axapta = Server.CreateObject("AxaptaConnector.Axapta")
>  Axapta.Logon "usah", "pass", "level", ""
> 
>  '
>  ' run Query
>  '
>  Set myRecord = Axapta.CreateRecord("CustTable")
>  Axapta.ExecuteStmt "select * from %1 where %1.Name == '" &
> Request.Form("Username") & "' && %1.WebPassword == '" &
> Request.Form("Password") & "'",myRecord
> 
>  '
>  ' Show result
>  '
>  if myRecord.Found then
>   Session("AccountNum") = myRecord.Field("AccountNum")
>   if Request.Form("ID")<>"" then
>    Response.Redirect "/public.asp?id=" & Request.Form("PageID")
>   else
>    Response.Redirect "/public.asp?keyword=memberpage"
>   end if
>  else
>   Response.redirect "/retry.asp?ERR=" & Server.URLEncode("Bad username")
>  end if
> 
>  Axapta.Logoff
>  Set Axapta = Nothing
> 
> %>
> ---
> 
> 
> 
> -- 
> 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 ---


Arron Edwards wrote:

> Where did you install php?
> and did you use the installer?
> and what OS?

I installed php in d:\php using the installer (it asked about the server, and
I choosed Xitami).
The installer modified the xitami CFG file adding to it the FILTER:

    .php=D:\PHP\php.exe

The system is WIN 98 SE (4.10.2222A).

PHP actually works: the message "Fatal error: Unable to open
c:\aplic\xitami\webpages\php\ in Unknown on line 0" is actually produced by
PHP.

Thanks for your interest in my problem.



--- End Message ---
--- Begin Message ---
> hi there
> 
> I've been told that php outperforms asp. is this true if yes why ?
> 
> kind regards
> 

Read here for more information :-)

http://www.zend.com/why-php.php
http://www.zend.com/aboutphp.php

PHP vs ASP etc:
http://www.zdnet.com/eweek/stories/general/0,11011,2646051,00.html
(outdated article tho, almost a year old)

/Martin
--- End Message ---
--- Begin Message ---
http://php.weblogs.com/php_asp_7_reasons

Alain

On Mon, Oct 01, 2001 at 09:33:54AM +0100, raj wrote:
> hi there
> 
> I've been told that php outperforms asp. is this true if yes why ?
> 
> kind regards
> 
> 
> 
> -- 
> 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 read an email saying that we can create connection or recordset object in
PHP using OLEDB just like what we did in ASP, but i forgot the way to do
it, anyone can enlighten me?

Thanks

Regards,
Wayne

--- End Message ---
--- Begin Message ---
Folks,

I am relatively new to PHP & MySQL.  I took on a side project some months
ago which I now realize is over my head.  The project is a real estate
catalog.  I adapted the catalog system from Welling and Thomson's "PHP &
MySQL Web Development" from SAMS.

I really need to wrap this project up.  So, I am looking for someone whose
skills are strong and has time to "connect all of the dots" in the
modifications I've made.  The Database is built and I've not strayed to far
from the original PHP, so I think this should be relatively simple for
someone with lots of dev experience in this environment.

If you are interested in working on this, please email me at
[EMAIL PROTECTED]  Please include your number of years experience in
this environment, hourly rate, current availability, links to some sample
sites and two professional references.

Regards,

Doug Daulton
Ursa Studios




--- End Message ---
--- Begin Message ---
at most... if you look at the generated HTM file, all you'll see are the
html tags and a number between the <body> and </body> tags...

Burak Delice wrote:
> 
> hi
>  I tried a php code below:
> 
> <!doctype html public "-//W3C//DTD HTML 4.0 file://EN">
> <html>
> <head>
>        <title>Title here!</title>
> </head>
> <body>
> <?
> 
> // Full sys path to count.txt
> $counter_file = "c:\count.txt";
> 
> // Puts the file lines into $counter_file_line array
> $counter_file_line = file($counter_file);
> 
> // adds one to the number in the [0] array or the very first line
> $counter_file_line[0]++;
> 
> // opends the file and then writes the new number and then closes it
> $cf = fopen($counter_file, "w");
> fputs($cf, "$counter_file_line[0]");
> fclose($cf);
> 
> // prints out the full count
> echo "$counter_file_line[0]";
> 
> ?>
> </body>
> </html>
> 
> whe I run this sample in "php coder" it worked. But when I run on Internet
> exoplorer it did not work. empty screen appeared.
> 
> why?
> 
> not: I have using windows 2000, IIS5 and PHP4.
> 

-- 
Leo G. Divinagracia III
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
I am running PHP in a weird configuration - :) - on a CD Rom! Therefore:

1) - Each time I run my CD ROM server, I need my setup executable to
reconfigure a copy of php.ini and copy it to the windows directory and
reconfigure.

     [Session]
     session.save_path= E:\CD\PHP\sessiondata    ; argument passed
     to save_handler

My questions are:

1) How can I configure an *.ini file with ease using PHP?
2) Specifically, how can I reconfiigure "session.save_path" to the PHP
variable $temp

E:\CD\PHP\sessiondata needs to be read and write, which is not possible
on a CD Rom.

An email post & reply would be most helpful.

John
--- End Message ---

Reply via email to