php-general Digest 7 Jan 2002 16:09:14 -0000 Issue 1097

Topics (messages 79643 through 79702):

Re: bcc
        79643 by: Bogdan Stancescu
        79646 by: Mehmet Kamil ERISEN
        79668 by: Tim Ward

Re: How to read/write form/into certain place in a text fil e
        79644 by: Zhang, Leon (STHK/Zh)
        79651 by: Jimmy
        79652 by: Zhang, Leon (STHK/Zh)

Re: bcc]
        79645 by: Bogdan Stancescu

Re: Remote Cookie ID and Web Statistics
        79647 by: Miles Thompson
        79685 by: Richard Spangenberg
        79687 by: Miles Thompson
        79688 by: Richard Spangenberg

phpinfo() question
        79648 by: Gaylen Fraley
        79649 by: Jason Murray
        79650 by: Gaylen Fraley

no reply-to header?
        79653 by: Jimmy
        79654 by: Martin Towell
        79666 by: Jimmy

Another php data gathering question
        79655 by: Gaylen Fraley
        79683 by: Miles Thompson

Scripting events with php
        79656 by: Puck
        79657 by: Jason Murray
        79658 by: Richard S. Crawford

IF in mysql query results problem
        79659 by: Jason Dulberg
        79662 by: Mehmet Kamil ERISEN
        79663 by: Jason Dulberg

Re: To you know-it-all's out there...
        79660 by: qartis

Re: PHP Security Alert for Apache/Win32
        79661 by: Garth Dahlstrom

2 images, merge, make one transparent
        79664 by: Peter J. Schoenster

Re: distinct element from array
        79665 by: Kancha .

Re: array_walk inside class method
        79667 by: S. Murali Krishna

strip from <html to closing body tag
        79669 by: WB
        79674 by: S. Murali Krishna
        79677 by: Jimmy
        79684 by: S. Murali Krishna

Regarding mail function
        79670 by: Balaji Ankem
        79671 by: Sandeep Murphy
        79681 by: Bogdan Stancescu

define() function strange output... !!!!
        79672 by: Levon Ghazaryan

PHP + Windows 98 + Apache
        79673 by: Sandeep Murphy
        79675 by: Levon Ghazaryan
        79678 by: Sandeep Murphy
        79679 by: Levon Ghazaryan

Re: NEWBIE IN DISTRESS:  Install Instructions are not work for PHP 4.1.1!!!
        79676 by: Freddy Vulto

Re: POSTing HTML into a database
        79680 by: James Arthur

Stupid Question Alert - part 2
        79682 by: tim at 10Kv

Zhang Session Expiration
        79686 by: phantom
        79690 by: Michael Sims

HOWTO USE : htmlspecialchars
        79689 by: louie miranda
        79696 by: Jimmy

Compiled version of PHP 4.1.1 for Mandrake 8.1
        79691 by: Programmer

CC Processing in PHP
        79692 by: Muhammad Asif

Compiling PHP with GD2.0 ?
        79693 by: Chris Aitken

MSFT Front Page inserts quotes
        79694 by: Miles Thompson
        79695 by: Rasmus Lerdorf

Re: take links from url
        79697 by: Jimmy

PHP, XML
        79698 by: Sandeep Murphy
        79699 by: Boget, Chris

I am very new Question
        79700 by: Kevin P
        79701 by: B. van Ouwerkerk

Strange Session Issues
        79702 by: Alastair

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 ---
What do you mean? Supported in what way? (I take it you're referring to
the e-mail blind carbon copy feature).

Bogdan

"Deependra B. Tandukar" wrote:

> Greetings !
>
> Is Bcc supported in PHP?
>
> Looking forward to hearing from you.
--- End Message ---
--- Begin Message ---

 Dear List,
I is always a good idea to check out the manual before asking questions.
The answer to Leon's question about files is in the manual as well as the answer to 
this questions.  I hope the following links help.
File Operations:
http://www.php.net/manual/en/ref.filesystem.php
Bcc can be found in this section:
http://www.php.net/manual/en/ref.mail.php
Copying from the manual:
/* recipients */$to  = "Mary <[EMAIL PROTECTED]>" . ", " ; //note the comma$to .= 
"Kelly <[EMAIL PROTECTED]>";/* subject */$subject = "Birthday Reminders for August";/* 
message */$message = '<html><head> <title>Birthday Reminders for 
August</title></head><body><p>Here are the birthdays upcoming in August!</p><table> 
<tr>  <th>Person</th><th>Day</th><th>Month</th><th>Year</th> </tr> <tr>  
<td>Joe</td><td>3rd</td><td>August</td><td>1970</td>  
<td>Sally</td><td>17th</td><td>August</td><td>1973</td> 
</tr></table></body></html>';/* To send HTML mail, you can set the Content-type 
header. */$headers  = "MIME-Version: 1.0\r\n";$headers .= "Content-type: text/html; 
charset=iso-8859-1\r\n";/* additional headers */$headers .= "From: Birthday Reminder 
<[EMAIL PROTECTED]>\r\n";$headers .= "Cc: [EMAIL PROTECTED]\r\n";$headers 
.= "Bcc: [EMAIL PROTECTED]\r\n";/* and now mail it */mail($to, $subject, 
$message, $headers);

 
  Bogdan Stancescu <[EMAIL PROTECTED]> wrote: What do you mean? Supported in what way? (I take 
it you're referring to
the e-mail blind carbon copy feature).

Bogdan

"Deependra B. Tandukar" wrote:

> Greetings !
>
> Is Bcc supported in PHP?
>
> Looking forward to hearing from you.

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


Mehmet Erisen
http://www.erisen.com


---------------------------------
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail.
--- End Message ---
--- Begin Message ---
If you mean blind carbon copy on e-mails then
www.php.net/manual/en/function.mail.php
<http://www.php.net/manual/en/function.mail.php>  explains how to do it. If
you mean anything else please elaborate

Tim
www.chessish.com <http://www.chessish.com> 

        ----------
        From:  Deependra B. Tandukar [SMTP:[EMAIL PROTECTED]]
        Sent:  07 January 2002 03:29
        To:  PHP General
        Subject:  bcc

        Greetings !

        Is Bcc supported in PHP?

        Looking forward to hearing from you.

        Warm Regards,
        DT
        
--- End Message ---
--- Begin Message ---
Does anybody know this?
Please give me some advice,any help will be appreciated.
-----ԭʼÓʼþ-----
·¢¼þÈË: Zhang, Leon (STHK/Zh) [mailto:[EMAIL PROTECTED]]
·¢ËÍʱ¼ä: 07 January, 2002 9:56
ÊÕ¼þÈË: [EMAIL PROTECTED]
Ö÷Ìâ: [PHP] How to read/write form/into certain place in a text file

hi,
   A text file has been formatted ,how to read/write form/into certain place in a text file.
For example,read form letter 5 to 10 in line 4 ,and after some procedure ,write into the same place.
  Another question is that if a user has opened the file to read and write ,what will happen if another one will open and write the same file?
  Thank you in advance.
 
Leon
--- End Message ---
--- Begin Message ---
Hi Leon,

> For example,read form letter 5 to 10 in line 4 ,and after some procedure
> ,write into the same place.

if the file is not too big, you can use file() function which will
return an array containing the content of the file per line.
combine this with substr() to read from specific column.
to write use substr_replace().

if the file is big, then doing file() is not advised, you should read
the file as stream. read the following functions:
fopen(), fclose(), fseek(), fread(), fwrite().

>   Another question is that if a user has opened the file to read and write ,
> what will happen if another one will open and write the same file?

php doesnt handle file locking automatically, so i think it would
depend on the OS. if you want to handle file locking, read about flock().

--
Jimmy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
God is greater than your greatest problem

--- End Message ---
--- Begin Message ---
Thank you ,Jimmy .



