php-windows Digest 24 Jun 2002 07:28:26 -0000 Issue 1208

Topics (messages 14353 through 14360):

Installing PHP for Apache on Windows XP
        14353 by: Dave
        14359 by: Steve Parrish

MIME type for an .exe file?
        14354 by: Mikey
        14355 by: Mark Filipak
        14356 by: Mikey

Re: Newbye question
        14357 by: Ross Fleming
        14358 by: Saci

Get/Post and Security Issues
        14360 by: Brian Graham

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 ---
I have been trying to install PHP for Apache on WinXP.  I have added all of
the necessary lines to the Apache Config file, although when i try to add

LoadModule php4_module c:/php4/sapi/php4apache2.dll

Apache wont restart.

I copied all of the PHP .ini and .dll files into the appropriate
directories, but I just wont work.

You think they would have made it a little more compatible, even the PHP
installer doesnt work properly.

Can anyone help?

Thanks



--- End Message ---
--- Begin Message ---
At 7:18 AM -0700 6/23/02, Dave wrote:
>I have been trying to install PHP for Apache on WinXP.  I have added all of
>the necessary lines to the Apache Config file, although when i try to add
>
>LoadModule php4_module c:/php4/sapi/php4apache2.dll
>
>Apache wont restart.
>
>I copied all of the PHP .ini and .dll files into the appropriate
>directories, but I just wont work.
>
>You think they would have made it a little more compatible, even the PHP
>installer doesnt work properly.
>
>Can anyone help?
>

Are you running Apache 2.0.39? What is the error? It helps to share 
this info when seeking assistance.  :)

I'll guess that you need an updated php4apache2.dll.

You can get a replacement php4apache2.dll here:
<http://ftp.proventum.net/pub/php/win32/php4.2.x-apache2.zip>

That worked for me. Thanks to Matt Parlane, who recently posted a 
message with this info.

HIH,

Steve Parrish
-- 
<mailto:[EMAIL PROTECTED]>
--- End Message ---
--- Begin Message ---
Hi there!

Was just wondering if anyone knew what mime type I should use when sending a
".exe" file to a user?  I have looked through the list and the closest (I
think) I can find is application/octet-stream - is this right, or is there
an better type I can't see on the list?

regards,

Mikey

--- End Message ---
--- Begin Message ---
Hi Mikey!

Mikey wrote:
> 
> Hi there!
> 
> Was just wondering if anyone knew what mime type I should use when
> sending a ".exe" file to a user?  I have looked through the list and
> the closest (I think) I can find is application/octet-stream - is this
> right, or is there an better type I can't see on the list?

I don't know for sure, but I think you would want this:

  application/x-msdownload

Perhaps someone more knowledgable will confirm this.

Ciao -- Mark
--- End Message ---
--- Begin Message ---
Scratch that - I have found out that it is octet-stream that I need.

However, using code as follows:

                if (strstr ($dt->table[0][1], ".zip")) header ("Content-Type:
application/x-zip-compressed");
                else header ("Content-Type: application/octet-stream");
                header ("Content-Length: ".filesize ($SITE_ROOT.$dt->table[0][1]));
                header ("Content-Disposition: inline; filename=".str_replace 
("/files/",
"", $dt->table[0][1]));
                readfile ($SITE_ROOT.$dt->table[0][1]);

(where $dt->table[0][1] is the filename.)

When I run this code for an exe file, the application name has a [1] put in
the middle of it - e.g. filename is "DelayCalculator-v1.0.exe", results in
"DelayCalculator-v.1[1].0.exe".

I am running on PHP4.2.1 on Apache 1.3.24 and browsing the page with IE6

regards,

Mikey

> -----Original Message-----
> From: Mikey [mailto:[EMAIL PROTECTED]]
> Sent: 23 June 2002 19:28
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] MIME type for an .exe file?
>
>
> Hi there!
>
> Was just wondering if anyone knew what mime type I should use
> when sending a
> ".exe" file to a user?  I have looked through the list and the closest (I
> think) I can find is application/octet-stream - is this right, or is there
> an better type I can't see on the list?
>
> regards,
>
> Mikey
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

