php-windows Digest 4 Jan 2005 04:48:44 -0000 Issue 2521
Topics (messages 25210 through 25219):
Re: PHP cgi
25210 by: Dean Hayes
25211 by: blulagoon
25212 by: Dean Hayes
25213 by: blulagoon
25214 by: Luis Moreira
25218 by: blulagoon
Searching for UPS tool
25215 by: Tony Devlin
Re: a function question
25216 by: Patrick Roane
25217 by: blulagoon
any scripts to manage APACHE's HTPASSWD/AUTH file?
25219 by: Leo G. Divinagracia III
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 ---
U can find this in the install.txt file under the php root dir
I have always used php as a module never CGI an have never had problems
under 98SE or XP Pro
--------------------------------------------------------------------------------------------------------------------
Installing as an Apache module
You need to insert these two lines to your Apache httpd.conf
configuration file to set up the PHP module for Apache 2.0:
Example 2-6. PHP and Apache 2.0 as Module
# For PHP 4 do something like this:
LoadModule php4_module "c:/php/sapi/php4apache2.dll"
AddType application/x-httpd-php .php
# For PHP 5 do something like this:
LoadModule php5_module "c:/php/php5apache2.dll"
AddType application/x-httpd-php .php
# configure the path to php.ini
PHPIniDir "C:/php"
Note: Remember to substitute the c:/php/ for your actual path to
PHP in the above examples. Take care to use either php4apache2.dll
or php5apache2.dll in your LoadModule directive and not
php4apache.dll or php5apache.dll as the latter ones are designed to
run with Apache 1.3.x.
Warning
Don't mix up your installation with DLL files from different PHP
versions. You have the only choice to use the DLL's and extensions
that ship with your downloaded PHP version.
--------------------------------------------------------------------------------------------------------------------
Dean "The Insane Guy" Hayes
<-- I design and i redesign but still i never designed true beauty like you
-->
~~~ Call me Insane call me Crazy but there is one thing i know i am That is
someone that shall reach peoples hearts with words ~~~
~~ PHP seems easy enough but what about this ASP now that looks hard ~~
From: blulagoon <[EMAIL PROTECTED]>
To: [email protected]
Subject: [PHP-WIN] PHP cgi
Date: Mon, 03 Jan 2005 11:01:40 +0000
I'm looking at an open source content management system which is PHP
based, but I'm having problems installing it. It has been suggested,
that the problem is solved by "switching PHP from the cgi mode to
Apache2 module" but I have no idea how to do this or what the
ramifications might be for all the other scripts I run. I've tried
searching through the manual at php.net for cgi, but haven't turned
anything useful up.
I guess it is a setting somewhere, but I couldn't find anything within
my php.ini file. I'm running PHP 4.3.10 and Apache2 on a Windows XP box.
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I've added the following two lines to my httpd.conf file at the end of the
LoadModule section:
LoadModule php4_module "C:/PHP/sapi/php4apache2.dll"
PHPiniDIR "C:/WINDOWS"
I've got the add type line in the file already.
End result is that Apache won't start automatically, and if I try and start it
manually it says 'Operation Failed'
Is there any other changes I need to make to the httpd.conf file, like changing
something to do with it running as a
cgi, as I seem to have created a conflict, but if I '#' the two lines out it
all starts up fine. Looking at the file
there is a cgi module that is in the LoadModule section, should I comment that
out ?
Further help would be very much appreciated.
Dean Hayes wrote:
> U can find this in the install.txt file under the php root dir
>
> I have always used php as a module never CGI an have never had problems
> under 98SE or XP Pro
>
> --------------------------------------------------------------------------------------------------------------------
>
> Installing as an Apache module
>
> You need to insert these two lines to your Apache httpd.conf
> configuration file to set up the PHP module for Apache 2.0:
>
> Example 2-6. PHP and Apache 2.0 as Module
> # For PHP 4 do something like this:
> LoadModule php4_module "c:/php/sapi/php4apache2.dll"
> AddType application/x-httpd-php .php
>
> # For PHP 5 do something like this:
> LoadModule php5_module "c:/php/php5apache2.dll"
> AddType application/x-httpd-php .php
>
> # configure the path to php.ini
> PHPIniDir "C:/php"
>
> Note: Remember to substitute the c:/php/ for your actual path to
> PHP in the above examples. Take care to use either php4apache2.dll
> or php5apache2.dll in your LoadModule directive and not
> php4apache.dll or php5apache.dll as the latter ones are designed to
> run with Apache 1.3.x.
>
> Warning
>
> Don't mix up your installation with DLL files from different PHP
> versions. You have the only choice to use the DLL's and extensions
> that ship with your downloaded PHP version.
>
> --------------------------------------------------------------------------------------------------------------------
>
> Dean "The Insane Guy" Hayes
>
> <-- I design and i redesign but still i never designed true beauty like you
> -->
>
> ~~~ Call me Insane call me Crazy but there is one thing i know i am That is
> someone that shall reach peoples hearts with words ~~~
>
> ~~ PHP seems easy enough but what about this ASP now that looks hard ~~
>
> From: blulagoon <[EMAIL PROTECTED]>
> To: [email protected]
> Subject: [PHP-WIN] PHP cgi
> Date: Mon, 03 Jan 2005 11:01:40 +0000
>
> I'm looking at an open source content management system which is PHP
> based, but I'm having problems installing it. It has been suggested,
> that the problem is solved by "switching PHP from the cgi mode to
> Apache2 module" but I have no idea how to do this or what the
> ramifications might be for all the other scripts I run. I've tried
> searching through the manual at php.net for cgi, but haven't turned
> anything useful up.
>
> I guess it is a setting somewhere, but I couldn't find anything within
> my php.ini file. I'm running PHP 4.3.10 and Apache2 on a Windows XP box.
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Yes remove all the lines that relate to running PHP as a CGI u can not run
both at the same time
Sorry forgot to say this before did not think about it
Dean "The Insane Guy" Hayes
<-- I design and i redesign but still i never designed true beauty like you
-->
~~~ Call me Insane call me Crazy but there is one thing i know i am That is
someone that shall reach peoples hearts with words ~~~
~~ PHP seems easy enough but what about this ASP now that looks hard ~~
From: blulagoon <[EMAIL PROTECTED]>
To: [email protected]
Subject: Re: [PHP-WIN] PHP cgi
Date: Mon, 03 Jan 2005 12:19:54 +0000
I've added the following two lines to my httpd.conf file at the end of the
LoadModule section:
LoadModule php4_module "C:/PHP/sapi/php4apache2.dll"
PHPiniDIR "C:/WINDOWS"
I've got the add type line in the file already.
End result is that Apache won't start automatically, and if I try and start
it manually it says 'Operation Failed'
Is there any other changes I need to make to the httpd.conf file, like
changing something to do with it running as a
cgi, as I seem to have created a conflict, but if I '#' the two lines out it
all starts up fine. Looking at the file
there is a cgi module that is in the LoadModule section, should I comment
that out ?
Further help would be very much appreciated.
Dean Hayes wrote:
> U can find this in the install.txt file under the php root dir
>
> I have always used php as a module never CGI an have never had problems
> under 98SE or XP Pro
>
>
--------------------------------------------------------------------------------------------------------------------
>
> Installing as an Apache module
>
> You need to insert these two lines to your Apache httpd.conf
> configuration file to set up the PHP module for Apache 2.0:
>
> Example 2-6. PHP and Apache 2.0 as Module
> # For PHP 4 do something like this:
> LoadModule php4_module "c:/php/sapi/php4apache2.dll"
> AddType application/x-httpd-php .php
>
> # For PHP 5 do something like this:
> LoadModule php5_module "c:/php/php5apache2.dll"
> AddType application/x-httpd-php .php
>
> # configure the path to php.ini
> PHPIniDir "C:/php"
>
> Note: Remember to substitute the c:/php/ for your actual path to
> PHP in the above examples. Take care to use either php4apache2.dll
> or php5apache2.dll in your LoadModule directive and not
> php4apache.dll or php5apache.dll as the latter ones are designed to
> run with Apache 1.3.x.
>
> Warning
>
> Don't mix up your installation with DLL files from different PHP
> versions. You have the only choice to use the DLL's and extensions
> that ship with your downloaded PHP version.
>
>
--------------------------------------------------------------------------------------------------------------------
>
> Dean "The Insane Guy" Hayes
>
> <-- I design and i redesign but still i never designed true beauty like
you
> -->
>
> ~~~ Call me Insane call me Crazy but there is one thing i know i am That
is
> someone that shall reach peoples hearts with words ~~~
>
> ~~ PHP seems easy enough but what about this ASP now that looks hard ~~
>
> From: blulagoon <[EMAIL PROTECTED]>
> To: [email protected]
> Subject: [PHP-WIN] PHP cgi
> Date: Mon, 03 Jan 2005 11:01:40 +0000
>
> I'm looking at an open source content management system which is PHP
> based, but I'm having problems installing it. It has been suggested,
> that the problem is solved by "switching PHP from the cgi mode to
> Apache2 module" but I have no idea how to do this or what the
> ramifications might be for all the other scripts I run. I've tried
> searching through the manual at php.net for cgi, but haven't turned
> anything useful up.
>
> I guess it is a setting somewhere, but I couldn't find anything within
> my php.ini file. I'm running PHP 4.3.10 and Apache2 on a Windows XP box.
>
> --
> 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 ---
Thanks Dean. I've commented out the lines that say:
Action application/x-httpd-php /php/php.exe
ScriptAlias /php/ "C:/php/"
which I think are involved with cgi, but I don't know enough about the
configuration files to know what else it uses,
but with those lines '#' out, the two new lines added and all my addtype lines
together, again Apache refuses to start.
Do you have any idea if any other lines need to be disabled, the two above are
the only ones mentioned in the
install.txt file
Thanks again for your help.
Dean Hayes wrote:
> Yes remove all the lines that relate to running PHP as a CGI u can not run
> both at the same time
>
> Sorry forgot to say this before did not think about it
>
> Dean "The Insane Guy" Hayes
>
> <-- I design and i redesign but still i never designed true beauty like you
> -->
>
> ~~~ Call me Insane call me Crazy but there is one thing i know i am That is
> someone that shall reach peoples hearts with words ~~~
>
> ~~ PHP seems easy enough but what about this ASP now that looks hard ~~
>
--- End Message ---
--- Begin Message ---
This is a PHP list, and there is an Apache one were this problem fits
better.
Go to www.apache.org and subscribe it.
Meanwhile, do you have an error log to look at ?
What does it say ?
Luis
blulagoon wrote:
Thanks Dean. I've commented out the lines that say:
Action application/x-httpd-php /php/php.exe
ScriptAlias /php/ "C:/php/"
which I think are involved with cgi, but I don't know enough about the
configuration files to know what else it uses,
but with those lines '#' out, the two new lines added and all my addtype lines
together, again Apache refuses to start.
Do you have any idea if any other lines need to be disabled, the two above are
the only ones mentioned in the
install.txt file
Thanks again for your help.
Dean Hayes wrote:
Yes remove all the lines that relate to running PHP as a CGI u can not run
both at the same time
Sorry forgot to say this before did not think about it
Dean "The Insane Guy" Hayes
<-- I design and i redesign but still i never designed true beauty like you
-->
~~~ Call me Insane call me Crazy but there is one thing i know i am That is
someone that shall reach peoples hearts with words ~~~
~~ PHP seems easy enough but what about this ASP now that looks hard ~~
--- End Message ---
--- Begin Message ---
I've looked in the apache error.log file, but there are no entries logged there
when apache fails to start.
I think you could make the case either way as to which group is more relevant
here, PHP or Apache. However I'm sure there
are lots of people here who use PHP with Apache running under Windows, and
hopefully some of them will have switched between
cgi and module mode and be able to tell me what I'm doing wrong.
Apologies to IIS users to whom this thread is of no interest.
Luis Moreira wrote:
> This is a PHP list, and there is an Apache one were this problem fits
> better.
> Go to www.apache.org and subscribe it.
> Meanwhile, do you have an error log to look at ?
> What does it say ?
>
> Luis
>
> blulagoon wrote:
>
> >Thanks Dean. I've commented out the lines that say:
> >
> >Action application/x-httpd-php /php/php.exe
> >ScriptAlias /php/ "C:/php/"
> >
> >which I think are involved with cgi, but I don't know enough about the
> >configuration files to know what else it uses,
> >but with those lines '#' out, the two new lines added and all my addtype
> >lines together, again Apache refuses to start.
> >Do you have any idea if any other lines need to be disabled, the two above
> >are the only ones mentioned in the
> >install.txt file
> >
> >Thanks again for your help.
> >
> >Dean Hayes wrote:
> >
> >
> >
> >>Yes remove all the lines that relate to running PHP as a CGI u can not run
> >>both at the same time
> >>
> >>Sorry forgot to say this before did not think about it
> >>
> >>Dean "The Insane Guy" Hayes
> >>
> >><-- I design and i redesign but still i never designed true beauty like you
> >>-->
> >>
> >>~~~ Call me Insane call me Crazy but there is one thing i know i am That is
> >>someone that shall reach peoples hearts with words ~~~
> >>
> >>~~ PHP seems easy enough but what about this ASP now that looks hard ~~
> >>
> >>
> >>
> >
> >
> >
--- End Message ---
--- Begin Message ---
Hello List,
Does anyone have or know where I can find a functional UPS shipping
tool? I have found tons for their old ups tool (which no longer function),
they have since switched to an XML version and my attempts have been futile,
including trying to find someone elses working version. So my request is do
any of you have a working UPS shipping calculator or do you know where I can
find one?
Thanks,
Tony
--- End Message ---
--- Begin Message ---
Thanks for all of your help. Sorry for the late
response, I've been out of town.
Anyway, my objective with this is to ultimately create
a website that uses php and mysql to store and load
information about gigs (for a band). I design web
sites and primarily rely on 'flash' to do the job
(which can be time consuming). If you go to
www.franklin-band.com and go to the '2005' link,
you'll see all the months for this year and the gigs
that are booked. I'd like to stay true to this format,
but eventually replace the flash w/php so that our
booking agent can simply 'log in' and type in the
details himself.
--- Jason Barnett <[EMAIL PROTECTED]> wrote:
>
> >
> > Here is my code (which I can't get to work):
> >
> > <?php
>
> /** Note that my code / comments are untested, but
> should be helpful. */
>
> >
> >
> > $mail = "[EMAIL PROTECTED]";
> > $user = "patrick";
> >
> > function usermail( $user, $mail ) {
> >
>
> /** We don't need global $user or $mail since these
> are passed into the
> function. In fact doing this just might confuse
> yourself... */
>
> > $user; = ucwords( $user ); // capitalizes
> the
> > //'p' in patrick
>
> /** The above is incorrect. A semicolon terminates
> a line! Try the
> following: */
>
> $user = ucwords( strtolower( $user ) );
>
> > $mail; = strtolower( $mail ); // converts
> all
> > //of FOJOMO into lower case
> >
>
> $mail = strtolower( $mail );
>
> >
> >
> > if ( strstr( $mail ), "@" )) {
>
>
> /** Agreed with Graeme's previous comment, strpos is
> fine for this. */
>
> if ( strpos( $mail, '@' ) ) {
>
>
> > // searches for the '@' sign
> > user_array = explode("-", $user, $mail); // this
>
> $user_array = explode( '-', $user);
>
> > //function (explode) creates the array
>
> /** Check the manual page for explode
> http://php.net/manual/en/function.explode.php
>
> Why do you explode on hyphens? Do you have a system
> to prevent users
> from creating email addresses without hyphens? And
> what do you want to
> do with this array? */
>
> > } else {
> > print "Please enter a valid e-mail address"; //
> > default if test fails to //find the '@' sign
> >
> >
> > }
> >
>
> /** Nothing is returned either... did you want
> something? */
> return $user_array;
>
> } /** end of function usermail */
>
>
> /** Now we test the function and echo the result of
> running the function. */
> $result = usermail( $user, $mail );
> print nl2br( print_r( $result ) );
>
>
> >
> >
> > ?>
> >
>
>
>
> --
> Teach a person to fish...
>
> Ask smart questions:
> http://www.catb.org/~esr/faqs/smart-questions.html
> PHP Manual: http://php.net/manual/
> php-general archives:
> http://marc.theaimsgroup.com/?l=php-general&w=2
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
=====
----------------
"forget your lust for the rich man's gold. All that you need, is in your soul.
You can do this if you try. All that I want for you my son, is to be satisfied"
~ Lynard Skynard
--- End Message ---
--- Begin Message ---
I've not read the whole thread, but might I suggest you might want to use PHP
to get the information from a MySQL database and use that data to populate your
Flash interface. If you use an action script construct like loadVars or
loadVariables it is not too difficult to pass parameters from Flash to PHP to
MySQL, and
then use PHP to pass them back to Flash.
Just a thought.
Blu
Patrick Roane wrote:
> Thanks for all of your help. Sorry for the late
> response, I've been out of town.
>
> Anyway, my objective with this is to ultimately create
> a website that uses php and mysql to store and load
> information about gigs (for a band). I design web
> sites and primarily rely on 'flash' to do the job
> (which can be time consuming). If you go to
> www.franklin-band.com and go to the '2005' link,
> you'll see all the months for this year and the gigs
> that are booked. I'd like to stay true to this format,
> but eventually replace the flash w/php so that our
> booking agent can simply 'log in' and type in the
> details himself.
>
> --- Jason Barnett <[EMAIL PROTECTED]> wrote:
>
> >
> > >
> > > Here is my code (which I can't get to work):
> > >
> > > <?php
> >
> > /** Note that my code / comments are untested, but
> > should be helpful. */
> >
> > >
> > >
> > > $mail = "[EMAIL PROTECTED]";
> > > $user = "patrick";
> > >
> > > function usermail( $user, $mail ) {
> > >
> >
> > /** We don't need global $user or $mail since these
> > are passed into the
> > function. In fact doing this just might confuse
> > yourself... */
> >
> > > $user; = ucwords( $user ); // capitalizes
> > the
> > > //'p' in patrick
> >
> > /** The above is incorrect. A semicolon terminates
> > a line! Try the
> > following: */
> >
> > $user = ucwords( strtolower( $user ) );
> >
> > > $mail; = strtolower( $mail ); // converts
> > all
> > > //of FOJOMO into lower case
> > >
> >
> > $mail = strtolower( $mail );
> >
> > >
> > >
> > > if ( strstr( $mail ), "@" )) {
> >
> >
> > /** Agreed with Graeme's previous comment, strpos is
> > fine for this. */
> >
> > if ( strpos( $mail, '@' ) ) {
> >
> >
> > > // searches for the '@' sign
> > > user_array = explode("-", $user, $mail); // this
> >
> > $user_array = explode( '-', $user);
> >
> > > //function (explode) creates the array
> >
> > /** Check the manual page for explode
> > http://php.net/manual/en/function.explode.php
> >
> > Why do you explode on hyphens? Do you have a system
> > to prevent users
> > from creating email addresses without hyphens? And
> > what do you want to
> > do with this array? */
> >
> > > } else {
> > > print "Please enter a valid e-mail address"; //
> > > default if test fails to //find the '@' sign
> > >
> > >
> > > }
> > >
> >
> > /** Nothing is returned either... did you want
> > something? */
> > return $user_array;
> >
> > } /** end of function usermail */
> >
> >
> > /** Now we test the function and echo the result of
> > running the function. */
> > $result = usermail( $user, $mail );
> > print nl2br( print_r( $result ) );
> >
> >
> > >
> > >
> > > ?>
> > >
> >
> >
> >
> > --
> > Teach a person to fish...
> >
> > Ask smart questions:
> > http://www.catb.org/~esr/faqs/smart-questions.html
> > PHP Manual: http://php.net/manual/
> > php-general archives:
> > http://marc.theaimsgroup.com/?l=php-general&w=2
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
>
> =====
>
> ----------------
> "forget your lust for the rich man's gold. All that you need, is in your
> soul. You can do this if you try. All that I want for you my son, is to be
> satisfied"
>
> ~ Lynard Skynard
--- End Message ---
--- Begin Message ---
i guess i'd asked first before reinventing the wheel... lol
running xp with apache 2.x and i am looking for a script to manage users
using apache's http authentication. you know, apache's HTPASSWD util?
would like an admin screen and then user screens...
is that asking too much? ;)
searched in PEAR...nothing. googling comes up close but i maybe using
wrong terms...
thanks...
--
Leo G. Divinagracia III
[EMAIL PROTECTED]
zzzzz
--- End Message ---