-----ԭʼÓʼþ-----
·¢¼þÈË: Jimmy [mailto:[EMAIL PROTECTED]]
·¢ËÍʱ¼ä: 07 January, 2002 12:13
ÊÕ¼þÈË: [EMAIL PROTECTED]
Ö÷Ìâ: Re: [PHP] How to read/write form/into certain place in a text file


Hi Leon,

> For example,read form letter 5 to 10 in line 4 ,and after some procedure
> ,write into the same place.

if the file is not too big, you can use file() function which will
return an array containing the content of the file per line.
combine this with substr() to read from specific column.
to write use substr_replace().

if the file is big, then doing file() is not advised, you should read
the file as stream. read the following functions:
fopen(), fclose(), fseek(), fread(), fwrite().

>   Another question is that if a user has opened the file to read and write
,
> what will happen if another one will open and write the same file?

php doesnt handle file locking automatically, so i think it would
depend on the OS. if you want to handle file locking, read about flock().

--
Jimmy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
God is greater than your greatest problem


-- 
PHP General 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 ---
Inadvertedly only sent to me...

-------- Original Message --------
Subject: Re: [PHP] bcc
Date: Mon, 7 Jan 2002 11:46:07 +0800
From: Jimmy <[EMAIL PROTECTED]>
To: Bogdan Stancescu <[EMAIL PROTECTED]>
References:
<[EMAIL PROTECTED]><00b701c1972b$68cae5c0$[EMAIL PROTECTED]>
<[EMAIL PROTECTED]>

> Is Bcc supported in PHP?

I havent try it, but i think it should work.
Just add the bcc header in the additional header parameter (the 4th
param of mail() function)

--
Jimmy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When you lose, don't lose the lesson.
--- End Message ---
--- Begin Message ---

Why would you want to use Javascript? Just have some code at the top of 
each page which
-checks for the cookie
-if it doesn't exist
    -identify customer, login page or however you choose
    -set cookie
    -update database
-if it does exist
    -update the database with some information pertinent to that page

Or are these straight HTML pages, thus the need for Javascript to do 
something? I don't konw a lot of Javascript, but you could have it pop open 
a PHP page in a child browser window, back in the Z-order so that it would 
be behind your "main" page (only for Internet Explorer), and use it to do 
the above steps.

For every page transition you would have to pass the appropriate parameters 
to the child window and force it to refresh. You will have some trouble 
with people who have Javascript and cookies turned off.

As I said, I don't know Javascript, so this is just off the top of my head. 
A straight PHP solution would be preferable and I assume it's not possible 
either because the ISP doesn't host it or for some political reason.


Miles Thompson


At 10:28 PM 1/6/2002 -0500, Richard Spangenberg wrote:
>Hello, - for something a little different...
>
>Does anyone have experience using Javascript on remote server html delivered
>pages to capture data in a PHP MySQL database resident at my domain.
>
>I would like to build a customer profile database for a customer using a
>permanent cookie on a visitor's browser client to ID them and track their
>visits by page over time.  This is similar to a live or remote web
>statistics process for a session but posting to a mysql database by some
>mapped category by page in addition to the web stats.  I'd like to track
>both the session and by posting to a visitor database, long term trends as
>well.
>
>Any suggestions would be appreciated.
>
>Thanks, Rick
>[EMAIL PROTECTED]
>
>
>
>
>--
>PHP General 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 ---
Miles,

The reason for the javascript is that the hosting ISP does not support PHP.

Each time a new session is started, the javascript would have to:

- check for cookie
- if it doesn't exist
    -poll database for next new custome ID#
    -set new cookie id
    -update database with page info
    -download java applet (does something else)

I guess I wasn't sure if a non PHP supported domain could access the PHP
database from a remot server or not and how one would do that. I am setting
things up in PHP but fairly new at it.

Rick

========================

"Miles Thompson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> Why would you want to use Javascript? Just have some code at the top of
> each page which
> -checks for the cookie
> -if it doesn't exist
>     -identify customer, login page or however you choose
>     -set cookie
>     -update database
> -if it does exist
>     -update the database with some information pertinent to that page
>
> Or are these straight HTML pages, thus the need for Javascript to do
> something? I don't konw a lot of Javascript, but you could have it pop
open
> a PHP page in a child browser window, back in the Z-order so that it would
> be behind your "main" page (only for Internet Explorer), and use it to do
> the above steps.
>
> For every page transition you would have to pass the appropriate
parameters
> to the child window and force it to refresh. You will have some trouble
> with people who have Javascript and cookies turned off.
>
> As I said, I don't know Javascript, so this is just off the top of my
head.
> A straight PHP solution would be preferable and I assume it's not possible
> either because the ISP doesn't host it or for some political reason.
>
>
> Miles Thompson
>
>
> At 10:28 PM 1/6/2002 -0500, Richard Spangenberg wrote:
> >Hello, - for something a little different...
> >
> >Does anyone have experience using Javascript on remote server html
delivered
> >pages to capture data in a PHP MySQL database resident at my domain.
> >
> >I would like to build a customer profile database for a customer using a
> >permanent cookie on a visitor's browser client to ID them and track their
> >visits by page over time.  This is similar to a live or remote web
> >statistics process for a session but posting to a mysql database by some
> >mapped category by page in addition to the web stats.  I'd like to track
> >both the session and by posting to a visitor database, long term trends
as
> >well.
> >
> >Any suggestions would be appreciated.
> >
> >Thanks, Rick
> >[EMAIL PROTECTED]
> >
> >
> >
> >
> >--
> >PHP General 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 ---
Rick,

It's amazing how one gets locked into a PHP mindset. Do all that stuff you 
outlined in your reply, but why not have a second Java applet to update a 
remote database? PHP doesn't have ownership over the database.

Miles

At 08:06 AM 1/7/2002 -0500, Richard Spangenberg wrote:
>Miles,
>
>The reason for the javascript is that the hosting ISP does not support PHP.
>
>Each time a new session is started, the javascript would have to:
>- check for cookie
>-if it doesn't exist
>         -poll database for next new custome ID#
>         -set new cookie id
>         -update database with page info
>         -download java applet (does something else)
>
>I guess I wasn't sure if a non PHP supported domain could access the PHP
>database from a remot   server or not and how one would do that.  I am setting
>things up in PHP but fairly new at it.
>
>Rick
>
>-----Original Message-----
>From: Miles Thompson [mailto:[EMAIL PROTECTED]]
>Sent: Sunday, January 06, 2002 10:52 PM
>To: Richard Spangenberg; [EMAIL PROTECTED]
>Subject: Re: [PHP] Remote Cookie ID and Web Statistics
>
>
>
>Why would you want to use Javascript? Just have some code at the top of
>each page which
>-checks for the cookie
>-if it doesn't exist
>     -identify customer, login page or however you choose
>     -set cookie
>     -update database
>-if it does exist
>     -update the database with some information pertinent to that page
>
>Or are these straight HTML pages, thus the need for Javascript to do
>something? I don't konw a lot of Javascript, but you could have it pop open
>a PHP page in a child browser window, back in the Z-order so that it would
>be behind your "main" page (only for Internet Explorer), and use it to do
>the above steps.
>
>For every page transition you would have to pass the appropriate parameters
>to the child window and force it to refresh. You will have some trouble
>with people who have Javascript and cookies turned off.
>
>As I said, I don't know Javascript, so this is just off the top of my head.
>A straight PHP solution would be preferable and I assume it's not possible
>either because the ISP doesn't host it or for some political reason.
>
>
>Miles Thompson
>
>
>At 10:28 PM 1/6/2002 -0500, Richard Spangenberg wrote:
> >Hello, - for something a little different...
> >
> >Does anyone have experience using Javascript on remote server html
>delivered
> >pages to capture data in a PHP MySQL database resident at my domain.
> >
> >I would like to build a customer profile database for a customer using a
> >permanent cookie on a visitor's browser client to ID them and track their
> >visits by page over time.  This is similar to a live or remote web
> >statistics process for a session but posting to a mysql database by some
> >mapped category by page in addition to the web stats.  I'd like to track
> >both the session and by posting to a visitor database, long term trends as
> >well.
> >
> >Any suggestions would be appreciated.
> >
> >Thanks, Rick
> >[EMAIL PROTECTED]
> >
> >
> >
> >
> >--
> >PHP General 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 ---
Miles,

