php-windows Digest 19 Feb 2001 17:59:28 -0000 Issue 453

Topics (messages 5630 through 5637):

Income on the Net!
        5630 by: Noel Hadfield

directory listing and how to determine file size
        5631 by: Andris Jancevskis
        5634 by: phobo

Re: Apache, PHP on win 98
        5632 by: Yoann Chevalier

connect to a Windows COM object
        5633 by: Glenn Lindgren

Re: php-windows Digest 12 Feb 2001 22:49:30 -0000 Issue 442
        5635 by: John Morrison

Re: PHP 'include' function
        5636 by: John Morrison

db-script doesn't work.
        5637 by: Toke Herkild

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]


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


I wanted to let you know about a new opportunity that you can take up FREE. 
If you join as an affiliate, we'll teach you how to build a profitable 
business on the Internet; how to use our system to create an income stream; 
and how to earn income globally, 24 hours a day. 

Don't let this opportunity slip past you - we expect our organization to be 
at least 1 million-strong within less than two years! Join us and let's 
work together to get a share of all those members.

Just hit Reply and send a blank message with "Opportunity" on the Subject 
line.




Hi,

  I am going to develop virtual file management. Thus I want to know
  some things.
  1. how to determine file size _before_ file uploading or on loading
  time and how to avoid error message if file size will be too large.
  2. how to read directory content with it's size, modes etc in win32
  and linux.
  3. in what mode i should make directory for read/write permission
  (not execute). Any point to docs?
  4. Any other useful points to my project? I don't know all problems
  for it.
  
TIA,
-- 
Andris
mailto:[EMAIL PROTECTED]






You should wander though php.net for 5 mins, then you wouldnt have to wait
for our replies...

>   1. how to determine file size _before_ file uploading or on loading
>   time and how to avoid error message if file size will be too large.

read http://www.php.net/manual/en/features.file-upload.php
basically, a variable wil be returned with the size in bytes:

$HTTP_POST_FILES['userfilename']['size'] = ....


>   2. how to read directory content with it's size, modes etc in win32
>   and linux.

http://www.php.net/manual/en/ref.dir.php
http://www.php.net/manual/en/ref.filesystem.php

>   3. in what mode i should make directory for read/write permission
>   (not execute). Any point to docs?

directories which store the files should be read/list only; PHP, not the
webclient, is writing the files.

>   4. Any other useful points to my project? I don't know all problems
>   for it.
>
> TIA,
> --
> Andris
> mailto:[EMAIL PROTECTED]
>
>
>
> --
> 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]
>
>





Here is the content of the install.txt include in the php4 distribution.
You have to follows what they say and it works fine.

Apache:
1. Stop the Apache Webserver.
Edit the httpd.conf and put in these lines, modified to your environment:
2. Unzip the Package to c:\php, now move php4ts.dll to the
windows/system(32) directory, overwritte any older file!

# for the apache module
LoadModule php4_module c:/php/sapi/php4apache.dll
AddType application/x-httpd-php .php4

#for the cgi binary (you can use that one compiled with force cgi redirect
too)
ScriptAlias /php4/ "C:/php/"
Action application/x-httpd-php4 "/php4/php.exe"
AddType application/x-httpd-php4 .php

3. Copy the php.ini-dist to your sysroot (directory where you installed
windows), rename it to php.ini, and
edit the php.ini to fit your needs.
4. Restart the Apache server.


Yoann.


----- Original Message -----
From: "Denis L. Menezes" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, February 19, 2001 5:17 AM
Subject: [PHP-WIN] Apache, PHP on win 98


> hello friends.
>
> I downloaded Apache for Windows and ran it. Works fine.
>
> I then downloaded php4 and looked at the install instructions and find
that
> there are errors in the install file regarding placing of the dlls, the
> loadmodule command etc.
>
> can anyone tell me the correct procedure of making Apache see and work
php?
>
> thank you.
> Denis
>
>
>
> --
> 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]
>
>





I'm trying to connect to a Windows COM object from a 
php4 script, using: 

$myConn = com_load ("ConnString");

but i can't get it to work :-(

All help appreciated.
Best regards.
//Glenn


................................................................
   80.000 svenskar har nu gratis e-post på Sverige.nu!

   http://www.sverige.nu




Tom

Sorry for the late reply but I have had a week's holiday.

<< I'm going to sound like a database freak >>

No. I don't think so.  It looks like the best idea to me. Without an 
organised approach like a database the whole thing could get very unwieldy if 
the number of pictures became large, - and the code maintenance would be no 
picnic either.

Which DBMS do you use?  A very popular choice for the web seems to be MySQL. 
 I don't know what proportion of ISPs support this but I do have some minor 
reservations about it.  They are not serious misgivings because my web 
application is not a "mission critical" one, but some of them could be in 
different circumstances.  No Commit/Rollback, no subQueries, no Stored 
Procedures, no built-in referential integrity (ie no Foreign Keys and no 
Triggers)  Or is my information on MySQL totally out of date?

I believe the justification for some of these omissions is the speed penalty 
overhead.  Not having used MySQL I cannot comment on this.  But the question 
which most bothers me is that of referential integrity.  Supporters of MySQL 
claim that it is not a problem since a well designed application should 
properly manage this.  But what would prevent database access from /outside/ 
an application?

On the plus side, from looking at published code examples one big advantage 
of MySQL/PHP seems to be the seamless ease with which they work together.  I 
have seen no ODBC calls, just PHP embedded SQL statements.  Does PHP access 
MySQL natively, or what?

<< By the way, it is possible to use javascript variables in php - I've got
some script I can dig out to show you how if you need it. >>

Being new to all this I really would appreciate that, if you do come across 
it.

John