--- End Message ---
--- Begin Message ---
Check out the new global_register that phpv4.2 employs, variables cannot be
set in the http request anymore, in order to access texto, you need to
access $_GET[texto]

> -----Original Message-----
> From: Saci [mailto:[EMAIL PROTECTED]]
> Sent: 23 June 2002 05:56
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Newbye question
>
>
> I installed php 4.2.1 on windows XP using the PHP 4.2.1 installer
> [897Kb] -
> 13 May 2002
>
> Apparently php is working since the classic hello word from php
> is running,
> but I have some problems with variables
>
> I have the following php code, who runs perfectly on my isp, but give a
> message error on my machine who use windows xp the message are
>
> Notice: Undefined variable: texto in
> d:\inetpub\wwwroot\souio\php\teste03.php on line 5
>
> I'm sure the code is correct because they run on my ISP (W2000)
> without any
> problem
>
>
> what is wrong witch my installation?
>
>
>
> The code are
>
> <html>
> <head><title>Learning PHP</title></head>
> <body>
> <?php
> if ($texto != "")
> echo "You typed  \"$texto\"<br><br>";
> ?>
> <form method=post action="<? echo $PATH_INFO; ?>">
> <input type="text" name="texto" value="" size=10>
> <br>
> <input type="submit" name="sub" value="Enviar!">
> </form>
> </body>
> </html>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--- End Message ---
--- Begin Message ---
Hi Cristian

I tried your code , and receive the folowing message

Notice: Undefined index: texto in d:\inetpub\wwwroot\impac\php\teste03.php
on line 5


I guess my problem is regarding configuration, to help here is my php.ini

[PHP]

engine = On
short_open_tag = On
asp_tags = on
precision    =  12
y2k_compliance = Off
output_buffering = Off
output_handler =
unserialize_callback_func=
zlib.output_compression = Off
implicit_flush = Off
allow_call_time_pass_reference = On
safe_mode = Off
safe_mode_gid = Off
safe_mode_include_dir =
safe_mode_exec_dir =
safe_mode_allowed_env_vars = PHP_
safe_mode_protected_env_vars = LD_LIBRARY_PATH
disable_functions =

highlight.string  = #CC0000
highlight.comment = #FF9900
highlight.keyword = #006600
highlight.bg      = #FFFFFF
highlight.default = #0000CC
highlight.html    = #000000

expose_php = On
max_execution_time = 30     ; Maximum execution time of each script, in
seconds
memory_limit = 8M      ; Maximum amount of memory a script may consume (8MB)

error_reporting  = E_ALL; display all errors, warnings and notices
display_errors = On
display_startup_errors = Off
log_errors = Off
track_errors = Off
warn_plus_overloading = Off
variables_order = "GPCSE"
register_globals = On
register_argc_argv = On
post_max_size = 8M
gpc_order = "GPC"
magic_quotes_gpc = On
magic_quotes_runtime = Off
magic_quotes_sybase = Off
auto_prepend_file =
auto_append_file =
default_mimetype = "text/html"
doc_root =
user_dir =
extension_dir = ./
enable_dl = On
cgi.force_redirect = 0
file_uploads = On
upload_tmp_dir = C:\PHP\uploadtemp  ; temporary directory for HTTP uploaded
files (will use system default if not specified)
upload_max_filesize = 2M




;;;;;;;;;;;;;;;;;;;
; Module Settings ;
;;;;;;;;;;;;;;;;;;;

[Syslog]
define_syslog_variables  = Off

[mail function]
SMTP = 192.168.1.101 ; for Win32 only
sendmail_from = [EMAIL PROTECTED] ; for Win32 only

[Java]

[SQL]
sql.safe_mode = Off

[ODBC]
odbc.allow_persistent = On
odbc.check_persistent = On
odbc.max_persistent = -1
odbc.max_links = -1
odbc.defaultlrl = 4096
odbc.defaultbinmode = 1