Thanks, now I have to just figure out how to do that stuff.  I take it
handling PHP from a remote non-PHP server is not a big issue.

The Java Applet is doing something else.  It is providing a monitoring
process to the database so a static html page and be pushed whatever content
if the database application so deems it without refreshing the html page.

:>)


"Miles Thompson" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Rick,
>
> It's amazing how one gets locked into a PHP mindset. Do all that stuff you
> outlined in your reply, but why not have a second Java applet to update a
> remote database? PHP doesn't have ownership over the database.
>
> Miles
>
> At 08:06 AM 1/7/2002 -0500, Richard Spangenberg wrote:
> >Miles,
> >
> >The reason for the javascript is that the hosting ISP does not support
PHP.
> >
> >Each time a new session is started, the javascript would have to:
> >- check for cookie
> >-if it doesn't exist
> >         -poll database for next new custome ID#
> >         -set new cookie id
> >         -update database with page info
> >         -download java applet (does something else)
> >
> >I guess I wasn't sure if a non PHP supported domain could access the PHP
> >database from a remot   server or not and how one would do that.  I am
setting
> >things up in PHP but fairly new at it.
> >
> >Rick
> >
> >-----Original Message-----
> >From: Miles Thompson [mailto:[EMAIL PROTECTED]]
> >Sent: Sunday, January 06, 2002 10:52 PM
> >To: Richard Spangenberg; [EMAIL PROTECTED]
> >Subject: Re: [PHP] Remote Cookie ID and Web Statistics
> >
> >
> >
> >Why would you want to use Javascript? Just have some code at the top of
> >each page which
> >-checks for the cookie
> >-if it doesn't exist
> >     -identify customer, login page or however you choose
> >     -set cookie
> >     -update database
> >-if it does exist
> >     -update the database with some information pertinent to that page
> >
> >Or are these straight HTML pages, thus the need for Javascript to do
> >something? I don't konw a lot of Javascript, but you could have it pop
open
> >a PHP page in a child browser window, back in the Z-order so that it
would
> >be behind your "main" page (only for Internet Explorer), and use it to do
> >the above steps.
> >
> >For every page transition you would have to pass the appropriate
parameters
> >to the child window and force it to refresh. You will have some trouble
> >with people who have Javascript and cookies turned off.
> >
> >As I said, I don't know Javascript, so this is just off the top of my
head.
> >A straight PHP solution would be preferable and I assume it's not
possible
> >either because the ISP doesn't host it or for some political reason.
> >
> >
> >Miles Thompson
> >
> >
> >At 10:28 PM 1/6/2002 -0500, Richard Spangenberg wrote:
> > >Hello, - for something a little different...
> > >
> > >Does anyone have experience using Javascript on remote server html
> >delivered
> > >pages to capture data in a PHP MySQL database resident at my domain.
> > >
> > >I would like to build a customer profile database for a customer using
a
> > >permanent cookie on a visitor's browser client to ID them and track
their
> > >visits by page over time.  This is similar to a live or remote web
> > >statistics process for a session but posting to a mysql database by
some
> > >mapped category by page in addition to the web stats.  I'd like to
track
> > >both the session and by posting to a visitor database, long term trends
as
> > >well.
> > >
> > >Any suggestions would be appreciated.
> > >
> > >Thanks, Rick
> > >[EMAIL PROTECTED]
> > >
> > >
> > >
> > >
> > >--
> > >PHP General 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 ---
When you run phpinfo(), the first line of detail has the OS version.  What
variable produces this?

--
Gaylen
[EMAIL PROTECTED]
Home http://www.gaylenandmargie.com/
PHP KISGB v3.02 Guest Book http://www.gaylenandmargie.com/phpwebsite/



--- End Message ---
--- Begin Message ---
> When you run phpinfo(), the first line of detail has the OS 
> version.  What variable produces this?

Thats the output from "uname -a" on the command line... at least,
under *nix it is...

Jason
--- End Message ---
--- Begin Message ---
Thanks.  That was it!

Gaylen
[EMAIL PROTECTED]
Home http://www.gaylenandmargie.com/
PHP KISGB v3.02 Guest Book http://www.gaylenandmargie.com/phpwebsite/

----- Original Message ----- 
From: "Jason Murray" <[EMAIL PROTECTED]>
To: "'Gaylen Fraley'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, January 06, 2002 10:06 PM
Subject: RE: [PHP] phpinfo() question


> When you run phpinfo(), the first line of detail has the OS 
> version.  What variable produces this?

Thats the output from "uname -a" on the command line... at least,
under *nix it is...

Jason

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

I just realize there's no reply-to header in this mailing list.
No wonder I never receive my own email when I reply to any mail here.
Does it purposely set this way? Or is this a glitch?

--
Jimmy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mistakes show us what we need to learn.

--- End Message ---
--- Begin Message ---
I thought that if there's no "reply-to", then email clients will use the
"from" as the reply to ??

-----Original Message-----
From: Jimmy [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 07, 2002 3:22 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP] no reply-to header?


Hi All,

I just realize there's no reply-to header in this mailing list.
No wonder I never receive my own email when I reply to any mail here.
Does it purposely set this way? Or is this a glitch?

--
Jimmy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mistakes show us what we need to learn.


-- 
PHP General 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 ---
Hi Martin,

> I thought that if there's no "reply-to", then email clients will use the
> "from" as the reply to ??

yes, correct, but the "from" is the address of the original sender,
so when someone hit reply, the email will goes to the original sender
only, not to this mailing list.

--
Jimmy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Be engaged at least six months before you get married

--- End Message ---
--- Begin Message ---
Is there any way, through PHP, to get the:

server uptime
processor type
number of cpu's

I'm trying to find a compatable solution for both win32 and *nix.  Thanks!

--
Gaylen
[EMAIL PROTECTED]
Home http://www.gaylenandmargie.com/
PHP KISGB v3.02 Guest Book http://www.gaylenandmargie.com/phpwebsite/



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

Use the exec() function to make the system calls you need.

Miles Thompson

At 10:47 PM 1/6/2002 -0600, Gaylen Fraley wrote:
>Is there any way, through PHP, to get the:
>
>server uptime
>processor type
>number of cpu's
>
>I'm trying to find a compatable solution for both win32 and *nix.  Thanks!
>
>--
>Gaylen
>[EMAIL PROTECTED]
>Home http://www.gaylenandmargie.com/
>PHP KISGB v3.02 Guest Book http://www.gaylenandmargie.com/phpwebsite/
>
>
>
>
>--
>PHP General 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 ---
My problem is that I want to use events in my forms but I do not know how to
use php as a script for an event.  Say I wanted to do something as simple as
(within a form): <input type="button" value="Test" onclick= <?php print
'testing, testin 123';?>>

Essentially, when a click this button in a form it prints out testing.

A more sophicisticated problem i had, was i wanted to print out multiple
repeats of a form based upon user input.  I have a user database, where
during the initial profile setup, they can specificy potentially large
amount of interests that they have.  I would like for them to be able to
say: I have 5 interests, click a button then 5 textboxes popup.

dmp


--- End Message ---
--- Begin Message ---
> My problem is that I want to use events in my forms but I do not know how
to
> use php as a script for an event.  Say I wanted to do something as simple
as
> (within a form): <input type="button" value="Test" onclick= <?php print
> 'testing, testin 123';?>>
> 
> Essentially, when a click this button in a form it prints out testing.