> In article <[EMAIL PROTECTED]>,  Tom Mathews wrote:
> Subject: Re: [PHP-WIN] PHP 'include' function
> 
> I'm going to sound like a database freak, but my solution to nearly all
> 'dynamic' pages is to pull everything out of a database -
> My implementation would probably be four fields - ID, Name (to display in
> the select list), text and image. You query the db to get a list of 'Name's
> and then use the ID to pull out the relevent image and text.
> By the way, it is possible to use javascript variables in php - I've got
> some script I can dig out to show you how if you need it.
> 
> Tom
> John Morrison wrote:
> 
> > Hi.
> >
> > I have just discovered server side scripting and am trying
> > to get to grips with it using PHP4 with Xitami on Windows
> > Me.  Straight away, on my first project, it looks as though
> > I have found a problem I am not going to solve without
> > help.
> >
> > I have an HTML form with an Option Select drop down list
> > which displays choices of which JPEG file to load into an
> > <IMG> picturebox.  After selecting an option, clicking a
> > button runs a Javascript function which displays the image,
> > changing the previous picture.  So far so good, but here is
> > the problem.  I also wish to display a caption and
> > descriptive paragraph or two in an adjacent scrollable
> > <TEXTAREA>.
> >
> > I thought a good way would be to have a text file for each
> > picture on the server and display the appropriate one as
> > required.  But, so far, I have not managed to find any file
> > operation capabilities in Javascript.
> >
> > My next thought was to use the PHP "include" function, or
> > some other file reading technique, but I have not found a
> > satisfactory way to pass the filename to PHP.  A Javascript
> > variable naturally cannot be passed to a PHP function so I
> > had Javascript copy the file pathname to the TextArea with
> > the hope of getting my include function to pick it up from
> > there.  But I have not succeeded.  PHP does not like the
> > dots in "$captionpath =
> > Document.FormName.TextAreaName.Value;" and simply removes
> > them.
> >
> > So I abandoned this and tried doing it completely outside
> > of Javascript.  I have tried everything I can think of
> > including a rigmarole which involved the self-submit method
> > <FORM METHOD="POST" ACTION="<?php print('$php_self'); ?>">.
> >  Without going into detail, I did manage to display the
> > caption but I had other problems which made this avenue
> > seem unproductive, so I did not persue it. For example,
> > instead of just a clean change of the IMG and TextArea
> > contents the whole page was reloaded from the server and
> > repositioned at "Top of Page".  Apart from the slowness of
> > this, it looked massively clumsy.
> >
> > Am I missing the obvious??
>







Alain

<< Why do you need javascript? >>

Good question, but I have no satisfactory answer.  I was just 
modifying "one I made earlier" (the only one) which happened to work 
that way, when I came across problems.  I have got some good ideas 
here and feel a completely fresh start is going to be the best.  I 
have arrived here straight from Visual Basic and am finding things 
a lot different.

John


In article <[EMAIL PROTECTED]>, Alain Samoun wrote:
> Why do you need javascript?
> Scenario:
> 1 User selects jpeg image in list
> 2 User press submit button
> 3 Server receives selection and download jpeg with its text in html
> Would that work for you?
> Alain
> 
> On Sun, Feb 11, 2001 at 02:19:38PM +0000, John Morrison wrote:
> > Hi.
> > 
> > I have just discovered server side scripting and am trying 
> > to get to grips with it using PHP4 with Xitami on Windows 
> > Me.  Straight away, on my first project, it looks as though 
> > I have found a problem I am not going to solve without 
> > help.
> > 
> > I have an HTML form with an Option Select drop down list 
> > which displays choices of which JPEG file to load into an 
> > <IMG> picturebox.  After selecting an option, clicking a 
> > button runs a Javascript function which displays the image, 
> > changing the previous picture.  So far so good, but here is 
> > the problem.  I also wish to display a caption and 
> > descriptive paragraph or two in an adjacent scrollable 
> > <TEXTAREA>.
> > 
> > I thought a good way would be to have a text file for each 
> > picture on the server and display the appropriate one as 
> > required.  But, so far, I have not managed to find any file 
> > operation capabilities in Javascript. 
> > 
> > My next thought was to use the PHP "include" function, or 
> > some other file reading technique, but I have not found a 
> > satisfactory way to pass the filename to PHP.  A Javascript 
> > variable naturally cannot be passed to a PHP function so I 
> > had Javascript copy the file pathname to the TextArea with 
> > the hope of getting my include function to pick it up from 
> > there.  But I have not succeeded.  PHP does not like the 
> > dots in "$captionpath = 
> > Document.FormName.TextAreaName.Value;" and simply removes 
> > them.
> > 
> > So I abandoned this and tried doing it completely outside 
> > of Javascript.  I have tried everything I can think of 
> > including a rigmarole which involved the self-submit method 
> > <FORM METHOD="POST" ACTION="<?php print('$php_self'); ?>">. 
> >  Without going into detail, I did manage to display the 
> > caption but I had other problems which made this avenue 
> > seem unproductive, so I did not persue it. For example, 
> > instead of just a clean change of the IMG and TextArea 
> > contents the whole page was reloaded from the server and 
> > repositioned at "Top of Page".  Apart from the slowness of 
> > this, it looked massively clumsy.
> > 
> > Am I missing the obvious??
> > 
> > Regards
> > John Morrison
>







After having upgraded my php 4.01 install to a 4.04pl1 a bbs example I've
tried have stopped working. I use PHP4 + Apache + Mysql And it seems like I
cannot get formdata send true the server...

first time I read the php page it shows the list of existing messages in the
bbs, but if I try to add og read any of the messages it just refreshes the
page...

it does send the information in the url but it is not used. could it be a
configuration problem ?!?




Reply via email to