php-windows Digest 11 Nov 2001 10:46:31 -0000 Issue 848

Topics (messages 10338 through 10342):

Re: chmod a folder
        10338 by: Ross Fleming

Re: Download System
        10339 by: Ross Fleming

Re: Windows XP
        10340 by: Ross Fleming
        10342 by: Lim Jian An

Re: Apache will not parse HELP PLEASE
        10341 by: Ross Fleming

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]


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


Or better still, [EMAIL PROTECTED] per chance?  They'll know

As far as I know chmod ain't supported by windows..  (tis what the php
manual sez)..

Ross

-----Original Message-----
From: Svensson, B.A.T. [mailto:[EMAIL PROTECTED]]
Sent: 10 November 2001 05:56
To: '[EMAIL PROTECTED] '
Cc: 'Karl S. Lxland '
Subject: RE: [PHP-WIN] chmod a folder


 >i wondered if someone could tell me jow i chmod a folder i php.
>(like: chmod("/somedir/somefile", 0755); works on files) ????

$man chmod

--
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]







Hmm... ok, thinking about it, this maybe solves only half the problem...
Here goes anyway, + my ramblings and theories as to how you could maybe do
the other half...

I'll check I've got the right problem though... You want to have links at
http://mydomain.com that point to a download, but only allow people to
download by clicking on there?  Yes?  If so, here's a solution as I see it

start off by validating where it came from:

if ($HTTP_REFERER!="http://mydomain.com";)
  {echo("Kindly go to http://mydomain.com and download from there."); }
else
  {
/* Allow the person to download the file */
}

Now here's where I'm hoping someone will be able to jump in here, but is it
possible for PHP to control the download?  ie send a file from somewhere
other than htdocs, so that the user can't download it through conventional
methods?  Surely you can get php to open a file outside the webspace (ie
c:/downloads etc) and send it to a user?

I'm looking for a person to step in here! :)

All I can suggest is this:
if ($HTTP_REFERER!="http://mydomain.com";)
  {echo("Kindly go to http://mydomain.com and download from there."); }
else
  {
Header("Location: http://servername/$file"}; /* Where $file is passed in as
a variable, choosing the filename */
}

I need other peoples input please?  PHP controllable downloads?

Ross

-----Original Message-----
From: GK [mailto:[EMAIL PROTECTED]]
Sent: 09 November 2001 13:41
To: [EMAIL PROTECTED]
Subject: Re: [PHP-WIN] Download System


Hi Ross,
I'm sorry, would you please further explain?

Kent

"Ross Fleming" <[EMAIL PROTECTED]> ¼¶¼g©ó¶l¥ó·s»D
:[EMAIL PROTECTED]
> $HTTP_REFERER holds the address that the browser was referred from.  This
is
> an apache variable that PHP has access to.
>
> Be aware though, that this variable should be set by the users browser,
and
> not all browsers do that...
>
> Ross
>
> -----Original Message-----
> From: GK [mailto:[EMAIL PROTECTED]]
> Sent: 09 November 2001 11:57
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Download System
>
>
> Hello guys,
> I'm running PHP on Apache on a Linux system. I would like to check where
the
> requests come from before allowing users to download a particular file.
For
> example,  if the request comes from http://abc.domain.com/ then allow the
> user to download the file, else the user cannot access the file. I wonder
if
> it can be achieved by PHP?
> Thanking you in advance.
>
> Kent
>
>
>
>
> --
> 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]
>
>
>



--
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]







Switch "view full extension" on in XP, I'm not sure where it's located, but
Apache is telling you the file ain't there.  If you've got a file called
"file.php" you may find it's ACTUALLY called file.php.txt or file.php.html
or something, but windows is hiding the true extension.

Ross

PS in windows98 it's in "View"/"Folder Options", then "view" then untick
"hide file extensions for known file types".  Don't know about XP

-----Original Message-----
From: Lim Jian An aka CaMeL [mailto:[EMAIL PROTECTED]]
Sent: 09 November 2001 17:07
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Windows XP


Hi,

I just install apache and php4 in my computer
After I finish everything
When I click a file which end with .php
It tell me the files not found



I have included this in my httpd.conf
-----
ScriptAlias /php4/ "C:/php4win/"
Addtype application/x-httpd-php4 .php
Addtype application/x-httpd-php4 .php3
Addtype application/x-httpd-php4 .php4
Action application/x-httpd-php4 "/php4/php.exe"
----

Anyone got any idea ?

I am using apache 1.3.22-win32.x86

Jian An


--
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]







10q for this
I thought that files should put it in c:\windows\

Jian An
-----Original Message-----
From: Jamie Van Kooten [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, November 10, 2001 1:03 PM
To: [EMAIL PROTECTED]
Subject: Re: Windows XP


Did you add php4ts.dll to the c:\windows\system32 dir?

If not it wont work,  trust me i had the same thing
----- Original Message ----- 
From: "Lim Jian An Aka Camel" <[EMAIL PROTECTED]>
Newsgroups: php.windows
To: <[EMAIL PROTECTED]>
Sent: Friday, November 09, 2001 9:07 AM
Subject: Windows XP


> Hi,
> 
> I just install apache and php4 in my computer
> After I finish everything 
> When I click a file which end with .php
> It tell me the files not found
> 
> 
> 
> I have included this in my httpd.conf
> -----
> ScriptAlias /php4/ "C:/php4win/"
> Addtype application/x-httpd-php4 .php
> Addtype application/x-httpd-php4 .php3
> Addtype application/x-httpd-php4 .php4
> Action application/x-httpd-php4 "/php4/php.exe"
> ----
> 
> Anyone got any idea ?
> 
> I am using apache 1.3.22-win32.x86
> 
> Jian An
> 






What code are you seeing?  The php code or the html code it would produce?

If it's the html code it would generate, then you're not sending the write
headers for it (ie ContentType: text/html), and if it's the PHP code then
you haven't edited the httpd.conf file that apache uses to tell it about the
existance of PHP.

    ScriptAlias /php/ "c:/php/"
    AddType application/x-httpd-php .php
    Action application/x-httpd-php "/php/php.exe"

in your conf file, where c:/php is the path you installed PHP to.

Ross

-----Original Message-----
From: H. White [mailto:[EMAIL PROTECTED]]
Sent: 09 November 2001 17:37
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] Apache will not parse HELP PLEASE


Big problem can not figure out why my php files will not parse on Apache
1.3.22  installed on windows 98

I installed Apache and PHP 4.06 and followed directions to the letter 4
times over. I know both work independently in fact when I run Apache is says
"Apache/1.3.22 <Win32> PHP/4.06 running... "and when I run phpinfo() -i
from the command prompt it spits out the phpinfo

but when I do a test file with any scripts <? phpinfo(); ?> and save it to
my root htdocs as test.php all I see when open with my browser
"http://localhost/test.php"; is the code. It is like nothing is happening and
the script is not being passed to the PHP module. I have been racking my
brain and have followed every manual and direction and nothing.

Definitely frustrated...
Thanks in Advance


******************************************************
H. White of
HWORB   "Where Radiance meets Function"
www.hworb.net
Complete Multi-Media Services:
    Graphics, Web, Document,
    Marketing, & Consulting
******************************************************
" Beware of TRUE Desire, because it is unyielding and knows no limit "



--
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]





Reply via email to