PHP is a server-side script language. It does not get sent to the browser,
and browsers don't understand how to execute PHP code (for that precise
reason).

You want to do this with JavaScript, not PHP.

Jason
--- End Message ---
--- Begin Message ---
Since PHP lives on the server and is not interpreted by the browser, you 
can't use PHP to script events.  You'll need to use JavaScript.

Specifically, in this case, what you need to do is something like this:

<input type="button" value="Test" onClick="javascript:alert('testing');" />

The best thing that you can do in this situation is to have PHP generate 
the JavaScript and send it to the browser, which hopefully speaks JavaScript.

With the example you have below, the source code of your page will show this:

<input type="button" value="text" onclick=testing, testin 123>

which probably isn't what you want.


At 06:39 PM 1/6/2002, Puck wrote:
>My problem is that I want to use events in my forms but I do not know how to
>use php as a script for an event.  Say I wanted to do something as simple as
>(within a form): <input type="button" value="Test" onclick= <?php print
>'testing, testin 123';?>>
>
>Essentially, when a click this button in a form it prints out testing.
>
>A more sophicisticated problem i had, was i wanted to print out multiple
>repeats of a form based upon user input.  I have a user database, where
>during the initial profile setup, they can specificy potentially large
>amount of interests that they have.  I would like for them to be able to
>say: I have 5 interests, click a button then 5 textboxes popup.
>
>dmp


Sliante,
Richard S. Crawford

http://www.mossroot.com
AIM: Buffalo2K   ICQ: 11646404  Y!: rscrawford
MSN: [EMAIL PROTECTED]

"It is only with the heart that we see rightly; what is essential is 
invisible to the eye."  --Antoine de Saint Exupéry

"Push the button, Max!"

--- End Message ---
--- Begin Message ---
I am working on a program that allows users to "bookmark" a particular item
that they view. The bookmarks are stored in the database.

I would like to use an IF statement in the mysql query so when the user logs
in and views the items, the option to bookmark the record has been removed
if they have already bookmarked it.

Here's an example query:

SELECT p.id AS player_id, p.name, p.hs, c.id AS coach_id, co.cid AS college,
IF(co.pid=31,1,0) AS is_bookmarked
FROM player p, coach c, co_bookmarks co
WHERE p.id=31 AND p.hs=c.id AND co.cid=2

When I use the above query in a search, it comes up with 3 results, 1 of
which is correct. If I GROUP BY p.id, there is only 1 result but its
incorrect. The search should only come up with 1 correct result in this
case.

+-----------+-------------+----+----------+---------+---------------+
| player_id | name | hs | coach_id | college | is_bookmarked |
+-----------+-------------+----+----------+---------+---------------+
| 31 | Paul Mantle | 24 | 24 | 2 | 0 |
| 31 | Paul Mantle | 24 | 24 | 2 | 1 |
| 31 | Paul Mantle | 24 | 24 | 2 | 0 |
+-----------+-------------+----+----------+---------+---------------+

+-----------+-------------+----+----------+---------+---------------+
| player_id | name | hs | coach_id | college | is_bookmarked |
+-----------+-------------+----+----------+---------+---------------+
| 31 | Paul Mantle | 24 | 24 | 2 | 0 |
+-----------+-------------+----+----------+---------+---------------+

The row with is_bookmarked = 1 is the only correct one. I am assuming that
for some reason, its displaying 3 results because there are 3 id's
associated with cid=2. But if I group them by the id, it takes the wrong
row:

If anyone has any suggestions as to what I'm doing wrong, please let me know
as I'm tapped out on ideas.

Thanks a TON!!

__________________
Jason Dulberg
Extreme MTB
http://extreme.nas.net

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

Hi Jason,
I am not too familiar with IF statements in SQL, but one thing may be the reason you 
see the incorrect results:

You have three tables, player, coach and co_bookmarks, but you only join player and 
coach.  Shouldn't you join coach with co_bookmarks.

I hope this helps.

erisen


SELECT p.id AS player_id, p.name, p.hs, c.id AS coach_id, co.cid AS college,
IF(co.pid=31,1,0) AS is_bookmarked
FROM player p, coach c, co_bookmarks co
WHERE p.id=31 AND p.hs=c.id AND co.cid=2


  Jason Dulberg <[EMAIL PROTECTED]> wrote: I am working on a program that allows users 
to "bookmark" a particular item
that they view. The bookmarks are stored in the database.

I would like to use an IF statement in the mysql query so when the user logs
in and views the items, the option to bookmark the record has been removed
if they have already bookmarked it.

Here's an example query:

SELECT p.id AS player_id, p.name, p.hs, c.id AS coach_id, co.cid AS college,
IF(co.pid=31,1,0) AS is_bookmarked
FROM player p, coach c, co_bookmarks co
WHERE p.id=31 AND p.hs=c.id AND co.cid=2

When I use the above query in a search, it comes up with 3 results, 1 of
which is correct. If I GROUP BY p.id, there is only 1 result but its
incorrect. The search should only come up with 1 correct result in this
case.

+-----------+-------------+----+----------+---------+---------------+
| player_id | name | hs | coach_id | college | is_bookmarked |
+-----------+-------------+----+----------+---------+---------------+
| 31 | Paul Mantle | 24 | 24 | 2 | 0 |
| 31 | Paul Mantle | 24 | 24 | 2 | 1 |
| 31 | Paul Mantle | 24 | 24 | 2 | 0 |
+-----------+-------------+----+----------+---------+---------------+

+-----------+-------------+----+----------+---------+---------------+
| player_id | name | hs | coach_id | college | is_bookmarked |
+-----------+-------------+----+----------+---------+---------------+
| 31 | Paul Mantle | 24 | 24 | 2 | 0 |
+-----------+-------------+----+----------+---------+---------------+

The row with is_bookmarked = 1 is the only correct one. I am assuming that
for some reason, its displaying 3 results because there are 3 id's
associated with cid=2. But if I group them by the id, it takes the wrong
row:

If anyone has any suggestions as to what I'm doing wrong, please let me know
as I'm tapped out on ideas.

Thanks a TON!!

__________________
Jason Dulberg
Extreme MTB
http://extreme.nas.net


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


Mehmet Erisen
http://www.erisen.com


---------------------------------
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail.
--- End Message ---
--- Begin Message ---
Thanks for your reply...

I thought about making that join however in this case, the coach data is
only needed for the player info.

Jason.
  -----Original Message-----
  From: Mehmet Kamil ERISEN [mailto:[EMAIL PROTECTED]]
  Sent: January 7, 2002 1:41 AM
  To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Subject: Re: [PHP] IF in mysql query results problem


  Hi Jason,

  I am not too familiar with IF statements in SQL, but one thing may be the
reason you see the incorrect results:

  You have three tables, player, coach and co_bookmarks, but you only join
player and coach.  Shouldn't you join coach with co_bookmarks.

  I hope this helps.

  erisen


  SELECT p.id AS player_id, p.name, p.hs, c.id AS coach_id, co.cid AS
college,
  IF(co.pid=31,1,0) AS is_bookmarked
  FROM player p, coach c, co_bookmarks co
  WHERE p.id=31 AND p.hs=c.id AND co.cid=2


    Jason Dulberg <[EMAIL PROTECTED]> wrote:

    I am working on a program that allows users to "bookmark" a particular
item
    that they view. The bookmarks are stored in the database.

    I would like to use an IF statement in the mysql query so when the user
logs
    in and views the items, the option to bookmark the record has been
removed
    if they have already bookmarked it.

    Here's an example query:

    SELECT p.id AS player_id, p.name, p.hs, c.id AS coach_id, co.cid AS
