php-windows Digest 20 Feb 2003 03:13:32 -0000 Issue 1596

Topics (messages 18604 through 18625):

Re: PHP and MySQL
        18604 by: Radovan Radic
        18605 by: Uttam

xml and php
        18606 by: Parvez Soobhany
        18608 by: Russell Johnson

Limiting phpinfo() information
        18607 by: "Juan Ant. Martínez"

Re: CGI installation problem
        18609 by: Brian 'Bex' Huff
        18610 by: Vincent Robert

Force a user to download a text file from a link
        18611 by: Matt Babineau
        18614 by: George Pitcher

define("DOC_HOME_PATH", "what goes here")
        18612 by: Jonathan Villa

Re: Information not being correctly parsed
        18613 by: Per Lundberg

Resizing image
        18615 by: Olafsson

Upload big files
        18616 by: Mottaghi.
        18617 by: Matt Babineau
        18619 by: Chris Kranz

encryption/decryption with RSA 1024 keys
        18618 by: Arthur Radulescu

Re: PWS or IIS?
        18620 by: Ed
        18621 by: Matt Hillebrand
        18623 by: Jonathan Villa

Re: mail() CC: header
        18622 by: Ed
        18624 by: Matt Hillebrand

PHP HTTP Authentication, Win2k & IIS
        18625 by: John Toews

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 solve this by starting-up with the line (on my local computer):

mysqld-nt.exe --default-character-set=cp1251

How ppl solve this problem on the web servers?


"Veselina Jecheva" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello everybody,
> I'm using PHP & MySQL running on Win2000 & IIS5 and I have the following
> problem with MySQL: I've got text records with cyrrilic letters and MySQL
> does not order the result records from a query in alphabetical order. (for
> example when using "order by" in a query)
> Any suggestions will be appreciated.
> Regards, Veselina
>


--- End Message ---
--- Begin Message ---
here's something from manual which may give you a direction:

<<quote
The Character Set Used for Data and Sorting

By default, MySQL uses the ISO-8859-1 (Latin1) character set with sorting
according to Swedish/Finnish. This is the character set suitable in the USA
and western Europe.

All standard MySQL binaries are compiled with --with-extra-charsets=complex.
This will add code to all standard programs to be able to handle latin1 and
all multi-byte character sets within the binary. Other character sets will
be loaded from a character-set definition file when needed.

The character set determines what characters are allowed in names and how
things are sorted by the ORDER BY and GROUP BY clauses of the SELECT
statement.

You can change the character set with the --default-character-set option
when you start the server.  The character sets available depend on
the --with-charset=charset and --with-extra-charset= list-of-charset |
complex | all options to configure, and the character set configuration
files listed in SHAREDIR/charsets/Index.  See configure options.

If you change the character set when running MySQL (which may also change
the sort order), you must run myisamchk -r -q on all tables. Otherwise your
indexes may not be ordered correctly.
quote>>

you can also refer to mysql mailing list [EMAIL PROTECTED]

regds,
-----Original Message-----
From: Veselina Jecheva [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 19, 2003 17:39
To: [EMAIL PROTECTED]
Subject: PHP and MySQL


Hello everybody,
I'm using PHP & MySQL running on Win2000 & IIS5 and I have the following
problem with MySQL: I've got text records with cyrrilic letters and MySQL
does not order the result records from a query in alphabetical order. (for
example when using "order by" in a query)
Any suggestions will be appreciated.
Regards, Veselina

--- End Message ---
--- Begin Message ---
hiii
i have my database on mySQL, and i wish to extract the data from certain tables , and 
store them in XML files.
Does anyone know how this is done?

thanks,

--- End Message ---
--- Begin Message ---
Try taking a look at the XML_sql2xml package from Pear: 
        http://pear.php.net/package-info.php?pacid=18

or the rs2xml extension for the ADOdb library:
        http://phplens.com/lens/dl/rs2xml.tar.gz
        http://php.weblogs.com/ADODB

There's an interesting discussion about ADOdb and XML here: 
        http://phplens.com/lens/lensforum/msgs.php?id=3430

Hope this helps,
- Russ

-----Mensaje original-----
De: Parvez Soobhany [mailto:[EMAIL PROTECTED]]
Enviado el: Wednesday, February 19, 2003 3:11 PM
Para: [EMAIL PROTECTED]
Asunto: [PHP-WIN] xml and php


hiii
i have my database on mySQL, and i wish to extract the data from certain
tables , and store them in XML files.
Does anyone know how this is done?

thanks,

--- End Message ---
--- Begin Message --- Hi,

Does anyone know how to limit the informtion phpinfo() gives. I'd like to have it enabled in order to run mail() (if I disable phpinfo() mail() doesn't work), but there's much information there. How can I limit it? (in fact, any other solution to run mail() without it would help).

