php-windows Digest 28 Dec 2001 09:13:51 -0000 Issue 923
Topics (messages 11155 through 11167):
Image Magick on Windows NT?
11155 by: Damiano Ferrari
11156 by: Rasmus Lerdorf
11163 by: Frank M. Kromann
Re: Real dumb newbie question...
11157 by: VivoAnt
11158 by: VivoAnt
11160 by: Todd Williamsen
Mathimatical equations in PHP
11159 by: Todd Williamsen
11165 by: Svensson, B.A.T. (HKG)
Re: [PHP] PHP software tool
11161 by: Todd Williamsen
11166 by: Svensson, B.A.T. (HKG)
Re: my site works well on WinME but Doesn`t work on WinXP HEEELLLLLPPPPP MEEEEEEEEE
11162 by: Todd Williamsen
Call another page after the menu had been selected
11164 by: Jack
Re: HTTP Referer
11167 by: Steve Yates
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 wrote a script that will create a thumbnail page for all the pictures in a
given directory. The thumbnails are created with the GD libraries and while
it all works, the result is.. well, very low quality, the .jpg images
actually look like .gif. Is there any way I can use Image Magick on Windows
NT (and PHP 4.1.0)? If not, is there any other viable solution?
Damiano
--- End Message ---
--- Begin Message ---
You need to use GD2. GD1 dithers down to 8-bit colour. There should be a
GD.DLL based on GD2 floating around out there somewhere.
-Rasmus
On Thu, 27 Dec 2001, Damiano Ferrari wrote:
> I wrote a script that will create a thumbnail page for all the pictures in a
> given directory. The thumbnails are created with the GD libraries and while
> it all works, the result is.. well, very low quality, the .jpg images
> actually look like .gif. Is there any way I can use Image Magick on Windows
> NT (and PHP 4.1.0)? If not, is there any other viable solution?
>
> Damiano
>
>
>
>
--- End Message ---
--- Begin Message ---
ImageMagic works fine on Window. You can download the binaries from one of the mirror
sites.
I have a web page (http://kromann.info/php4.php) where you can download php binaries
based on the latest cvs version. There you can find php_gd.dll with both GD1 and GD2.
I have not tested it but I think these dll's can be used with php 4.1.x.
- Frank
> You need to use GD2. GD1 dithers down to 8-bit colour. There should be a
> GD.DLL based on GD2 floating around out there somewhere.
>
> -Rasmus
>
> On Thu, 27 Dec 2001, Damiano Ferrari wrote:
>
> > I wrote a script that will create a thumbnail page for all the pictures in a
> > given directory. The thumbnails are created with the GD libraries and while
> > it all works, the result is.. well, very low quality, the .jpg images
> > actually look like .gif. Is there any way I can use Image Magick on Windows
> > NT (and PHP 4.1.0)? If not, is there any other viable solution?
> >
> > Damiano
> >
> >
> >
> >
>
>
> --
> 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 ---
Sry if I'm sounding real dumb now :/
I removed the # like you said and I also removed the .html extension that I
did... But it still didn't help :( I tried going into the error log thingy
and found it empty but on the access I noticed this:
"GET /phpinfo.php HTTP/1.1" 200 33
Shouldn't it be like SHOW instead of GET or something?
*Confused*
----- Original Message -----
From: "LaserJetter" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 27, 2001 1:13 AM
Subject: [PHP-WIN] Re: Real dumb newbie question...
> Lines that start with a # have been commented out so the Apache will just
> ignore these.
> The lines which start with AddType need to be added but so you can just
> delete the # from the start of the lines below ehere it says "For PHP
4.x".
> Any of the extensions in the list at the end of the line will be
recognised
> as PHP files. As you can see, all .html files will be processed by the PHP
> application as well. Although this will work, you might like to delete
.html
> from the list and let apache handle these.
> You can also add extensions to that list and any file ending in that will
be
> processed as if it was a PHP file e.g. you could add .eeek and all files
> that end in .eeek would be processed by PHP!
> I think that you may have to add another line to the configuration file as
> well to tell it to use c:\php\php.exe for PHP files. This should be
> mentioned in the install.txt if you do (I used the server module thing,
not
> the CGI program).
> If this line isnt added to httpd.conf, I think you can add a line at the
> start of every PHP file to tell it what program to use. Its something like
> #!c:/php/php.exe (as you do in perl scripts) but look it up somewhere
> because I'm not sure.
>
> Hope this helps a bit!
>
> "Laserjetter" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Its nothing to do with the browser, you need to tell Apache that .php
> files
> > need to be sent to a browser and are not downloaded.
> > By default, Apache handles .htm and .html files but you need to tell it
to
> > send .php files to the PHP program. Apache then sends the output from
PHP
> to
> > the browser window as it would with a normal web page.
> >
> > There is a section in the install.txt file which tells you how to change
> the
> > apache/conf/httpd.conf file
> >
> >
> > "Vivoant" <[EMAIL PROTECTED]> wrote in message
> > 003901c18dda$c3d2bec0$5bc3e60c@VivoAnt">news:003901c18dda$c3d2bec0$5bc3e60c@VivoAnt...
> > I'm totally new to this PHP thing... (and apache...) so I tried doing
one
> of
> > those tutoral thingies... I stuck stuck on some problem that is like
this:
> >
> > I try to access the page on my own server (phpinfo.php) and for some
> reason
> > instead of loading it on IE6.0 it tries to download it from my own
> > harddrive... How do I prevent this? (It worked just fine before...) I
can
> > still load PHP pages from other sites on the net except the one I
made...
> I
> > tried deleting it and making a new PHP page but it still does the same
> > thing... Any help is appreciated :)))
> >
> > (I'm on MSN Messenger too... [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]
>
--- End Message ---
--- Begin Message ---
Err... The error log all of a sudden showed up I think this is the reason
why it doesn't want to work...
[Thu Dec 27 14:43:31 2001] [error] [client 12.230.209.171] File does not
exist: c:/program files/apache group/apache/htdocs/scripts/root.exe
[Thu Dec 27 14:43:32 2001] [error] [client 12.230.209.171] File does not
exist: c:/program files/apache group/apache/htdocs/msadc/root.exe
[Thu Dec 27 14:43:32 2001] [error] [client 12.230.209.171] File does not
exist: c:/program files/apache group/apache/htdocs/c/winnt/system32/cmd.exe
[Thu Dec 27 14:43:33 2001] [error] [client 12.230.209.171] File does not
exist: c:/program files/apache group/apache/htdocs/d/winnt/system32/cmd.exe
[Thu Dec 27 14:43:34 2001] [error] [client 12.230.209.171] File does not
exist: c:/program files/apache
group/apache/htdocs/scripts/..%5c/winnt/system32/cmd.exe
[Thu Dec 27 14:43:34 2001] [error] [client 12.230.209.171] File does not
exist: c:/program files/apache
group/apache/htdocs/_vti_bin/..%5c/..%5c/..%5c/winnt/system32/cmd.exe
[Thu Dec 27 14:43:43 2001] [error] [client 12.230.209.171] File does not
exist: c:/program files/apache
group/apache/htdocs/_mem_bin/..%5c/..%5c/..%5c/winnt/system32/cmd.exe
[Thu Dec 27 14:43:44 2001] [error] [client 12.230.209.171] File does not
exist: c:/program files/apache
group/apache/htdocs/msadc/..%5c/..%5c/..%5c/..Á/..Á/..Á/winnt/system32/cm
d.exe
[Thu Dec 27 14:43:44 2001] [error] [client 12.230.209.171] File does not
exist: c:/program files/apache
group/apache/htdocs/scripts/..Á/winnt/system32/cmd.exe
[Thu Dec 27 14:43:45 2001] [error] [client 12.230.209.171] File does not
exist: c:/program files/apache
group/apache/htdocs/scripts/..À¯/winnt/system32/cmd.exe
[Thu Dec 27 14:43:45 2001] [error] [client 12.230.209.171] File does not
exist: c:/program files/apache
group/apache/htdocs/scripts/..Áo/winnt/system32/cmd.exe
[Thu Dec 27 14:43:46 2001] [error] [client 12.230.209.171] File does not
exist: c:/program files/apache
group/apache/htdocs/scripts/..%5c/winnt/system32/cmd.exe
[Thu Dec 27 14:43:47 2001] [error] [client 12.230.209.171] File does not
exist: c:/program files/apache
group/apache/htdocs/scripts/..%2f/winnt/system32/cmd.exe
All that stuff appeared after I did the phpinfo thing (It started
downloading instead of showing it)
----- Original Message -----
From: "LaserJetter" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 27, 2001 1:13 AM
Subject: [PHP-WIN] Re: Real dumb newbie question...
> Lines that start with a # have been commented out so the Apache will just
> ignore these.
> The lines which start with AddType need to be added but so you can just
> delete the # from the start of the lines below ehere it says "For PHP
4.x".
> Any of the extensions in the list at the end of the line will be
recognised
> as PHP files. As you can see, all .html files will be processed by the PHP
> application as well. Although this will work, you might like to delete
.html
> from the list and let apache handle these.
> You can also add extensions to that list and any file ending in that will
be
> processed as if it was a PHP file e.g. you could add .eeek and all files
> that end in .eeek would be processed by PHP!
> I think that you may have to add another line to the configuration file as
> well to tell it to use c:\php\php.exe for PHP files. This should be
> mentioned in the install.txt if you do (I used the server module thing,
not
> the CGI program).
> If this line isnt added to httpd.conf, I think you can add a line at the
> start of every PHP file to tell it what program to use. Its something like
> #!c:/php/php.exe (as you do in perl scripts) but look it up somewhere
> because I'm not sure.
>
> Hope this helps a bit!
>
> "Laserjetter" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > Its nothing to do with the browser, you need to tell Apache that .php
> files
> > need to be sent to a browser and are not downloaded.
> > By default, Apache handles .htm and .html files but you need to tell it
to
> > send .php files to the PHP program. Apache then sends the output from
PHP
> to
> > the browser window as it would with a normal web page.
> >
> > There is a section in the install.txt file which tells you how to change
> the
> > apache/conf/httpd.conf file
> >
> >
> > "Vivoant" <[EMAIL PROTECTED]> wrote in message
> > 003901c18dda$c3d2bec0$5bc3e60c@VivoAnt">news:003901c18dda$c3d2bec0$5bc3e60c@VivoAnt...
> > I'm totally new to this PHP thing... (and apache...) so I tried doing
one
> of
> > those tutoral thingies... I stuck stuck on some problem that is like
this:
> >
> > I try to access the page on my own server (phpinfo.php) and for some
> reason
> > instead of loading it on IE6.0 it tries to download it from my own
> > harddrive... How do I prevent this? (It worked just fine before...) I
can
> > still load PHP pages from other sites on the net except the one I
made...
> I
> > tried deleting it and making a new PHP page but it still does the same
> > thing... Any help is appreciated :)))
> >
> > (I'm on MSN Messenger too... [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]
>
--- End Message ---
--- Begin Message ---
don't remove the html extension!
Do this, this is from the Install.txt file
Edit your php.ini file:
You will need to change the 'extension_dir' setting to
point to your php-install-dir, or where you have placed
your 'php_*.dll' files. ex: c:\php
If you are using OmniHTTPd, do not follow the next step.
Set the 'doc_root' to point to your webservers
document_root. ex: c:\apache\htdocs or c:\webroot
Choose which extensions you would like to load when PHP
starts, noting that several extensions are already built
into the Windows release, see the section about
Windows extensions for details of the built in extensions.
You can uncomment the: 'extension=php_*.dll' lines
in php.ini to load these extensions.
Some extensions require you to have additional libraries
installed on your system for the module to work correctly.
The PHP FAQ at www.php.net/FAQ.php has more information on
where to get supporting libraries. You can also load a
module dynamically in your script using dl. See the section
about Windows extensions.
Note that on a new installation it is advisable to first get
PHP working and tested without any extensions before enabling
them in php.ini.
-----------------------------------------------------------------------
Now do this:
=======================
Installing PHP on Windows with Apache 1.3.x
There are two ways to set up PHP to work with Apache 1.3.x
on Windows. One is to use the CGI binary (php.exe),
the other is to use the Apache module dll. In either case
you need to stop the Apache server, and edit your
srm.conf or httpd.conf to configure Apache to work with PHP.
Although there can be a few variations of configuring PHP
under Apache, these are simple enough to be used by the
newcomer. Please consult the Apache Docs for further
configuration directives.
If you unzipped the PHP package to C:\PHP\ as desribed
above, you need to insert these lines to your Apache conf
file to set up the CGI binary:
ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php
Action application/x-httpd-php "/php/php.exe"
Remember to restart the server, for example,
NET STOP APACHE
followed by
NET START APACHE
If you would like to use PHP as a module in Apache,
you should move php4ts.dll to the windows/system (for Windows 9x/Me)
or winnt/system32 (for Windows NT/2000) directory, overwriting any
older file. Then you should add the following two lines to you Apache
conf file:
LoadModule php4_module c:/php/sapi/php4apache.dll
AddType application/x-httpd-php .php
Remember to restart the server, for example,
NET STOP APACHE
followed by
NET START APACHE
To use the source code highlighting feature, simply create a PHP
script file and stick this code in:
<?php show_source("original_php_script.php"); ?>
Substitute original_php_script.php with the name of the
file you wish to show the source of. (This is the only way of
doing so).
On Win-Apache all backslashes in a path statement such
as: "c:\directory\file.ext", must be converted to
forward slashes.
--- End Message ---
--- Begin Message ---
Ok...
I have a site that is for a football game and people play each other then
report who is the winner and loser. Well, I want to inject some excitement
a bit and do some stats, like Passing averages per game and rushing average
per game.
The problem is that it will need to make the total yards then divide them by
the number of games they played.
How would I do that? Also would I need two rows, one for total yards and
one for averages? or just one row just for the averages?
--- End Message ---
--- Begin Message ---
>I have a site that is for a football game and people play each other then
>report who is the winner and loser. Well, I want to inject some excitement
>a bit and do some stats, like Passing averages per game and rushing average
>per game.
>
>The problem is that it will need to make the total yards then divide them
by
>the number of games they played.
>
>How would I do that?
What about the old fashion addition, multiplication and division we all
learnt in basic school?
> Also would I need two rows, one for total yards and
>one for averages? or just one row just for the averages?
For total use addition for average divide the total with number of
participates.
--- End Message ---
--- Begin Message ---
PHPEdit
I forget who its by... its nice, needs work, but what do you expect for
free?
"B.A.T. Svensson" <[EMAIL PROTECTED]> wrote in message
27E647E5629ED211BF78009027289C6302157DA9@mail1">news:27E647E5629ED211BF78009027289C6302157DA9@mail1...
>So sprach »LaserJetter« am 2001-12-22 um 18:46:46 -0000 :
>> Does anybody know of or can recommend any freeware text editing tools for
>> editing PHP code in Win32?
>
>vim
Hey, what's wrong with notepad now then?
--- End Message ---
--- Begin Message ---
From: Todd Williamsen
>PHPEdit
>
>I forget who its by... its nice, needs work, but what do you expect for
>free?
GnuEmax?
>"B.A.T. Svensson" wrote in message
>>So sprach »LaserJetter« am 2001-12-22 um 18:46:46 -0000 :
>>> Does anybody know of or can recommend any freeware text editing tools
for
>>> editing PHP code in Win32?
>>
>>vim
>
>Hey, what's wrong with notepad now then?
--- End Message ---
--- Begin Message ---
if you give system specs, it may helps us help you... what web server you
using?
"Aiquidie" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I do not understand why?
>
> it works great on Win ME bu when I work on XP I get ""Supplied argument is
> not a valid MySQL result resource in"" message.
>
> and the weirdest thing is that the site defines the user but when listing
> other users it gives that warning. So mysql works but makes some mistakes
> somewhere. Maybe the php.
>
> Please help meeeeeee
>
>
--- End Message ---
--- Begin Message ---
Dear all
I'm using UltraDev which build a form containing a menu, there a two items
inside this menu for user to choose. This form is using Post Action to
$php_self which means it will pass back the variable to itself.
Then here is the question:
what should i do if i want to call a page prompt from a blank window when
the item A is selected?
and another page when Item B is selected!
thx a lot
jack
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
> From: "Mihail Bota" <[EMAIL PROTECTED]>
> > I am trying to use the HTTP_Referer (or any of its variants:
SERVER_VARS,
> > ENV_VARS) to keep track of the URL of pages that are passed through
forms.
One thing you might want to consider is that unless I am mistaken,
HTTP_REFERER is dependent on the web browser sending that info to the
server. It may also be dependent on the server also (?), but if it's
working for you then obviously your server supports it.
- Steve Yates
- SRT Enterprises
- There are 3 kinds of people: those who can count and those who can't.
/ Taglines by Taglinator - www.srtware.com /
--- End Message ---