college,
    IF(co.pid=31,1,0) AS is_bookmarked
    FROM player p, coach c, co_bookmarks co
    WHERE p.id=31 AND p.hs=c.id AND co.cid=2

    When I use the above query in a search, it comes up with 3 results, 1 of
    which is correct. If I GROUP BY p.id, there is only 1 result but its
    incorrect. The search should only come up with 1 correct result in this
    case.

    +-----------+-------------+----+----------+---------+---------------+
    | player_id | name | hs | coach_id | college | is_bookmarked |
    +-----------+-------------+----+----------+---------+---------------+
    | 31 | Paul Mantle | 24 | 24 | 2 | 0 |
    | 31 | Paul Mantle | 24 | 24 | 2 | 1 |
    | 31 | Paul Mantle | 24 | 24 | 2 | 0 |
    +-----------+-------------+----+----------+---------+---------------+

    +-----------+-------------+----+----------+---------+---------------+
    | player_id | name | hs | coach_id | college | is_bookmarked |
    +-----------+-------------+----+----------+---------+---------------+
    | 31 | Paul Mantle | 24 | 24 | 2 | 0 |
    +-----------+-------------+----+----------+---------+---------------+

    The row with is_bookmarked = 1 is the only correct one. I am assuming
that
    for some reason, its displaying 3 results because there are 3 id's
    associated with cid=2. But if I group them by the id, it takes the wrong
    row:

    If anyone has any suggestions as to what I'm doing wrong, please let me
know
    as I'm tapped out on ideas.

    Thanks a TON!!

    __________________
    Jason Dulberg
    Extreme MTB
    http://extreme.nas.net


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



  Mehmet Erisen
  http://www.erisen.com




----------------------------------------------------------------------------
--
  Do You Yahoo!?
  Send FREE video emails in Yahoo! Mail.
--- End Message ---
--- Begin Message ---
Your code works perfectly as a .php file


--- End Message ---
--- Begin Message ---
AFAIK, you need the ScriptAlias line in your httpd.conf
if you are running PHP as a CGI...   

Safer to run it as an SAPI module if you can and remove 
that ScriptAlias line.

-GED

>   "LaserJetter" 
> -----  Re: PHP Security Alert for Apache/Win32
> -----  Sun, 6 Jan 2002 20:16:39 -0000
> 
> Can you not just delete the ScriptAlias line?
> What does that line actually do apart from create an Alias?
> 
> LJ


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

I've looked here:

http://download.php.net/manual/en/function.imagecolortransparent.p
hp

I've read this:

http://www.wdvl.com/Authoring/Languages/PHP/BeginningPHP4/tra
nsparent.html

But they lose me when they suddenly jump to PNG. I got their 
code but it doesn't work for me. I have all the libraries, can do just 
about any image manipulation but this transparency thing has 
escaped me.

Does anyone have a good tutorial on this that doesn't start with 
jpeg and images they shouldn't use.

Peter

---------------------------
"Reality is that which, when you stop believing in it, doesn't go
away".
                -- Philip K. Dick
--- End Message ---
--- Begin Message ---
doesn't seem to work for multidimensional array. 

$yourarray looks like this in my case
$yourarray[0] => array()
$yourarray[1] => array() //i'm looking for distinct
elemtns in the inner array


--- Bogdan Stancescu <[EMAIL PROTECTED]> wrote:
> $distincts=array();
> while (list($key,$val)=each($yourarray)
> {
>   if (!in_array($val,$distincts))
>   {
>     $distincts[]=$val;
>   }
> }
> 
> "Kancha ." wrote:
> 
> > An array contains various values eg: list of
> fruits.
> > Now i want to retrieve only unique fruits from the
> > array. The array may contain duplicate names. How
> can
> > i achieve this?
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Send FREE video emails in Yahoo! Mail!
> > http://promo.yahoo.com/videomail/
> >
> > --
> > PHP General 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]
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/
--- End Message ---
--- Begin Message ---
Hi
        Thanks for ur help. 
        Its Working but I couldn't understand the syntax given by u
        can u explain pls.

Thanks again.


On Sun, 6 Jan 2002, Gyozo Papp wrote:

> it may be better:
> 
> array_walk($this->array, array(&$this, 'func1');
> 
> "Attila Strauss" <[EMAIL PROTECTED]> wrote in message 
>001d01c195db$67647da0$[EMAIL PROTECTED]">news:001d01c195db$67647da0$[EMAIL PROTECTED]...
> | hi
> | 
> | $this->func1();
> | 
> | 
> | best regards
> | attila
> | 
> | 
> | >
> | >
> | > Hi All,
> | > I want to use "array_walk" function inside a class method. But the
> | > problem is i want the second argument to array_walk ( function name )
> | > be a another function of the same class. when i gave like that its telling
> | >
> | > Error : function not exist.
> | >
> | > class some()
> | > {
> | >
> | > function func1()
> | > {
> | > }
> | > function func2()
> | > {
> | > array_walk($array,"func1");
> | > }
> | > }
> | >
> | > What is the syntax or way to do this.
> | >
> | >
> | > Thanks in Advance.
> | >
> | > S.Murali Krishna
> | > [EMAIL PROTECTED]
> | > =====================================
> | > We grow slow trying to be great
> | >
> | >    - E. Stanley Jones
> | > -------------------------------------
> | >
> | >
> | > --
> | > PHP General 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]
> | >
> | 
> 

S.Murali Krishna
[EMAIL PROTECTED]  
===================================== 
We grow slow trying to be great
                                                                
                   - E. Stanley Jones
-------------------------------------

--- End Message ---
--- Begin Message ---
Hi,
Hi i need to strip out the <html> up  to the <body> tag.
For some reason, my function,
         preg_replace( "/<html(.*)body(.*)>" , " " , $body );
does not work.
Ok I am not really brilliant at regular expressions ...

Help?

Jay
--- End Message ---
--- Begin Message ---

Hi,
        Ur quest is not clear.
Whether u want to delete everything upto <body> tag or only <html> tags
up to body tag.

anyway this might work for the former.

$parsed = preg_replace("/\\n/","",$html); // to remove  '\n' in HTML file
$parsed = preg_replace("/^(<html>.*)(<body.*)/","\\2",$parsed);  // to
remove string upto "<body>" tag


Thanks.


On Mon, 7 Jan 2002, WB wrote:

> Hi,
> Hi i need to strip out the <html> up  to the <body> tag.
> For some reason, my function,
>          preg_replace( "/<html(.*)body(.*)>" , " " , $body );
> does not work.
> Ok I am not really brilliant at regular expressions ...
> 
> Help?
> 
> Jay

S.Murali Krishna
[EMAIL PROTECTED]  
===================================== 
We grow slow trying to be great
                                                                
                   - E. Stanley Jones
-------------------------------------

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


> Hi i need to strip out the <html> up  to the <body> tag.
> preg_replace( "/<html(.*)body(.*)>" , " " , $body );

try this:
preg_replace( "/<html>[^<body>]*<body[^>]*>/" , " " , $body );


--
Jimmy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Your mind is like parachute. It works best when it is open.

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

Hi,
        the code u sent is displaying the html as it is,
but
        There is more than one way to do that.

Atmost we can atleast do this.
        
  $pos = strpos($html,"<body");
    $start = substr($html,0,$pos - 1);
    $html  = substr($html,$pos);
    $start = preg_replace("/<html>/","",$start);

    print "$start $html" ;








On Mon, 7 Jan 2002, Jimmy wrote:

> Hi WB,
> 
> 
> > Hi i need to strip out the <html> up  to the <body> tag.
> > preg_replace( "/<html(.*)body(.*)>" , " " , $body );
> 
> try this:
> preg_replace( "/<html>[^<body>]*<body[^>]*>/" , " " , $body );
> 
> 
> --
> Jimmy
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Your mind is like parachute. It works best when it is open.
> 
> 
> -- 
> PHP General 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]
> 