Thanks,

Juanan

--- End Message ---
--- Begin Message ---
Setting up CGI is only slightly more complex than ISAPI. The main problem I have had in the past involved file permissions... altho I have not yet tried 4.3.1 CGI:

http://www.php.net/manual/fr/install.iis.php#install.iis.iis4

Im assuming French is better for you than English... Also, be sure to set this in your php.ini file:

cgi.force_redirect=1

This must be '0' for a secure Apache server, but it must be '1' for a functional IIS CGI server.

--

Brian 'Bex' Huff
[EMAIL PROTECTED]
Phone: 952-903-2023
Fax: 952-829-5424


I've installed yesterday the 4.3.1 on two system:
first: NT4 SP6a & IIS
second: Win XP Pro SP1 & IIS

In both cases the PHP functions normally in ISAPI but not in CGI.

In the first case, i've have multiple instances of php.exe in my task
manager and my browser (IE6) don't have result before I kill the
php.exe.

In the second case, i've an error with php interpretor, so i've nothing
in the browser.

I read that ISAPI is not as stable as cgi, so what can I do in order to
use CGI ???


--- End Message ---
--- Begin Message ---
I've read all the manual ..., and have done what you said, but nothing is
ok.

Look at http://bugs.php.net/bug.php?id=22292
http://bugs.php.net/bug.php?id=22291




"Brian 'Bex' Huff" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
>
> Setting up CGI is only slightly more complex than ISAPI. The main
> problem I have had in the past involved file permissions... altho I have
> not yet tried 4.3.1 CGI:
>
> http://www.php.net/manual/fr/install.iis.php#install.iis.iis4
>
> Im assuming French is better for you than English... Also, be sure to
> set this in your php.ini file:
>
> cgi.force_redirect=1
>
> This must be '0' for a secure Apache server, but it must be '1' for a
> functional IIS CGI server.
>
> --
>
> Brian 'Bex' Huff
> [EMAIL PROTECTED]
> Phone: 952-903-2023
> Fax: 952-829-5424
>
>
> > I've installed yesterday the 4.3.1 on two system:
> > first: NT4 SP6a & IIS
> > second: Win XP Pro SP1 & IIS
> >
> > In both cases the PHP functions normally in ISAPI but not in CGI.
> >
> > In the first case, i've have multiple instances of php.exe in my task
> > manager and my browser (IE6) don't have result before I kill the
> > php.exe.
> >
> > In the second case, i've an error with php interpretor, so i've nothing
> > in the browser.
> >
> > I read that ISAPI is not as stable as cgi, so what can I do in order to
> > use CGI ???
>
>
>


--- End Message ---
--- Begin Message ---
How can I force a download of a TXT file from a Link? Or an Excel CSV
file? using PHP of course too. I am running PHP 4.3 on W2K. Are there
any tutorials for this?
 
Thx-
 
Matt
--- End Message ---
--- Begin Message ---
Matt,

You should NEVER force a download on anyone. How do they know it isn't
carrying a virus.

What you should do is to send the headers that prompt a dialog box for Save
or Open (I'm sure you've seen this).

I'm not sure which headers you use for csv or txt files but I do this with
PDFs all the time.

<?php
$fpd = "E:\\Pdf\\" . $fp . ".pdf";
$len = filesize($fpd);
header("Content-Type: application/pdf");
header("Content-Disposition: inline; filename=$fpd");
header("Content-Title: $fpd");
header("Content-Length: $len");
readfile($fpd);
?>

I suspect that you just need to change pdf to text in the Content-Type line.