[MySQL]
mysql.allow_persistent = On
mysql.max_persistent = -1
mysql.max_links = -1
mysql.default_port =
mysql.default_socket =
mysql.default_host =
mysql.default_user =
mysql.default_password =

[mSQL]
msql.allow_persistent = On
msql.max_persistent = -1
msql.max_links = -1

[PostgresSQL]
pgsql.allow_persistent = On
pgsql.auto_reset_persistent = Off
pgsql.max_persistent = -1
pgsql.max_links = -1

[Sybase]
sybase.allow_persistent = On
sybase.max_persistent = -1
sybase.max_links = -1
sybase.min_error_severity = 10
sybase.min_message_severity = 10
sybase.compatability_mode = Off

[Sybase-CT]
sybct.allow_persistent = On
sybct.max_persistent = -1
sybct.max_links = -1
sybct.min_server_severity = 10
sybct.min_client_severity = 10

[bcmath]
bcmath.scale = 0

[browscap]

[Informix]
ifx.default_host =
ifx.default_user =
ifx.default_password =
ifx.allow_persistent = On
ifx.max_persistent = -1
ifx.max_links = -1
ifx.textasvarchar = 0
ifx.byteasvarchar = 0
ifx.charasvarchar = 0
ifx.blobinfile = 0
ifx.nullformat = 0

[Session]
session.save_handler = files
session.save_path = C:\PHP\sessiondata    ; argument passed to save_handler
session.use_cookies = 1
session.name = PHPSESSID
session.auto_start = 0
session.cookie_lifetime = 0
session.cookie_path = /
session.cookie_domain =
session.serialize_handler = php
session.gc_probability = 1
session.gc_maxlifetime = 1440
session.referer_check =
session.entropy_length = 0
session.entropy_file =
session.cache_limiter = nocache
session.cache_expire = 180
session.use_trans_sid = 1
url_rewriter.tags = "a=href,area=href,frame=src,input=src,form=fakeentry"

[MSSQL]
mssql.allow_persistent = On
mssql.max_persistent = -1
mssql.max_links = -1
mssql.min_error_severity = 10
mssql.min_message_severity = 10
mssql.compatability_mode = Off


[Ingres II]
ingres.allow_persistent = On
ingres.max_persistent = -1
ingres.max_links = -1
ingres.default_database =
ingres.default_user =
ingres.default_password =

[Verisign Payflow Pro]
pfpro.defaulthost = "test-payflow.verisign.com"
pfpro.defaultport = 443
pfpro.defaulttimeout = 30

[Sockets]
sockets.use_system_read = On





--- End Message ---
--- Begin Message ---
Apache 1.3.26
PHP 4.2.1

When I enter username and password information onto a page, it uses Get and
puts the session ID along with the username and the password into the URL,
despite my saying "method=post" in the form attributes.

This seems like it would be a common problem, but my research isn't bringing
up anything even remotely about it.

I've done very, very little tweaking to my php.ini and httpd.conf to give
you an idea of what defaults are in place still. Here is the function code:

function user_login() {
 global $usern;
 global $userp;
 global $feedback;
 global $loginswitch;
 if (!isSet($usern) && !isSet($userp))
  return FALSE;
 if ($usern == '' or $userp == '') {
  $loginswitch = FALSE;
  $feedback = "Username and/or password is missing.";
  return FALSE;
 }
 $uname = strtolower($usern);
 $query = "SELECT user_name, user_pass, user_isconfirmed
    FROM user
    WHERE user_name = '$usern'
    AND user_pass = '$userp'";
 $results = mysql_query($query) or die(mysql_error());
 $row = mysql_fetch_row($results);
 if ($usern == $row[0] && $userp == $row[1]) {
  $_SESSION['loginswitch'] = TRUE;
  $_SESSION['username'] = $usern;
  $feedback = "You are now logged in.";
  return TRUE;
 }
 else {
  $_SESSION['loginswitch'] = FALSE;
  $feedback = "Username of password are incorrect.";
  return FALSE;
 }
}






--- End Message ---

Reply via email to