S.Murali Krishna
[EMAIL PROTECTED]  
===================================== 
We grow slow trying to be great
                                                                
                   - E. Stanley Jones
-------------------------------------


--- End Message ---
--- Begin Message ---
Hi ,
 
My file name: bala.php
-------------------------------------------------------
<?php
 
 mail("[EMAIL PROTECTED]", "hi friend", "Hi, how are you? Expecting reply from you. -Bala");
 
?>
----------------------------------------------------
 
for the above program I am getting the following warning..
 
-----------------------------------------------------
Warning: Server Error in c:\www/bala.php on line 3
-----------------------------------------------------
 
I have changed in php.ini with my SMTP server (arabhi.wipro.com or 10.145.2.18)
 
 
In outlook settings we give the username and password for our mail server.
 
Is it required here also?
 
could you please tell available headers for e-mail function?
 
Is ther any headers like user name and password??
 
 
 
Any help greatly appreciable...
 
Thanks in advance.
 
-Balaji
 
-----------------------------------------------------------------------------------------------------------------------
Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and
is intended for use only by the individual or entity to which it is
addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended
recipient or it appears that this mail has been forwarded to you without
proper authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail
from your records.
------------------------------------------------------------------------------------------------------------------------
--- End Message ---
--- Begin Message ---
tettttt

-----Original Messa[Sandeep Murphy] ter ge-----
From: Balaji Ankem [mailto:[EMAIL PROTECTED]]
Sent: segunda-feira, 7 de Janeiro de 2002 10:55
To: [EMAIL PROTECTED]
Subject: [PHP] Regarding mail function


Hi ,
  