Using the above script will always save the file as  (scriptname.pdf)
so I've been a bit creative and when my user is heading towards a document,
an appropriately named script containing  the above script is created
on the fly and called to handle the download. It is then deleted when
they confirm downloading.

The rest of my site uses Lasso so there's no point showing how those parts
work.

HTH

George

> -----Original Message-----
> From: Matt Babineau [mailto:[EMAIL PROTECTED]]
> Sent: 19 February 2003 4:24 pm
> To: [EMAIL PROTECTED]
> Subject: [PHP-WIN] Force a user to download a text file from a link
>
>
> How can I force a download of a TXT file from a Link? Or an Excel CSV
> file? using PHP of course too. I am running PHP 4.3 on W2K. Are there
> any tutorials for this?
>
> Thx-
>
> Matt
>

--- End Message ---
--- Begin Message ---
I want to define 3 constants

DOC_HOME_PATH
IMG_HOME_PATH
CTL_HOME_PATH

So that I can just do this 

<img src="<? echo IMG_HOME_PATH ?>stuff/image.jpg">
<a href="<? echo DOC_HOME_PATH ?>stuff/index.jsp">Click Here</a>
 <form action="<? echo CTL_HOME_PATH ?>stuff/process_order.php">
**do I need to echo?
**not everything goes to "stuff"

Right now I have

define ("DOC_HOME_PATH", "d:/is/projects/killerspin/web/store/");
define ("IMG_HOME_PATH", "d:/is/projects/killerspin/web/images/");
define ("CTL_HOME_PATH", "d:/is/projects/killerspin/web/control/");

This works fine for displaying images but not for form submission or
links.

I have also tried this

define ("DOC_HOME_PATH", "http://localhost/killerspin/web/store/";);
define ("IMG_HOME_PATH", "http://localhost/killerspin/web/images/";);
define ("CTL_HOME_PATH", "http://localhost/killerspin/web/control/";);

doesn't work.

I have also tried a few other ways, but to no avail.

Right now the config is Apache 2.0.43, PHP 4.3.0, Win Xp Pro, and an
Access DB.
For production this will be running on  a windows server so I would also
need to know to set up the same var for this enviroment.


---> Jonathan
 
 
 


--- End Message ---
--- Begin Message ---
On Wed, 2003-02-19 at 04:38, Andrew Ferguson wrote:
> I recently upgraded to PHP 4.3.1 from 4.2. I use the nusphere bundle, and
> they had not yet incorporated the new version yet. Anyways, now my pages are
> being parsed correctly. Basically, I'm trying to post information through
> the url (i.e. randompage.php?male=y&age=43), and then have PHP retrieve it
> from my mySQL database. I've tried just making a script that would echo the
> POSTed information, but it doesn't echo it. I've looked through everything,
> and double checked all my settings. Any ideas?

The default value of register_globals has changed.  This means that a
POST variable called "test" will now be in $_POST["test"] and not $test.

You can change this behaviour in php.ini if you like but it is not
recommended; rather, rewrite your code.

-- 
Best regards,

Per Lundberg / Capio ApS
Phone: +46-18-4186040
Fax: +46-18-4186049
Web: http://www.capio.com




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

Im trying to resize a image.  This is my code;

   $img_orig_size = GetImageSize($FileName);
   $img_orig_width = (int) $img_orig_size[0];
   $img_orig_height = (int) $img_orig_size[1];

   $img_resized = ImageCreate($x, $y);

But I keep getting errpr on all the Image-functions ;

What do I have to do?  Do I have to use header ('content-type html/jpeg')?
Do I have to change php.ini?

Thanx
Oli




--- End Message ---
--- Begin Message ---
Hi all,
1- How can i upload big files to server??
2- How can i know what is the size of file before upload??

when i upload a big file, the code execution time was finished! i was
changed the max_execution_time in php.ini but doesn't work.

thanks, omid

--- End Message ---
--- Begin Message ---
I had the EXACT problem with file upload times, I could not modify this
with the ini_set() function. After a phone call to my host, they were
able to change that but big time annoying, and I still don't know why I
couldn't modify it.