My file name: bala.php
-------------------------------------------------------
<?php
 
 mail("[EMAIL PROTECTED]", "hi friend", "Hi, how are you? Expecting
reply from you. -Bala");
 
?>
----------------------------------------------------
 
for the above program I am getting the following warning..
 
-----------------------------------------------------
Warning: Server Error in c:\www/bala.php on line 3
-----------------------------------------------------
 
I have changed in php.ini with my SMTP server (arabhi.wipro.com or
10.145.2.18)
 
 
In outlook settings we give the username and password for our mail server.
 
Is it required here also?
 
could you please tell available headers for e-mail function?
 
Is ther any headers like user name and password??
 
 
 
Any help greatly appreciable...
 
Thanks in advance.
 
-Balaji
 

--- End Message ---
--- Begin Message ---
Gee, Sandeep, what a great reply! I wish I got this kind of support when I
asked a question on this list too!

Balaji, sorry, man, I don't know how to help you - I was just touched by
Sandeep's reply and wanted to point it out for everybody to see just how
helpful we are in these parts. Tettttt be thy name!

Bogdan

Sandeep Murphy wrote:

> tettttt
>
> -----Original Messa[Sandeep Murphy] ter ge-----
> From: Balaji Ankem [mailto:[EMAIL PROTECTED]]
> Sent: segunda-feira, 7 de Janeiro de 2002 10:55
> To: [EMAIL PROTECTED]
> Subject: [PHP] Regarding mail function
>
> Hi ,
>
> My file name: bala.php
> -------------------------------------------------------
> <?php
>
>  mail("[EMAIL PROTECTED]", "hi friend", "Hi, how are you? Expecting
> reply from you. -Bala");
>
> ?>
> ----------------------------------------------------
>
> for the above program I am getting the following warning..


--- End Message ---
--- Begin Message ---
 Hi everibody
I have Apache running under Linux SuSE 7.2 with PHP/4.0.4pl1
The server the Linux and the php instalation is the standart
SuSE package instalation from the SuSE install cd-s so, everithing is
fine except one thing:
calling this test.php script in browser window:

<?php

define("_Sc","Test");

#echo 'the constant is: ' . _Sc . '<br />';

if(defined("_Sc")){
echo 'Test:' . _Sc ;
}else{
        echo 'Test: false';
}


?>

... gives only on first time the excpected output:

        Test: Test

after reloading a few times the script returns some strange
output like :

        Test: /&%/(&%

or something like this, sometimes some values of other constants
then some characters and sometimes the server hangs up.. so that means
that the httpd process dies and the process SSL hangs up, and i have to
kill it manualy in order to be able to start up the server again.

one small detail:

calling the same script from the shell:

shell:> ./test.php

!/usr/bin/php

<?php

define("_Sc","hi hu hi\n");

#echo 'the constant is: ' . _Sc . '<br />';

if(defined("_Sc")){
echo 'ja:' . _Sc ;
}else{
        echo 'nein';
}


?>

.. returns allways the excpected output without errors

so my idea is that this may be a mod_php4 problem,
but i wonder if i am the only one that have this problemm yet
becoase i have the standart instalation from SuSe CD

Do anyone have some similar problemm and if yes how would you
suggest to solwe this?

I hasitate to uninstal php or apache becouse this is a customer server
and i did not foud some updates or patches by SuSE for this,
strange is that i did not heared about someone having this problem

thanks

levon

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

I have installed Apache on my win 98 machine and it runs fine .. however, am
unable to configure Apache to run with PHP. 

I installed the binary version of PHP and edited the httpd.conf file as
instructed in the install.txt of php but am getting a browser (400) page not
found error..

any suggestions are appreciated,

TIA,

Sandeep
--- End Message ---
--- Begin Message ---
hm.. I also have Apache with PHP and mysql on my win 98
and it runs fine with both..
check ones more the configure steps to be done
for php configuration or write detailed what steps have you
gone thru configuring

levon

On Mon, 7 Jan 2002, Sandeep Murphy wrote:

> Hi all,
>
> I have installed Apache on my win 98 machine and it runs fine .. however, am
> unable to configure Apache to run with PHP.
>
> I installed the binary version of PHP and edited the httpd.conf file as
> instructed in the install.txt of php but am getting a browser (400) page not
> found error..
>
> any suggestions are appreciated,
>
> TIA,
>
> Sandeep
>
> --
> PHP General 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 ---
hi,

ok, heres what I did exactly...

1.Downloaded and extracted PHP version 4.1.1 to c:\php

2. Copied php4ts.dll to c:\windows\system  (running win98)

3. php.ini-dist  to c:\windows  and renamed it to php.ini

4. Edited the php.ini as follows:
        changed the 'extension_dir' setting to point to my c:\php
        Set the 'doc_root' to point to my webservers document_root.
c:\apache\htdocs 
        
5. Copied the lines (

ScriptAlias /php/ "c:/php4/"
AddHandler application/x-httpd-php .php
Action application/x-httpd-php3 "/php-bin/php.exe")
 
to my httpd.conf (tried placing these lines at the end first, then after the
load module statements.. all in vain)

6. Restarted Apache

any suggestions??

Thanks,
sandeep

-----Original Message-----
From: Levon Ghazaryan [mailto:[EMAIL PROTECTED]]
Sent: segunda-feira, 7 de Janeiro de 2002 11:39
To: [EMAIL PROTECTED]
Subject: Re: [PHP] PHP + Windows 98 + Apache


hm.. I also have Apache with PHP and mysql on my win 98
and it runs fine with both..
check ones more the configure steps to be done
for php configuration or write detailed what steps have you
gone thru configuring

levon

On Mon, 7 Jan 2002, Sandeep Murphy wrote:

> Hi all,
>
> I have installed Apache on my win 98 machine and it runs fine .. however,
am
> unable to configure Apache to run with PHP.
>
> I installed the binary version of PHP and edited the httpd.conf file as
> instructed in the install.txt of php but am getting a browser (400) page
not
> found error..
>
> any suggestions are appreciated,
>
> TIA,
>
> Sandeep
>
> --
> PHP General 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 General 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 ---
I think this steps could not make PHP running..
---->>>>>

On Mon, 7 Jan 2002, Sandeep Murphy wrote:

> hi,
>
> ok, heres what I did exactly...
>
> 1.Downloaded and extracted PHP version 4.1.1 to c:\php
>
> 2. Copied php4ts.dll to c:\windows\system  (running win98)
>
> 3. php.ini-dist  to c:\windows  and renamed it to php.ini
>
> 4. Edited the php.ini as follows:
>       changed the 'extension_dir' setting to point to my c:\php
>       Set the 'doc_root' to point to my webservers document_root.
> c:\apache\htdocs
>
> 5. Copied the lines (
>
> ScriptAlias /php/ "c:/php4/" <<<------- Do you whant php running as CGI ?

> AddHandler application/x-httpd-php .php  <<< --- OK

> Action application/x-httpd-php3 "/php-bin/php.exe")  << --::::

         Action application/x-httpd-php4 "/php-bin/php.exe")  << --::::
is php.exe really in [Apache-root]/php-bin/php.exe ?


>
> to my httpd.conf (tried placing these lines at the end first, then after the
> load module statements.. all in vain)
>
> 6. Restarted Apache
>
> any suggestions??
>
> Thanks,
> sandeep
>
> -----Original Message-----
> From: Levon Ghazaryan [mailto:[EMAIL PROTECTED]]
> Sent: segunda-feira, 7 de Janeiro de 2002 11:39
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] PHP + Windows 98 + Apache
>
>
> hm.. I also have Apache with PHP and mysql on my win 98
> and it runs fine with both..
> check ones more the configure steps to be done
> for php configuration or write detailed what steps have you
> gone thru configuring
>
> levon
>
> On Mon, 7 Jan 2002, Sandeep Murphy wrote:
>
> > Hi all,
> >
> > I have installed Apache on my win 98 machine and it runs fine .. however,
> am
> > unable to configure Apache to run with PHP.
> >
> > I installed the binary version of PHP and edited the httpd.conf file as
> > instructed in the install.txt of php but am getting a browser (400) page
> not
> > found error..
> >
> > any suggestions are appreciated,
> >
> > TIA,
> >
> > Sandeep
> >
> > --
> > PHP General 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 General 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 General 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 ---
My module configuration (Win98, Apache 1.3.22, PHP 4.1.1) started working
after I added the line:

   AddModule mod_php4.c

to httpd.conf.  This seems to be an omission from the install.txt as stated
in the php.windows thread "Apache 1.3.22 and PHP 4.1.0" d.d. Jan 3, 2002.
It's added as note to the on-line manual
(http://www.php.net/manual/en/install.apache.php):

"Note: In Apache 1.3.22 for Windows, the default configuration file
(httpd.conf-dist-win) has a ClearModuleList directive included by default.
If this directive is used, it is required to put an AddModule mod_php4.c to
the AddModule list, as else PHP will not be registered as an Apache module."

HTH, Freddy Vulto


Mark <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I apologize if the title of this post sounds overly aggresive, but I have
> followed the instructions to a 'T' and got nowhere!!  I have tried the
> "auto" install version of PHP and manual instructions for installing PHP
> 4.1.1.  Neither of them work.  I added the lines to my httpd.conf file for
> both types of installs (not at the same time) as discribed in the
> Install.txt file, along with the instructions on the website, and can get
no
> "test" scripts to run or PHP for that matter.  All I get is a blank screen
> when running the CGI version or can not even get apache to load when I try
> the Module version (Get a "Requested Operation Failed" message).  can
> someone please help?????  My system is as follows:
>
> Windows 2000 SP2
> Apache 2.0.28 (I have also tried version 1.3.22 with same results as
> mentioned above)
> PHP 4.1.1
> MDAC 2.7
> MySQL 3.23.46a
>
> Thanks in advance!!
>
> Mark
>
>


--- End Message ---
--- Begin Message ---
On Monday 07 January 2002 01:59, Richard S. Crawford wrote:
> I've used a combination of addslashes() and stripslashes() along with
> htmlspecialchars() to perform just that sort of thing, though I used MySQL
> instead of PostreSQL.

Can you help me along a bit further? I can't seem to get them in the right 
order.

Thanks.

--jaa
--- End Message ---
--- Begin Message ---
Thanks for everyone's comments. If I understand what you are saying it
should be possible to fill the content of a layer by issuing some sort of
server include command.. (?)  So, for example, rather than have a something
that looks like this:

<div id="haiti" style="position:absolute; left:752px; top:321px;
width:166px; height:162px; z-index:14; visibility: hidden">
  <table width=166 border=0 cellpadding=0 cellspacing=0>
    <tr> 
      <td> <img src="Atlas/images/photolayer_11.gif" width=81
height=55></td>
      <td> <img src="Atlas/images/photolayer_12.gif" width=85
height=55></td>
    </tr>
    <tr> 
      <td> <img src="Atlas/images/photolayer_14.gif" width=81
height=53></td>
      <td> <img src="Atlas/images/photolayer_15.gif" width=85
height=53></td>
    </tr>
    <tr> 
      <td> <img src="Atlas/haiti_17.gif" width=81 height=55></td>
      <td> <img src="Atlas/haiti_18.gif" width=85 height=55></td>
    </tr>
  </table>
</div>

It should be possible to have some code that gives the layer position but
rather than then having all the other code describing the layer contents,
have some sort of php command that says 'get the contents from file
xxx.php'. If this is the case what should I be learning about to make this
happen?

Thanks again,

Tim

(standing on the shoulders of giants)

-----------


> Your question is not stupid - it's just uninformed, and that's easily
> understandable if you never used PHP.
> 
> The concept is dynamically creating the page SERVER-SIDE. That is, use some
> databases or some nifty code to dynamically build a page using specific
> parameters. Unforunately for you, this means that all the fun ends on the
> server
> side. Once PHP ends its job, Apache takes over and serves the content
> generated
> by PHP as it would serve any regular file. What you actually pass to the
> client
> is "dead" information - it's not dynamic unless you echo some JavaScript code
> or
> something similar from PHP (which is the same as writing the respective code
> in
> a regular file, unless you create some custom parameters in JavaScript based
> on
> some other parameters you pass to PHP).
> 
> Hope my explanation makes sense... ;-)
> 
> Bogdan
> 
> tim at 10Kv wrote:
> 
>> Hi,
>> 
>> first of all apologise to the list ­ this is a very basic question for you
>> I¹m sure. I have tried to find an answer on the web but the problem is
>> knowing HOW to ask the question ­ and I hoping you can provide me with a
>> starting point.
>> 
>> Anyway.. I design a lot of graphic intensive pages which rely heavily on
>> layers that contain images, mouseovers and image swaps. The trouble is, when
>> there are more than a couple of these layers on a page the code gets long
>> and over complicated.  For example, if I have a page which on one side
>> contains an image map with 5 clickable points that shows one of 5 possible
>> layers on the other side of the page  (each with different content)  this is
>> automatically a page with lots of code which is slow to load ­ especially if
>> the page already has a layer based navigation bar!
>> 
>> My question is: is there a way to use a language like php to make this
>> process easier? For example populate the layers from a different file rather
>> than have all the code on the same page and perhaps slim the page down a
>> little ­ or is this missing the point of what a language like php is about.
>> 
>> Thanks for your help and my apologies if this is the worst question of the
>> week.
>> 
>> Tim Rogers
> 


--
PHP General 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 ---
Hey all,

I am using the Zhang session method from
http://www.phpbuilder.com/columns/ying20000602.php3  and it works great
with a mysql database.

Does anyone out there know how to tell if a session is expired using
this method?  The Read Session function is:
\\---------------------------------------;
function sess_read($key) {
 global $SESS_DBH, $SESS_LIFE;

 $qry = "SELECT value FROM Sessions WHERE sesskey = '$key' AND expiry >
" . time();
 $qid = mysql_query($qry, $SESS_DBH);

 if (list($value) = mysql_fetch_row($qid)) {
  return $value;
 }

 return false;
}
\\---------------------------------------;

So if session is expired, this script will return nothing (per the
expiry WHERE clause).

Say I had placed a variable called $NameOfUser in the session data using
session_register($NameOfUser), if the session is expired, would I be
able to know that it was expired by using isset($NameOfUser) after
running the session_register($NameOfUser) in the script??

Thanks.

--- End Message ---
--- Begin Message ---
At 07:20 AM 1/7/2002 -0600, phantom wrote:
>Hey all,
>
>I am using the Zhang session method from
>http://www.phpbuilder.com/columns/ying20000602.php3  and it works great
>with a mysql database.
>
>Does anyone out there know how to tell if a session is expired using
>this method?

Yep.  The "expiry" field is equal to the UNIX timestamp at which the 
session will expire.  To get a list of sessions that have already expired, 
you can use this:

$query = "SELECT * FROM sessions WHERE expiry < " . time();

>Say I had placed a variable called $NameOfUser in the session data using
>session_register($NameOfUser), if the session is expired, would I be
>able to know that it was expired by using isset($NameOfUser) after
>running the session_register($NameOfUser) in the script??

That sounds about right.  You might want to try:

if (!session_is_registered("NameOfUser")) {
         //restart session
}

Although I don't know if that function is reliable with the custom session 
handler...I think it should be though.

I've been using that exact same session handler for several weeks in one of 
my scripts and it works great....

--- End Message ---
--- Begin Message ---
<form action=form.php method=GET>
Info: <input type=text name=info size=25 maxlength=25 value="<?php
htmlspecialchars($info); ?>">
<input type=submit>
</form>


Hi, im trying this form w/ htmlspecialchars (php function), but it doesn't
seem
to work, when i submit the form.. htmlspecialchars($info); is included on
the source
ex: <? HTMLSpecialChars($info); ?>

Hm, am i correct?

thanks!!


louie

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


> <?php htmlspecialchars($info); ?>">

htmlspecialchars() do not change the passed variable.
it will _return_ the result.
so you have to do like this:
$info = htmlspecialchars($info);

please read the manual before asking to the list.
it's clearly stated there, and there's even an example
on how to use this function.

--
Jimmy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Leave loved ones with loving words, it may be the last time you see them


--- End Message ---
--- Begin Message ---
I am looking for with compiled version of the newest PHP 4.1.1 for
Linux Mandrake 8.1.

--
Jaroslaw

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

hi,

Do PHP has some built-in support for Credit Card Processing?

Is there any library available that can be used for processing Credit Cards?

Thanks for your time.

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

I have just upgraded my system (FreeBSD4.4 box with Apache/PHP/MySQL) and I 
want to use GD2.0.1 with PHP.

I have installed GD 2.0.1 from /usr/ports onto the system so the package is 
actually there, but I have no idea how to compile GD2 ability into PHP. If 
anyone can lend some assistance it would be appreciated.

I really want to be able to use the ImageCopyResampled() function.


Thanks


Chris


---
CDR - Crowley Digital Reproductions - Hard Rock & Heavy Metal CD Bootlegs
http://crowley.thegatesofhell.org/cdr/

My ICQ # is 1096929

--- End Message ---
--- Begin Message ---
I have a client which edits all his PHP pages as HTML files in MSFT Front 
Page. That's not been a problem until now, as the pages are all straight 
HTML except for a bit at the very top.

Here's the problem. We need this line at the top of the page, ahead of the 
<HTML> tag, for an automatic login routine:

<? session_start();session_register( "origin" );$origin=$PHP_SELF;  ..and a 
bunch of stuff ... ?>

Front Page insists on doing this to the line:

<? session_start();session_register( "origin" );$origin= " $PHP_SELF; " 
..and a bunch of stuff ... ?>,

putting quotation marks around $PHP_SELF; like so : "$PHP_SELF;"

Needless to say this causes parse errors. I can open the file in the HTML 
tag of Front Page, eliminate the quotes and save it. When I reopen the file 
the quotes have reappeared.

I have removed the file from the Front Page web, edited it using a plain 
ASCII editor, then reloaded it. Guess what, the quotes magically reappear.

Does anyone have any suggestions? It's Front Page 98 by the way.

For those of you who are wondering how I change these files to PHP I just 
parse them after they are uploaded to the server, changing all links to 
point to .php rather than .html and saving the changed files with .php 
extensions.

Regards - Miles Thompson

--- End Message ---
--- Begin Message ---
Why not just use an auto_prepend rule in your config and prepend that bit 
of PHP code automatically without touching the FrontPage-generated crap?

-Rasmus

On Mon, 7 Jan 2002, Miles Thompson wrote:

> I have a client which edits all his PHP pages as HTML files in MSFT Front 
> Page. That's not been a problem until now, as the pages are all straight 
> HTML except for a bit at the very top.
> 
> Here's the problem. We need this line at the top of the page, ahead of the 
> <HTML> tag, for an automatic login routine:
> 
> <? session_start();session_register( "origin" );$origin=$PHP_SELF;  ..and a 
> bunch of stuff ... ?>
> 
> Front Page insists on doing this to the line:
> 
> <? session_start();session_register( "origin" );$origin= " $PHP_SELF; " 
> ..and a bunch of stuff ... ?>,
> 
> putting quotation marks around $PHP_SELF; like so : "$PHP_SELF;"
> 
> Needless to say this causes parse errors. I can open the file in the HTML 
> tag of Front Page, eliminate the quotes and save it. When I reopen the file 
> the quotes have reappeared.
> 
> I have removed the file from the Front Page web, edited it using a plain 
> ASCII editor, then reloaded it. Guess what, the quotes magically reappear.
> 
> Does anyone have any suggestions? It's Front Page 98 by the way.
> 
> For those of you who are wondering how I change these files to PHP I just 
> parse them after they are uploaded to the server, changing all links to 
> point to .php rather than .html and saving the changed files with .php 
> extensions.
> 
> Regards - Miles Thompson
> 
> 
> 

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

> I want to take string between <table></table> tags in put it
> in variable 

preg_match ("|<table>([^</table>]*)</table>|i", $str, $match);

$match[1] will contain the string between <table></table>

--
Jimmy
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fate shuffles the cards and we play with them


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

hi,

Does anyone know of a mailing list for PHP and XML or can I just pose them
here??

Thanks,

sandeep
--- End Message ---
--- Begin Message ---
> Does anyone know of a mailing list for PHP and XML or can I 
> just pose them here??

PHP-XML.  The list address is:

[EMAIL PROTECTED]

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

I am extremely new to PHP and I want to have a clickable item that will
bring up a particular item from the database (i.e a menu) What is the
proceedure here? Can anyone help me?

Thanks

Kevin


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

>I am extremely new to PHP and I want to have a clickable item that will
>bring up a particular item from the database (i.e a menu) What is the
>proceedure here? Can anyone help me?

Hi,

Take a look at one or more scriptarchives like hotscripts.com

If you want to learn more about PHP please go to the links on www.php.net 
it will give you several links where you can learn more. Many many tutorials..

Bye,


B.

--- End Message ---
--- Begin Message ---
I posted a question earlier,  but I don't think I explained my problem all
that well.

I am having problem with sessions on my W2K box.  I can start sessions and
register variables but  I can't, however, seem to get the contents of the
registered variables written.

When I open the session file (the actual physical file located on the
server), this is its contents:

!sess_user|!blah|!sessUserClass|!sessFormData|!oUser|

Each of those variables should have some data associated with them.  Please
note that I have not added the '!' to the variables.

I don't think I am having file permission problems because some data is
actually being written.  The only data missing (and the most crucial) is the
contents of each those variables.

Does anybody have any suggestions?

Thanks!

alastair





--- End Message ---

Reply via email to