--> -----Original Message-----
--> From: Mottaghi. [mailto:[EMAIL PROTECTED]] 
--> Sent: Wednesday, February 19, 2003 12:02 PM
--> To: [EMAIL PROTECTED]
--> Subject: [PHP-WIN] Upload big files
--> 
--> 
--> Hi all,
--> 1- How can i upload big files to server??
--> 2- How can i know what is the size of file before upload??
--> 
--> when i upload a big file, the code execution time was 
--> finished! i was changed the max_execution_time in php.ini 
--> but doesn't work.
--> 
--> thanks, omid
--> 
--> 
--> -- 
--> PHP Windows Mailing List (http://www.php.net/)
--> To unsubscribe, visit: http://www.php.net/unsub.php
--> 
--> 

--- End Message ---
--- Begin Message ---
Also check the max upload size, and the max post size in your php.ini
files. These will also effect what and how much you can upload.

Not sure how to check the filesizes before you upload. That's something
I'd find useful...


chris kranz
fatcuban.com


-----Original Message-----
From: Matt Babineau [mailto:[EMAIL PROTECTED]] 
Sent: 19 February 2003 20:33
To: 'Mottaghi.'; [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Upload big files

I had the EXACT problem with file upload times, I could not modify this
with the ini_set() function. After a phone call to my host, they were
able to change that but big time annoying, and I still don't know why I
couldn't modify it.

--> -----Original Message-----
--> From: Mottaghi. [mailto:[EMAIL PROTECTED]] 
--> Sent: Wednesday, February 19, 2003 12:02 PM
--> To: [EMAIL PROTECTED]
--> Subject: [PHP-WIN] Upload big files
--> 
--> 
--> Hi all,
--> 1- How can i upload big files to server??
--> 2- How can i know what is the size of file before upload??
--> 
--> when i upload a big file, the code execution time was 
--> finished! i was changed the max_execution_time in php.ini 
--> but doesn't work.
--> 
--> thanks, omid
--> 
--> 
--> -- 
--> PHP Windows Mailing List (http://www.php.net/)
--> To unsubscribe, visit: http://www.php.net/unsub.php
--> 
--> 


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--- End Message ---
--- Begin Message ---
Hello!

I need some help in using the encryption/decryption algorithm with RSA 1024
keys
I have some XML strings that I need to encrypt with the received public key
and pass via SOAP to a different server that will have to decrypt them.

Can any one help me on this matter? Please point me to any documentations or
solutions that might exist!


Thankx,
Arthur

--- End Message ---
--- Begin Message ---
If your on windows IIS5 is the best choice.
Since PWS is much slower.

Don't go for Apache under windows ,its the ultimate under Unix/Linux
but certainly not under windows.I tried it under Win2K ansd didn't like it.

"M1nt Ch3w" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Howdy all,
>
> Just got Win XP Pro, and was wondering which server to go for. IIS or PWS?
> Which one is more stable and stuff like that.
> Thanks in advance,
> /m1nt
>


--- End Message ---
--- Begin Message ---
IIS is no good if you ask me. It wouldn't let me use a custom 404
script, and sometimes it acts up....refusing to work.

I also like Apache because I use Win2k and Linux.

|-----Original Message-----
|From: Ed [mailto:[EMAIL PROTECTED]] 
|Sent: Wednesday, February 19, 2003 3:33 PM
|To: [EMAIL PROTECTED]
|Subject: [PHP-WIN] Re: PWS or IIS?
|
|
|If your on windows IIS5 is the best choice.
|Since PWS is much slower.
|
|Don't go for Apache under windows ,its the ultimate under 
|Unix/Linux but certainly not under windows.I tried it under 
|Win2K ansd didn't like it.
|
|"M1nt Ch3w" <[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Howdy all,
>
> Just got Win XP Pro, and was wondering which server to go for. IIS or 
> PWS? Which one is more stable and stuff like that. Thanks in advance,
> /m1nt
>



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--- End Message ---
--- Begin Message ---
Same here...

I am running Win Xp Pro on my laptop and have Apache running with Tomcat
for development.  Most of my development is PHP and I have never had a
problem on my windows machine.

I was using Xp Pro to host 2 php/mysql sites on one of my machines at
home.  I never had a problem with that either.  I just recently switched
over to linux to host the sites only because I wanted more server
features.

In my opinion, I would always choose Apache if I was going to using PHP.

 
---> Jonathan
 
 
 
-----Original Message-----
From: Matt Hillebrand [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, February 19, 2003 4:15 PM
To: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] Re: PWS or IIS?

IIS is no good if you ask me. It wouldn't let me use a custom 404
script, and sometimes it acts up....refusing to work.

I also like Apache because I use Win2k and Linux.

|-----Original Message-----
|From: Ed [mailto:[EMAIL PROTECTED]] 
|Sent: Wednesday, February 19, 2003 3:33 PM
|To: [EMAIL PROTECTED]
|Subject: [PHP-WIN] Re: PWS or IIS?
|
|
|If your on windows IIS5 is the best choice.
|Since PWS is much slower.
|
|Don't go for Apache under windows ,its the ultimate under 
|Unix/Linux but certainly not under windows.I tried it under 
|Win2K ansd didn't like it.
|
|"M1nt Ch3w" <[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Howdy all,
>
> Just got Win XP Pro, and was wondering which server to go for. IIS or 
> PWS? Which one is more stable and stuff like that. Thanks in advance,
> /m1nt
>



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--- End Message ---
--- Begin Message ---
Hi Matt,

All the remaing headers are int the last argument of the mail function.And
are sperareted by delimiter "\r\n"

like so..

mail("[EMAIL PROTECTED]", "the subject", $message, "From:
[EMAIL PROTECTED]\r\nCC:[EMAIL PROTECTED]\r\nBCC:getonetoo@shotsnail
.com");

regrads,

Ed


"Matt Hillebrand" <[EMAIL PROTECTED]> wrote in message
003e01c2d6c2$d75e5bc0$0100a8c0@beast">news:003e01c2d6c2$d75e5bc0$0100a8c0@beast...
> Has anyone here successfully sent CC headers with mail()? It simply
> won't work for me. I get different errors depending on which mail server
> I use.
>
> Matt
>
>


--- End Message ---
--- Begin Message ---
Ah ha! There can't be a space between CC: and the email address!?!?
That's not cool...

Thanks; this helps a lot.

Matt

|-----Original Message-----
|From: Ed [mailto:[EMAIL PROTECTED]] 
|Sent: Wednesday, February 19, 2003 3:22 PM
|To: [EMAIL PROTECTED]
|Subject: [PHP-WIN] Re: mail() CC: header
|
|
|Hi Matt,
|
|All the remaing headers are int the last argument of the mail 
|function.And are sperareted by delimiter "\r\n"
|
|like so..
|
|mail("[EMAIL PROTECTED]", "the subject", $message, "From: 
|[EMAIL PROTECTED]\r\nCC:[EMAIL PROTECTED]\r\nBCC:getone
too@shotsnail
|.com");
|
|regrads,
|
|Ed
|
|
|"Matt Hillebrand" <[EMAIL PROTECTED]> wrote in message 
003e01c2d6c2$d75e5bc0$0100a8c0@beast">news:003e01c2d6c2$d75e5bc0$0100a8c0@beast...
> Has anyone here successfully sent CC headers with mail()? It simply 
> won't work for me. I get different errors depending on which mail 
> server I use.
>
> Matt
>
>



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




--- End Message ---
--- Begin Message ---
<apologies if this came through yesterday as well, I never saw it propogate
though>

Hello All,

I am experimenting with HTTP authentication in IIS 5.0 on a Windows 2000 SP3
server with PHP 4.3.0. PHP is installed as an ISAPI module both as a filter
and an application mapping (both point to the php4isapi.dll). All forms of
authentication are turned off in IIS (anonymous access only). I am using the
php.ini-dist with only the /extensions directory changed.

It appears to me that the user/pass I enter is never getting through to PHP.
I've tried authentication examples from
http://www.zend.com/zend/tut/authentication.php as well as
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=252&lngW
Id=8 with no luck.

(btw, tested on a friends BSD/Apache, worked fine [a simple test from the
zend.com page])

Thanks!



--- End Message ---

Reply via email to