confirm subscribe to php-general@lists.php.net

2012-09-11 Thread php-general-help
Hi! This is the ezmlm program. I'm managing the
php-general@lists.php.net mailing list.

I'm working for my owner, who can be reached
at php-general-ow...@lists.php.net.

To confirm that you would like

   arch...@mail-archive.com

added to the php-general mailing list, please send
an empty reply to this address:

   
php-general-sc.1347368255.dogihbdninpbhefjekdn-archive=mail-archive@lists.php.net

Usually, this happens when you just hit the "reply" button.
If this does not work, simply copy the address and paste it into
the "To:" field of a new message.

or click here:

mailto:php-general-sc.1347368255.dogihbdninpbhefjekdn-archive=mail-archive@lists.php.net

This confirmation serves two purposes. First, it verifies that I am able
to get mail through to you. Second, it protects you in case someone
forges a subscription request in your name.

Some mail programs are broken and cannot handle long addresses. If you
cannot reply to this request, instead send a message to
 and put the
entire address listed above into the "Subject:" line.


--- Administrative commands for the php-general list ---

I can handle administrative requests automatically. Please
do not send them to the list address! Instead, send
your message to the correct command address:

For help and a description of available commands, send a message to:
   

To subscribe to the list, send a message to:
   

To remove your address from the list, just send a message to
the address in the ``List-Unsubscribe'' header of any list
message. If you haven't changed addresses since subscribing,
you can also send a message to:
   

or for the digest to:
   

For addition or removal of addresses, I'll send a confirmation
message to that address. When you receive it, simply reply to it
to complete the transaction.

If you need to get in touch with the human owner of this list,
please send a message to:



Please include a FORWARDED list message with ALL HEADERS intact
to make it easier to help you.

--- Enclosed is a copy of the request I received.

Return-Path: 
Received: (qmail 4126 invoked from network); 11 Sep 2012 12:57:35 -
Received: from unknown (HELO lists.php.net) (127.0.0.1)
  by localhost with SMTP; 11 Sep 2012 12:57:35 -
Return-Path: 
Authentication-Results: pb1.pair.com smtp.mail=nore...@php.net; spf=unknown; 
sender-id=unknown
Authentication-Results: pb1.pair.com header.from=arch...@mail-archive.com; 
sender-id=softfail
Received-SPF: unknown (pb1.pair.com: domain php.net does not designate 
140.211.15.143 as permitted sender)
X-PHP-List-Original-Sender: nore...@php.net
X-Host-Fingerprint: 140.211.15.143 osu1php.osuosl.org  
Received: from [140.211.15.143] ([140.211.15.143:57971] helo=osu1php.osuosl.org)
by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP
id C3/A2-24398-E353F405 for 
; Tue, 11 Sep 
2012 08:57:35 -0400
Authentication-Results: osu1php.osuosl.org smtp.mail=nore...@php.net; 
spf=neutral; sender-id=neutral
Authentication-Results: osu1php.osuosl.org 
header.from=arch...@mail-archive.com; sender-id=softfail
Received-SPF: neutral (osu1php.osuosl.org: 127.0.0.1 is neither permitted nor 
denied by domain of php.net)
Received: from [127.0.0.1] ([127.0.0.1:60108] helo=localhost)
by osu1php.osuosl.org (envelope-from )
(ecelerity 3.3.2.44647 r(44647)) with ESMTP
id 39/D0-30231-A353F405; Tue, 11 Sep 2012 12:57:30 +
Date: Tue, 11 Sep 2012 12:57:30 +
Message-ID: <39.d0.30231.a353f...@osu1php.osuosl.org>
X-Authentication-Warning: osu1php.osuosl.org: nobody set sender to 
nore...@php.net using -f
To: php-general-subscribe-archive=mail-archive@lists.php.net
Subject: PHP Mailing List Website Subscription
X-PHP-Originating-Script: 0:subscribe.php
From: arch...@mail-archive.com

This was a request generated from the form at 
http://www.php.net/mailing-lists.php by 109.61.3.34.



Re: [PHP] ftp_put issues

2009-04-16 Thread j&#x27;s php general
On Thu, Apr 16, 2009 at 10:24 PM, James Hill
 wrote:
> The ftpData function and in fact all the php stuff is running online on my
> webserver. The pdf file is on my local machine, I'm trying to upload the
> local pdf file to the server using ftp.
>
>
>
> The dest variable I have tried with the full path:
>
> /var/www/html/Docs/DU/DU1.pdf
>
> And with just the DU1.pdf along with ftp_chdir.
>
>
>
> The local file path is being passed through a html form and consists of
> L:/mypdfs/testpdf.pdf
>
>
>
> I've disabled my firewall to try that to no avail.
>
>
>
> James
>
>
>
> Just to be clear where are you running your ftpData function from?
>
> Your local computer? Where is the PDF file coming from? I hope from
>
> your local computer as well.
>
>
>
> How does your Source and Dest variables look like? Full paths?
>
> Have you tried your firewall? (Assuming both script and file is coming
>
> from local and your firewall is on whitelist mode.)
>
>
>
> Cheers
>
>
>
> --
>
> http://www.lampadmins.com

I think that explains your problem, in order to upload a file via FTP
your FTP client GENERALLY must reside on the same computer as your
client, in your case your FTP client sits remotely elsewhere (which is
your PHP script) and your file is on your local computer.

A simple HTTP file upload should fit your 100K file nicely.

Cheers.

-- 
http://www.lampadmins.com

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



Re: [PHP] ftp_put issues

2009-04-16 Thread j&#x27;s php general
On Thu, Apr 16, 2009 at 9:27 PM, James  wrote:
> Hi, yeah ftp manually works just fine using the same login too.
>
> James
>
> -Original Message-
> From: Chris [mailto:dmag...@gmail.com]
> Sent: Wednesday, April 15, 2009 10:09 PM
> To: James
> Cc: php-general@lists.php.net
> Subject: Re: [PHP] ftp_put issues
>
> James wrote:
>> Hi, I'm trying to upload a pdf file from a local drive to the server using
> a
>> php routine. I've done it server to server before with no issues but this
>> just keeps failing on me.
>>
>> This is the function I'm calling, it connects and logs in just fine, but
> it
>> will not upload the file. The file I'm sending is just a 100k pdf file.
>
> If you do it manually does it work? Maybe the account is over quota.
>
> --
> Postgresql & php tutorials
> http://www.designmagick.com/
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

Just to be clear where are you running your ftpData function from?
Your local computer? Where is the PDF file coming from? I hope from
your local computer as well.

How does your Source and Dest variables look like? Full paths?
Have you tried your firewall? (Assuming both script and file is coming
from local and your firewall is on whitelist mode.)

Cheers

-- 
http://www.lampadmins.com

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



Re: [PHP] [php] scheduled task in php

2009-04-03 Thread j&#x27;s php general
On Fri, Apr 3, 2009 at 7:49 PM, Andrew Williams
 wrote:
> does anyone knows the the following is not working:
>
> C:\PHP\php.exe  D:\DEMO\index.php?action=run&run=1
>

The querystring does not have an effect from the command line, it is
part of the HTTP protocol. Use console options instead and use the
getopt function http://us2.php.net/manual/en/function.getopt.php

-- 
http://www.lampadmins.com

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



Re: [PHP] User Authentication across multiple server

2009-03-06 Thread j&#x27;s php general
On Fri, Mar 6, 2009 at 5:14 PM, Paul Scott  wrote:
> On Fri, 2009-03-06 at 10:09 +0100, Edmund Hertle wrote:
>
>> The only method which possibly could work and came to my mind was using
>> somehow $_GET parameter for username and password (encrypted).
>
> Set a cookie and crypt that (RC4 works well) and then check for the
> cookie on both sites. Kind of like a "Remember me" type deal
>
> -- Paul
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

I believe you can do this with a database to handle session, I haven't
used that myself though.

-- 
-
http://www.lampadmins.com

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



Re: [PHP] PHP AS an FTP server

2009-02-17 Thread j&#x27;s php general
On Wed, Feb 18, 2009 at 4:24 AM, Ashley Sheridan
 wrote:

> I used vsftp for several FTP systems at work, and bar a few problems
> (errors on my part!) they work just fine. I've even got PHP talking to
> various Bash scripts to manage users and permissions for the FTP, and,
> touch wood, everything works well.
>
> I wouldn't really agree that allowing local users to FTP in is a bad
> idea. I'm using just that method for my systems. The users, etc are only
> ever created through a web interface, which forces certain rules on
> usernames, which as far as I see it, is the only problem. As long as the
> vsftpd.conf file is configured correctly and securely, the whole thing
> will remain pretty tight.
>
>
> Ash
> www.ashleysheridan.co.uk
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

A couple months back we were able to configure ProFTPd with MySQL
support to allow our forum users to login and upload files. Although
users login using credentials from MySQL they are somewhat chrooted to
a single user with very limited capabilities and no shell of course.

This opens up the possibility of working with the users from PHP.

With a bit of creativity this link can help you get started
http://www.howtoforge.com/proftpd_mysql_virtual_hosting

-
http://www.lampadmins.com

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



[PHP] Best store for mans

2008-07-30 Thread php-general

Dont leave your nights dissatisfied

http://uimeds.com/

 
 
 
 
 
 
 
 
 
 
 
 
 
 
  












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



[PHP] Dear php-general@lists.php.net April 84% 0FF

2008-04-21 Thread php-general
Canadian Doctor Hazel Best Price On Net
http://zxa.pharmstorez.com?liyws


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



[PHP] RE: MensHealth 12916

2008-04-02 Thread php-general
Canadian Doctor Clara  Best Price On Net 79% OFF
http://www.beautywarm.com



No virus found in this outgoing message
Checked by PC Tools AntiVirus (4.0.0.26 - 10.067.006).
http://www.pctools.com/free-antivirus/

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



[PHP] testing

2008-03-25 Thread PHP General Users Mailing List
testing






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



Re: [PHP] change php variable depending on selection

2008-01-20 Thread PHP-General
thx for the reply but i am a bit confused (i am new to php and even to 
javascript)



Where would I put the javascript portion (the window.onLoad part), then? 
Here is the relevant portion of the code. My test page can be seen at 
http://valueinvestingplanet.com/test. The idea is to have the rss feed show 
up on that page after you select which feed you want.


thx again!



 
 
   
   (!(strcmp($row_Recordset1['blogname'], $row_Recordset1['blogname']))) {echo 
"selected=\"selected\"";} ?>>$row_Recordset1['blogname']?>

0) {
 mysql_data_seek($Recordset1, 0);
  $row_Recordset1 = mysql_fetch_assoc($Recordset1);
 }
?>
 
 
 



""Nathan Nobbe"" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

On Jan 20, 2008 8:51 PM, PHP-General <[EMAIL PROTECTED]> wrote:


Hi,

I've looked everywhere on the web (except of course the place that has 
the

answer ;) ) but can't seem to find a solution.

I'm trying to build an rss reader on a webpage. The idea is simple:
there's
a dropdown box where you select the name of the blog and when you select
the
blog you want to view a variable in the php script changes that captures
the
rss feed of that blog. The db is setup so that the name of the blog is
stored next to the rss feed of the blog. If I'm thinking of this 
correctly

I've developed the dropdown box so that it populates from my db the name
of
the blogs I have stored. I can't seem to figure out how to, when you
select
matt'sblog (for example), how to make it so that the php variable will be
populated with the rssfeed of matt's blog and then the feed will show. 
For

instance, selecting matt'sblog from the drop down list will make it so
that
$url="rss feed from matt'sblog" (which is stored in the db next to the
name
of the blog). Make sense?



so, you just want to submit a request to the server once someone makes a
selection?
you need to use the onselect dom level 0 event (easiest way [w/o requiring
users to
press a submit button]).  then you will have a javascript function to 
submit

the form,
eg.
// assume the select tag has id="rssFeedSelector"
// assume the form the select is in has id="rssSelectionForm
// then the javascript would look (roughly) something like this (put it in
the head tag of your page)

window.onLoad = function() {
   document.getElementById('rssFeedSelector').onchange = function() {
   document.getElementById('rssSelectionForm').submit();
   }
}

-nathan



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



[PHP] change php variable depending on selection

2008-01-20 Thread PHP-General

Hi,

I've looked everywhere on the web (except of course the place that has the 
answer ;) ) but can't seem to find a solution.


I'm trying to build an rss reader on a webpage. The idea is simple: there's 
a dropdown box where you select the name of the blog and when you select the 
blog you want to view a variable in the php script changes that captures the 
rss feed of that blog. The db is setup so that the name of the blog is 
stored next to the rss feed of the blog. If I'm thinking of this correctly 
I've developed the dropdown box so that it populates from my db the name of 
the blogs I have stored. I can't seem to figure out how to, when you select 
matt'sblog (for example), how to make it so that the php variable will be 
populated with the rssfeed of matt's blog and then the feed will show. For 
instance, selecting matt'sblog from the drop down list will make it so that 
$url="rss feed from matt'sblog" (which is stored in the db next to the name 
of the blog). Make sense?


thx in advance for any help! 


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



Re: [PHP] Adv. photo scripts

2007-11-25 Thread PHP-General
Thanks for all the replys. I should have warned you in advance that I am new 
;)



"Casey" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]

On Nov 24, 2007 11:16 PM, Robert Cummings <[EMAIL PROTECTED]> wrote:

On Sun, 2007-11-25 at 01:59 -0500, PHP-General wrote:
> Not sure if I'm at the right place but here goes
>
> I'm trying to create a script that will let users upload photos. It is 
> a
> high traffic site and I've been told its best to create a function that 
> will
> generate a unique filename for a temp. file, put the temp file 
> elsewhere on
> the server, and then use an (unlink???) function to delete the temp. 
> file

> after it gets written to the d-base.
>
> How would I do that?

PHP already does ALL that for you. You just need to save the file to
your DB. See the $_FILES global array for uploaded files.

Cheers,
Rob.
--
...
SwarmBuy.com - http://www.swarmbuy.com

Leveraging the buying power of the masses!
...


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




See this for examples:

http://us.php.net/features.file-upload

-Casey 


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



[PHP] Adv. photo scripts

2007-11-24 Thread PHP-General

Not sure if I'm at the right place but here goes

I'm trying to create a script that will let users upload photos. It is a 
high traffic site and I've been told its best to create a function that will 
generate a unique filename for a temp. file, put the temp file elsewhere on 
the server, and then use an (unlink???) function to delete the temp. file 
after it gets written to the d-base.


How would I do that? 


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



[PHP] Php-general-help/--STOP !!! No Pague de MAS... !!

2007-07-09 Thread Php-general-help 9
dollop absolution monogamy gallop jog 
heuristic stifle cove injudicious stab togs equitable averse 
concord brazzaville punish deed detroit 


[PHP] mysql_connect() error

2005-09-03 Thread php general help
Hi

guys hope you can all help me here. im in the middle of making a script ( im
still quite new), anyway im getting this error Parse error: syntax error,
unexpected T_STRING in c:\wamp\www\cms\header.inc on line 5 and on line 5 is
mysql_connect($dbhost, $dbusername, $dbpassword) , i know its the
mysql_connect() function thats giving me the error though cant seem to get
it sorted. below is the versions im using

Apache version : Apache/1.3.33 (Win32)
PHP version : 5.0.4
MySQL version : 4.1.10a-nt - extension : mysqli
all the above come in a bundle package called ( wampserver )
have also posted on wampservers forums for help
im using windows xp home.

Hope you guys can help me.

Thanks
Steve

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



[PHP] mysql_connect() error

2005-09-03 Thread php general help
Hi

guys hope you can all help me here. im in the middle of making a script ( im 
still quite new), anyway im getting this error Parse error: syntax error, 
unexpected T_STRING in c:\wamp\www\cms\header.inc on line 5 and on line 5 is 
mysql_connect($dbhost, $dbusername, $dbpassword) , i know its the 
mysql_connect() function thats giving me the error though cant seem to get 
it sorted. below is the versions im using

Apache version : Apache/1.3.33 (Win32)
PHP version : 5.0.4
MySQL version : 4.1.10a-nt - extension : mysqli
all the above come in a bundle package called ( wampserver )
have also posted on wampservers forums for help
im using windows xp home.

Hope you guys can help me.

Thanks
Steve 

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



[PHP] Returned mail: see transcript for details

2005-06-07 Thread php-general
The message was not delivered due to the following reason:

Your message was not delivered because the destination server was
not reachable within the allowed queue period. The amount of time
a message is queued before it is returned depends on local configura-
tion parameters.

Most likely there is a network problem that prevented delivery, but
it is also possible that the computer is turned off, or does not
have a mail system running right now.

Your message could not be delivered within 5 days:
Host 151.227.146.62 is not responding.

The following recipients could not receive this message:


Please reply to [EMAIL PROTECTED]
if you feel this message to be in error.


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

php-general Digest 3 Dec 2004 10:37:02 -0000 Issue 3148

2004-12-03 Thread php-general-digest-help

php-general Digest 3 Dec 2004 10:37:02 - Issue 3148

Topics (messages 203393 through 203411):

Re: $this - >
203393 by: Matthew Weier O'Phinney
203408 by: Klaus Reimer

Strange character conversion when converting XML by XSLT in PHP
203394 by: Age Bosma
203395 by: John Holmes
203400 by: Richard Lynch

Re: Too many DELETE statements
203396 by: Richard Lynch
203399 by: Richard Lynch

Re: Working with Dates
203397 by: Richard Lynch

Re: How to Add a Module
203398 by: Richard Lynch

Apache 2 survey
203401 by: Bart Baenisch

Mining protection / security code confirmation
203402 by: Ho!Tech Guy
203411 by: Jordi Canals

Re: Sessions: Basic Information
203403 by: Peter Lauri

Need Help
203404 by: suneel
203405 by: GH
203406 by: Peter Lauri
203407 by: Thomas Goyne

Re: Very fresh to php
203409 by: Zareef Ahmed

Re: Custom Open Tags
203410 by: Red Wingate

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 ---
* R. Van Tassel <[EMAIL PROTECTED]>:
> --=_NextPart_000_0039_01C4D88C.AECDCB00
> Content-Type: text/plain;
>   charset="us-ascii"
> Content-Transfer-Encoding: 7bit
>
> Can someone please point me to the php documentation where it explains
>
> $this - > 
>
> What is the symbol "- >" and is $this something only used in classes?
>
> I can't find any information that explains this specifically but see it used
> everywhere.

It's in http://php.net/oop and/or http://php.net/oop5 (php5). $this is a
special variable used within methods of classes to indicate the current
object instance. The '->' notation is used to access object properties
and methods.

-- 
Matthew Weier O'Phinney   | mailto:[EMAIL PROTECTED]
Webmaster and IT Specialist   | http://www.garden.org
National Gardening Association| http://www.kidsgardening.com
802-863-5251 x156 | http://nationalgardenmonth.org
--- End Message ---
--- Begin Message ---
R. Van Tassel wrote:
Can someone please point me to the php documentation where it explains
$this - > 
1. It must be "$this->" and not "$this - >".
2. Documentation can be found here:
http://de.php.net/manual/en/language.oop.php

What is the symbol "- >" and is $this something only used in classes?
Yes. Inside a method you can use "$this" to reference the current object 
in which the method was called. The "->" operator is not specific to 
"$this". It is generelly used to call methods or access properties of an 
object.
--- End Message ---
--- Begin Message ---
I'm converting, or at least trying, one XML file to another XML format 
using XSLT parsing it with PHP.

I'm using a lot of characters in the following style "& #34;", "& #42;", 
etc. (without the space, added now the prevent any conversion in this 
e-mail) in the XML file and I would like to keep it that way. PHP is 
converting every string like these to e.g. "&qout;" or "*". What can be 
done to prevent this conversion?

As far as I understand this is default behaviour of the parser and can 
not be prevented. Personally I consider this a bug because what if I 
just want to use "& #34;" (without the space) as a normal string value? 
The parser shouldn't touch it at all.

Can someone enlighten me a bit more on this one? :-)
Cheers,
Age
--- End Message ---
--- Begin Message ---
Age Bosma wrote:
I'm converting, or at least trying, one XML file to another XML format 
using XSLT parsing it with PHP.

I'm using a lot of characters in the following style "& #34;", "& #42;", 
etc. (without the space, added now the prevent any conversion in this 
e-mail) in the XML file and I would like to keep it that way. PHP is 
converting every string like these to e.g. "&qout;" or "*". What can be 
done to prevent this conversion?

As far as I understand this is default behaviour of the parser and can 
not be prevented. Personally I consider this a bug because what if I 
just want to use "& #34;" (without the space) as a normal string value? 
The parser shouldn't touch it at all.

Can someone enlighten me a bit more on this one? :-)
If you want a literal " in your data, then you should have 
&#34;, iirc. Maybe you could run the data through a preparser to 
match "&#xx;" patterns and convert the & to & ??

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/

php-general Digest 29 Nov 2004 20:38:01 -0000 Issue 3141

2004-11-29 Thread php-general-digest-help

php-general Digest 29 Nov 2004 20:38:01 - Issue 3141

Topics (messages 203054 through 203083):

Re: Weird sessions problem
203054 by: steve

Re: Problem with self join
203055 by: Raditha Dissanayake
203057 by: Robin Vickery
203060 by: Raditha Dissanayake

Re: similar function like getimagesize for Quicktime?
203056 by: Marek Kilimajer

Is this a bug in PHP 4.3.4?
203058 by: Octavian Rasnita
203062 by: Raditha Dissanayake
203064 by: Octavian Rasnita
203065 by: Greg Donald
203066 by: Greg Donald
203067 by: Raditha Dissanayake

Re: Go Back Problem
203059 by: Philip Thompson

SELECT problem..Need urgent help 
203061 by: Phpu
203063 by: Greg Donald

UNDEFINED VARIABLE ON LOCALHOST
203068 by: Ross Hulford
203070 by: John Nichel
203071 by: Greg Donald

Problems with headers and downloading file
203069 by: Christian Johansson
203073 by: John Nichel
203075 by: David Dickson

Turck mm_cache problem
203072 by: Mirek Novak

Line breaks in form
203074 by: Chris Farrugia
203076 by: John Nichel
203077 by: Greg Donald

[Off] - A way for PHP sites to get extreme Google rankings
203078 by: Brian Dunning
203079 by: Greg Donald
203080 by: John Nichel
203081 by: Brian Dunning

Re: PHP arrays and javascript
203082 by: Nick Peters

PHP log 2 Apache log
203083 by: David Zejda

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 ---
Andre Dubuc wrote:

> I gather that all of the script occurs on one page, and that the page is
> 'refreshed' by some action of the user (i.e. that the user has
> clicked/entered login info on some other page, and that this page then
> needs to detect that change.)

No, it's when moving from one page/script to another.
 
> What may be happening is that the refresh action triggers the script
> twice: once for the initial loading and again for the reset values. Hence,
> $ref_page gets reset by line 53 ($ref_page = get_ref_page();

Nope. There's no 'refresh' as such.

> Another question, by
> any chance, are you switching into https by any chance?

Nope.

Ah well. As I mentioned earlier, I have a workaround now - not ideal, but as
it's working it'll do. I don't make money from web programming so I'll
leave it at that and get on with my day job :-)

-- 
@+
Steve
--- End Message ---
--- Begin Message ---
suneel wrote:
Hi...
   Please take a look at the following...
   I'm using MySQL 4.0.15
 

And what makes you think this is a mysql list?
--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 
--- End Message ---
--- Begin Message ---
On Mon, 29 Nov 2004 14:12:23 +0530, suneel
<[EMAIL PROTECTED]> wrote:
> Hi...
> Please take a look at the following...
> 
> I'm using MySQL 4.0.15
> I have the database like this
> 
>Id name Owner
> 1Top Menu0
> 2File   1
> 3Open1
> 4Text File   2
> 5Dot Net2
> 6ASP.Net   5
> 7C#.Net  5
> 
>   In the above data the Id's 6 & 7  are not owner to any one.So,I
> want to retrieve those Id's which are not owner to any one.

This should really go to a MySQL list, but...

If your table is called "menus", this should do the job.

SELECT a.* 
  FROM menus a LEFT JOIN menus b ON a.Id = b.Owner 
  WHERE b.Owner IS NULL

-robin
--- End Message ---
--- Begin Message ---
Robin Vickery wrote:
On Mon, 29 Nov 2004 14:12:23 +0530, suneel
<[EMAIL PROTECTED]> wrote:
 

Hi...
   Please take a look at the following...
   I'm using MySQL 4.0.15
   I have the database like this
   

This should really go to a MySQL list, but...
 

please keep the discussion on topic.

--
Raditha Dissanayake.
--
http://www.radinks.com/print/card-designer/ | Card Designer Applet
http://www.radinks.com/upload/  | Drag and Drop Upload 
--- End Message ---
--- Begin Message ---
Dustin Krysak wrote:
Hi there - I was wondering if there was some kind of PHP function to 
determine hte pixel size of a quicktime mov

php-general Digest 29 Nov 2004 08:35:51 -0000 Issue 3140

2004-11-29 Thread php-general-digest-help

php-general Digest 29 Nov 2004 08:35:51 - Issue 3140

Topics (messages 203024 through 203053):

Re: Weird sessions problem
203024 by: Jason Wong
203031 by: steve
203032 by: Andre Dubuc
203049 by: Jason Wong

Re: Mass MySQL INSERT
203025 by: Jason Wong

Re: buffer
203026 by: Greg Donald

Re: Getting static member for a class which name is stored
203027 by: Greg Beaver
203035 by: Jake Press

Re: Overriding static members?
203028 by: Greg Beaver

sql insert into 2 tables
203029 by: Dustin Krysak
203030 by: Larry E. Ullman

php 4 to  5
203033 by: Travis Conway
203034 by: Greg Beaver
203037 by: Travis Conway
203039 by: Curt Zirzow
203040 by: Michael Leung
203051 by: ShenKong
203052 by: Lester Caine

exclude - mysql query
203036 by: Brad Ciszewski
203046 by: David Robley

Help with DB.php in PHP5
203038 by: Info.Best-IT
203050 by: ShenKong

and statement
203041 by: Brad Ciszewski
203042 by: Brad Ciszewski
203043 by: Larry E. Ullman
203044 by: Robert Cummings
203047 by: John Nichel

similar function like getimagesize for Quicktime?
203045 by: Dustin Krysak

newbie web services
203048 by: Andras Kende

Problem with self join
203053 by: suneel

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 ---
On Sunday 28 November 2004 22:46, steve wrote:

> I tried printing out the values before and after each of those lines. After
> line 53, $ref_page is an array containing precisely the values I expect, so
> the function is working. After line 54, the session var has been reset, as
> expected, to match the current page - but $ref_page has also changed and is
> now equal to $_SESSION['ref_page'], which is what I found very weird - ie,
> resetting $_SESSION['ref_page'] simultaneously reset $ref_page.

Is $ref_page getting set to what the _previous_ value of $_SESSION['ref_page'] 
was? If so, it sounds like you have register_globals enabled.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
I think we're in trouble.
  -- Han Solo
*/
--- End Message ---
--- Begin Message ---
Jason Wong wrote:

> On Sunday 28 November 2004 22:46, steve wrote:
> 
>> I tried printing out the values before and after each of those lines.
>> After line 53, $ref_page is an array containing precisely the values I
>> expect, so the function is working. After line 54, the session var has
>> been reset, as expected, to match the current page - but $ref_page has
>> also changed and is now equal to $_SESSION['ref_page'], which is what I
>> found very weird - ie, resetting $_SESSION['ref_page'] simultaneously
>> reset $ref_page.
> 
> Is $ref_page getting set to what the _previous_ value of
> $_SESSION['ref_page'] was? If so, it sounds like you have register_globals
> enabled.

No to both. When I arrive at the new page, the sessions vars (as expected)
contain the values set by the previous page. $ref_page is not set. The
values are transferred to $ref_page by the function. That works as planned.
I then reset the value of the session vars, at which point, $ref_page also
gets set. From printing out the values after each line, I find this:

Let's say we've come from the page /community.php and have arrived
at /market.php. Here are the values at each stage:

$_SESSION['ref_page] = '/community.php'
$_SESSION['ref_pagequery'] = 'pagemode=index' // as an example
53. $ref_page = get_ref_page();
$ref_page['name'] =  '/community.php'
$ref_page['query'] = 'pagemode=index'
$_SESSION['ref_page] = '/community.php'
$_SESSION['ref_pagequery'] = 'pagemode=index'
54. $_SESSION['ref_page'] = THIS_PAGE;
$ref_page =  '/community.php' // now a scalar
$_SESSION['ref_page] = '/market.php'

register_globals is off (in php.ini and there are no .htaccess files). 

-- 
@+
Steve
--- End Message ---
--- Begin Message ---
On Sunday 28 November 2004 05:46 pm, steve wrote:
> Jason Wong wrote:
> > On Sunday 28 N

RE: [PHP] Server's clock gone funny, maybe? OT

2004-07-29 Thread php-general
Quoting Jay Blanchard <[EMAIL PROTECTED]>:

> [snip]
> >
> > [smartass mode to full power - nothing personl]
> > [/smartass mode]
> 
> Is that W3C HTML 4.01 compliant?
> [/snip]
> 
> Yes, ermaybe. Try XJBML strict
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
Tag is invalid personl, should be personAl

:)


-----
This mail sent through IMP: http://horde.org/imp/

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



[PHP] ordering a list starting at x

2004-07-29 Thread php-general
Okay so I have a list of 20 images, I want to display 5 per page, the code I 
have included will do that without any problems, and the code I have included 
will setup the Prev, Next and page # links and they will pull up the correct 
results.  However I need to include some functionality where if I give this 
code an image id say 13, that the code with then show 13 as the first one and 
go on to 14, 15 to the end, and then start over ending the list at 12.  So 
that in this example you have 13, 14, 15, 16, 17 on page 1.  page 2 would have 
the next 5 and so on back to 12. 

So I need to order a list starting at x, which in this case = 13, and then 
have it loop around and end at 12.

Quoting [EMAIL PROTECTED]: 

> This is a little bit more involved then the subject would let on.  What I 
> have 
> is a picture page, has nothing to do with an 80's themed kids show starring 
> 
> Bill Cosby, but what it has to deal with is a search results like page where 
> 5 
> images will appear with a next and prev link to get to more.  However what I 
> 
> need to do extra is if someone clicks in from a link for a particular 
picture 
> 
> I need to display that pic first.  So below is my psudocode. 
> 
> $numresults = mysql_query("SELECT * FROM images WHERE approved = 1"); 
> $numrows = mysql_num_rows($numresults); 
> if (empty($offset)) { 
> $offset=0; 
> } 
> // end entry 
> $sqlquery = "SELECT * FROM images WHERE approved = 1 ORDER BY imageId DESC 
> limit $offset,$limit"; 
> $result = mysql_query($sqlquery); 
> while ($search_return = mysql_fetch_array($result)) { 
> print the images here 
> } 
> //mysql_free_result($result); 
> print $search_results; 
> // entry for results 
> $pages = intval($numrows/$limit); 
> if ($numrows%$limit) { 
> $pages++; 
> } 
> 
> for ($i=1;$i<=$pages;$i++) { 
> $newoffset=$limit*($i-1); 
> print "$i \n"; 
> 
> } 
> 
> 
> if ($offset>1) { 
> $prevoffset=$offset-$limit; 
> print "$Prev 
> \n"; 
> } 
> 
> 
> if ($numrows>($offset+$limit)) { 
> $nextoffset=$offset+$limit; 
> print " offset=$nextoffset&sc=searchResults\">$Next\n"; 
> } 
> 
> Any thoughts? 
> 
> 
> - 
> This mail sent through IMP: http://horde.org/imp/ 
> 
> -- 
> PHP General Mailing List (http://www.php.net/) 
> To unsubscribe, visit: http://www.php.net/unsub.php 
> 


-
This mail sent through IMP: http://horde.org/imp/

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



[PHP] ordering a list starting at x

2004-07-29 Thread php-general
This is a little bit more involved then the subject would let on.  What I have 
is a picture page, has nothing to do with an 80's themed kids show starring 
Bill Cosby, but what it has to deal with is a search results like page where 5 
images will appear with a next and prev link to get to more.  However what I 
need to do extra is if someone clicks in from a link for a particular picture 
I need to display that pic first.  So below is my psudocode.

$numresults = mysql_query("SELECT * FROM images WHERE approved = 1"); 
$numrows = mysql_num_rows($numresults); 
if (empty($offset)) { 
$offset=0; 
}
// end entry
$sqlquery = "SELECT * FROM images WHERE approved = 1 ORDER BY imageId DESC 
limit $offset,$limit";
$result = mysql_query($sqlquery);
while ($search_return = mysql_fetch_array($result)) {
print the images here
}
//mysql_free_result($result); 
print $search_results;
// entry for results
$pages = intval($numrows/$limit); 
if ($numrows%$limit) { 
$pages++; 
} 

for ($i=1;$i<=$pages;$i++) { 
$newoffset=$limit*($i-1); 
print "$i \n"; 
} 


if ($offset>1) { 
$prevoffset=$offset-$limit; 
print "$Prev 
\n"; 
} 


if ($numrows>($offset+$limit)) { 
$nextoffset=$offset+$limit; 
print "$Next\n"; 
} 

Any thoughts?


-----
This mail sent through IMP: http://horde.org/imp/

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



[PHP] Re: Problems with variable handling !

2004-06-08 Thread php-general
On Tuesday 08 June 2004 18:50, php-general wrote:

> Only pressing the "Display concatenated strings"-button should 

> output the concatenated string, but this does not work, and I do not 

> understand why.

$var3 is not defined.

-- 



$var3 is defined as

$var3 = "$var1$var2";

in the body of the if ($button1) statement !?





[PHP] Re: Problems with variable handling !

2004-06-08 Thread php-general

  - Original Message - 
  From: php-general 
  To: [EMAIL PROTECTED] 
  Sent: Tuesday, June 08, 2004 12:36 PM
  Subject: Problems with variable handling !


  Hi !

  I have a Problem with hand over of variables;
  My Page consists of three files which I have enclosed to
  demonstrate the problem.

  test.php:
  --
  
  
  test.php
  

  

  
  
  
  
  
  --



  test_oben.php:
  --
  
  
  test_oben.php
  

  
  test
  

  
String1

String2
 


  

  
  
  
  --



  test_0.php:
  --
  
  
  test_0.php
  

  
  
  
  
  --




  In test_oben.php I want to insert two strings.
  pressing the "Display strings"-button will output them in the button frame.

  Only pressing the "Display concatenated strings"-button should output the 
concatenated string,
  but this does not work, and I do not understand why.


  Please give me a hint !

  best regards

  chrm

  

  phpinfo reports that register_globals=On
















[PHP] Re: Problems with variable handling !

2004-06-08 Thread php-general
phpinfo reports that register_globals=On
















[PHP] Problems with variable handling !

2004-06-08 Thread php-general
Hi !

I have a Problem with hand over of variables;
My Page consists of three files which I have enclosed to
demonstrate the problem.

test.php:
--


test.php



  





--



test_oben.php:
--


test_oben.php



test

  

  String1
  
  String2
   
  
  

  



--



test_0.php:
--


test_0.php






--




In test_oben.php I want to insert two strings.
pressing the "Display strings"-button will output them in the button frame.

Only pressing the "Display concatenated strings"-button should output the concatenated 
string,
but this does not work, and I do not understand why.


Please give me a hint !

best regards

chrm

















[PHP] PHP Basic's Problem with a simple script.

2004-06-01 Thread php-general
Hi !

I am an unexperienced PHP newbie, and a have a Problem:
The following script is a sample from a PHP tutorial,
but it does not work on my machine.
I use  PHP Ver. 4.1.2 with apache 1.3.26 on a debian box.
In php.ini, "safe_mode" is off, and "register_globals" is on.

The script from the mentioned tutorial 
(http://www.galileocomputing.de/openbook/php4/kapd.htm)
should be a sample for a php-file which invokes itself;
This does not work on my machine;
I can enter names and submit them as often I like, but
the statement from the if-block is never executed, i.e.
the output "You have entered the following name: ..."
is never displayed.

Here is the excerpt from this script:

--


";
   }
?>


Please enter a Name and send the form:

 2nd Name
 1st Name







I assume the reason is in global or general settings,
but I don't know them.
Does anybody know what to do ?

best regards

chrm


















php-general Digest 17 May 2004 13:07:39 -0000 Issue 2768

2004-05-17 Thread php-general-digest-help

php-general Digest 17 May 2004 13:07:39 - Issue 2768

Topics (messages 186369 through 186403):

Re: while inside a while or join or...
186369 by: Rachel Rodriguez
186370 by: Curt Zirzow
186371 by: John W. Holmes

Forums
186372 by: Ryan A
186373 by: John W. Holmes
186374 by: Justin French
186381 by: Steve Magruder - WebCommons.org
186391 by: John Taylor-Johnston
186392 by: John Taylor-Johnston

change database from mysql to mssql
186375 by: David
186393 by: Torsten Roehr
186403 by: Aidan Lister

create if table not exists
186376 by: John Taylor-Johnston
186378 by: Travis Low
186379 by: Tim Van Wassenhove
186385 by: John Taylor-Johnston
186386 by: John Taylor-Johnston
186390 by: John Taylor-Johnston

Re: weird problem with index page
186377 by: Andy Ladouceur
186382 by: loll
186383 by: Jason Wong

Re: File_exists result cached over a session?
186380 by: Steve Magruder - WebCommons.org

passing values of checkboxes in PHP
186384 by: gowthaman ramasamy
186387 by: John Taylor-Johnston
186394 by: Marek Kilimajer

passing values of checkboxes in PHP- solved
186388 by: gowthaman ramasamy
186389 by: John Taylor-Johnston

keeping the last zero
186395 by: Mario
186396 by: Oliver Hankeln
186397 by: Marek Kilimajer
186401 by: php chucker

[Newbie] Simple stats from mysql table data
186398 by: Vans Hallden

class_xslt
186399 by: eoghan
186400 by: Clifford W. Hansen

thought I should share this
186402 by: Brent Clark

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
--- Begin Message ---

> 
> I would like to select all 'b' from Table_1 WHERE a
> = '2' and then to 
> select all 'd' from table_2 with 'b' from previous
> result.
> 
> Table 2 is the Table with UserNames (d) and Table 1
> is the table with 
> 'marked' UserID's (b).
> 
If I understand you correctly, its sounds like you
want to do the following:

$sql = "
SELECT t1.b,
   t2.d
FROM Table_1 AS t1
LEFT JOIN Table_2 AS t2
ON (t1.b = t2.d)
WHERE t1.a = '2'";


=
~Rachel




__
Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.
http://promo.yahoo.com/sbc/
--- End Message ---
--- Begin Message ---
* Thus wrote T. H. Grejc ([EMAIL PROTECTED]):
> Hallo,
> 
> I know of a few ways of doing this but I am not sure that any is right. 
> I want to consult with you what is the best way of doing this:
> 
> ...
> 
> I would like to select all 'b' from Table_1 WHERE a = '2' and then to 
> select all 'd' from table_2 with 'b' from previous result.
> 
> Table 2 is the Table with UserNames (d) and Table 1 is the table with 
> 'marked' UserID's (b).
> 
> What is the best way of doing this.

I'm having difficluties finding out how this is related to php, but
anyway... this is a  simple joining of two tables.

so you have

  select b from table_1 where a = 2

and
  select d from table_2 where b = results from table_1

Thus

  select table_1.b, table_2.d from table_1, table_2 
   where table_1.b = table_2.b 
and table_1.a = 2


come to think of it, thats very much like an algebra problem.


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."
--- End Message ---
--- Begin Message ---
T. H. Grejc wrote:
Hallo,
I know of a few ways of doing this but I am not sure that any is right. 
I want to consult with you what is the best way of doing this:

Table 1:
++-+
| *a* | *b* |
++-+
|  2   |  1|
++-+
|  2   |  2|
++-+
Table 2:
++-+
| *b* | *d* |
++-+
|  1   |  asd |
++-+
|  2   |  fgh |
++-+
I would like to select all 'b' from Table_1 WHERE a = '2' and then to 
select all 'd' from table_2 with 'b' from previous result.

Table 2 is the Table with UserNames (d) and Table 1 is the table with 
'marked' UserID's (b).
What's this go to do with PHP? This should be on php-db at least...
SELECT t1.b, t2.d FROM table1 t1, table2, t2 WHERE t1.a = 2 AND t1.b = t2.b
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
Hey,
Just spent 2 hours at hot scripts searching for a good forum software, after
going through 15 pages 

php-general Digest 17 May 2004 00:28:06 -0000 Issue 2767

2004-05-16 Thread php-general-digest-help

php-general Digest 17 May 2004 00:28:06 - Issue 2767

Topics (messages 186347 through 186368):

Re: PEAR::DB is great but is so SLOW !
186347 by: Aidan Lister
186349 by: Martin Hjort Eriksen
186350 by: Tim Van Wassenhove
186355 by: Curt Zirzow

Re: Template Engine -> TinyButStrong
186348 by: Skrol 29

weird problem with index page
186351 by: loll
186352 by: BAO RuiXian
186356 by: loll

Need help integration whoiscart.net script with my hosting template!
186353 by: J.H.J. Saat
186354 by: AP&J-SAAT Internet Solutions

File_exists result cached over a session?
186357 by: Steve Magruder - WebCommons.org
186363 by: Marek Kilimajer

How to get class name in static function (PHP 4.2.3)
186358 by: Torsten Roehr
186360 by: Curt Zirzow

Re: PHP and qmail
186359 by: Justin Patrin

loosing memory
186361 by: Merlin
186364 by: Curt Zirzow
186365 by: Merlin

Re: Reposting elseif carry
186362 by: Curt Zirzow

session
186366 by: MrS

Local_value Extension_Dir
186367 by: Alexander Hachmann

while inside a while or join or...
186368 by: T. H. Grejc

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 ---
There are many, many benchmarks done comparing PEAR::DB to PEAR::MDB to
AdoDB, PEAR::DB is much slower than the native API, AdoDB is the fastest but
least functional - I suggest you try PEAR::MDB2

http://pear.php.net/package/mdb2

once you get into it, you'll love it


"Rainer müller" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Greg wrote:
> > Hello,
> >
> > I've just performed a few tests when using PEAR::DB and
> > the results weren't good at all.
> >
> > If I compare a script using PEAR::DB with a script using
> > standard functions (and which supports mysql, pgsql and
> > sqlite databases), the script using PEAR::DB is 10 times
> > slower than the other.
> >
> > In one of my projects, it slows down execution time to
> > 0,7 sec per page !
> >
> > Conclusion : if you want to use PEAR::DB package, you'll
> > probably will have to use cache systems for scripts that
> > may be request often.
> >
> > Am I the only one annoying by this loss of performance ?
> > Because this is a huge loss in that case !
> >
> > Greg
>
> Remember, PEAR::DB also uses the standard functions, so I can't
> understand, why it should be much slower.
>
> Rainer
--- End Message ---
--- Begin Message ---

Remember, PEAR::DB also uses the standard functions, so I can't 
understand, why it should be much slower.

Rainer

You have to remeber that PEAR::DB is an object oriented abstraction over 
the standard functions, and within this abstraction, there is also built 
som error handling funtions, etc. in.

/Martin Eriksen
--- End Message ---
--- Begin Message ---
In article <[EMAIL PROTECTED]>, Greg wrote:
> If I compare a script using PEAR::DB with a script using
> standard functions (and which supports mysql, pgsql and
> sqlite databases), the script using PEAR::DB is 10 times
> slower than the other.
> 
> Conclusion : if you want to use PEAR::DB package, you'll
> probably will have to use cache systems for scripts that
> may be request often.

I don't understand your logic. 

Imho, you can only compare:
- A without caching VS B without caching
- A with caching VS B with caching

> Am I the only one annoying by this loss of performance ?
> Because this is a huge loss in that case !

I understand there might be a significant difference in performance, and
i understand nobody likes that.

But imho the real questions are these:
- What are the advantages of a Database Abstraction API?
- What are the disadvantages of a Database Abstraction API?
- Can we live with the lesser performance if we know we'll safe a lot of time
when we switch to another DBMS product? 
- How likely is it that we are going to switch to another DBMS? 

-- 
http://home.mysth.be/~timvw
--- End Message ---
--- Begin Message ---
* Thus wrote Tim Van Wassenhove ([EMAIL PROTECTED]):
> In article <[EMAIL PROTECTED]>, Greg wrote:
> 
> > Am I the only one annoying by this loss of performance ?
> > Because this is a huge loss in that case !
> 
> I understand there might be a significant difference in performance, and
> i understand nobody likes that.
> 
> But imho the real questions are these:
> - What are the advantages of a Database Abstraction API?
> - What are the dis

php-general Digest 16 May 2004 11:09:12 -0000 Issue 2766

2004-05-16 Thread php-general-digest-help

php-general Digest 16 May 2004 11:09:12 - Issue 2766

Topics (messages 186336 through 186346):

Re: PHP and qmail
186336 by: Manuel Lemos
186339 by: electroteque

Release Announcement: Hardened-PHP 0.1.1
186337 by: Stefan Esser
186338 by: electroteque

Re: Reposting elseif carry
186340 by: Curt Zirzow
186341 by: Daniel Clark
186342 by: Ronald \"The Newbie\" Allen

PEAR::DB is great but is so SLOW !
186343 by: greg
186344 by: greg
186345 by: greg
186346 by: Rainer Müller

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 ---
Hello,
On 05/15/2004 04:14 PM, Stephen Lake wrote:
Can someone tell me how I can send HTML using qmail from a Script? The MTA I
was using was changed from Sendmail to qmail and now my HTML mails actually
show the html tags in the mail body.
That looks like a bug in the mail() function because qmail comes with 
sendmail compatible wrapper.

Anyway, you may want to try this class for composing and sending 
messages including HTML formatted. It comes with a sub-class specialized 
in qmail but I suspected that you do not need to use it as the base 
class that uses mail() already comes with workarounds to use the mail()
function without the problems you are facing:

http://www.phpclasses.org/mimemessage
--
Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--- End Message ---
--- Begin Message ---
Could it not be you have to send the  html document type in the header of
the mail ?

> -Original Message-
> From: Manuel Lemos [mailto:[EMAIL PROTECTED]
> Sent: Sunday, May 16, 2004 8:55 AM
> To: Stephen Lake
> Cc: [EMAIL PROTECTED]
> Subject: [PHP] Re: PHP and qmail
>
>
> Hello,
>
> On 05/15/2004 04:14 PM, Stephen Lake wrote:
> > Can someone tell me how I can send HTML using qmail from a
> Script? The MTA I
> > was using was changed from Sendmail to qmail and now my HTML
> mails actually
> > show the html tags in the mail body.
>
> That looks like a bug in the mail() function because qmail comes with
> sendmail compatible wrapper.
>
> Anyway, you may want to try this class for composing and sending
> messages including HTML formatted. It comes with a sub-class specialized
> in qmail but I suspected that you do not need to use it as the base
> class that uses mail() already comes with workarounds to use the mail()
> function without the problems you are facing:
>
> http://www.phpclasses.org/mimemessage
>
>
> --
>
> Regards,
> Manuel Lemos
>
> PHP Classes - Free ready to use OOP components written in PHP
> http://www.phpclasses.org/
>
> PHP Reviews - Reviews of PHP books and other products
> http://www.phpclasses.org/reviews/
>
> Metastorage - Data object relational mapping layer generator
> http://www.meta-language.net/metastorage.html
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---


_  __ _   ___  _  _  ___ 
   | || | __ _  _ _  __| | ___  _ _   ___  __| | ___ | _ \| || || _ \
   | __ |/ _` || '_|/ _` |/ -_)| ' \ / -_)/ _` ||___||  _/| __ ||  _/
   |_||_|\__,_||_|  \__,_|\___||_||_|\___|\__,_| |_|  |_||_||_|  
 



The Hardened-PHP project team is pleased to announce the release of 
version 0.1.1 of our PHP security hardening patch. This new Hardened-PHP
release is the first one that is publicly announced and is considered
stable on atleast linux systems.

Hardened-PHP is a patch against the PHP codebase which adds security 
hardening features to it to protect servers on the one hand against a 
number of well known problems in hastily written PHP scripts and on 
the other hand against potential unknown vulnerabilities within the 
engine itself.

Hardened-PHP provides:

+ Protection of the Zend Memory Manager with canaries
+ Protection of Zend Linked Lists with canaries
+ Protection against internal format string exploits
+ Protection against arbitrary code inclusion
+ Syslog logging of attackers IP

We consider Hardened-PHP 0.1.1 to be the best version of Hardened-PHP
available and we st

php-general Digest 15 May 2004 10:34:44 -0000 Issue 2764

2004-05-15 Thread php-general-digest-help

php-general Digest 15 May 2004 10:34:44 - Issue 2764

Topics (messages 186263 through 186287):

Looking For Easy To Use Shopping Cart
186263 by: Ryan Schefke
186266 by: Justin Patrin
186268 by: Dan McCullough
186270 by: Ryan Schefke
186271 by: Justin Patrin
186273 by: Dan McCullough
186274 by: Dan McCullough

Missing data types?
186264 by: René Fournier

Re: tracking ip and its location
186265 by: adwinwijaya

Re: GD createpng and getting different png formats
186267 by: Galen
186269 by: Sam Joseph
186275 by: Galen
186278 by: Sam Joseph

How to duplicate this functionality?
186272 by: Ryan A
186276 by: Robert Cummings
186277 by: Ryan A
186279 by: Will Collins
186280 by: Curt Zirzow
186282 by: Will Collins

Re: php-general Digest 14 May 2004 22:05:59 - Issue 2763
186281 by: Graeme Foster

Re: [PHP-DB] php-mysql problem
186283 by: Burhan Khalid

Re: Template Engine
186284 by: Tom Rogers
186285 by: electroteque

Carrying Variables
186286 by: Ronald \"The Newbie\" Allen
186287 by: Torsten Roehr

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 ---
Can anyone recommend a good open source shopping cart solution? I built an
application for custom websites, now, I just need to interface to a shopping
cart. I'm using mysql. Any suggestions?

...looking for something easy.

Thanks,
Ryan 

 

--- End Message ---
--- Begin Message ---
Ryan Schefke wrote:
Can anyone recommend a good open source shopping cart solution? I built an
application for custom websites, now, I just need to interface to a shopping
cart. I'm using mysql. Any suggestions?
...looking for something easy.
Thanks,
Ryan 

Well...
Do you mean that you've created a storefront already and need a cart, or 
do you need the whole thing? There really isn't any only cart software, 
they all include a storefront.

From what I've seen, Zen Cart is pretty well featured and is open 
source and free.

--
paperCrane 
--- End Message ---
--- Begin Message ---
There are several tutorials that are just the cart, probably some minimal
code typing and fixing for your needs.
MyMarket found on SourceForge is one.  There was one on Monkey Junkies.

FreeTrade is good.

dan mccullough
sr. engineer
url:  heathermccullough.com
tf:   866.298.3991
w:   603.444.9808

There is no such thing as a problem, unless the servers are on fire.
Sometimes great opportunity comes brilliantly disguised as bad news.

-Original Message-
From: Justin Patrin [mailto:[EMAIL PROTECTED]
Sent: Friday, May 14, 2004 6:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Looking For Easy To Use Shopping Cart

Ryan Schefke wrote:

> Can anyone recommend a good open source shopping cart solution? I built an
> application for custom websites, now, I just need to interface to a
shopping
> cart. I'm using mysql. Any suggestions?
>
> ...looking for something easy.
>
> Thanks,
> Ryan
>

Well...

Do you mean that you've created a storefront already and need a cart, or
do you need the whole thing? There really isn't any only cart software,
they all include a storefront.

 From what I've seen, Zen Cart is pretty well featured and is open
source and free.

--
paperCrane 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
I want my customer to be able to select a few options via radio buttons (12
months or 24 months - how many photos in their photo album, etc) that impact
the price.  Then, I want the customer to click a "checkout" link that takes
them directly to a form to input billing address and credit card
information.

Any recommendations/guidance?

I'm calling around and speaking to payment gateways and merchant account
providers but wanted to tap into the open source community to see what's out
there that can fit my needs.

I really don't think this is that complex of a task, or maybe it is?

Thanks,
Ryan

-Original Message-
From: Justin Patrin [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 14, 2004 6:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: Looking For Easy To Use Shopping Cart

Ryan Schefke wrote:

> Can anyone recommend a good open source shopping cart solution? I built an
> application for custom websites, now, I just need to interface to a
shopping
> cart. I'm using mysql. Any suggestions?
> 
> ...looking for something easy.
> 
> Thanks,
> Ryan 
> 

Well...

Do you mean that you'

php-general Digest 13 May 2004 08:26:03 -0000 Issue 2760

2004-05-13 Thread php-general-digest-help

php-general Digest 13 May 2004 08:26:03 - Issue 2760

Topics (messages 186042 through 186076):

SuExec and PHP
186042 by: Travis Low

Re: include (or require) doesn't seem to work
186043 by: Torsten Roehr

Re: User/Group rights system?
186044 by: Torsten Roehr

mcrypt & pdflib configuration
186045 by: William Holroyd

Re: Memory usage
186046 by: Torsten Roehr

Breaking out of a loop...
186047 by: René Fournier
186049 by: Curt Zirzow
186054 by: René Fournier
186055 by: Curt Zirzow
186057 by: Tom Rogers

Re: HTTP_RAW_POST_DATA
186048 by: Chris Shiflett
186050 by: Michal Migurski
186056 by: Chris Shiflett
186063 by: raditha dissanayake
186064 by: raditha dissanayake
186066 by: Curt Zirzow
186068 by: Michal Migurski

mysql went away
186051 by: Bill Green
186061 by: raditha dissanayake

security and extended ascii characters
186052 by: Chris W

Re: PHP Session Handlers
186053 by: Paul Higgins

Re: Reshuffling an array
186058 by: Todd Cary

Re: Ordering alphabetical in secondary select string
186059 by: R.G. Vervoort

site search engine.. not dynamic
186060 by: Aaron Wolski

Zip-code Form Validation Scripts and Zipcode Program
186062 by: Ryan Munevar
186065 by: Manuel Lemos

a good user directory application...
186067 by: bruce
186069 by: Ryan A
186070 by: bruce

PHP5 - instanceof
186071 by: Martin Towell
186072 by: Travis Low

Multiple Socket's at one time
186073 by: Terence

Re: PHP5 - instanceof [SOLVED]
186074 by: Martin Towell

problem install pws and php
186075 by: lee 03

Saving and mailing remote file
186076 by: Sascha Meyer

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 ---
Greetings.  We have a need for our PHP scripts to run as the user and group 
associated with each Apache virtual domain on our Redhat server.  Currently, 
all PHP scripts run as nobody.nobody.

I know that the apache suexec module allows CGI scripts to run as the user and 
group of the virtual host, but that doesn't seem to be the case for PHP scripts 
run under the apache php module (mod_php).

So my questions are:

(1) Can we use suexec to force PHP scripts (running under mod_php) to run as 
the user/group associated with the virtual host?  If so, how?  Are there any 
special configuration tricks to make this happen?

(2) If we CAN'T use suexec with mod_php, I assume we can run PHP as CGI to 
solve our problem.  However, I'm worried about performance.  Have any of you 
done this on linux?  Is it difficult to configure?  Do you have to audit all of 
your PHP scripts?  Etc., etc.

I did read the pages http://www.php.net/security.cgi_bin and 
http://www.php.net/manual/en/security.apache.php, but did not come away with 
clear answers to my questions.  There were also a lot of contradictory comments 
at the bottom of those pages, and a whole mess of stuff on google, so I'm 
getting more lost, not less.  Please help!

cheers,

Travis

--
Travis Low
<mailto:[EMAIL PROTECTED]>
<http://www.dawnstar.com>
--- End Message ---
--- Begin Message ---
"Daniel Barbar" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Thanks Torsten! Using the file-system relative path made it work (I had
> tried only with the absolute path, which ddidn't work). However, I checked
> again and I did have 'allow_url_fopen = On' in /etc/php.ini. I'll take a
> closer look later and report the problem if I find it. Thanks again,
>
> Daniel

Using the absolute path works as well - but you have to use the full LOCAL
file path, e.g. /htdocs/www/your-domain etc.

You can get this value from $_SERVER['DOCUMENT_ROOT'].

Regards, Torsten

>
> "Torsten Roehr" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > > Try including it as a local file:
> > > require_once library.php'; // if it is in the same directory as the
file
> > you
> >
> > Forgot a quote here, sorry:
> > require_once 'library.php';
> >
> > Torsten
--- End Message ---
--- Begin Message ---
"David David" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello,
>
> Does anyone know of an open source "user/group" based
> permission system built with php/MySQL?
>
> That is, the effective rights for any user on a
> specific secured object are computed from various
> permit/deny permissions assigned to the use

php-general Digest 12 May 2004 07:24:51 -0000 Issue 2758

2004-05-12 Thread php-general-digest-help

php-general Digest 12 May 2004 07:24:51 - Issue 2758

Topics (messages 185936 through 185955):

Re: php calender
185936 by: Daniel Clark
185937 by: Torsten Roehr

include (or require) doesn't seem to work
185938 by: Daniel Barbar
185939 by: Torsten Roehr
185940 by: Torsten Roehr
185941 by: Daniel Clark

Re: HTTP_RAW_POST_DATA
185942 by: Chris Boget
185943 by: John W. Holmes
185944 by: Chris Shiflett
185945 by: Travis Low

Automatically send auth info
185946 by: motorpsychkill

Re: loading 250kb include files, performance degration?
185947 by: Justin French

PHP Sessions on Windows
185948 by: David Mitchell
185950 by: Daniel Clark
185955 by: rich

User/Group rights system?
185949 by: david david
185953 by: Burhan Khalid

Re: What is the GD library and what can I do with it ?
185951 by: Pete
185954 by: Burhan Khalid

Re: Save page
185952 by: Nadim Attari

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 ---
It could be a HTML table with links on the properties to view more details.

> I am currently working on a site for a vacation rental company.   They
> want
> the ability to show users the availability of certain properties.  The
> availability will be held in a mysql db so I assume I will have to
> dynamically build a small javascript menu or somethingI am just
> looking
> for some good suggestions and examples from other's who have done this.
>
> I am not a fan of generating javascript from php.
>
> Thanks,
> Eddie
--- End Message ---
--- Begin Message ---
"Edward Peloke" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I am currently working on a site for a vacation rental company.   They
want
> the ability to show users the availability of certain properties.  The
> availability will be held in a mysql db so I assume I will have to
> dynamically build a small javascript menu or somethingI am just
looking
> for some good suggestions and examples from other's who have done this.
>
> I am not a fan of generating javascript from php.
>
> Thanks,
> Eddie

Hi Eddie,

there is a great calendar package in PEAR:
http://pear.php.net/package/Calendar

There is a good example of how to build an HTML calendar from it:
http://pear.php.net/manual/en/package.datetime.calendar.intro-inahurry.php
(scroll down to the middle of the page)

I don't know why you want to use javascript here. I would do it this way:

- select all dates of free vacation properties of the given/current month
- put the dates from the DB result into an array
- create the calendar with the example from above and check for every day if
there is an entry for the day in your array
- if so give the table cell a specific color and/or link to page containing
detailed information
- otherwise blank the cell out or whatever

Hope this helps!

Regards, Torsten
--- End Message ---
--- Begin Message ---
Hi,

 I'm almost ashamed to ask this question as surely enough the
problem is something very basic but, nonetheless, I can't put my finger on
it. I'm trying to implement the concept of a library (library.php) on PHP
where I define (once) all auxiliary functions and then use them in a file
(for instance index.php) via the 'require' or 'include' constructs. Here's a
reduced version of what I'm doing:



index.php:

";
require("http://tristan/library.php?lang=$lang";);
my_function("en");
?>



library.php:

";
function my_function($lang = "es") {
echo "my_function() says $lang";
}
echo "library.php: loaded";
?>



When I load index.php I get the following:



index.php: include_path is .:/usr/local/php/4.3.6/lib/php
library.php: Called with tristan://library.php?lang=es
library.php: loaded



Fatal error: Call to undefined function: my_function() in
/www/htdocs/index.php on line 5



It seems that the name space on index.php never gets updated
with the function definitions made on library.php. What am I doing wrong?
Thanks! Cheers,



Daniel
--- End Message ---
--- Begin Message ---
"Daniel Barbar" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
>  I'm almost ashamed to ask this question as surely enough the
> problem is something very basic but, nonetheless, I can't put my finger on
> it. I'm trying to implement the concept of a library (library.php) on PHP
> where I define (once) all auxiliary functions and then use the

php-general Digest 10 May 2004 05:31:41 -0000 Issue 2754

2004-05-09 Thread php-general-digest-help

php-general Digest 10 May 2004 05:31:41 - Issue 2754

Topics (messages 185748 through 185774):

Re: Putting a stop in a foreach
185748 by: Curt Zirzow
185752 by: Curt Zirzow
185755 by: Torsten Roehr

Re: protecting web page
185749 by: Curt Zirzow

Re: Strange mails...
185750 by: Daniel Clark

feof Question
185751 by: Harish
185753 by: Petr U.
185754 by: Curt Zirzow

Re: Putting a stop in a foreach - SOLVED
185756 by: Verdon Vaillancourt

Re: Graphical calendar
185757 by: Manuel Lemos

hash with RIPEMD-160
185758 by: Dennis Gearon

Clean Open Source PHP extranet app?
185759 by: david david
185761 by: John W. Holmes
185763 by: Justin French

Curl & cookies
185760 by: Jason Morehouse
185770 by: Curt Zirzow

Does this "directory detection" script work for you?
185762 by: John W. Holmes
185768 by: Richard Harb
185771 by: Curt Zirzow

PHP /\ UML
185764 by: Matthias H. Risse

exclude_once(); ?
185765 by: Matthias H. Risse
185767 by: Justin French

Re: using cookies
185766 by: David T-G

thumbnail problems
185769 by: Ninti Systems
185772 by: Curt Zirzow

List() help
185773 by: PHPDiscuss - PHP Newsgroups and mailing lists

$_SESSION <- Learning
185774 by: Ross Bateman

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 ---
* Thus wrote Verdon Vaillancourt ([EMAIL PROTECTED]):
> Hi :)
> 
> This is the original statement that works...
> 
> foreach ($this->_content as $item) {
> if ($item['type'] == 'item'){
> ..

ok. good so far.

> 
> 
> This is my attempt to count items and put a stop in the foreach so it only
> returns 5 items.
> 
> foreach ($this->_content as $n => $item) {
> if ($n=="5") { 
> break;
> } else { 
> if ($this->_content[$n] => $item['type'] == 'item'){

I'm  not sure why  you  changed all this.

All you have to do is a simple foreach loop with a counter, and
break when the counter reaches your condition:

$need = 5; /* how many we want */

foreach($this->_content as $index => $item) {

  if ($item['type'] == 'item') {
//...

/* only decrement if its an 'item' */
$need--;
  }
  if (! $need) break; /* we got everything we needed */
}


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."
--- End Message ---
--- Begin Message ---
* Thus wrote Torsten Roehr ([EMAIL PROTECTED]):
> 
> Sorry, I mixed up the for and the foreach syntaxes. Here my (hopefully
> correct) loop proposal:
> 
> for ($i; $i < 5; $i++) {

for($i=0; ...)

I wouldn't suggest this method, it is making the assumption that
the indexes are numeric and sequenced from 0..5


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."
--- End Message ---
--- Begin Message ---
"Curt Zirzow" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> * Thus wrote Torsten Roehr ([EMAIL PROTECTED]):
> >
> > Sorry, I mixed up the for and the foreach syntaxes. Here my (hopefully
> > correct) loop proposal:
> >
> > for ($i; $i < 5; $i++) {
>
> for($i=0; ...)
>
> I wouldn't suggest this method, it is making the assumption that
> the indexes are numeric and sequenced from 0..5

Correct, I forgot =0. But as far as I have seen his indices are numeric.

Regards, Torsten

>
>
> Curt
> --
> "I used to think I was indecisive, but now I'm not so sure."
--- End Message ---
--- Begin Message ---
* Thus wrote [EMAIL PROTECTED] ([EMAIL PROTECTED]):
> Hi,
> 
> i'm designing a web application and i want to protect my web page from
> printing and if possible want to protect source code too.

You can prevent the average joe from printing by putting some css
in your document:

@media print { body { display:  none; } }



Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."
--- End Message ---
--- Begin Message ---
Yep.  I'm getting it too.

>>Each time I post a message on p.general, i receive two strange mails 
>>from ADVANCE CREDIT SUISSE BANK.
>>
>>What's this spam ? It looks like an auto-responder is subscribed on the 
>>newsgroup. Spammers really s*x !
>>
>>Greg
--- End Message ---
--- Begin Message ---

Hi

I am using Linux, Apache, MySql, PHP. In the below mentioned code example when

php-general Digest 9 May 2004 16:11:30 -0000 Issue 2753

2004-05-09 Thread php-general-digest-help

php-general Digest 9 May 2004 16:11:30 - Issue 2753

Topics (messages 185727 through 185747):

using cookies
185727 by: David T-G
185729 by: Richard Harb
185731 by: Aidan Lister

$myobject->$$varname doens't work ??
185728 by: greg
185730 by: Richard Harb
185732 by: Aidan Lister
185733 by: Aidan Lister
185734 by: Aidan Lister
185735 by: greg

Strange mails...
185736 by: greg

preg_replace to delete all js code in string help needed
185737 by: Dave Carrera
185740 by: Curt Zirzow
185746 by: Dave Carrera

icmp echo / ping
185738 by: news.php.net
185739 by: Aidan Lister

Putting a stop in a foreach
185741 by: Verdon Vaillancourt
185742 by: Torsten Roehr
185743 by: Torsten Roehr
185744 by: Aidan Lister
185745 by: Verdon Vaillancourt

Re: protecting web page
185747 by: Daniel Clark

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 ---
Hi, all --

I guess I need a primer on cookie usage.  I've read the manual regarding
setcookie and have gone back to look at everything having to do with
cookies on this list in the past few months (it seems that I'm not the
only one with some troubles, but most of them appear to have been having
sent some HTML output before trying to set a cookie).

I want to check to see if the user has my cookie to then log him in
automatically, and if he doesn't then I show the login screen and he logs
in and then I set the cookie if the box is checked.

Of course, $_COOKIE is set, so I have to check for my cookie name.  Even
something as simple as

  $_COOKIE['test'] = 'tested';

followed by a load of the page and a print doesn't show it.

Do I only call setcookie if the cookie isn't set, or do i call it every
time I load the page to initialize it?  Once I set it, how do I read it?
Does anyone have any pointers to a basic tutorial?


TIA & HAND

:-D
-- 
David T-G
[EMAIL PROTECTED]
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature
--- End Message ---
--- Begin Message ---
-Original Message-
From: David T-G
Sent: Sunday, May 9, 2004, 6:09:06 AM
> Hi, all --

> I guess I need a primer on cookie usage.  I've read the manual regarding
> setcookie and have gone back to look at everything having to do with
> cookies on this list in the past few months (it seems that I'm not the
> only one with some troubles, but most of them appear to have been having
> sent some HTML output before trying to set a cookie).

> I want to check to see if the user has my cookie to then log him in
> automatically, and if he doesn't then I show the login screen and he logs
> in and then I set the cookie if the box is checked.

> Of course, $_COOKIE is set, so I have to check for my cookie name.  Even
> something as simple as

>   $_COOKIE['test'] = 'tested';

Under normal circumstances you don't need to do that (unless you know
what you are doing - but it will not set a cookie on the client side,
it only modifies your superglobal variable for as long as the script
runs. I guess I'm once again stating the obvious).


> followed by a load of the page and a print doesn't show it.

> Do I only call setcookie if the cookie isn't set, or do i call it every
> time I load the page to initialize it?  Once I set it, how do I read it?

Once you setcookie() you can optionally give it something on its way:
like name, value, expire time/date, etc.

You could for example set a cookie to expire in half an hour - i.e.
for a session. It might make sense to refresh that cookie on every
page request, so that a session timeout will be postponed on each
refresh.

If you omit the expire time, it will be valid until the end of the
session (browser closes) - see the docs.


How do you get your cookie back?

If your visitor has a browser that allows cookies and you already sent
him one (or more) before, he will automatically transmit it to you as
part of the HTTP request headers. PHP does its magic and places the
values received into that Superglobal $_COOKIE (as well as $_REQUEST)
for you to play with...

So, if that array is empty that could mean two things:
1) you didn't send any cookie before (either because you already sent
your headers and thus have a f***up in your code or because the
visitor hasn't been to your page before)
2) the visitor does not allow cookies - too bad.


I guess that's all there is to it. Someone correct me or add to that
:)


> Does anyone have any pointers to a 

php-general Digest 9 May 2004 03:57:45 -0000 Issue 2752

2004-05-08 Thread php-general-digest-help

php-general Digest 9 May 2004 03:57:45 - Issue 2752

Topics (messages 185710 through 185726):

Problems with very special characters
185710 by: Wouter van Vliet
185720 by: Aidan Lister

Gd library not found
185711 by: Phpu
185712 by: Ray Hunter

Re: page_title
185713 by: Daniel Clark
185714 by: Erik Gjertsen

Re: Graphical calendar
185715 by: Todd Cary
185716 by: Todd Cary
185717 by: Todd Cary
185719 by: php-list.xenonsolutions.com

Re: Recommend an IDE for Windows
185718 by: Chris Lott

Re: protecting web page
185721 by: Anguz
185724 by: Petr U.
185725 by: Travis Low
185726 by: Ashley M. Kirchner

A binary compatibility alternative to mod_fastcgi
185722 by: Pan qingfeng
185723 by: Pan qingfeng

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 ---
Hello everybody,
 
I'm back! (been a subscriber here before, a while ago .. was quite an active
one at that time .. ;)) .. and I'm back for a reason, having a very wicked
problem. The setup is one RedHat linux 9 machine (called "s007"), previously
in use as both our web and database server. As traffic increased
dramatically earlier this week, we had to grab another server, running
RedHat Fedora. We'll call her "s006", and use to serve the webpages. All
happened very quickly and smooth for most of it. Only currently still
existing problem has (appearantly) to do with transferring the very special
characters over the lines between s007 and s006, displaying them on the
screen and entering them in the database through webforms. Normal special
chars like é, ê, à and so on seem to be displayed ok (after calling
htmlentities in php: PHP 4.3.3 (cgi) (built: Oct 21 2003 09:51:55) on s006
and PHP 4.3.4 (cli) (built: Jan 24 2004 22:34:14) on s007), but the more
exotic ones (~ and ^ signs on and under Z, S .. and stuff like that) still
cause problems on the s006. Same script, requesting data from the same rows
of the same database on the s007 works as it is supposed to.
 
MySQL version of both servers is "mysql  Ver 11.18 Distrib 3.23.58, for
redhat-linux-gnu (i386)", for both machines, /etc/sysconfig/i18n looks like:
 
  1 LANG="en_US"
  2 SUPPORTED="nl_NL:nl_NL:nl:en_US:en"
  3 SYSFONT="lat0-sun16"
  4 SYSFONTACM="iso15"

(numbers are line numbers). To compare the pages:
http://esctoday.s007.interlize.net/annual/2004/participants.php
 <http://esctoday.s006.interlize.net/annual/2004/participants.php>
http://esctoday.s006.interlize.net/annual/2004/participants.php   
 
I'm stuck here with my hands in my hair, and would very much appriciate any
clue to a solution,
Wouter van Vliet
 
(ps. since I'm not sure of the solution will be found in php, mysql or any
other place I have posted this message also to the mysql-general list)
--- End Message ---
--- Begin Message ---
Hi,

Make sure the charset of your document matches the charset sent by the
server - If you tell the browser the charset is A, and use characters from
charset B, you will get the problem observed.

The charset can be sent from Apache, PHP and the actual charset is set in
the document.

It's a pain in the arse to fix, I've had the same problem, it took a lot of
experimenting

Good luck,


"Wouter Van Vliet" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hello everybody,

I'm back! (been a subscriber here before, a while ago .. was quite an active
one at that time .. ;)) .. and I'm back for a reason, having a very wicked
problem. The setup is one RedHat linux 9 machine (called "s007"), previously
in use as both our web and database server. As traffic increased
dramatically earlier this week, we had to grab another server, running
RedHat Fedora. We'll call her "s006", and use to serve the webpages. All
happened very quickly and smooth for most of it. Only currently still
existing problem has (appearantly) to do with transferring the very special
characters over the lines between s007 and s006, displaying them on the
screen and entering them in the database through webforms. Normal special
chars like é, ê, à and so on seem to be displayed ok (after calling
htmlentities in php: PHP 4.3.3 (cgi) (built: Oct 21 2003 09:51:55) on s006
and PHP 4.3.4 (cli) (built: Jan 24 2004 22:34:14) on s007), but the more
exotic ones (~ and ^ signs on and under Z, S .. and stuff like that) still
cause problems on the s006. Same script, requesting data from the same rows
of the same database on the s007 works as it is supposed to.

MySQL version of both serv

php-general Digest 8 May 2004 15:50:06 -0000 Issue 2751

2004-05-08 Thread php-general-digest-help

php-general Digest 8 May 2004 15:50:06 - Issue 2751

Topics (messages 185700 through 185709):

Re: Graphical calendar
185700 by: David T-G
185703 by: Manuel Lemos
185709 by: Todd Cary

Re: page_title
185701 by: John W. Holmes
185706 by: Kim Steinhaug

Re: SMTP and changing the character set
185702 by: Chris
185705 by: Dave G
185708 by: Todd Cary

PHP5 RC2 Spec file
185704 by: Aidan Lister
185707 by: Aidan Lister

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 ---
Todd --

...and then Todd Cary said...
% 
% I need to bring up a calendar so the user can determine what day of the 
...
% Is there a simple graphical calendar where the use can pick a month and 
% see the days of the week?

I don't know (though that makes sense), but you could always rip the
calendar code out of any of those mainstream apps.  I use Craig Knudsen's
WebCalendar (http://www.k5n.us/webcalendar.php) and it has preview
calendars for last month and next month that would probably do a great
job for you.


% 
% Todd


HTH & HAND

:-D
-- 
David T-G
[EMAIL PROTECTED]
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature
--- End Message ---
--- Begin Message ---
Hello,

On 05/07/2004 11:36 PM, Todd Cary wrote:
I need to bring up a calendar so the user can determine what day of the 
week a certain falls on, etc.  My search with Google appears to have 
calendars that are like appointment books.

Is there a simple graphical calendar where the use can pick a month and 
see the days of the week?
You may want to try this class that does precisely that:

Class: Calendar generation class http://www.phpclasses.org/calendargenerator

--

Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--- End Message ---
--- Begin Message ---
Which table_class is to be used with the calendar class?

Todd

Manuel Lemos wrote:
Hello,

On 05/07/2004 11:36 PM, Todd Cary wrote:

I need to bring up a calendar so the user can determine what day of 
the week a certain falls on, etc.  My search with Google appears to 
have calendars that are like appointment books.

Is there a simple graphical calendar where the use can pick a month 
and see the days of the week?


You may want to try this class that does precisely that:

Class: Calendar generation class 
http://www.phpclasses.org/calendargenerator


--- End Message ---
--- Begin Message ---
Erik Gjertsen wrote:






Hmmm... you're title doesn't show up? Are you using sessions? Is 
safe_mode on or off? Is html_title_mode on or off in your php.ini file?

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
Is it me or is the sollution here incredible simple?





-- 
-- 
Kim Steinhaug
--
There are 10 types of people when it comes to binary numbers:
those who understand them, and those who don't.
--
www.steinhaug.com - www.easywebshop.no - www.webkitpro.com
--

"John W. Holmes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Erik Gjertsen wrote:
>
> > 
> > 
> > 
> > 
> >
> > 
> >  > $page_title = "Welcome";
>
> Hmmm... you're title doesn't show up? Are you using sessions? Is
> safe_mode on or off? Is html_title_mode on or off in your php.ini file?
>
> -- 
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
SMTP, just like HTTP, uses the Content-Type header. So you can do something
like this:

Content-Type: text/plain; charset=US-ASCII

Just add that to the header argument of the mail function, if that's what
you're using.

Chris

-Original Message-
From: Todd Cary [mailto:[EMAIL PROTECTED]
Sent: Friday, May 07, 2004 4:51 PM
To: [EMAIL PROTECTED]
Cc: Kim Wagner; Brian Feifarek; Gus Scherer
Subject: [PHP] SMTP and changing the character set


Is there a way to specify a character set in a SMTP email?

Todd

--
PHP General Mailing L

php-general Digest 7 May 2004 13:30:10 -0000 Issue 2749

2004-05-07 Thread php-general-digest-help

php-general Digest 7 May 2004 13:30:10 - Issue 2749

Topics (messages 185579 through 185614):

Returning an object
185579 by: Aidan Lister
185581 by: Petr U.
185583 by: Curt Zirzow
185585 by: John W. Holmes
185603 by: Jay Blanchard

Re: strip comments from HTML?
185580 by: Justin French
185582 by: John W. Holmes
185586 by: Paul Chvostek

Re: Looking for Advanced PHP Developers
185584 by: Curt Zirzow

[Newbie Guide] For the benefit of new members
185587 by: Ma Siva Kumar

Socket
185588 by: Juan Pablo Herrera
185590 by: Petr U.

PHP Research
185589 by: Trevor Nesbit

setting php_admin_value 2
185591 by: Tim Traver

Best way to get mysql table metadata
185592 by: daniel.electroteque.org

Recommend an IDE for Windows
185593 by: Chris Lott
185595 by: Richard Davey
185612 by: Seth Bembeneck

HTML vs. Plain Text Input
185594 by: Matt Palermo
185596 by: Richard Davey

A work around my HTTP_REFERER Prob...
185597 by: Tristan.Pretty.risk.sungard.com
185601 by: Richard Harb
185606 by: Tristan.Pretty.risk.sungard.com
185608 by: Jason Wong

auto saving data in forms
185598 by: mserra.gdwd.com
185604 by: Jay Blanchard
185614 by: Travis Low

Showing only part of string
185599 by: Dave Carrera
185600 by: Richard Harb
185602 by: John W. Holmes
185605 by: Dave Carrera

Active PHP Sessions
185607 by: Paul Higgins
185609 by: Brent Clark
185610 by: Jason Wong
185611 by: John W. Holmes
185613 by: Torsten Roehr

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 ---
How _should_ this be done? In terms of "best practice".



Or:



Please don't reply if you really, really don't know what you are talking
about.
--- End Message ---
--- Begin Message ---
On Fri, 7 May 2004 11:35:24 +1000
"Aidan Lister" <[EMAIL PROTECTED]> wrote:

 > How _should_ this be done? In terms of "best practice".

I'd choose this way:

function &foo()
{
return new Object;
}

-- 
Petr U.
--- End Message ---
--- Begin Message ---
* Thus wrote Aidan Lister ([EMAIL PROTECTED]):
> How _should_ this be done? In terms of "best practice".
> 
>  function foobar ()
> {
> return new SomeObject;
> }
> ?>
> 
> Or:
> 
>  function barfoo ()
> {
> $tempvar = new SomeObject;
> return $tempvar
> }
> ?>

I'm not exactly sure what your looking for, this is like asking
what is better:

  $a = 'foo';
  echo $a;

  or 
  echo 'foo';

if tou want my opinion it should be written like this:
 Please don't reply if you really, really don't know what you are talking
> about.

What kind of requirement is this? Anyone can reply your email and
they will do so if they feel like it.


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."
--- End Message ---
--- Begin Message ---
Aidan Lister wrote:

Please don't reply if you really, really don't know what you are talking
about.
Okay, I won't reply.

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
[snip]
Please don't reply if you really, really don't know what you are talking
about.
[/snip]

Talk about alienating yourself right up front.
--- End Message ---
--- Begin Message ---
Thanks to everyone who's replied... appears to be quite a tricky one!!

$text = preg_replace('//su','',$text);
Did not work (was too greedy, matched multiple comments)
$text = preg_replace('//','',$text);
Did not work (needed multiple lines)
$text = preg_replace('//su','',$text);
Does work so far, finger's crossed.
Thanks again to John, Paul, Rob, Tom, et al.

---
Justin French
http://indent.com.au
--- End Message ---
--- Begin Message ---
Justin French wrote:

$text = preg_replace('//su','',$text);
Did not work (was too greedy, matched multiple comments)
Just for the record, it should be a capital 'U' for ungreedy. Lowercase 
'u' is something else. :)

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
On Thu, May 06, 2004 at 07:11:55PM +, Curt Zirzow wrote:

php-general Digest 6 May 2004 13:06:59 -0000 Issue 2747

2004-05-06 Thread php-general-digest-help

php-general Digest 6 May 2004 13:06:59 - Issue 2747

Topics (messages 185491 through 185521):

Class Help
185491 by: PHP Email List
185494 by: Curt Zirzow

Re: remove soap header
185492 by: Chhai T

Re: HTTP_REFERER ... ?
185493 by: David Robley
185509 by: Tristan.Pretty.risk.sungard.com

Re: Regular Expression
185495 by: Tumurbaatar S.

strip comments from HTML?
185496 by: Justin French
185501 by: Marius Dascalu
185505 by: David T-G
185506 by: David T-G
185510 by: Marius Dascalu
185516 by: Tom Rogers
185518 by: John W. Holmes

Class Help Extended
185497 by: PHP Email List
185498 by: Richard Harb
185500 by: PHP Email List
185502 by: Torsten Roehr

Re: how does PHP handle kerberos authentication?
185499 by: Burhan Khalid

I can't make session work, but cookie can, why?
185503 by: TOld
185504 by: Torsten Roehr

Login page
185507 by: Erik Gjertsen
185511 by: Jay Blanchard
185513 by: Angelo Zanetti
185514 by: Jay Blanchard
185520 by: Erik Gjertsen

File management.
185508 by: Carles Xavier Munyoz Baldó
185512 by: Jay Blanchard

Way OT MySql Update
185515 by: Dave Carrera
185519 by: John W. Holmes
185521 by: Angelo Zanetti

gifs, icons etc
185517 by: Brent Clark

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 ---
Why is it in a class, so important for you to initialize your $variables?

In the following example, I have my class started and then took out or
atleast commented my "var $variable" and the code still does what it should.
So why is it so important that you initialize these variables this way?

[:::CODE:::]
z = 250;
return $this->z;
}

function test1($a,$b){
$this->tested = $a + $b;
return $this->tested;
}

function test2($c,$d,$e,$f){
$this->test2 = $c + $d;
$this->test3 = $this->test1($e,$f) + $this->test2 + $this->z();
return $this->test3;
}

}
$whynot = new test();
echo $whynot->test2(10,10,10,20);
?>
[:::/CODE:::]

I don't have any real use for this code to work after this point, I'm just
trying to generate somesort of script that makes sense to me. As my previous
attempt at jumping feet first into classes failed miserably.

I guess I'm just confused on why you would want to initialize a variable and
not assign a value to it if you know what it is? Like in my Database class,
I made my username, pass, localhost, etc variables initiated with their
values, but kept getting errors from mysql that I didn't have a "Valid"
mysql resource. I guess after reading this in 4 books and on php.net, they
all do this but none of them go into WHY it's so important.

Part of my concern is that I'm being told, or atleast reading that you
initialize them for the class, but if the class structure is already in
place for the variables inside each method to be local to that class, I
don't see the relevance for initialization. Man this sounds dumb cuz I just
know there's a reason, I just can't find it. Any help would be appreciated.
Thanks.

Wolf
--- End Message ---
--- Begin Message ---
* Thus wrote PHP Email List ([EMAIL PROTECTED]):
> Why is it in a class, so important for you to initialize your $variables?
> 
> In the following example, I have my class started and then took out or
> atleast commented my "var $variable" and the code still does what it should.
> So why is it so important that you initialize these variables this way?
> 
> [:::CODE:::]
>  class test {
> 
>   //var $z;   <--This is the part I don't see
>   the relevance in doing as here this is
>   commented out and the class works as expected.
> ...
> 
> I guess I'm just confused on why you would want to initialize a variable and
> not assign a value to it if you know what it is? Like in my Database class,
> I made my username, pass, localhost, etc variables initiated with their
> values, but kept getting errors from mysql that I didn't have a "Valid"
> mysql resource. I guess after reading this in 4 books and on php.net, they
> all do this but none of them go into WHY it's so important.

Defining a variable in a class using 'var $z', keeps some sort of
structure for the class.  PHP has always kept the creation of
variables simple for the 

php-general Digest 5 May 2004 12:35:36 -0000 Issue 2745

2004-05-05 Thread php-general-digest-help

php-general Digest 5 May 2004 12:35:36 - Issue 2745

Topics (messages 185382 through 185416):

Re: WHERE clause...getting closer
185382 by: Richard Davey
185384 by: Curt Zirzow
185393 by: Ray Hunter
185401 by: Tom
185413 by: msa

Re: SCP a file from my server to another using PHP
185383 by: Vail, Warren
185385 by: Kelly Hallman

Re: cleaning word HTML code
185386 by: David Robley

Re: re-keying an array
185387 by: Jason Barnett

Re: word to pdf via web server ??
185388 by: Jason Barnett
185391 by: Travis Low

Re: Asking for data during a script
185389 by: Jason Barnett

Re: PHP & Apache Version
185390 by: Jason Barnett
185392 by: Ray Hunter

Regular Expression
185394 by: Tumurbaatar S.
185395 by: Tumurbaatar S.
185396 by: Paul Chvostek

Re: PHP5 and PEAR
185397 by: php-list.xenonsolutions.com

Re: paging methodology
185398 by: Paul Chvostek
185404 by: Brian Muldown

parse error on fgets
185399 by: dburch.oz.net
185403 by: Brian Muldown

complex array
185400 by: Chhai T
185402 by: roehr.zilleon.com

Walk though array applying my highlighting routine?
185405 by: Dave Carrera
185407 by: Burhan Khalid
185410 by: Dave Carrera
185415 by: Dave Carrera

protecting web page
185406 by: mserra.gdwd.com
185408 by: Brent Clark
185409 by: PHP Email List

Re: Hi
185411 by: Phplist

GD problems with opacity on translucent background
185412 by: Raymond den Ouden

Importing data from one mysql server to an other
185414 by: Seth Bembeneck
185416 by: Seth Bembeneck

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 ---
Hello msa,

Wednesday, May 5, 2004, 2:18:57 AM, you wrote:

m> $query_rsENews = 'SELECT * FROM NewsArchive WHERE YEAR(datePublished) = ' .
m> YEAR('NOW'()) . ' AND MONTH(datePublished) = ' . MONTH('NOW'()) . ' ORDER BY
m> sortBy DESC';

m> the above code got a parse error
m> any ideas, anyone?

Your quotes are wrong and you shouldn't use NOW like that:

$query_rsENews = "SELECT * FROM NewsArchive WHERE YEAR(datePublished)
= YEAR(NOW()) AND MONTH(datePublished) = MONTH(NOW()) ORDER BY sortBy
DESC";

Should be a lot closer to what you want.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html
--- End Message ---
--- Begin Message ---
* Thus wrote msa ([EMAIL PROTECTED]):
> 
> $query_rsENews = 'SELECT * FROM NewsArchive WHERE YEAR(datePublished) = ' .
> YEAR(NOW()) . ' AND MONTH(datePublished) = ' . MONTH(NOW()) . ' ORDER BY
> sortBy DESC';
> 
> got this error:
>  Fatal error: Call to undefined function: year()
> 
> any ideas, anyone?

You're mixing php and mysql, you've changed from using php's date()
function to mysql's functions.

Not to through a whole new twist into all your problems but your
query probably should be written differently:

$query_rsENews = 'SELECT * FROM NewsArchive 
   WHERE datePublished >= DATE_FORMAT(NOW(), "%Y-%m-01")
ORDER BY sortBy DESC';
  
And add an index on the datePublished column.  You'll notice a
considerable speed difference.

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."
--- End Message ---
--- Begin Message ---
On Tue, 2004-05-04 at 19:18, msa wrote:
> $query_rsENews = 'SELECT * FROM NewsArchive WHERE YEAR(datePublished) = ' .
> YEAR('NOW'()) . ' AND MONTH(datePublished) = ' . MONTH('NOW'()) . ' ORDER BY
> sortBy DESC';
> 
> 
> this is supposed to return only the records that have the current month and
> year in the datePublished record.
>
> got this error:
>  Fatal error: Call to undefined function: year()
> 

You sure you did not mean $dataPublished?

--
ray
--- End Message ---
--- Begin Message ---
Ray Hunter wrote:
On Tue, 2004-05-04 at 19:18, msa wrote:
$query_rsENews = 'SELECT * FROM NewsArchive WHERE YEAR(datePublished) = ' .
YEAR('NOW'()) . ' AND MONTH(datePublished) = ' . MONTH('NOW'()) . ' ORDER BY
sortBy DESC';
this is supposed to return only the records that have the current month and
year in the datePublished record.
got this error:
Fatal error: Call to undefined function: year()

You sure you did not mean $dataPublished?
I think datePublished is his columnName?
But also:
Assuming mySQL (I can't find your original post?):
+++T

php-general Digest 2 May 2004 22:54:17 -0000 Issue 2740

2004-05-02 Thread php-general-digest-help

php-general Digest 2 May 2004 22:54:17 - Issue 2740

Topics (messages 185136 through 185158):

Re: Progress Bar
185136 by: Burhan Khalid

http username
185137 by: Harry.de
185138 by: Matt
185139 by: rich

Re: String Question
185140 by: John W. Holmes

Setting fopen timeout ?
185141 by: Dave Carrera
185158 by: Marek Kilimajer

Re: Results in array
185142 by: Burhan Khalid

Re: PHP Auth
185143 by: Burhan Khalid

Help with Curl GZIP problem?
185144 by: Dac Chartrand
185149 by: Dac Chartrand

Re: Frage
185145 by: Torsten Roehr

Is Curl GZIP support broken?
185146 by: Dac Chartrand
185147 by: Curt Zirzow
185148 by: Dac Chartrand
185150 by: Dac Chartrand
185153 by: Curt Zirzow
185157 by: Dac Chartrand

looking for PHP/MYSQL developer in SW london,UK
185151 by: scott.broadcastwarehouse.com

Trouble setting include_path
185152 by: Pablo Gosse
185154 by: Curt Zirzow

Re: Numeric Index of an array
185155 by: Marek Kilimajer

Array Question
185156 by: Jason Williard

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 ---
Craig Gardner wrote:

I'm working on a script that will automatically download and burn an ISO 
to a CD, when passed the filename of the ISO and I want to use some sort 
of progress bar to show how much of the download/burn is complete.  I 
was originally going to use wget to download the file, but I don't know 
how to get the progress of the download.  Before the script processes, I 
have the filename and filesize.  Does anyone know of a way to get the 
file to download and give me the percentage of the file downloaded or 
even the filesize of the local copy every couple seconds or so?
http://pear.php.net/package/HTML_Progress
--- End Message ---
--- Begin Message ---
If a user is logged in via http (authentification e.g. with  .htaccess and
.htpasswd file), how can i get the username of the current logged in user?

Thanx
Harry
--- End Message ---
--- Begin Message ---
> If a user is logged in via http (authentification e.g. with  .htaccess and
> .htpasswd file), how can i get the username of the current logged in user?

Read the manual at: http://www.php.net/manual/en/features.http-auth.php
--- End Message ---
--- Begin Message ---
> If a user is logged in via http (authentification e.g. with  .htaccess and
> .htpasswd file), how can i get the username of the current logged in user?
>
> Thanx
> Harry

try $_SERVER['PHP_AUTH_USER']

rich
--- End Message ---
--- Begin Message ---
Dave Carrera wrote:
How would I show 100 chars after finding the first instance of a searched
word in a string.
$start = strpos('hello',$str);
$hundredchars = substr($str,$start,100);
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
Hi List,

How can I set fopen to time out if a url is not reachable ?

I have tried set_time_limit but that dose not seem to work.

Thank you in advance for any help or pointers.

Dave C

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.674 / Virus Database: 436 - Release Date: 02/05/2004
 
--- End Message ---
--- Begin Message ---
Dave Carrera wrote:
Hi List,

How can I set fopen to time out if a url is not reachable ?

I have tried set_time_limit but that dose not seem to work.

Thank you in advance for any help or pointers.

Dave C

I'm not sure it will help but try ini_set('default_socket_timeout', XX);

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.674 / Virus Database: 436 - Release Date: 02/05/2004
 

--- End Message ---
--- Begin Message ---
Phpu wrote:

I want to interogate the database and the results to be placed into array.

For now i have:

$query = "SELECT product_id, brand_name, model_name FROM products WHERE 
product_id='$product_id'";
$result = mysql_query($query) or die("error in query - $query - ".mysql_error());
 $results = mysql_num_rows($result);
I want all athe results to be placed in an array named "models" and then i want to print all the results. 
How can i do that.
PS. The results must be placed in an array.
while($row = mysql_fetch_assoc($results))
{
   $models[] = $row;
}
echo ""; print_r($models); echo "";
--- End Message ---
--- Begin Message ---
Anton Krall wrote:

Guys.
 
Im doing a small php auth system and I was wondering, how can avoid having

php-general Digest 2 May 2004 10:48:04 -0000 Issue 2739

2004-05-02 Thread php-general-digest-help

php-general Digest 2 May 2004 10:48:04 - Issue 2739

Topics (messages 185111 through 185135):

Sorting text with multibyte characters
185111 by: Michal Migurski
185114 by: Red Wingate
185117 by: Michal Migurski

- Delete records in an Access DB
185112 by: francesco.automationsoft.biz
185113 by: Torsten Roehr

Re: Select from 24 tables
185115 by: Richard A. DeVenezia
185116 by: Michal Migurski
185119 by: Travis Low
185122 by: Michal Migurski
185124 by: Travis Low
185125 by: Curt Zirzow

php user management functionality
185118 by: bruce
185121 by: Travis Low

Re: reversing an IF statement
185120 by: Curt Zirzow

Re: Php & MySql selection question
185123 by: Curt Zirzow

Re: creating a mailing list
185126 by: Manuel Lemos
185128 by: Curt Zirzow

Re: Installing sendmail in win9X/Me
185127 by: Manuel Lemos

Re: Batch/Prepared statements for Mysql in PHP
185129 by: Curt Zirzow

String Question
185130 by: Dave Carrera

Frage
185131 by: Draw-A-Line
185133 by: Jordi Canals

[Newbie Guide] For the benefit of new members
185132 by: Ma Siva Kumar

Re: https & sessions failing to persist
185134 by: Jordi Canals

Numeric Index of an array
185135 by: Natascha Chrobok

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 ---
Hi,

Does anyone have any thoughts on how to effectively sort text with
multi byte characters? I am working on a project that uses lots of German
text, and the letters with umlauts don't sort correctly. I'm using the
mb_* functions in a few places (to adapt an ASCII-encoded database to XML
output for flash, which is always expected to be in UTF-8), but none of
them seems to be made for string comparison.

thanks,
-mike.

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html
--- End Message ---
--- Begin Message ---
Run into this before, PHP seams to do quite well when you set the locale
right ( de_DE ) which will place AÄBCD instead of ABCDÄÖÜ.
Hope this helps :-)

 -- red

Michal Migurski wrote:

Hi,

Does anyone have any thoughts on how to effectively sort text with
multi byte characters? I am working on a project that uses lots of German
text, and the letters with umlauts don't sort correctly. I'm using the
mb_* functions in a few places (to adapt an ASCII-encoded database to XML
output for flash, which is always expected to be in UTF-8), but none of
them seems to be made for string comparison.
thanks,
-mike.
-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html
--- End Message ---
--- Begin Message ---
> Run into this before, PHP seams to do quite well when you set the locale
> right ( de_DE ) which will place AÄBCD instead of ABCDÄÖÜ.
>
> Hope this helps :-)

Thanks, I hadn't thought of that.

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html
--- End Message ---
--- Begin Message ---
Hi all, 
I have this problem:
I want to delete records in an Access DB. I use this code:

$query="DELETE FROM Test_Table WHERE name='franco';"; 
// the connection parameters

$path="d:/inetpub/webs/my_site/mdb-database/" ;

$db_name="test.mdb" ;

$dsource=$path.$db_name ;

$cn_string="Provider=Microsoft.Jet.OLEDB.4.0;" ;

$cn_string.="Data Source=$dsource;" ;

// connection

$cn=new COM("ADODB.Connection");

$cn->open($cn_string);

// object Recordset and send query by  Open() metod

$rs=new COM("ADODB.Recordset") ;

$rs->open($query,$cn) ;

// clean Recordset object

$rs->Release() ;

$rs=null ;

/* close connection */

$cn->Close() ;

$cn->Release() ;

$cn=null ;



but I have this error message:

Fatal error: Call to undefined function: open() in 
D:\Inetpub\webs\metagenonlinecom\canc.php on line 11


Where is the problem? Is this the correct way to delete records from an Access DB? If 
this is a bad tecnic, can you suggest me what is the correct way?

Thanks in advance to all.

(The server where this script run is a Microsoft server).

Francesco  





--- End Message ---
--- Begin Message ---
So the problem is not the delete statement but that you cannot even open a
connection, right? Have you tried PHP's ODBC functions to connect to the
Access DB?:

http://de.php.net/manual/en/func

php-general Digest 1 May 2004 22:23:15 -0000 Issue 2738

2004-05-01 Thread php-general-digest-help

php-general Digest 1 May 2004 22:23:15 - Issue 2738

Topics (messages 185091 through 185110):

reversing an IF statement
185091 by: Kim Steinhaug
185092 by: Torsten Roehr
185093 by: Anguz
185101 by: Chris

Re: Separating spaces from the rest
185094 by: Anguz

Strip_tags issue / question
185095 by: Dave Carrera
185097 by: Dave Carrera

PHP Conference in Amsterdam
185096 by: Filip de Waard

Re: Script never returns from funktion.
185098 by: Lars.Pedersen.oz2lpr.dk

Re: https & sessions failing to persist
185099 by: Luis Bernardo
185102 by: Michael R. Wayne

Php & MySql selection question
185100 by: Dave Carrera

XSLT_SABOPT_DISABLE_ADDING_META  option
185103 by: Fabrice Dufour
185104 by: Fabrice Dufour

Select from 24 tables
185105 by: Dave Carrera
185106 by: Red Wingate
185107 by: John Nichel
185108 by: John W. Holmes
185109 by: John Nichel
185110 by: Travis Low

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 ---
Often I end up using a "dumb" IF statement which to me seems that
it could have been done some other way.

Example :
if(
($_GET["id"]==1) or
($_GET["mode"]=="home") or
((!isset($_GET["item"])) && ($_GET["mode"]=="news"))
  ) {
// Here we do nothing
 } else {
// This is where we do it
}

If we translate the above to simpler reading we could say :
if(statement)
// skip
else
// Do the stuff

I'm ofcourse looking for this
if(!statement)
// Do the stuff

Problem is, when using more statements I never seem to find the
way of doing it without having an empty {} in it, dont know if you
see my problem here however, its the best I can exmplain.

For all I know it has to be like this.

-- 
-- 
Kim Steinhaug
--
There are 10 types of people when it comes to binary numbers:
those who understand them, and those who don't.
--
www.steinhaug.com - www.easywebshop.no - www.webkitpro.com
--
--- End Message ---
--- Begin Message ---
"Kim Steinhaug" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Often I end up using a "dumb" IF statement which to me seems that
> it could have been done some other way.
>
> Example :
> if(
> ($_GET["id"]==1) or
> ($_GET["mode"]=="home") or
> ((!isset($_GET["item"])) && ($_GET["mode"]=="news"))
>   ) {

Wouldn't this be the opposite (just inverting every condition)?:

if(
($_GET["id"]!=1) &&
($_GET["mode"]!="home") &&
((isset($_GET["item"])) || ($_GET["mode"]!="news"))
  ) {

What do you think?

Regards, Torsten

> // Here we do nothing
>  } else {
> // This is where we do it
> }
>
> If we translate the above to simpler reading we could say :
> if(statement)
> // skip
> else
> // Do the stuff
>
> I'm ofcourse looking for this
> if(!statement)
> // Do the stuff
>
> Problem is, when using more statements I never seem to find the
> way of doing it without having an empty {} in it, dont know if you
> see my problem here however, its the best I can exmplain.
>
> For all I know it has to be like this.
>
> --
> --
> Kim Steinhaug
> --
> There are 10 types of people when it comes to binary numbers:
> those who understand them, and those who don't.
> --
> www.steinhaug.com - www.easywebshop.no - www.webkitpro.com
> --


--- End Message ---
--- Begin Message ---
Kim Steinhaug wrote:

Often I end up using a "dumb" IF statement which to me seems that
it could have been done some other way.
Example :
if(
($_GET["id"]==1) or
($_GET["mode"]=="home") or
((!isset($_GET["item"])) && ($_GET["mode"]=="news"))
  ) {
// Here we do nothing
 } else {
// This is where we do it
}
Wouldn't it then be like this?

if($_GET['id']!=1 && $_GET['mode']!='home

php-general Digest 1 May 2004 10:14:04 -0000 Issue 2737

2004-05-01 Thread php-general-digest-help

php-general Digest 1 May 2004 10:14:04 - Issue 2737

Topics (messages 185076 through 185090):

Re: https & sessions failing to persist
185076 by: Michael R. Wayne
185077 by: Curt Zirzow

initializing HTML form using PHP
185078 by: Denis Kertz
185079 by: Daniel Clark

Separating spaces from the rest
185080 by: Anguz
185081 by: Anguz
185082 by: Curt Zirzow
185083 by: Justin Patrin

dollar sign ASCII code
185084 by: David T-G
185085 by: John W. Holmes

Batch/Prepared statements for Mysql in PHP
185086 by: electroteque

@session_start()?
185087 by: Brandon Goodin
185089 by: Torsten Roehr

Script never returns from funktion.
185088 by: Lars.Pedersen.oz2lpr.dk
185090 by: PHP Email List

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 ---
On Fri, Apr 30, 2004 at 08:52:37PM +, Curt Zirzow wrote:
> 
> session.cookie_path
> session.cookie_domain
> session.cookie_secure

session.cookie_path /
session.cookie_secure   Off
session.cookie_domain   no value

But we never use cookies:
session.use_cookies Off

/\/\ \/\/
--- End Message ---
--- Begin Message ---
* Thus wrote Michael R. Wayne ([EMAIL PROTECTED]):
> On Fri, Apr 30, 2004 at 08:52:37PM +, Curt Zirzow wrote:
> > 
> > session.cookie_path
> > session.cookie_domain
> > session.cookie_secure
> 
> session.cookie_path   /
> session.cookie_secure Off
> session.cookie_domain no value
> 
> But we never use cookies:
> session.use_cookies   Off

do'h.. i completly missed that.  



Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."
--- End Message ---
--- Begin Message ---
I have a large HTML form (~100 form elements) that I used a year ago to
conduct a survey.  Now I would like to use this same form but rather than
starting with an empty form I would like to populate the form with a user's
survey response from last year.  I have the survey data in a mysql db and I
know how to use PHP to retrieve a user's data.  However, the only way I know
to insert a user's data into a form is to embed value=""
statements for each form element (text, checkbox, drop-down, etc).  This is
pretty messy, especially for drop-down lists.

Is there a cleaner, easier way to do this?

Denis
--- End Message ---
--- Begin Message ---
That is the way I've done it.

I hear that with PEAR, you can add elments to the HTML page.

> I have a large HTML form (~100 form elements) that I used a year ago to
> conduct a survey.  Now I would like to use this same form but rather than
> starting with an empty form I would like to populate the form with a
> user's
> survey response from last year.  I have the survey data in a mysql db and
> I
> know how to use PHP to retrieve a user's data.  However, the only way I
> know
> to insert a user's data into a form is to embed value=""
> statements for each form element (text, checkbox, drop-down, etc).  This
> is
> pretty messy, especially for drop-down lists.
>
> Is there a cleaner, easier way to do this?
>
> Denis
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
I have an array with many strings, of which most have spaces or tabs at 
the beginning, but no fixed number of them. Example:

$arr[0] = 'Hello.';

How can I separate them into two strings? Like:

Array
(
[0] => Array
(
[0] => ""  //I added the quotes to notice the space.
[1] => Hello.
)
)
TIA!
Anguz
--- End Message ---
--- Begin Message ---
Thanks! I was just reading that function in the manual when I got your 
reply. I tested it but I still have a couple of problems with it.

print_r(preg_split('(\s+)', "   word1 word2 word3.", -1, 
PREG_SPLIT_DELIM_CAPTURE));

I get this:

Array
(
[0] =>
[1] => word1
[2] => word2
[3] => word3.
)
In [0] the spaces aren't there and it's splitting the other spaces too, 
where I need to only split the leading spaces. How should I write it?

TIA,
Anguz
Kemper, Helmut wrote:
> Hi,
>
> See preg_explite and use "/(\s+)/" for explode string into array.
>
> Tanks,
> Kemper
>
>
> 
> -
> Helmut Kemper
> [EMAIL PROTECTED]
> Celular (Mobile): 55 81 99268744
>

php-general Digest 29 Apr 2004 20:35:55 -0000 Issue 2734

2004-04-29 Thread php-general-digest-help

php-general Digest 29 Apr 2004 20:35:55 - Issue 2734

Topics (messages 184930 through 184970):

Re: global vars inside includes inside functions?
184930 by: De Greef Sébastien
184953 by: Red Wingate
184962 by: Tom Rogers
184963 by: Red Wingate

web page existance check
184931 by: Decapode Azur
184932 by: Vinod Panicker

creating a mailing list
184933 by: chris o'shea
184935 by: Vinod Panicker
184936 by: Chris Hayes
184959 by: Chris W. Parker

Re: Problem with a class... any help will be appreciated.
184934 by: Marius Dascalu

Single quotes inside double quoted string (Was: Re: [PHP] Re: Problem with a class... 
any help will be appreciated.)
184937 by: John W. Holmes
184942 by: Elliot J. Balanza
184969 by: Torsten Roehr

Changing passwords
184938 by: Jason Barnett
184948 by: Jason Sheets

$_SERVER['SERVER_NAME'] in read-only.
184939 by: Vincent M.
184940 by: Jay Blanchard
184941 by: Jason Barnett
184960 by: Red Wingate
184966 by: John W. Holmes

Re: Nonsense mail
184943 by: Elliot J. Balanza
184952 by: trlists.clayst.com

__toString or not __toString
184944 by: Thomas Björk
184945 by: Thomas Björk
184946 by: Thomas Björk

Re: GD support
184947 by: Marek Kilimajer
184950 by: Anton Krall

Re: php code in a .js file?
184949 by: Craig Donnelly

Re: Fetching XML for parsing
184951 by: Pablo

variable-length arguments passed by reference... how?
184954 by: Aric Caley
184955 by: Aric Caley
184956 by: Marek Kilimajer
184957 by: Jay Blanchard
184958 by: Marek Kilimajer
184961 by: Aric Caley
184965 by: Tom Rogers
184968 by: Jason Barnett

Re: Using HTTP_REFERRER to ensure forms posted from server
184964 by: Chris Shiflett

Re: Listing all id's in array
184967 by: Torsten Roehr

how to verify PHP has been installed with ldap?
184970 by: Bing Du

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 ---
normally you just put
global $something;
at the begining of your function..
Like this
function safeInclude($file) {
global $something;
 if(file_exists($file)) { include($file);
 } else {
 debug("file $file not found");
 }
 }


"Justin French" <[EMAIL PROTECTED]> a écrit dans le message news:
[EMAIL PROTECTED]
> Can someone see a way to achieve what I want?
>
> I have the following function:
>
>  function safeInclude($file) {
> if(file_exists($file)) {
> include($file);
> } else {
> debug("file $file not found");
> }
> }
> ?>
>
> When used in this context...
>
>  $something = 'foo';
> safeInclude('somethingElse.inc');
> ?>
>
> ... somethingElse.inc cannot see the global variable $something.
>
>
> So, if an include is wrapped in a function, it would appear that the
> global variables no longer apply to the namespace of the included file.
>
> Is there anyway I can get around this?
>
> My only guess is I could add the line "global $GLOBALS;" to
> safeInclude(), but I have no idea how this affects memory usage or
> anything else.
>
>
>
> ---
> Justin French
> http://indent.com.au
--- End Message ---
--- Begin Message ---
[...]
[...]

foreach ( $GLOBALS AS $k => $v ) {
$$k = $v ;
}
[...]
if(file_exists($file)) {
include($file);
} else {
debug("file $file not found");
}
}
?>
[...]

(better, as no eval-syntax is required)

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

Friday, April 30, 2004, 1:29:12 AM, you wrote:
RW> [...]
>> > function safeInclude($file) {
RW> [...]

RW>  foreach ( $GLOBALS AS $k => $v ) {
RW>  $$k = $v ;
RW>  }

RW> [...]
>> if(file_exists($file)) {
>> include($file);
>> } else {
>> debug("file $file not found");
>> }
>> }
>> ?>
RW> [...]

RW> (better, as no eval-syntax is required)

RW>-- red
That makes local copies only, still no access to the global variable

The other thing to consider is that everything dies at the conclusion of
the function. It may be better to do this via a class construct

-- 
regards,
Tom
--- End Message ---
--- Begin Message ---
Again ain't no problem anyway

foreach ( $GLOBALS AS $k => $v ) {
$$k =& $GLOBALS[$k] ;
}
zap you are done ... again when using a function to include
a file with rel

php-general Digest 25 Apr 2004 17:27:52 -0000 Issue 2726

2004-04-25 Thread php-general-digest-help

php-general Digest 25 Apr 2004 17:27:52 - Issue 2726

Topics (messages 184546 through 184574):

SSI and query string variables to PHP
184546 by: Tim Traver
184547 by: Tim Traver
184552 by: Evan Nemerson
184554 by: Burhan Khalid
184573 by: Tim Traver

Re: formatting a string
184548 by: Tom Rogers

OR
184549 by: Aidan Lister
184550 by: daniel.electroteque.org
184551 by: Evan Nemerson
184553 by: Rainer Müller
184559 by: -{ Rene Brehmer }-
184572 by: Red Wingate

Re: Fetching XML for parsing
184555 by: Burhan Khalid
184558 by: Patagonia Hosting Development Group

Re: SMTP and GroupWise
184556 by: Burhan Khalid

PHP /MySQL problem on SMP machines
184557 by: Lasse Laursen
184568 by: Curt Zirzow

adult content censoring
184560 by: Andy B
184561 by: Richard Davey
184565 by: Richard A. DeVenezia
184566 by: Curt Zirzow
184570 by: Richard Davey
184571 by: Curt Zirzow

Re: OK SQL experts...
184562 by: Daniel Clark
184563 by: Daniel Clark

Shared session ? (frames application)
184564 by: Richard A. DeVenezia
184567 by: Marek Kilimajer
184574 by: Torsten Roehr

Re: Call to external function
184569 by: Marek Kilimajer

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 ---
Hi all,

ok, this may be a dumb question, but I have a page that has server side 
includes that include a php script like this :



works fine, except the script doesn't appear to receive any of the query 
string information if that page has a query string on it...

an example would be something like this :

http://www.domain.com/index.shtml?myvariable=1

the php script should get $_REQUEST['myvariable']==1, but instead does not 
get any of the query information.

The $_SERVER global gets the unescaped query string, but has no value for 
just the query string...

any way around this without making the whole page a php script ?

Thanks,

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

ok, this may be a dumb question, but I have a page that has server side 
includes that include a php script like this :



works fine, except the script doesn't appear to receive any of the query 
string information if that page has a query string on it...

an example would be something like this :

http://www.domain.com/index.shtml?myvariable=1

the php script should get $_REQUEST['myvariable']==1, but instead does not 
get any of the query information.

The $_SERVER global gets the unescaped query string, but has no value for 
just the query string...

any way around this without making the whole page a php script ?

Thanks,

Tim 
--- End Message ---
--- Begin Message ---
On Saturday 24 April 2004 10:29 pm, Tim Traver wrote:
> Hi all,
>
> ok, this may be a dumb question, but I have a page that has server side
> includes that include a php script like this :
>
> 
>
> works fine, except the script doesn't appear to receive any of the query
> string information if that page has a query string on it...
>
> an example would be something like this :
>
> http://www.domain.com/index.shtml?myvariable=1
>
> the php script should get $_REQUEST['myvariable']==1, but instead does not
> get any of the query information.
>
> The $_SERVER global gets the unescaped query string, but has no value for
> just the query string...

um, huh? you mean it has the query string but it isn't parsed into the proper 
superglobals ($_GET, $_REQUEST)? Not really sure what you're looking for here 
so i'm going to just pretend this paragraph isn't here ;)
>
> any way around this without making the whole page a php script ?

php.net/parse_str
>
> Thanks,
>
> Tim

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"The greatest mistake is to imagine that the human being is an autonomous 
individual. The secret freedom which you can supposedly enjoy under a 
despotic government is nonsense, because your thoughts are never entirely 
your own. Philosophers, writers, artists, even scientists, not only need 
encouragement and an audience, they need constant stimulation from other 
people. It is almost impossible to think without talking. If Defoe had really 
lived on a desert island, he could not have written Robinson Crusoe, nor 
would he have wanted to. Take away freedom of speech, and the creative 
faculties dry up."

-George Orwell
--- End Message ---
--- Begin Message ---
Tim Traver wrote:
Hi all,

ok, this may be a dumb question, but I have a page that has server s

php-general Digest 25 Apr 2004 05:14:04 -0000 Issue 2725

2004-04-24 Thread php-general-digest-help

php-general Digest 25 Apr 2004 05:14:04 - Issue 2725

Topics (messages 184527 through 184545):

Re: PHP5 bloats the code
184527 by: Johannes Reichardt
184529 by: Marek Kilimajer
184531 by: Mark Charette
184533 by: Marek Kilimajer
184535 by: Johannes Reichardt

Re: Fetching XML for parsing
184528 by: Patagonia Hosting Development Group

>From IIS to Apache
184530 by: Stephen Craton
184532 by: Richard Harb

Re: php/apache/mysql on ntfs
184534 by: Curt Zirzow

PHP Auth
184536 by: Anton Krall
184538 by: Rainer Müller
184539 by: Curt Zirzow
184540 by: Anton Krall

Re: MySQL Dump
184537 by: Michal Migurski

Problem when compiling php5
184541 by: Martin Hjort Eriksen

formatting a string
184542 by: Andy B
184543 by: Tom Rogers
184545 by: Andy B

Re: The COM problem when converting from ASP to PHP [works now!!]
184544 by: Steven Kidd

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 ---
Hi Curt,

thank you for pointing this one out. Who are the "php internals" and how 
could i contact them? This issue was rejected as bug recently.

- Johannes

* Thus wrote Marek Kilimajer ([EMAIL PROTECTED]):
 

I just installed php5 (finaly :-))  and it does not throw any error nor 
warning. I think what you see is Notice, so the behavior did not change.
   

Here is the offending situation:



/* E_NOTICE: undefined index, returns false */
unset($a);
echo is_array($a['foo']['asdf']);
/* returns false */
$a = 'asdf';
echo isset($a['foo']['asdf']);
/* returns false */
$a = array('foo' => 'asdf');
echo is_array($a['foo']['asdf']);
/* E_ERROR Invalid offset */
$a = 'asdf';
echo is_array($a['foo']['asdf']);
The last one is the biggie, the solution of course is to have
something like:
if (isset($a['foo']['asdf']) &&
   is_array($a['foo']['asdf']) {
This is a big BC issue, IMO, and might be worth asking internals
why the E_ERROR is given vs. a E_WARNING.
Curt
 

--- End Message ---
--- Begin Message ---
Curt Zirzow wrote:
Here is the offending situation:



/* E_NOTICE: undefined index, returns false */
unset($a);
echo is_array($a['foo']['asdf']);
/* returns false */
$a = 'asdf';
echo isset($a['foo']['asdf']);
/* returns false */
$a = array('foo' => 'asdf');
echo is_array($a['foo']['asdf']);
/* E_ERROR Invalid offset */
$a = 'asdf';
echo is_array($a['foo']['asdf']);
The last one is the biggie, the solution of course is to have
something like:
if (isset($a['foo']['asdf']) &&
is_array($a['foo']['asdf']) {
This is a big BC issue, IMO, and might be worth asking internals
why the E_ERROR is given vs. a E_WARNING.
Curt
Well, what I always know about my variables is if they are arrays or 
scalar ;) And I don't consider warning to be much nicer then error

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

> From: Marek Kilimajer [mailto:[EMAIL PROTECTED]

> Well, what I always know about my variables is if they are arrays or
> scalar ;) And I don't consider warning to be much nicer then error

Hmmm ... my current methods and functions in PHP 4.x oftentimes adapt to the
type passed to them since PHP doesn't have method signatures, meaning I
_don't_ know a priori what will be passed to them. Currently type checking
is mandatory if you want to avail yourself of a single method name.

Mark C.
--- End Message ---
--- Begin Message ---
Mark Charette wrote:
From: Marek Kilimajer [mailto:[EMAIL PROTECTED]


Well, what I always know about my variables is if they are arrays or
scalar ;) And I don't consider warning to be much nicer then error


Hmmm ... my current methods and functions in PHP 4.x oftentimes adapt to the
type passed to them since PHP doesn't have method signatures, meaning I
_don't_ know a priori what will be passed to them. Currently type checking
is mandatory if you want to avail yourself of a single method name.
Mark C.

So you have to check the type of the passed variable anyway, even in 
php4. You won't be affected by the new behavior in php5.
--- End Message ---
--- Begin Message ---
Hi Marek,

actually this behaviour is "too critical" since there are many cases 
where "compliant code" is not as well as much more simpler code. reminds 
me on the w3c standards that are so high that some things simply dont 
comply if yo

php-general Digest 19 Apr 2004 12:20:42 -0000 Issue 2714

2004-04-19 Thread php-general-digest-help

php-general Digest 19 Apr 2004 12:20:42 - Issue 2714

Topics (messages 183785 through 183799):

Re: session var puzzle
183785 by: Tom Rogers
183787 by: Larry Brown

Problems compiling a DSO in BSD/OS 5.1
183786 by: The Doctor

Re: why doesn't this work ?
183788 by: Andy Ladouceur

Re: Array Sorting Headaches
183789 by: Burhan Khalid
183791 by: Torsten Roehr
183793 by: Burhan Khalid
183794 by: Torsten Roehr
183799 by: Burhan Khalid

Re: Why are Session Variables carried over into a brand new browser window?
183790 by: Rob Adams

Re: php accelerator for php5rc1 ?
183792 by: David Herring
183795 by: Elfyn McBratney
183797 by: Thomas Seifert

C or C++
183796 by: Brent Clark

Re: Regexp hyperlink
183798 by: Martin Visser

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 ---
Hi,

Monday, April 19, 2004, 8:46:02 AM, you wrote:
KB> Dear list,
KB> I am sorry for the second posting, but this is going
KB> to drive me to drink something other than lattes! 

KB> I have one page, index.php.  when it calls mod_sub, a
KB> directory type of page is printed.  Here I am trying
KB> to set a session var of the most recently selected
KB> category to allow the user to return the to same place
KB> in the directory.

KB> when I do this:
KB> $_SESSION['CategoryID'] = 230; in mod_sub

KB> then in mod_profile:
KB> print($_SESSION['CategoryID']);
KB> will print 230

KB> when I do this:
KB> $Tmp = 230;
KB> $_SESSION['CategoryID'] = $Tmp; in mod_sub

KB> in mod_profile:
KB> print($_SESSION['CategoryID']);
KB> will print 230

KB> BUT, when I do this:
KB> $_SESSION['CategoryID'] = $Data['ID']; in mod_sub
KB> $_SESSION['CategoryID'] = intval($Data['ID']);


KB> in mod_profile:
KB> print($_SESSION['CategoryID']);
KB> will print '' and 0

KB> I am setting several other session variables
KB> throughout the code without any unexpected behavior. 
KB> I have even tried changing the index to something odd
KB> in case I am resetting 'CategoryID' somewhere and
KB> forgotten it.  But no matter what I try, once I set it
KB> "= $Data['ID']" I get the odd result.

KB> BTW, if I print $_SESSION['CategoryID'] from mod_sub
KB> right after setting, it holds the expected value. 
KB> This is really frustrating, I must be missing
KB> something basic about the way session vars can be set.


KB> Kathleen


put this at the top of each page and see if you get any undefined
variables warnings as it may be a problem of variable scope

error_reporting(E_ALL);


-- 
regards,
Tom
--- End Message ---
--- Begin Message ---
In the last pair of examples where it fails, you know you are first
assigning the value of $Data['ID'] to the $_SESSION['CategoryID'] and the
over-writing that value with the value of intval($Data['ID'])?  Why are you
assigning $Data['ID'] to it if you are going to overwrite it?  If those
other tests work then I doubt that it is a session problem.  I'd
double-check to make sure that $Data['ID'] is holding a reasonable value.

-Original Message-
From: Kathleen Ballard [mailto:[EMAIL PROTECTED]
Sent: Sunday, April 18, 2004 6:46 PM
To: [EMAIL PROTECTED]
Subject: [PHP] session var puzzle


Dear list,
I am sorry for the second posting, but this is going
to drive me to drink something other than lattes!

I have one page, index.php.  when it calls mod_sub, a
directory type of page is printed.  Here I am trying
to set a session var of the most recently selected
category to allow the user to return the to same place
in the directory.

when I do this:
$_SESSION['CategoryID'] = 230; in mod_sub

then in mod_profile:
print($_SESSION['CategoryID']);
will print 230

when I do this:
$Tmp = 230;
$_SESSION['CategoryID'] = $Tmp; in mod_sub

in mod_profile:
print($_SESSION['CategoryID']);
will print 230

BUT, when I do this:
$_SESSION['CategoryID'] = $Data['ID']; in mod_sub
$_SESSION['CategoryID'] = intval($Data['ID']);


in mod_profile:
print($_SESSION['CategoryID']);
will print '' and 0

I am setting several other session variables
throughout the code without any unexpected behavior.
I have even tried changing the index to something odd
in case I am resetting 'CategoryID' somewhere and
forgotten it.  But no matter what I try, once I set it
"= $Data['ID']" I get the od

php-general Digest 18 Apr 2004 23:57:03 -0000 Issue 2713

2004-04-18 Thread php-general-digest-help

php-general Digest 18 Apr 2004 23:57:03 - Issue 2713

Topics (messages 183761 through 183784):

Re: Bookmark server
183761 by: Justin French
183763 by: Chris W
183764 by: Marek Kilimajer

Array Sorting Headaches
183762 by: Burhan Khalid
183768 by: Torsten Roehr

Re: why doesn't this work ?
183765 by: Pooya Eslami
183766 by: Robert Cummings
183767 by: Marek Kilimajer
183769 by: Daniel Clark
183770 by: Daniel Clark
183772 by: Dave G

session var problems
183771 by: Kathleen Ballard
183774 by: Daniel Clark

Re: addslashes vs. mysql_real_escape_string
183773 by: John W. Holmes

example from meloni not working
183775 by: Anthony Ritter
183776 by: Red Wingate
183777 by: Richard Harb
183778 by: Anthony Ritter
183779 by: Anthony Ritter

Regexp hyperlink
183780 by: Martin Visser
183781 by: Richard Harb

session var puzzle
183782 by: Kathleen Ballard
183783 by: Richard Harb

test, please ignore
183784 by: Michal Migurski

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 ---
On 18/04/2004, at 10:35 AM, Chris W wrote:

So now I am out of ideas and was wondering if anyone here had any.
We're getting a little OT, but it's possible that a bookmarklet (a 
JavaScript bookmark) installed on all browsers you use could act as the 
method of grabbing the existing URL, and passing it to another URL 
(your bookmark server) as a GET or POST var.

---
Justin French
http://indent.com.au
--- End Message ---
--- Begin Message ---
Justin French wrote:

On 18/04/2004, at 10:35 AM, Chris W wrote:

So now I am out of ideas and was wondering if anyone here had any.


We're getting a little OT, but it's possible that a bookmarklet (a 
JavaScript bookmark) installed on all browsers you use could act as 
the method of grabbing the existing URL, and passing it to another URL 
(your bookmark server) as a GET or POST var.


that's not a viable option because the main idea of this bookmark server 
is to be able to save URL's when I'm using computers I don't normally 
use, like at a friends house or library or whereever.

Chris W
--- End Message ---
--- Begin Message ---
Chris W wrote:
Justin French wrote:

On 18/04/2004, at 10:35 AM, Chris W wrote:

So now I am out of ideas and was wondering if anyone here had any.


We're getting a little OT, but it's possible that a bookmarklet (a 
JavaScript bookmark) installed on all browsers you use could act as 
the method of grabbing the existing URL, and passing it to another URL 
(your bookmark server) as a GET or POST var.


that's not a viable option because the main idea of this bookmark server 
is to be able to save URL's when I'm using computers I don't normally 
use, like at a friends house or library or whereever.

It's a matter of seconds to to grap the bookmarklet off your links 
directory and put it into IE's favorites or Mozilla's bookmarks. There 
has to be some kind of "installation" on the clients machine if you want 
to make it simple.
--- End Message ---
--- Begin Message ---
Greetings everyone :

  Having a hard time with this one. I have a multi-dim array 
$foo[$x][$y]['key'], where $x and $y are numeric. Here is some sample data :

Array
(
[$x] => Array
(
[0] => Array
(
[invoiceid] => 11842
[product] => myproduct
[domain] => foo.net
[expires] => February 28, 2004
)
[1] => Array
(
[invoiceid] => 10295
[product] => myotherproduct
[domain] => foo.net
[expires] => December 9, 2003
)
[2] => Array
(
[invoiceid] => 10202
[product] => product1
[domain] => foo.bar
[expires] => January 19, 2003
)
[3] => Array
(
[invoiceid] => 10005
[product] => product2
[domain] => foo.bar
[expires] => December 11, 2002
)
)
)
I need to filter the results so that I get the latest expiry date for 
each product.  The expires field actually contains a timestamp.  So for 
the sample array above, the resultant array would have only keys 0 and 
2, filtering out all the rest.  There are around 180+ main entr

php-general Digest 18 Apr 2004 11:55:07 -0000 Issue 2712

2004-04-18 Thread php-general-digest-help

php-general Digest 18 Apr 2004 11:55:07 - Issue 2712

Topics (messages 183746 through 183760):

Re: why doesn't this work ?
183746 by: Daniel Clark
183754 by: Pooya Eslami
183756 by: Andy Ladouceur

Removing line breaks...
183747 by: Russell P Jones
183749 by: -{ Rene Brehmer }-
183750 by: Daniel Clark

Bookmark server
183748 by: Chris W
183758 by: PHP Email List

Why are Session Variables carried over into a brand new browser window?
183751 by: Bob Bruce - Programmer
183752 by: Travis Low
183755 by: Greg Donald
183757 by: Torsten Roehr

Re: Array Problem
183753 by: Tom Rogers
183760 by: Don Read

addslashes vs. mysql_real_escape_string
183759 by: Richard Davey

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 ---
Can you post the code and error.


>>I took out the scrip tags and put in   at the
>>end, but it returns this:
>>
>>$file
>>"; } } closedir($handle); } echo "
>>"; ?>
--- End Message ---
--- Begin Message ---
I put this in the body of an html file:

$file";
   }
   }
   closedir($handle);
}

echo "";
?>

the output page contains :

$file
"; } } closedir($handle); } echo "
"; ?>

I don't understand why.

"Daniel Clark" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Can you post the code and error.
>
>
> >>I took out the scrip tags and put in   at
the
> >>end, but it returns this:
> >>
> >>$file
> >>"; } } closedir($handle); } echo "
> >>"; ?>
--- End Message ---
--- Begin Message ---
It's already been mentioned, but you do need to ensure you are using a 
.php extension on the file. Also, forgive me if this has already been 
covered, but are you sure the server even supports PHP?

Try creating a new file with:

And save it as something.php, check and see if it returns a table full 
of information or not.

Andy

Pooya Eslami wrote:
I put this in the body of an html file:

$file
font>";
   }
   }
   closedir($handle);
}
echo "";
?>
the output page contains :

$file
"; } } closedir($handle); } echo "
"; ?>
I don't understand why.

"Daniel Clark" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Can you post the code and error.



I took out the scrip tags and put in   at
the

end, but it returns this:

$file
"; } } closedir($handle); } echo "
"; ?>
--- End Message ---
--- Begin Message ---
How do i turn this...

[br]
  [b]My Title [/b]
[br]

into

[br][b]My Title[/b][br]


--- I just need to have line breaks removed basically...

any ideas?

Russ Jones
--- End Message ---
--- Begin Message ---
str_replace("\n",'',$string);

don't think it'd be any faster with the regex ones...

Rene

At 01:18 18-04-2004, Russell P Jones wrote:
How do i turn this...

[br]
  [b]My Title [/b]
[br]
into

[br][b]My Title[/b][br]

--- I just need to have line breaks removed basically...

any ideas?

Russ Jones
--
Rene Brehmer
aka Metalbunny
~ If you don't like what I have to say ... don't read it ~

http://metalbunny.net/
References, tools, and other useful stuff...
Check out the new Metalbunny forums @ http://forums.metalbunny.net/
--- End Message ---
--- Begin Message ---
str_replace( $line, '\n', '')

http://us2.php.net/manual/en/function.str-replace.php

>>How do i turn this...
>>
>>[br]
>>  [b]My Title [/b]
>>[br]
>>
>>into
>>
>>[br][b]My Title[/b][br]
>>
>>
>>--- I just need to have line breaks removed basically...
>>
>>any ideas?
--- End Message ---
--- Begin Message ---
I am planning on writing a "bookmark server" in php.  The idea is I will 
have a database that stores all my internet favorites on a web server 
some where, so if I am doing some web browsing away from home and find a 
site I want to save, I can go to my bookmark server and save the url 
there.  Now for the part I can't figure out an easy way to do.  I want 
to have it so if I am looking at a page I want to save I can type in a 
nice short url for my bookmark server and it will some how be able to 
know where I just came from and have the form fields for URL and 
description already filled in for me.  Then I just have to tell it what 
category to save the bookmark in.
First I thought the _SERVER["HTTP_REFERER"] variable, but that only 
works if you click on a link and since every web page I want to save 
won&#

php-general Digest 17 Apr 2004 23:21:37 -0000 Issue 2711

2004-04-17 Thread php-general-digest-help

php-general Digest 17 Apr 2004 23:21:37 - Issue 2711

Topics (messages 183712 through 183745):

Re: php and mysql help
183712 by: David Robley

Re: http header
183713 by: Daniel Clark
183714 by: Torsten Roehr

Print out all the files in a directory
183715 by: Pooya Eslami
183716 by: Matt Matijevich
183717 by: Pooya Eslami
183718 by: Matt Matijevich
183719 by: Pooya Eslami
183720 by: Robert Cummings
183721 by: Pooya Eslami
183744 by: Rainer Müller

why doesn't this work ?
183722 by: Pooya Eslami
183724 by: John W. Holmes
183725 by: Pooya Eslami
183730 by: Daniel Clark
183731 by: Daniel Clark
183733 by: Pooya Eslami
183735 by: John W. Holmes
183737 by: Pooya Eslami
183742 by: John W. Holmes

Array Problem
183723 by: Flavio Fontana
183726 by: Richard Harb
183727 by: Arthur Radulescu
183732 by: Daniel Clark
183734 by: Richard Harb

Re: Formatting phone numbers?
183728 by: Andy Crain

php accelerator for php5rc1 ?
183729 by: David Herring
183739 by: Thomas Seifert

Rporting tool - CVS?
183736 by: Kim Steinhaug
183740 by: Aaron Wolski
183741 by: Jordi Canals
183745 by: Daniel Clark

Re: [AWF-TOPIC] Reporting tool - CVS?
183738 by: Robert Cummings

Form data not available at first. Why?
183743 by: Dave Pidgeon

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 ---
[EMAIL PROTECTED] (Jay Blanchard) wrote in 
news:[EMAIL PROTECTED]:

> Why are you sending this to me? You're at Stanford, you can probably
> figure out the unsubscribe link and stuff
> 
> -Original Message-
> From: David A. Stevens [mailto:[EMAIL PROTECTED] 
> Sent: Friday, April 16, 2004 12:41 PM
> To: Jay Blanchard
> Subject: RE: [PHP] php and mysql help
> 
> 
> Please remove my address from any future correspondence about PHP.
> 

Jay, you are confusing persons at a university with persons who may have a 
Clue [TM]

David (also recipient of this message)
--- End Message ---
--- Begin Message ---
Yes, that works.

>>Is the following code the best way to redirect someone to a different 
>>page using PHP?
>>
>>>header("Location: http://www.yahoo.com";);
>>?>
>>
>>I looked for a "redirect" function of some kind and didn't come up with 
>>anything.  Just curious what the consensus is...


--- End Message ---
--- Begin Message ---
"Gabe" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Is the following code the best way to redirect someone to a different
> page using PHP?
>
>  header("Location: http://www.yahoo.com";);
> ?>

>From personal experience I can recommend putting "exit;" behind a header()
redirect to absolutely make sure that no code is executed afterwards in the
script:

header("Location: http://www.yahoo.com";); exit;

Without "exit;" the header redirect soemtimes didn't work for me.

Regards,

Torsten Roehr

>
> I looked for a "redirect" function of some kind and didn't come up with
> anything.  Just curious what the consensus is...
>
> Thanks
--- End Message ---
--- Begin Message ---
Hi,
I want to write a simple script that looks for all the files with a common
name and show them, like all the .mp3 files or all the .doc files. How do I
go about it?

Thank you,
-Pooya
--- End Message ---
--- Begin Message ---
http://www.php.net/readdir
--- End Message ---
--- Begin Message ---
But how do I get all the .mp3 files? can I use *.mp3? and how ?

"Matt Matijevich" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> http://www.php.net/readdir


--- End Message ---
--- Begin Message ---
on that page ther is examples

 
--- End Message ---
--- Begin Message ---
That is exactly my question! how do I look for a .mp3 file?!
I tried
  if ($file != "." && $file != ".." && $file=="*.mp3")
but it doesn't work!

"Matt Matijevich" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> on that page ther is examples
>
>  if ($handle = opendir('.')) {
>while (false !== ($file = readdir($handle))) {
>if ($file != "." && $file != "..") { //add your logic to see if
> it is an .mp3 file right here, that can be done any number of ways
>echo "$file\n";
>}
>}
>closedir($handle)

php-general Digest 17 Apr 2004 08:05:37 -0000 Issue 2710

2004-04-17 Thread php-general-digest-help

php-general Digest 17 Apr 2004 08:05:37 - Issue 2710

Topics (messages 183673 through 183711):

Re: Unwanted e-mails
183673 by: Elfyn McBratney
183674 by: Travis Low
183675 by: Lester Caine
183676 by: John W. Holmes
183677 by: John Nichel
183679 by: Lester Caine
183680 by: Jay Blanchard
183681 by: John W. Holmes
183682 by: Elfyn McBratney
183683 by: Chris W. Parker
183684 by: John Nichel
183685 by: Elfyn McBratney
183686 by: Lester Caine
183688 by: David T-G
183692 by: Ryan A

Re: sending mail with php on a linux box
183678 by: John W. Holmes

Re: Looking for a comprehensive PHP tutorial
183687 by: Stephen Allen

http header
183689 by: Gabe
183690 by: Matt Matijevich
183691 by: Elfyn McBratney
183693 by: Matt Matijevich
183695 by: Brandon Holtsclaw
183696 by: Gabe
183703 by: Chris Shiflett
183707 by: Matt Matijevich

Double mails
183694 by: Lopez, Kaleb (GEAE, Foreign National, CIAT)
183697 by: Chris W. Parker
183698 by: Lopez, Kaleb (GEAE, Foreign National, CIAT)
183706 by: Chris W. Parker
183708 by: PHP Email List
183709 by: PHP Email List
183710 by: Elfyn McBratney

Re: Formatting phone numbers?
183699 by: Jay Blanchard

Re: alternating row color--newbie help
183700 by: Don Read

***Re: [PHP] Explanation of cookie behavior
183701 by: David A. Stevens

PHP's RPM vs PHP's Compiling???
183702 by: Scott Fletcher

limit number of CGI processes
183704 by: Florian Effenberger

Fatal error: Call to undefined function: mysql_connect()
183705 by: Tim
183711 by: David Robley

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 ---
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Friday 16 Apr 2004 19:19, Lester Caine wrote:
> Chris W. Parker wrote:
> > David A. Stevens <mailto:[EMAIL PROTECTED]>
> >
> > on Friday, April 16, 2004 10:31 AM said:
> >>I have somehow, for reasons unknown to me, gotten onto some e-mail
> >>list that I don't want to or need to be on. Somebody please, at all
> >>the above addresses, do everything possible to get me off that
> >>list(s).
> >
> > DON'T MAKE AN AUTO-REPLY!!
> >
> > UNSUBSCRIBE YOURSELF!!
>
> Does not Fing work!!
> The unsubscribe process requires you to reply to the eMail that is sent.
> THAT email is bounced for many people who are trying to unsubscribe.
> SOMEBODY NEEDS TO GET THEIR ACT TOGETHER AND FIX THE SYSTEM SO THAT WE
> C*A*N* UNSBSCRIBE !
>
> There is obviously an anti spam filter that processes many of these
> requests and prevent email IN while still sending it OUT to the banned
> addresses !

Chill out, or you'll see no help, OK?

If for whatever reason you don't get that unsibscribe email, you need to 
contact the people who run this list:

  

But use that as a /last/ resort.  Try the unsubscribe page on the PHP website 
first:

  <http://www.php.net/unsub.php>

Coming on this list and swearing at everyone won't get you anywhere.

":-)"

Elfyn

- -- 
Elfyn McBratney, EMCB
mailto:[EMAIL PROTECTED]
http://www.emcb.co.uk/

PGP Key ID: 0x456548B4
PGP Key Fingerprint:
  29D5 91BB 8748 7CC9 650F  31FE 6888 0C2A 4565 48B4

"When I say something, I put my name next to it." -- Isaac Jaffee

>> ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ <<
<< ~  Linux london 2.6.5-emcb-241 #2 i686 GNU/Linux  ~ >>
>> ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ <<
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAgECmaIgMKkVlSLQRAkR9AJ48QGZl4iwy+hPmbBNekD3F4lRZvQCgiKh/
JBY08qC2MFFNLvsXbv3hnuc=
=4+dE
-END PGP SIGNATURE-
--- End Message ---
--- Begin Message ---
Lester Caine wrote:
Chris W. Parker wrote:
David A. Stevens <mailto:[EMAIL PROTECTED]>
on Friday, April 16, 2004 10:31 AM said:
I have somehow, for reasons unknown to me, gotten onto some e-mail
list that I don't want to or need to be on. Somebody please, at all
the above addresses, do everything possible to get me off that
list(s).
DON'T MAKE AN AUTO-REPLY!!

UNSUBSCRIBE YOURSELF!!
Does not Fing work!!
The unsubscribe process requires you to reply to the eMail that is sent.
THAT email is bounced for many people who are trying to unsubscribe.
SOMEBODY NEEDS TO GET THEIR ACT TOGETHER AND FIX THE SYSTEM SO THAT WE 
C*A*N* UNSBSCRIB

php-general Digest 12 Apr 2004 16:03:02 -0000 Issue 2701

2004-04-12 Thread php-general-digest-help

php-general Digest 12 Apr 2004 16:03:02 - Issue 2701

Topics (messages 183140 through 183166):

[Newbie Guide] For the benefit of new members
183140 by: Ma Siva Kumar

Re: How do you handle device detection?
183141 by: DvDmanDT

Re: using $_SESSION inside of user functions
183142 by: Jason Wong

After calling a Function the Script aborts without any error :-\
183143 by: Ben
183146 by: John Nichel
183150 by: John W. Holmes
183152 by: William Lovaton

Using only PHP is it possible (multiple re-directs)?
183144 by: Jay Blanchard
183147 by: John Nichel

requests per s with php and mysql queries
183145 by: Merlin
183148 by: John W. Holmes
183149 by: William Lovaton
183155 by: Merlin
183156 by: Merlin

Re: ADOdb Operator question
183151 by: Gabe

Re: PHP/MySQL difficulties on WindowsXP
183153 by: Gabe

XML Parser Functions - problem interpreting an xml file
183154 by: Kai Hackemesser
183159 by: Chris Boget

Wanted: login and CMS system with a twist
183157 by: David T-G

varible
183158 by: edwardspl.ita.org.mo

Re: commercial autoresponses (was "Re: [PHP] Wanted: ...")
183160 by: David T-G
183166 by: Jason Barnett

Problems with mail and php
183161 by: Luis Lebron

Re: php 5 install
183162 by: Jason Barnett

Preg_match_all problem
183163 by: Jeff McKeon
183164 by: John Nichel

htmlentities, links, javascript
183165 by: Beau Hartshorne

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 ---
===
This message is for the benefit of new 
subscribers and those new to PHP.  Please 
feel free to add more points and send to the 
list.
===
1. If you have any queries/problems about PHP 
try http://www.php.net/manual/en first. You 
can download a copy and use it offline also. 

Please also try 
http://www.php.net/manual/faq.php 
for answers to frequently answered questions 
about PHP (added by Christophe Chisogne).

2. Try http://www.google.com next. Searching 
for "php YOUR QUERY" may fetch you relevant 
information within the first 10 results.

3. There is a searchable archive of the 
mailing list discussion at 
http://phparch.com/mailinglists. Many of the 
common topics are discussed repeatedly, and 
you may get answer to your query from the 
earlier discussions. 

For example: One of the repeatedly discussed 
question in the list is "Best PHP editor". 
Everyone has his/her favourite editor. 
You can get all the opinions by going through 
the list archives. If you want a chosen list 
try this link : 
http://phpeditors.linuxbackup.co.uk/ 
(contributed by Christophe Chisogne).

4. Not sure if PHP is working or you want 
find out what extensions are available to 
you?

Just put the following code into a file with 
a .php extension and access it through your 
webserver:

 

If PHP is installed you will see a page with 
a lot of information on it. If PHP is not 
installed (or not working correctly) your 
browser will try to download the file.

(contributed by Teren and reworded by Chris W 
Parker)

5. If you are stuck with a script and do not 
understand what is wrong, instead of posting 
the whole script, try doing some research 
yourself. One useful trick is to print 
the variable/sql query using print or echo 
command and check whether you get what you 
expected. 

After diagnosing the problem, send the 
details of your efforts (following steps 1, 
2 & 3) and ask for help.

6. PHP is a server side scripting language. 
Whatever processing PHP does takes place 
BEFORE the output reaches the client. 
Therefore, it is not possible to access 
users'  computer related information (OS, 
screen size etc) using PHP. Nor can you 
modify any the user side settings. You need 
to go for JavaScript and ask the question in 
a JavaScript list.

On the other hand, you can access the 
information that is SENT by the user's 
browser when a client requests a page from 
your server. You can find details about 
browser, OS etc as reported by 
this request. - contributed by Wouter van 
Vliet and reworded by Chris W Parker.

7. Provide a clear descriptive subject line. 
Avoid general subjects like "Help!!", "A 
Question" etc.  Especially avoid blank 
subjects. 

8. When you want to start a new topic, open a 
new mail composer and enter the mailing list 
address [EMAIL PROTECTED] instead of 
replying to an existing thread and replacing 
the subject and body with your message.

9. It's always a good idea to post back to 
the list once you've solve

php-general Digest 12 Apr 2004 03:58:45 -0000 Issue 2700

2004-04-11 Thread php-general-digest-help

php-general Digest 12 Apr 2004 03:58:45 - Issue 2700

Topics (messages 183124 through 183139):

Re: trying to output a hyperlink
183124 by: Michal Migurski

Re: adding items to a list or menu
183125 by: Robert

PHP5 RC1 rpms for Mandrake 10
183126 by: Andrei Verovski (aka MacGuru)

function imagecreatefromjpeg pb
183127 by: Cosas minovela
183128 by: Cosas minovela

creating log files out of a delete statement
183129 by: Andy B
183133 by: John W. Holmes
183136 by: Andy B
183138 by: Robert Sossomon

using $_SESSION inside of user functions
183130 by: Andy B
183131 by: daniel.electroteque.org
183132 by: Andy B
183134 by: John W. Holmes
183135 by: daniel.electroteque.org

How do you handle device detection?
183137 by: Richard Davey
183139 by: Lukasz Karapuda

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 ---
>Although, it could be shortened even more, to:
>
>Click here";
>   echo $link;?>

Or still more, to:
Click Here

...which starts to approach the original legibility of HTML for me, and
the syntax hilighting in BBEdit is corrrect. I've been tending to use
constructions like that instead of templating classes like smarty or
printf constructiions, and I've been very pleased with em.

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html
--- End Message ---
--- Begin Message ---
"R.G. Vervoort" <[EMAIL PROTECTED]> wrote in message news:<[EMAIL PROTECTED]>...
> Not sure if it is a php question but since i am working in php here it is.
> 
> Ho can i add items to (the item label=visual text and the value=index
> number) a list object on a website.
> 
> I am having a list with 4 items and i would like to add the text from a
> textfield (textfield1.value) to the list object so it will hold 5 items.
> 
> thanks for any suggestions
> 
> Roy
> The Netherlands

PHP is server side, it looks like you want to send items to a client
side app (javascript?) you could do something like this:

--->Snip!

\n"; //Not a javascript guy,
but you get the point

foreach($array as $key=>$item) {
   echo "\n textdata.item$key=$item";
}

?>
 etc.

<---

Not sure how javascript looks (started working with it in last 2 days)
but you can change that echo statement to what it should be in
javascript

Cheers!

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

Anyone can suggest me where I can get PHP5 RC1 rpms (with possible max# of 
extensions) for Mandrake 10? I have tried to make them myself, but run into 
numerous problems.

Thanks in advance for any suggestion(s)

Andrei Verovski (aka MacGuru)
--- End Message ---
--- Begin Message ---
about GD, Warning: imagecreatefromjpeg(): '/var/www/html/datos/2004/02/crio25.jpg' is 
not a valid JPEG file. how can i solve it please?

image pass the EOF and BOF test, so this is not the problem :)--- End Message ---
--- Begin Message ---





about GD, Warning: imagecreatefromjpeg(): 
'/var/www/html/datos/2004/02/crio25.jpg' is not a valid JPEG file. how can i 
solve it please?
 
image pass the EOF and BOF test, so this is not the 
problem :)
 
here you got the image with problems , i'm sorry 
about the content of image...
 
http://www.paginadespud.com/datos/2004/02/crio25.jpg
 
--- End Message ---
--- Begin Message ---
hi...

i have a section of a website that deletes records from a mysql table...
right now all the query is is a delete statement but i need to make a "log
file" in this format:
current time::username who executed delete:: deleted(name of record)::delete
completed
or delete failed depending on what happened... i can do all of the log
except dont exactly know how to extract the "Name" field of the deleted
record before it actually gets dumped.. that way i can use it on the log...

any ideas how to do it in the best way??
--- End Message ---
--- Begin Message ---
Andy B wrote:

i have a section of a website that deletes records from a mysql table...
right now all the query is is a delete statement but i need to make a "log
file" in this format:
current time::username who executed delete:: deleted(name of record)::delete
completed
or delete failed depending on what happened... i can do all of the log
except dont exactly know how to extract the "Name" field of the deleted
record before it actually gets dumped.. that way i can use it on the log...
There's no way to extract it from the DELETE. You

php-general Digest 11 Apr 2004 15:02:14 -0000 Issue 2699

2004-04-11 Thread php-general-digest-help

php-general Digest 11 Apr 2004 15:02:14 - Issue 2699

Topics (messages 183097 through 183123):

timestamp to readabe date and time ?
183097 by: Damian Brown
183098 by: Ryan A
183099 by: Andy Ladouceur
183104 by: Damian Brown
183106 by: Andy Ladouceur
183107 by: Damian Brown
183108 by: Damian Brown
183116 by: Don Read
183121 by: Rainer Müller

Re: phpextdist and phpize
183100 by: Curt Zirzow

Re: php as cgi and module at same time
183101 by: Curt Zirzow

Re: Most bizarre date problem ever
183102 by: Curt Zirzow

Re: video thumbnail generation
183103 by: Curt Zirzow

Re: PHP e-commerce questions
183105 by: PHP Email List

trying to output a hyperlink
183109 by: Damian Brown
183111 by: John W. Holmes
183112 by: John W. Holmes
183113 by: Andy Ladouceur

Re: PHP5 and pear
183110 by: electroteque

SOLVED:Re: trying to output a hyperlink
183114 by: Damian Brown

SOLVED:Re: [PHP] timestamp to readabe date and time ?
183115 by: Damian Brown

Re: PHP-GTK mailing list
183117 by: David Robley

cannot find server even though the page is there?
183118 by: Andy B

Re: List Admins
183119 by: David Robley
183123 by: Elfyn McBratney

[solved][ignore]Re: [PHP] cannot find server even though the page is there?
183120 by: Andy B

Re: PHP OO concepts
183122 by: Ralph G

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
--- Begin Message ---
I need to output a date and time that  shows more clearly than just
outputting the timestamp

what is the correct way to go about it ?
I have looked at getdate(), but I haven't fathomed it out yet !

--
www.phpexpert.org/truefaith.htm
"True Faith is not just when you believe in God and yourself, it is when
others begin to believe in you as well" - Damian John Paul Brown 2004
--- End Message ---
--- Begin Message ---

On 4/11/2004 3:25:09 AM, Damian Brown ([EMAIL PROTECTED]) wrote:
> I need to output a date and time that  shows more clearly than just
> outputting the timestamp
>
> what is the correct way to go about it ?
> I have looked at getdate(), but I haven't fathomed it out yet !

If you are using timestamp(14), here is how i do it: (after the select)

if(($row = mysql_fetch_row($result))>=1)
{
  $d_year = substr($row[4],0,4);
  $d_month = substr($row[4],4,2);
  $d_day = substr($row[4],6,2);
  $d_hours = substr($row[4],8,2);
  $d_mins = substr($row[4],10,2);
  $d_secs = substr($row[4],12,2);
}

I am using a  mysql_fetch_row as i am getting a lot of fields from the db,
you may want to use the fetch_array or something else but eh above should
give you an idea. The reason I like it like this is because the
year,month,date etc is all in different varialbes which I can format the way
I want it...or can even give the client the option of specifying the
format...but thats another thing altogether

HTH.

Cheers,
-Ryan
--- End Message ---
--- Begin Message ---
The second parameter of PHP's date() function takes a timestamp as an 
argument, this may be what you're looking for?

Andy

Damian Brown wrote:
I need to output a date and time that  shows more clearly than just
outputting the timestamp
what is the correct way to go about it ?
I have looked at getdate(), but I haven't fathomed it out yet !
--
www.phpexpert.org/truefaith.htm
"True Faith is not just when you believe in God and yourself, it is when
others begin to believe in you as well" - Damian John Paul Brown 2004
--- End Message ---
--- Begin Message ---
I have tried that, but it gives a date in the future
and all records have the same time
the code is



and it gives an output of

Monday 18th of January 2038 10:14:07 PM

I need it to proces the timestamp in the database table so that it shows the
different times
Thanks in advance for a solution

> The second parameter of PHP's date() function takes a timestamp as an
> argument, this may be what you're looking for?
>
> Andy
>
> Damian Brown wrote:
> > I need to output a date and time that  shows more clearly than just
> > outputting the timestamp
> >
> > what is the correct way to go about it ?
> > I have looked at getdate(), but I haven't fathomed it out yet !
> >
> > --
> > www.phpexpert.org/truefaith.htm
> > "True Faith is not just when you believe in God and yourself, it is when
> > others begin to believe in you as well" - Damian John Paul Brown 2004
--- End Message ---
--- Begin Message ---
And these are UNIX timestamps? Odd. I can't see date giving the wrong 
output,

php-general Digest 11 Apr 2004 01:11:05 -0000 Issue 2698

2004-04-10 Thread php-general-digest-help

php-general Digest 11 Apr 2004 01:11:05 - Issue 2698

Topics (messages 183066 through 183096):

How to do this?
183066 by: Mike Mapsnac
183068 by: Duncan Hill
183069 by: John W. Holmes
183083 by: Mike Mapsnac

Re: Store e-mail in DB
183067 by: Raditha Dissanayake

Re: PHP5 and pear
183070 by: Aidan Lister

Most bizarre date problem ever
183071 by: Brian Dunning
183075 by: trlists.clayst.com

Read file backwards
183072 by: Kim Steinhaug
183073 by: Kim Steinhaug

PHP e-commerce questions
183074 by: Matt Hedges

Re: Smarty Summary was Re: [PHP] smarty
183076 by: Jochem Maas

Re: cleaning up html output from php in apache
183077 by: Jason Sheets

MVC based frameworks and PHP5 Object Model.
183078 by: Lukasz Karapuda
183079 by: Robert Cummings

video thumbnail generation
183080 by: Stuart Gilbert

php 5 install
183081 by: Andy B
183082 by: Andy B
183084 by: Richard Harb
183091 by: Rainer Müller

configure php solaris with openssl
183085 by: Sascha Ferley

query strings coming from the same page going back to the same page
183086 by: Andy B
183088 by: Rainer Müller
183090 by: Andy B
183092 by: John W. Holmes

imap_open() fails with CouirerIMAP
183087 by: Pembo13
183089 by: Elfyn McBratney
183093 by: Pembo13
183094 by: Elfyn McBratney

phpextdist and phpize
183095 by: gayard.ig.com.br
183096 by: Elfyn McBratney

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 ---
My php page takes data from the database such as ID, Date, Value and prints 
on the screen. About 20 entries are printed on the screen. The each entry 
has option 'yes' or 'no'.

So I need to gather the information about each entry and update database. I 
cannot access the variable from $_POST because parameter is not static and 
$_POST is not working like this $_POST['$id'];

Any ideas how I can make this working?

_
Tax headache? MSN Money provides relief with tax tips, tools, IRS forms and 
more! http://moneycentral.msn.com/tax/workshop/welcome.asp
--- End Message ---
--- Begin Message ---
On Saturday 10 April 2004 14:36, Mike Mapsnac wrote:

> So I need to gather the information about each entry and update database. I
> cannot access the variable from $_POST because parameter is not static and
> $_POST is not working like this $_POST['$id'];

$_POST["$id"]

" does variable substitution, ' does not.
--- End Message ---
--- Begin Message ---
Mike Mapsnac wrote:
My php page takes data from the database such as ID, Date, Value and 
prints on the screen. About 20 entries are printed on the screen. The 
each entry has option 'yes' or 'no'.

So I need to gather the information about each entry and update 
database. I cannot access the variable from $_POST because parameter is 
not static and $_POST is not working like this $_POST['$id'];
Make a radio button such as:



Then, you'll have $_POST['option'][$id] that you can use.

$yes_ids = array_keys($_POST['option'],'Yes');
$yes_list = implode(',',$yes_ids);
$no_ids = array_keys($_POST['option'],'No');
$no_ids = implode(',',$no_ids);
$entire_list = implode(',',array_keys($_POST['option']));

$query = "UPDATE table SET option = CASE WHEN id IN ($yes_list) THEN 
'Yes' WHEN id IN ($no_list) THEN 'No' END CASE WHERE id IN ($entire_list)";

Need to add in some validation, but that's the basic idea. Well, that's 
not really "basic", but it gives you an idea of a very efficient way to 
handle this. :)

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
Thanks a lot
- Original Message -
From: "John W. Holmes" <[EMAIL PROTECTED]>
To: "Mike Mapsnac" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Saturday, April 10, 2004 10:34 AM
Subject: Re: [PHP] How to do this?


> Mike Mapsnac wrote:
> > My php page takes data from the database such as ID, Date, Value and
> > prints on the screen. About 20 entries are printed on the screen. The
> > each entry has option 'yes' or 'no'.
> >
> > So I need to gather the information about each entry and update
> > database. I cannot access the var

php-general Digest 10 Apr 2004 12:40:52 -0000 Issue 2697

2004-04-10 Thread php-general-digest-help

php-general Digest 10 Apr 2004 12:40:52 - Issue 2697

Topics (messages 183036 through 183065):

Re: List Admins
183036 by: -{ Rene Brehmer }-
183041 by: Elfyn McBratney

regular expressions
183037 by: René Fournier
183039 by: Richard Harb

Re: Looking for a comprehensive PHP tutorial
183038 by: -{ Rene Brehmer }-

Store e-mail in DB
183040 by: Michelle Konzack

Re: Serializing objects and storing them is sessions [fixed]
183042 by: Kelly Hallman
183051 by: Tom Rogers
183054 by: Kelly Hallman

Re: failure notice
183043 by: Elfyn McBratney

Re: What does MAX_FILE_SIZE do?
183044 by: Raditha Dissanayake

The Smarty Aftermath
183045 by: Justin French

Re: Finding value in multi-dimensional array - Solved
183046 by: Verdon Vaillancourt

require_once '../config.php'; doesn't work?
183047 by: Mike Zornek
183048 by: Jason Giangrande
183049 by: Richard Harb
183050 by: Marek Kilimajer

Re: Beginner Question
183052 by: Kris J. Hagel

Re: Beginner Question-Solution-packages
183053 by: rob

Re: writing a class in php to print form elements
183055 by: Don Read
183056 by: Andy B

stripping the query string from url
183057 by: Andy B

cleaning up html output from php in apache
183058 by: Merlin
183060 by: electroteque
183062 by: Merlin

mysqli
183059 by: electroteque

error with curl and PHP5 compile
183061 by: electroteque

Re: (new question on this) http referer
183063 by: Don Read

PHP5 and pear
183064 by: electroteque

php as cgi and module at same time
183065 by: Andy B

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
--- Begin Message ---
I'll second that ... keep getting this in response from them:

Thank you !!

Your message has been received; we will treat your message and get back to 
you as soon as possible.

Besides the fact that mailman more or less makes this list useless for me 
... this is just another annoyance...

Rene

At 16:19 09-04-2004, Ryan A wrote:
Please take out these two addresses:

"Information Desk" <[EMAIL PROTECTED]>
"Advance Credit Suisse Bank" <[EMAIL PROTECTED]>
everytime we post to the list we get their damn autoresponders.
--
Rene Brehmer
aka Metalbunny
~ If you don't like what I have to say ... don't read it ~

http://metalbunny.net/
References, tools, and other useful stuff...
Check out the new Metalbunny forums @ http://forums.metalbunny.net/
--- End Message ---
--- Begin Message ---
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

[postmaster@ added to Cc:]

Hello,

On Saturday 10 Apr 2004 00:39, -{ Rene Brehmer }- wrote:
> I'll second that ... keep getting this in response from them:
>
> Thank you !!
>
> Your message has been received; we will treat your message and get back to
> you as soon as possible.
>
> Besides the fact that mailman more or less makes this list useless for me
> ... this is just another annoyance...
>
> Rene
>
> At 16:19 09-04-2004, Ryan A wrote:
> >Please take out these two addresses:
> >
> >"Information Desk" <[EMAIL PROTECTED]>
> >"Advance Credit Suisse Bank" <[EMAIL PROTECTED]>
> >
> >everytime we post to the list we get their damn autoresponders.

Yes, postmaster, please do.  The spam mennaces hit me 10+ times on every post 
i make to php-general@ (yes, only three or four today :)

Thanks,
Elfyn

- -- 
Elfyn McBratney, EMCB
mailto:[EMAIL PROTECTED]
http://www.emcb.co.uk/

PGP Key ID: 0x456548B4
PGP Key Fingerprint:
  29D5 91BB 8748 7CC9 650F  31FE 6888 0C2A 4565 48B4

"When I say something, I put my name next to it." -- Isaac Jaffee

>> ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ <<
<< ~  Linux london 2.6.5-emcb-241 #2 i686 GNU/Linux  ~ >>
>> ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ <<
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFAd1HXaIgMKkVlSLQRAgKbAJ9e+ZnqP9f9iass0XkMjsxuxeWtcACgqdRU
WJRs+1YJWPcdvy1LvkJ6uVg=
=Q5Ir
-END PGP SIGNATURE-
--- End Message ---
--- Begin Message ---
I'm trying to 'clean up' some text that is extracted from a web 
directory, and I need to use (I think) preg_replace or ereg_replace, 
etc. I've read a bunch of tutorials, but none of them seem to cover the 
particular thing I want to do. Here's an example of text I need to 
process:

-

J.  Smith   ( More Info )
map
driving directions
add to My Directory
update or remove
Did you go to High School with J.  Smith?
 

php-general Digest 5 Apr 2004 09:24:06 -0000 Issue 2687

2004-04-05 Thread php-general-digest-help

php-general Digest 5 Apr 2004 09:24:06 - Issue 2687

Topics (messages 182300 through 182337):

\n is not working!
182300 by: Labunski
182302 by: Robert Cummings
182303 by: Monty
182306 by: DvDmanDT
182310 by: Chris Shiflett

$HTTP_SESSION_VARS still holds original values even after unset?
182301 by: Andy B
182304 by: John Holmes
182307 by: DvDmanDT
182308 by: Andy B
182309 by: Andy B
182311 by: Larry Brown
182312 by: DvDmanDT
182314 by: trlists.clayst.com
182315 by: Andy B
182317 by: John Holmes
182319 by: Andy B
182320 by: trlists.clayst.com
182321 by: Andy B
182327 by: Curt Zirzow

Re: Session hell: register_globals off
182305 by: DvDmanDT

Re: php as default "value" in html
182313 by: Larry Brown

[solved][PHP] php as default "value" in html
182316 by: Andy B

Sorting array of objects
182318 by: Richard Harb
182325 by: Tom Rogers

Re: session_exist() ?? Can this be done?
182322 by: Curt Zirzow
182323 by: Aaron Christopher Vonderhaar

Re: Regular Expressions
182324 by: Curt Zirzow

Weird variable issue encountered... help needed!
182326 by: gvarosky.conversent.com

Mail sending from nobody to nobody...
182328 by: Jonathan Villa
182329 by: hitek
182330 by: Jonathan Villa
182335 by: hitek

Re: mysql - can't use the copy/paste function
182331 by: Burhan Khalid

Re: Extracting Output from File...
182332 by: Burhan Khalid

Passing array as subject to preg_replace has odd behaviour with limit
182333 by: Leon Derczynski

Re: code design? modular?
182334 by: Justin French

How to built desktop applications.
182336 by: francesco.automationsoft.biz
182337 by: Red Wingate

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 ---
\n isn't working properly.

Why do this line $new_topic = $post_0.'|'.$post_1.'|'.'$post_2\n'; writes to
the document
one|two|three\n
but not
one|two|three (and break)



whole code:

if ($a=="new"){
$post_0 = $_POST["one"];
$post_1 = $_POST["two"];
$post_2 = $_POST["three"];
 if ($post_1 !=""){
 if ($post_2 !=""){
$m_fails=fopen('../data/menu.txt','a');
$new_topic = $post_0.'|'.$post_1.'|'.'$post_2\n';
fwrite($m_fails,$new_topic);
fclose($m_fails);
}}
}
--- End Message ---
--- Begin Message ---
On Sun, 2004-04-04 at 17:58, Labunski wrote:
> \n isn't working properly.
> 
> Why do this line $new_topic = $post_0.'|'.$post_1.'|'.'$post_2\n'; writes to
> the document
> one|two|three\n
> but not
> one|two|three (and break)

Because it's in single quotes versus a double quotes.

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'
--- End Message ---
--- Begin Message ---
\n must be included in double-quotes because it's treated like a variable.

echo "This works\n";  // Displays: This works

echo "This doesn't work\n';  // Displays: This doesn't work\n


> From: [EMAIL PROTECTED] (Labunski)
> Newsgroups: php.general
> Date: Mon, 5 Apr 2004 00:58:35 +0300
> To: [EMAIL PROTECTED]
> Subject: \n is not working!
> 
> \n isn't working properly.
> 
> Why do this line $new_topic = $post_0.'|'.$post_1.'|'.'$post_2\n'; writes to
> the document
> one|two|three\n
> but not
> one|two|three (and break)
> 
> 
> 
> whole code:
> 
> if ($a=="new"){
> $post_0 = $_POST["one"];
> $post_1 = $_POST["two"];
> $post_2 = $_POST["three"];
> if ($post_1 !=""){
> if ($post_2 !=""){
> $m_fails=fopen('../data/menu.txt','a');
> $new_topic = $post_0.'|'.$post_1.'|'.'$post_2\n';
> fwrite($m_fails,$new_topic);
> fclose($m_fails);
> }}
> }
--- End Message ---
--- 

php-general Digest 4 Apr 2004 21:11:59 -0000 Issue 2686

2004-04-04 Thread php-general-digest-help

php-general Digest 4 Apr 2004 21:11:59 - Issue 2686

Topics (messages 182272 through 182299):

Re: how to reset PHP_AUTH vars
182272 by: Burhan Khalid
182276 by: Nitin Mehta
182278 by: Martin Oettinger

Intermittent problem with Session Variable and IE6
182273 by: beetroot
182277 by: Tom Rogers

Re: email viruses
182274 by: Jason Wong

Re: looping through an array
182275 by: Jason Wong

php as default "value" in html
182279 by: Andy B
182280 by: Mark
182282 by: Andy B
182284 by: John Holmes
182286 by: Andy B
182288 by: John Holmes
182289 by: Jason Wong
182292 by: Andy B

Problem with script halting
182281 by: Nathan Croker
182283 by: John Holmes
182285 by: Nathan Croker
182290 by: Jason Wong

double require_once("string")
182287 by: Kazuumi TASHIRO
182291 by: Jason Wong
182294 by: Kazuumi TASHIRO

session_exist() ?? Can this be done?
182293 by: Monty

Re: Session hell: register_globals off
182295 by: Randall Perry
182298 by: Randall Perry
182299 by: trlists.clayst.com

Regular Expressions
182296 by: Matt Palermo

Using PDFLib
182297 by: Nathan Mealey

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 ---
Nitin Mehta wrote:
Hello,

Thanks for your reply. but what I'm looking for is, yes logoff the user, but
not making him/her click some link. I've this page and I want it to ask for
username & password whenever a user comes/comes back. Any suggestions?
I believe this is the default behavior, unless the user saves the 
credentials locally.
--- End Message ---
--- Begin Message ---
but it's not happening.

- Original Message - 
From: "Burhan Khalid" <[EMAIL PROTECTED]>
To: "Nitin Mehta" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, April 04, 2004 1:58 PM
Subject: Re: [PHP] how to reset PHP_AUTH vars


> Nitin Mehta wrote:
> > Hello,
> >
> > Thanks for your reply. but what I'm looking for is, yes logoff the user,
but
> > not making him/her click some link. I've this page and I want it to ask
for
> > username & password whenever a user comes/comes back. Any suggestions?
>
> I believe this is the default behavior, unless the user saves the
> credentials locally.
>
--- End Message ---
--- Begin Message ---
Another solution to clean the browser auth cache is to close the browser; a
javscript function exists as well

"Nitin Mehta" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]
> but it's not happening.
>
> - Original Message - 
> From: "Burhan Khalid" <[EMAIL PROTECTED]>
> To: "Nitin Mehta" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Sunday, April 04, 2004 1:58 PM
> Subject: Re: [PHP] how to reset PHP_AUTH vars
>
>
> > Nitin Mehta wrote:
> > > Hello,
> > >
> > > Thanks for your reply. but what I'm looking for is, yes logoff the
user,
> but
> > > not making him/her click some link. I've this page and I want it to
ask
> for
> > > username & password whenever a user comes/comes back. Any suggestions?
> >
> > I believe this is the default behavior, unless the user saves the
> > credentials locally.
> >
--- End Message ---
--- Begin Message ---
I have a php app that is in the final stages of testing and has been tested
by over 30 separate users.

One of the testers is having an intermittent problem which seems to be
caused by a session variable not being read properly in about 1 in 3
requests - the variable is getting set correctly in the session temp file.

This bug only occurs when using IE6 (XP SP2) on this particular machine, it
does not occur when using Netscape7.1 on the same machine.

It occurs when testing against the main server Linux/Apache 1.3.29/PHP4.2.3
and against my dev machine Win2k/Apache 2/PHP4.3.4

None of the other testers seemed to experience the same problem.

Has anybody seen anything similar or know of any possible causes?
--- End Message ---
--- Begin Message ---
Hi,

Sunday, April 4, 2004, 9:11:08 PM, you wrote:
b> I have a php app that is in the final stages of testing and has been tested
b> by over 30 separate users.

b> One of the testers is having an intermittent problem which seems to be
b> caused by a session variable not being read properly in about 1 in 3
b> requests - the variable is getting set correctly in the session temp file.

b> This bug

php-general Digest 4 Apr 2004 08:26:36 -0000 Issue 2685

2004-04-04 Thread php-general-digest-help

php-general Digest 4 Apr 2004 08:26:36 - Issue 2685

Topics (messages 182255 through 182271):

Re: passing variables
182255 by: Larry E. Ullman

Message ("Your message dated Sat, 3 Apr 2004 19:18:13 +0200...")
182256 by: L-Soft list server at America Online, Inc. (1.8e)

email viruses
182257 by: Andy B

Re: Flash MX
182258 by: Michal Migurski

Keep HTML tags, but strip attributes
182259 by: Matt Palermo
182260 by: Jochem Maas
182263 by: Jochem Maas
182264 by: Matt Palermo
182265 by: Red Wingate
182266 by: Matt Palermo

checking for existance of $_SESSION variables
182261 by: Andy B
182262 by: Red Wingate

Array_keys problem
182267 by: Robin 'Sparky' Kopetzky
182271 by: Burhan Khalid

looping through an array
182268 by: Andy B

Re: Suddenly some errors are coming
182269 by: Kim Steinhaug
182270 by: Manisha Sathe

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 ---
When using a link like xxx.proceed.php?language=gbr
the 'proceed.php' script does not receive any $language variable.
Does someone know how to get it run?
This is a register_globals issue. Refer to $_GET['language'] instead of 
just language. Or, at the top of your script, add
$language = $_GET['language'];
and you shouldn't have to change anything else.

See the manual for $_GET and $_POST for more information.

Larry
--- End Message ---
--- Begin Message ---
Your message dated Sat, 3 Apr 2004 19:18:13 +0200 with subject "Re: Mail
Authentification" has been  submitted to the moderator of  the WOC list:
[EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
hi...

i know this is a little ot but in an attempt to keep viruses off the list (i think) 
somebody/something is forging an email in my name to the php mailing list as well as 
mysql mailing list along with a few others. i get a message something like this:

"your message titled: submit your authentication here... has been sent to (whatever 
mailing list it sent to)"

does anybody know about this sort of thing? and if so how to get rid of it?

tnx and sorry for the ot thing

--- End Message ---
--- Begin Message ---
>> I have to send data to flash. Should i use the "urlencode()" or the
>> "rawurlencode()" function to encode the data?
>
>If you are going to be doing this a lot, you should take a look at
>AMFPHP, Flash Remoting for PHP, at
>http://sourceforge.net/projects/amfphp/
>
>This seems to be a fast, reliable way to send data back and forth between
>your server and your Flash client.

I have heard rumors that remoting is supposed to be "deprecated" in the
next revision of flash, but I'm not sure how reliable those reports are.
Remoting with AMFPHP is speedy and easy, but you may be a little better
off using XML - it's definitely chatty, but the API is stable on both
sides, and there's no reverse-engineering voodoo associated with it.

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html
--- End Message ---
--- Begin Message ---
I am building a system which allows users to post data.  I want to allow
them to use ONLY certain tags such as , , , , , ,
etc...  I want to allow them to use only these, and then strip out ALL
attributes inside the tags.  So if they input something like ,
it would switch it to just .  Anyone know of a way this can be done?

Thanks,

Matt Palermo
http://sweetphp.com
--- End Message ---
--- Begin Message ---
Matt Palermo wrote:

I am building a system which allows users to post data.  I want to allow
them to use ONLY certain tags such as , , , , , ,
etc...  I want to allow them to use only these, and then strip out ALL
attributes inside the tags.  So if they input something like ,
it would switch it to just .  Anyone know of a way this can be done?
regular expressions, heres an example:



$input = 'this is some bad HTML';
echo "{$input}\n";
$input = preg_replace('/<\/?[^pbiu\/][^>]*>/', '', $input);
echo "{$input}\n";
$input = preg_replace('/<([pbiu])[^>]*>/', '<\1>', $input);
echo "{$input}\n";
$input = str_replace('bad', 'good', $input);
echo "{$input}\n";
?>

you might also think about stripping 

php-general Digest 3 Apr 2004 16:15:45 -0000 Issue 2684

2004-04-03 Thread php-general-digest-help

php-general Digest 3 Apr 2004 16:15:45 - Issue 2684

Topics (messages 182235 through 182254):

Re: Global $_FILEs
182235 by: Jason Wong

Re: Problem sending with mail()
182236 by: Jason Wong

Re: php email functionality
182237 by: Jason Wong
182242 by: Burhan Khalid

Re: I can't view files uploaded with PHP
182238 by: Jason Wong

Re: Apache version... 1.3.29 vs 2.0.
182239 by: Jason Wong

Re: Relative Url
182240 by: K.Bogac Bokeer

Re: Configuration Variable user_agent
182241 by: Burhan Khalid

how to reset PHP_AUTH vars
182243 by: Nitin Mehta
182247 by: Marek Kilimajer
182249 by: Nitin Mehta

php_admin_value's from httpd.conf Override'd in .htaccess files
182244 by: Juan Velasquez
182248 by: Marek Kilimajer

Apache2.x and php4.x
182245 by: Merlin
182246 by: Burhan Khalid
182251 by: Lester Caine

Installing php with curl and sablotron
182250 by: Merlin

compiling php with sablot and curl
182252 by: Merlin

Suddenly some errors are coming
182253 by: Manisha Sathe

passing variables
182254 by: klaus

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 ---
On Saturday 03 April 2004 05:50, Bruno Santos wrote:

> i've tried to pass the global array $_FILES to a function

$_FILES is a superglobal and hence available everywhere (including the inside 
of functions) without any work on your part.

> but still no sucess...

Please elaborate.

> can someone help me ??

Only if you can provide some details:

1) State what you're trying to do
2) Show the code that you're using
3) State what you expect the code to do
4) State what the code is actually doing

If (3) and (4) are different then:
 
 i) Enable full error reporting and study any error messages you get
ii) Use print_r() and var_dump() to examine all your variables.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
A king's castle is his home.
*/
--- End Message ---
--- Begin Message ---
On Saturday 03 April 2004 03:35, Matt MacLeod wrote:

> I'm stumped. I have a script to send a simple email using the mail()
> function in PHP.
>
> For some reason I can only receive the email if I send it to my hotmail
> account. If I send to my regular email ([EMAIL PROTECTED]) I can't get
> it. I've also tried sending to other non-hotmail addresses with no
> luck.

What does the php error logs say?
And your mail logs?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
----------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
If the human brain were so simple that we could understand it,
we would be so simple we couldn't.
*/
--- End Message ---
--- Begin Message ---
On Saturday 03 April 2004 00:59, Shawn Beard wrote:
> I just tried downgrading to version 4.3.4 and it still does not work.

And presumably it had worked before you did the upgrade? The tone of your 
original post suggested that the upgrade broke the mail functionality?

Again:

> Are you positive you have made no other changes to your setup whilst
> upgrading php?

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Murphy's Law is recursive.  Washing your car to make it rain doesn't work.
*/
--- End Message ---
--- Begin Message ---
Shawn Beard wrote:
I just upgraded to PHP 4.3.5 and now my email functionality does not work.  I do have the SMTP setting in the php.ini set up and did restart Apache. We are running a Windows 2000 server and Apache 2.0.49.   Any ideas?
A few ideas/suggestions :

Does your smtp server require authentication before sending? If so, the 
default mail() function in PHP can't handle SMTP authentication.  Could 
be that it changed since your upgrade.

Does turning up the error_reporting level (E_ALL) print any 
warnings/notices?

C

php-general Digest 29 Mar 2004 12:07:16 -0000 Issue 2674

2004-03-29 Thread php-general-digest-help

php-general Digest 29 Mar 2004 12:07:16 - Issue 2674

Topics (messages 181639 through 181649):

Accessing HTTP Content
181639 by: Quentin Bennett
181648 by: Burhan Khalid

How to send SMS
181640 by: saepudin
181642 by: Jake McHenry
181643 by: Evan Nemerson

preg_match
181641 by: Jason Williard
181644 by: Tim Traver

reg expression for ide-emails
181645 by: Robert Kornfeld
181649 by: John W. Holmes

Re: plz help
181646 by: CurlyBraces Technologies \( Pvt \) Ltd

Re: $$$wanna make real money$$$..you will no longer need student loans
181647 by: Andrew Fenn

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 ---
Hi,
 
Is this possible, please?
 
What I want to do is, using an HTTP class, 
 
   $myComms = new Ihttp_base_class(&$httpParams);
   $myComms->request = $some_document;
   $myComms->requrl = "/mysite/myscript.php";
   $myComms->Send();
 
"myscript.php" runs within the same Apache server, processes some_document, and 
returns an HTTP response. PHP is running as an Apache module, not CGI.
 
Within myscript.php, I can 'getallheaders()' to access the HTTP headers, but I want to 
access the contents of $some_document - i.e. the content portion of the HTTP message.
 
$some_document can't be sent as a GET/POST variable, as it exceeds the limitations on 
those.
 
Any advice would be appreciated.
 
Quentin Bennett

 

The information contained in this email is privileged and confidential and
intended for the addressee only. If you are not the intended recipient, you
are asked to respect that confidentiality and not disclose, copy or make use
of its contents. If received in error you are asked to destroy this email
and contact the sender immediately. Your assistance is appreciated.
--- End Message ---
--- Begin Message ---
Quentin Bennett wrote:
Hi,
 
Is this possible, please?
 
What I want to do is, using an HTTP class, 
 
   $myComms = new Ihttp_base_class(&$httpParams);
   $myComms->request = $some_document;
   $myComms->requrl = "/mysite/myscript.php";
   $myComms->Send();
 
"myscript.php" runs within the same Apache server, processes some_document, and returns an HTTP response. PHP is running as an Apache module, not CGI.
 
Within myscript.php, I can 'getallheaders()' to access the HTTP headers, but I want to access the contents of $some_document - i.e. the content portion of the HTTP message.
 
$some_document can't be sent as a GET/POST variable, as it exceeds the limitations on those.
Have you considered using something like Snoopy?
http://snoopy.sf.net
Could be worth a try.
--- End Message ---
--- Begin Message ---
How to send sms with PHP and Mysql  and mobil phone Nokia 5110?
--- End Message ---
--- Begin Message ---
I have one of my scripts set up to just send an email to the sms email
address that ATT provides me. Verizon also does this. Not sure about the
rest. The phone provider then changes from email to whatever the phone
understands

Jake


- Original Message - 
From: "saepudin" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 29, 2004 12:49 PM
Subject: [PHP] How to send SMS


> How to send sms with PHP and Mysql  and mobil phone Nokia 5110?
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
You can send through OSCAR (AIM/ICQ), too. With a bit of clever hacking, you 
could connect GAIM to PHP and live happily ever after.



On Sunday 28 March 2004 08:14 pm, Jake McHenry wrote:
> I have one of my scripts set up to just send an email to the sms email
> address that ATT provides me. Verizon also does this. Not sure about the
> rest. The phone provider then changes from email to whatever the phone
> understands
>
> Jake
>
>
> - Original Message -
> From: "saepudin" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, March 29, 2004 12:49 PM
> Subject: [PHP] How to send SMS
>
> > How to send sms with PHP and Mysql  and mobil phone Nokia 5110?
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php

-- 
Evan Nemerson
[EMAIL PROTECTED]
http://coeusgroup.com/en

--
"If anyone can show me, and prove to me, that I am wrong in thought or deed, I 
will gladly change. I seek the truth, which never yet hurt anybody. It is 
only persistence in self-delusion and ignorance which does harm."

-Marcus Aurelius
--- End Message ---
--- Begin Messag

php-general Digest 28 Mar 2004 22:22:13 -0000 Issue 2673

2004-03-28 Thread php-general-digest-help

php-general Digest 28 Mar 2004 22:22:13 - Issue 2673

Topics (messages 181626 through 181638):

Error: `phpize' failed?
181626 by: Johannes Tyra

Re: slow script
181627 by: Marek Kilimajer

PHP 4.2.3 || Can't unset $_SESSION!
181628 by: CF High
181634 by: DvDmanDT

plz help
181629 by: CurlyBraces Technologies \( Pvt \) Ltd

Re: PHP5RC1 Windows problem
181630 by: Hemp Cluster

Newbie question on arrays
181631 by: Willem van der Scheun
181632 by: ma.siebeneicher.gmx.de

$$$wanna make real money$$$..you will no longer need student loans
181633 by: theeb

Newbie question on  Array
181635 by: carlson.ngwa.ch
181636 by: DvDmanDT
181638 by: Jason Wong

proc_open child pipes ignoring stream_set_blocking()
181637 by: Jason Donald

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 ---
Hi...
while installing the PEAR Package SQLite the following Error accours:

www:~ # pear install SQLite
downloading SQLite-1.0.2.tgz ...
...done: 362,412 bytes
51 source files, building
running: phpize
`phpize' failed

Anyone who could help??

--
Mit freundlichem Gruß, Greetz...

| Johannes Tyra
--- End Message ---
--- Begin Message ---
Luis Gustavo Faccioni Barcellos wrote:
We notice that while the php is 
running, anything happens and suddenly(after ~70 seconds) the page 
arises. 
Do you have gzcompression enabled in apache or php? If so, disable it, 
it is useless for localhost requests.
--- End Message ---
--- Begin Message ---
Hey all.

Strange problem here.

I'm running on apache 1.3.26 & php 4.2.3.

In a test page, test1.php, I set $_SESSION['checker'] = 1;

In another test page, test2.php, I unset($_SESSION['checker']);

When I print_r($_SESSION) in test1.php, $_SESSION['checker'] is still set &
still equals 1!

I've tried session_unregister($checker),
session_unregister($_SESSION['checker']), unset($checker), etc. -- none of
them unset this particular session var.  Very strange behavior.
Interestingly, I can set $_SESSION['checker'] = 0 (instead of 1) in
test2.php & that works fine when I print_r($_SESSION) in test1.php.

Any clues as to why this might be happening?

FYI, register globals is set to ON.

Let me know if you need further details.

TIA,

--Noah



--
--- End Message ---
--- Begin Message ---
It should be
unset($_SESSION['checker']);

try to use var_dump($_SESSSION); on another page, called test3.php, and let
us know what happends..

also, I hope you remember to use session_start(); and no
session_write_close(); on test2.php..

Otherwise, please mail me the files: dvdmandt at telia dot com...
-- 
// DvDmanDT
MSN: dvdmandt¤hotmail.com
Mail: dvdmandt¤telia.com
"Cf High" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> Hey all.
>
> Strange problem here.
>
> I'm running on apache 1.3.26 & php 4.2.3.
>
> In a test page, test1.php, I set $_SESSION['checker'] = 1;
>
> In another test page, test2.php, I unset($_SESSION['checker']);
>
> When I print_r($_SESSION) in test1.php, $_SESSION['checker'] is still set
&
> still equals 1!
>
> I've tried session_unregister($checker),
> session_unregister($_SESSION['checker']), unset($checker), etc. -- none of
> them unset this particular session var.  Very strange behavior.
> Interestingly, I can set $_SESSION['checker'] = 0 (instead of 1) in
> test2.php & that works fine when I print_r($_SESSION) in test1.php.
>
> Any clues as to why this might be happening?
>
> FYI, register globals is set to ON.
>
> Let me know if you need further details.
>
> TIA,
>
> --Noah
>
>
>
> --
--- End Message ---
--- Begin Message ---



hi , 
 
i have an apache web server in linux . Those php 
scripts runs in that pc. Mean while another perl scrips runs associate with that 
php scripts . altogether they develop a out put and store in the mysql 
database.That process perfectly running.There is no any dout.
Once this web server started , no body can access 
this machine directly . This machnie is behind the firewall . This machnie 
assingned as a web server . That's mean all the ports has been blocked by the 
firewall except port 80 ( this web server running under port 80 ). ping also has 
been blocked.
That certain url can access from any other out side 
pcs. 
Some request handling purpose i want to stop that 
perl script where it is runing in the web server . But from the web server we do 
it ctrl+c perl.pl
I want to do this through the web 
browser.
wh

php-general Digest 28 Mar 2004 09:29:14 -0000 Issue 2672

2004-03-28 Thread php-general-digest-help

php-general Digest 28 Mar 2004 09:29:14 - Issue 2672

Topics (messages 181617 through 181625):

Convert string and char in unicode format
181617 by: edwardspl.ita.org.mo

slow script
181618 by: Luis Gustavo Faccioni Barcellos
181619 by: electroteque
181620 by: Galen

Measurement Problem
181621 by: Karl Timmermann
181623 by: Jim Kaufman
181624 by: Galen

mysql table field choices
181622 by: Andy B

Re: isset() and !=NULL
181625 by: Dimiter Naydenov

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 ---
Dear All,

How to control php / freetds to convert data ( query / insert )  to
unicode format ?

Thank for you rhelp !

Edward.
--- End Message ---
--- Begin Message ---
Hi all. 

I am developing a system using php 4.3.2 + apache 1.3.29. The db is a mssql 
msde (we’re going to mysql, but not yet due to some internal reasons). All 
things are running in a local, standalone station, because we had to use the 
app on line and off line states. The off-line one should have all stuff, so. 
It just connect to internet to send a data replication. The stations are 
windows 98. 

The problem is: I have to run this stuff in small boxes, like some pentium 
200mhz with 64-80mb ram, and in these machines the system is very slow. The 
html page takes about 70 seconds to be showed in the browser. I saw cpu and 
ram, and are all normal, even the mssql. Just the apache activity goes up to 
70% cpu. We notice that while the php is running, anything happens and 
suddenly(after ~70 seconds) the page arises. Our php code is a kind of big, 
about 160kb, and the html is generated equally big. I am going to break the 
jscript stuff it in some small peaces, but will not help to much, I guess. 

Well, if someboddy could point out me a way, a tip or a tool to discover 
what the script is doing while I am waiting its response, or just an ideia, 
I would really thank you. 

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

> 200mhz with 64-80mb ram, and in these machines the system is very 
> slow. 

Sorry dude you just answered your question.

Also aparantly ODBC is slow.
--- End Message ---
--- Begin Message ---
Gustavo,

1) Read the manual - though I can understand how you might have missed 
this:
http://us2.php.net/manual/en/function.microtime.php

Basically, there's a function based on microtime that does 
benchmarking. This is vital to timing your script. Use it extensively. 
If you're not sure where to start, break your script into chunks and 
figure out where most of your time is being spent.

2) Evaluate where time is being spent. If it's on database-access-bound 
portions, not a lot you can do from the PHP-end.

3) Evaluate the remainder of your code. In many tight loops (many 
iterations, not a lot of actual processing per iteration), particularly 
those modifying arrays, I get much better performance using while() or 
for() loops instead of foreach() generally. Obviously, this isn't 
always applicable, but I have found few ways to optimize GD image 
manipulations while I've found plenty for tight loops, so I'm only 
giving you suggestions on what I know.

4) Consider some overall performance enhancing stuff. Like the Zend 
Optimizer (free) which can sometimes help a lot, sometimes not at all. 
Also I'd say turckmmcache or something like that, but I'm pretty sure 
there's no Windows 98 version.

5) Evaluate your code. 160 KB (kilobytes, I'm assuming) is a pretty 
huge amount of PHP code for data replication. I hope that lots of it is 
content-type things and not all PHP commands, otherwise I would guess 
(though I could be wrong - some applications are very complex) that you 
are not coding efficiently. Very few of my projects even approach 160 
KB of pure PHP, even things as massive as a complete online store 
creation and management application I developed not too long ago.

Good luck! Re-post to php-general if you have further questions!

-Galen

On Mar 27, 2004, at 1:43 PM, Luis Gustavo Faccioni Barcellos wrote:

Hi all.
I am developing a system using php 4.3.2 + apache 1.3.29. The db is a 
mssql msde (we’re going to mysql, but not yet due to some internal 
reasons). All things are running in a local, standalone station, 
because we had to use the app on line and off line states. The 
off-line one should have all stuff, so. It just connect to internet to 
send a data replication. The stations are windows 98.
The problem is: I have to run this stuff in small boxes, like some 
pentium 200mhz with 64-80mb ram, and in these machines the system is 
very slow. The html page takes about 70 seconds to be showed in the 
browser. I saw cpu and ram, and are all n

php-general Digest 27 Mar 2004 17:38:21 -0000 Issue 2671

2004-03-27 Thread php-general-digest-help

php-general Digest 27 Mar 2004 17:38:21 - Issue 2671

Topics (messages 181605 through 181616):

REsource Identifier( PHP_MYSQL)
181605 by: Gimic
181606 by: David Robley
181607 by: Burhan Khalid
181609 by: Gimic
181610 by: Burhan Khalid

Re: simple, but missing something?
181608 by: Burhan Khalid

PHP5RC1 Windows problem
181611 by: Aidan Lister

Re: multi-dim array from text file
181612 by: Burhan Khalid

4.3.5 compiler error
181613 by: Jan Urbansky

Re: Can't to insert data ( via variable ) into MS-SQL
181614 by: Rob Adams
181616 by: edwardspl.ita.org.mo

Re: Local sysadmin DFW needed
181615 by: Don Read

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 ---
Hey y'all, I'm having problems trying to get the
MySql_Query() function to return the resource ID when using a $string as the
argument to pass to it. It returns when I hard code the argument but not the
string.  Any ideas?  here is what the function looks like:

function GetVals() {
$db = mysql_connect("localhost", "root");
$str_Query=("Select * from " . $subject);

mysql_select_db("books",$db);

$result = mysql_query($str_Query);
echo $result;

}
but when I use the query:
$result=mysql_query("Select * from math") it works.  Am I setting my string
up wrong?  Because it's not running into any errors when I do this.
--- End Message ---
--- Begin Message ---
[EMAIL PROTECTED] (Gimic) wrote in
news:[EMAIL PROTECTED]: 

> Hey y'all, I'm having problems trying to get the
> MySql_Query() function to return the resource ID when using a $string
> as the argument to pass to it. It returns when I hard code the
> argument but not the string.  Any ideas?  here is what the function
> looks like: 
> 
> function GetVals() {
> $db = mysql_connect("localhost", "root");
> $str_Query=("Select * from " . $subject);
> 
> mysql_select_db("books",$db);
> 
> $result = mysql_query($str_Query);
> echo $result;
> 
> }
> but when I use the query:
> $result=mysql_query("Select * from math") it works.  Am I setting my
> string up wrong?  Because it's not running into any errors when I do
> this. 
> 

The string $subject is almost certainly empty, as it is not passed as an 
argument to the function, nor is it declared global in the function. Try a 
little debugging, echoing your query and the output of mysql_error. For 
example:

function GetVals() {
$db = mysql_connect("localhost", "root");
$str_Query=("Select * from " . $subject);

mysql_select_db("books",$db);

$result = mysql_query($str_Query);
echo "Query: $str_query".mysql_error();
echo $result;
}

Then either pass $subject as an argument to the function, or declare it 
global within the function.

Lastly, if $string is passed from another script, make sure it is populated 
via the GET or POST globals.
--- End Message ---
--- Begin Message ---
Gimic wrote:
Hey y'all, I'm having problems trying to get the
MySql_Query() function to return the resource ID when using a $string as the
argument to pass to it. It returns when I hard code the argument but not the
string.  Any ideas?  here is what the function looks like:
function GetVals() {
$db = mysql_connect("localhost", "root");
$str_Query=("Select * from " . $subject);
mysql_select_db("books",$db);

$result = mysql_query($str_Query);
echo $result;
}
but when I use the query:
$result=mysql_query("Select * from math") it works.  Am I setting my string
up wrong?  Because it's not running into any errors when I do this.
First thing, how would you know if it was returning any errors or not? 
Try mysql_errno() and mysql_error().

Secondly, I suspect that your "string" is not what you think.

print_r($str_Query); and see what its giving you.
--- End Message ---
--- Begin Message ---
The entire script looks like this:

Where the name of the table is stored in the $_POST varible.  The string
isn't empty, yet it is empty.  It may be a bug... Or do any of you see any
problem with my varible scope? because I don't.
"Gimic" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hey y'all, I'm having problems trying to get the
> MySql_Query() function to return the resource ID when using a $string as
the
> argument to pass to it. It returns when I hard code the argument but not
the
> string.  Any ideas?  here is what the function looks like:
>
> function GetVals() {
> $db = 

php-general Digest 26 Mar 2004 17:09:53 -0000 Issue 2669

2004-03-26 Thread php-general-digest-help

php-general Digest 26 Mar 2004 17:09:53 - Issue 2669

Topics (messages 181542 through 181565):

Re: Methods for creating HTML with PHP
181542 by: electroteque

Imap functions (imap_fetchstructure)
181543 by: Daryl Meese

Re: an if statement
181544 by: David Robley

Re: Local sysadmin DFW needed
181545 by: David Robley
181551 by: Roger Spears

Re: PHP and GD
181546 by: Patrik Fomin

Re: Header Redirect & POST
181547 by: Ford, Mike   [LSS]

Re: $_POST not working with str_replace
181548 by: Ford, Mike   [LSS]

curl problem
181549 by: Hodicska Gergely

Re: question about M. Lemos's HTML forms generation and validation
181550 by: dr. zoidberg

Re: Ereg problems
181552 by: Jeff McKeon

PHP 4.3.5 Released
181553 by: Ilia Alshanetsky

problem with archives zip
181554 by: German

saving as .XLS
181555 by: jon
181557 by: Daniel Purdy
181565 by: Justin Patrin

sprintf troubles
181556 by: Chris Thomas

Connection with MS-SQL
181558 by: edwardspl.ita.org.mo

Can't to insert data ( via variable ) into MS-SQL
181559 by: edwardspl.ita.org.mo

check for special characters...
181560 by: Chris Mach
181564 by: John W. Holmes

multi-dim array from text file
181561 by: Larry Pisani

Apache 2 w/ PHP database sessions
181562 by: Christopher Ditty
181563 by: Chris Shiflett

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
--- Begin Message ---
I'm using this one with no problems, its actually quite fast

http://pukomuko.esu.lt/phemplate/

there is a benchmark against smarty aswell, i was actually thinking of going
the smarty path as so many php apps use it, what is the better of them ,
anyone using this class ?

> -Original Message-
> From: Justin French [mailto:[EMAIL PROTECTED]
> Sent: Friday, March 26, 2004 2:11 PM
> To: Resell Domain Names
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Re: Methods for creating HTML with PHP
>
>
> On Friday, March 26, 2004, at 04:47  AM, Resell Domain Names wrote:
>
> > Why not use Smarty or another template engine? (http://smarty.php.net/)
>
> Smarty has a lot of overhead.  PHP is a perfectly good templating
> engine all by itself.
>
> What the OP may or may not have understood is that PHP and HTML can be
> mixed together:
>
> ---
> 
>   
>   
>   
>   
>   
> 
> ---
>
> As for Smarty, well, anything it can do, PHP can do better and faster,
> without the overhead :)
>
> ---
> 
> {section name=mysec loop=$name}
> {strip}
> 
>{$name[mysec]}
> 
> {/strip}
> {/section}
> 
> ---
>
> Could just as easily be:
>
> ---
> 
>   
>   
>   
>   
>   
> 
> ---
>
> Alternating table row colours?  I just slapped this together in about 1
> minute -- I'm sure with a little more work (or a class), I could keep
> it all out of the global name space too!
>
> ---
>  function alternator($val1,$val2,$name='alternator')
>   {
>   // initialise or increment the global counter
>   // called ${$name}_counter
>   if(!isset($GLOBALS["{$name}_counter"]))
>   { $GLOBALS["{$name}_counter"] = 1; }
>   else
>   { $GLOBALS["{$name}_counter"]++; }
>
>   // set ${name} in the global space to either
>   // $val1 or $val2, depending on the odd/even
>   // state of the counter
>   if(is_int($GLOBALS["{$name}_counter"] / 2))
>   { $GLOBALS[$name] = $val1; }
>   else
>   { $GLOBALS[$name] = $val2; }
>   }
> $names = array('Fred','Jane','Bob','Kate','Hank','Nicole');
> ?>
>
> 
>   
>   
>   
>   
>   
>   
> 
>
>
> And when you hit a wall in Smarty, you can't do much other than request
> a new feature... in PHP, just code it!  You also don't have to learn
> YET ANOTHER syntax/language, you don't have to compile templates
>
> Smarty's forte (and it's downfall) is that it limits what you can do.
> On one hand, you're not letting untrusted on unskilled template
> designers loose with the full features of PHP, but on the other hand,
> when a skilled template designer with PHP experience hits a
> &

php-general Digest 23 Mar 2004 13:33:36 -0000 Issue 2663

2004-03-23 Thread php-general-digest-help

php-general Digest 23 Mar 2004 13:33:36 - Issue 2663

Topics (messages 181215 through 181251):

Re: Passing by conditional IF statement...why?
181215 by: Ligaya Turmelle
181217 by: Daniel Guerrier
181219 by: Ryan A
181221 by: John W. Holmes
181224 by: Ryan A

Re: Any Ideas?
181216 by: John W. Holmes

PHP5 Release
181218 by: daniel.electroteque.org
181227 by: Yann Larrivee

Re: PHP installation problem in FreeBSD OS.
181220 by: Filip de Waard

Image Storage
181222 by: Matt Palermo
181223 by: Michal Migurski
181237 by: James Coder

Re: SQL Injection check (mysql)
181225 by: trlists.clayst.com

Re: RE:[PHP] sessions...how to use not clear?
181226 by: trlists.clayst.com

an if statement
181228 by: Andy B
181229 by: John W. Holmes
181232 by: Andy B
181234 by: Evgeny Pedya

Unable connect to ORACLE
181230 by: Timotius

Ticketing system
181231 by: daniel.electroteque.org
181242 by: Henry Grech-Cini

mysql_connect error
181233 by: T UmaShankari
181235 by: php-general.lists.php.net

Constants
181236 by: Jakes
181250 by: Jay Blanchard

$x <> base64_decode(base64_encode($x)) for imagecreatefromstring
181238 by: James Coder

php and email
181239 by: Steven Mac Intye
181240 by: Jakes

Re: [GLUG-chat] Re: email form
181241 by: Steven Mac Intye

syntax for printing multi-dimensional arrays
181243 by: Bob Pillford
181244 by: Bob Pillford
181245 by: Tom Rogers

Java script prompt - help
181246 by: Brent Clark

PHPSESSID in passthru
181247 by: Guillouet Nicolas

string to float
181248 by: Diana Castillo
181251 by: Jay Blanchard

Re: receiving ndr for each email sent to list
181249 by: Jay Blanchard

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
--- Begin Message ---
I think it is because the query ran successfully and returns an empty set.
So the pointer is still good.

Respectfully,
Ligaya Turmelle


"Ryan A" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
> I have this simple code in my php script:
>
> * * * * *
> $res = mysql_query("SELECT product_id, now()-1 FROM ".$tc."_prods where
> cno=$cno AND product_id='$product_id' LIMIT 1");
>
> if($res)
>  {
>  $r = mysql_fetch_row($res);
>  $product_id2   = $r[0];
>  $th_pres= $r[1];
> echo "debug echo";
>  }else {echo "No results, sorry";}
> * * * * *
>
> its working great when the data actually exists but when there are no
> matches it still executes the "if($res)" part instead of
> displaying "No results, sorry".
> Why is that? or am I using the syntax wrong?
>
> Thanks,
> -Ryan
--- End Message ---
--- Begin Message ---
if(mysql_num_rows($res))

returns count of rows returned.
if it 0 is false so it shouldn't execute the
conditional code
--- Ligaya Turmelle <[EMAIL PROTECTED]> wrote:
> I think it is because the query ran successfully and
> returns an empty set.
> So the pointer is still good.
> 
> Respectfully,
> Ligaya Turmelle
> 
> 
> "Ryan A" <[EMAIL PROTECTED]> wrote in message
>
news:[EMAIL PROTECTED]
> > Hi,
> > I have this simple code in my php script:
> >
> > * * * * *
> > $res = mysql_query("SELECT product_id, now()-1
> FROM ".$tc."_prods where
> > cno=$cno AND product_id='$product_id' LIMIT 1");
> >
> > if($res)
> >  {
> >  $r = mysql_fetch_row($res);
> >  $product_id2   = $r[0];
> >  $th_pres= $r[1];
> > echo "debug echo";
> >  }else {echo "No results, sorry";}
> > * * * * *
> >
> > its working great when the data actually exists
> but when there are no
> > matches it still executes the "if($res)" part
> instead of
> > displaying "No results, sorry".
> > Why is that? or am I using the syntax wrong?
> >
> > Thanks,
> > -Ryan
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html
--- End Message ---
--- Begin Message ---
> "Ryan A" <[EMAIL PROTECTED]> wrote in message
>
news:[EMAIL PROTECTED]
> > Hi,
> > I have this simple code in my php script:
> &

RE: [PHP] mysql_connect error

2004-03-22 Thread php-general
T,

You also need to load the php_mysql rpm (Assuming you loaded via rpm)

Till We Meet Again...

Clifford W. Hansen
Operations Support Developer
Aspivia (Pty) Ltd.

+27 (0) 11 259-1150 (Switchboard)
+27 (0) 11 259-1019 (Fax)
+27 (0) 83 761-0240 (Mobile)
[EMAIL PROTECTED] (EMail)
http://chansen.aspivia.com (Web)

Registered Linux user number 343424 on http://counter.li.org/

"We have seen strange things today!" Luke 5:26

This message contains information intended for the perusal, and/or use (if
so stated), of the stated addressee(s) only. The information is confidential
and privileged. If you are not an intended recipient, do not peruse, use,
disseminate, distribute, copy or in any manner rely upon the information
contained in this message (directly or indirectly). The sender and/or the
entity represented by the sender shall not be held accountable in the event
that this prohibition is disregarded.

If you receive this message in error, notify the sender immediately by
e-mail, fax or telephone and return and/or destroy the original message.

The views or representations contained in this message, whether express or
implied, are those of the sender only, unless that sender expressly states
them to be the views or representations of an entity or person, who shall be
named by the sender and who the sender shall state to represent. No
liability shall otherwise attach to any other entity or person.

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



php-general Digest 22 Mar 2004 13:23:02 -0000 Issue 2661

2004-03-22 Thread php-general-digest-help

php-general Digest 22 Mar 2004 13:23:02 - Issue 2661

Topics (messages 181109 through 181135):

Re: Zend Optimiser -- wide spread??
181109 by: Filip de Waard
181118 by: Kim Steinhaug

Re: SQL Injection check (mysql)
181110 by: Chris Shiflett
18 by: trlists.clayst.com
181112 by: Chris Shiflett
181114 by: Evan Nemerson
181134 by: trlists.clayst.com

Re: Array problem
181113 by: Firman Wandayandi
181122 by: noginn

what is the best idea to make mirror for mysql database
181115 by: QT
181116 by: Burhan Khalid
181135 by: QT

Peculiar number_format() behaviour
181117 by: Paul Hopkins
181119 by: Ford, Mike   [LSS]

building CLI version only
181120 by: neko

Re: Decoding a URL without decoding values
181121 by: Ford, Mike   [LSS]

Question for PHP.net
181123 by: Florian Hoenl
181125 by: Red Wingate

Fill strings with  
181124 by: Merlin
181127 by: Red Wingate
181128 by: Dave G
181129 by: Firman Wandayandi

Re: Scheduling PHP on Windows
181126 by: imran asghar

Client does not support authentication protocol requested
181130 by: Khalid Judeh

String Length ??
181131 by: gordon stewart
181132 by: Filip de Waard
181133 by: gordon stewart

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 ---
On Mar 22, 2004, at 1:16 AM, Justin French wrote:

Hi all,

I'm close to releasing my first widely distributed (I hope) PHP 
application, and I wish to protect the source with Zend Encoder.  
Seems easy enough.

However, this is a low-cost app that was intended to work on basic 
installs of PHP, running on almost any server -- it uses no external 
libraries, and required no special compiles.

Is Zend Optimiser (required to run encoded PHP files) part of a base 
installation, or at the very least, is it widely spread in use 
(available on most hosts)?

Seems like there's no point encoding if only half of the servers out 
there can run the scripts.  I know optimiser is available on *my* 
host, but that's not enough in this case!
It's not available on every PHP aware webserver, since it's not part of 
PHP itself.

You can give your clients two options: a. encoded file (cheaper) and b. 
source code (expensive). If you don't want to give them your source you 
can always make an reseller arrangement with a specific hosting company 
and forward clients who's current provider doesn't support the Zend 
Optimizer to that reseller account :-)

Regards,

Filip de Waard
--- End Message ---
--- Begin Message ---
As other people mention here PHP Zend Optimizer is usually NOT installed
on any systems unless they have encountered a customer which needed it.

Were selling a shoppingcart system and *every* host were encountered did
not have it installed.

Another sollution comes up, since a lot of the hosting companies for some
reason dont want to install this, IonCube. Purchasing this is much more
affordable prize aswell. The IonCube loader however can be included and
loaded at runtime, meaning you dont have to install anything on the server,
:)
I have yet to meet a server that doesnt support the runtime loader by
default.

You should check it out, www.ioncube.com

-- 
-- 
Kim Steinhaug
--
There are 10 types of people when it comes to binary numbers:
those who understand them, and those who don't.
--
www.steinhaug.com - www.easywebshop.no - www.webkitpro.com
--

"Justin French" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi all,
>
> I'm close to releasing my first widely distributed (I hope) PHP
> application, and I wish to protect the source with Zend Encoder.  Seems
> easy enough.
>
> However, this is a low-cost app that was intended to work on basic
> installs of PHP, running on almost any server -- it uses no external
> libraries, and required no special compiles.
>
> Is Zend Optimiser (required to run encoded PHP files) part of a base
> installation, or at the very least, is it widely spread in use
> (available on most hosts)?
>
> Seems like there's no point encoding if only half of the servers out
> there can run the scripts.  I know optimiser is available on *my* host,
> but that's not enough in this case!
>
>
> ---
> Justin French
> http://indent.com.au


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

php-general Digest 22 Mar 2004 01:22:55 -0000 Issue 2660

2004-03-21 Thread php-general-digest-help

php-general Digest 22 Mar 2004 01:22:55 - Issue 2660

Topics (messages 181078 through 181108):

Re: Timing a MySQL response
181078 by: John W. Holmes

Re: Upload file field not working as a form element
181079 by: Lowell Allen
181080 by: Vernon
181081 by: Jason Wong
181082 by: Lowell Allen

SQL Injection check (mysql)
181083 by: Ali Ashrafzadeh
181099 by: Chris Shiflett
181108 by: Michael Rasmussen

Re: 9 Months Ago
181084 by: Marek Kilimajer
181086 by: Ben Ramsey
181090 by: Rasmus Lerdorf

Decoding a URL without decoding values
181085 by: Ben Ramsey
181087 by: Jason Wong
181088 by: Ben Ramsey

Re: Scheduling PHP on Windows
181089 by: trlists.clayst.com

Array problem
181091 by: noginn

PHP as module, also as suexec, in Apache?
181092 by: Wendell

creating a confirm page
181093 by: Andy B
181094 by: Bruno Santos

RE:[PHP] creating a confirm page
181095 by: Andy B

Re: ip to country
181096 by: Chris Shiflett
181097 by: Chris Shiflett
181098 by: Chris Shiflett
181100 by: Filip de Waard
181103 by: Chris Shiflett

Re: Comparing 2 files
181101 by: Kim Steinhaug
181104 by: Jochem Maas

Re: Problem uploading large files via PHP (20+ MB)
181102 by: Kim Steinhaug

Zend Optimiser -- wide spread??
181105 by: Justin French
181106 by: Geir Pedersen - Activio AS

Re: php and CSS level 2
181107 by: Michal Migurski

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 ---
Richard Davey wrote:

Just a quick question - but does anyone know how to get the ms value
back from MySQL that tells you how long it took to run your query?
That value is not returned at all. Go with the wrapper...

--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
> All I am trying to do is insert the file name, not the file. The file is
> being uploaded to the server in a specific location. All I need is the
> filename inserted into the database. I've gotten the upload part to work and
> everything I just can't get the file name inserted for God knows what
> reason. I removed the upload code and am simply trying to insert the
> filename and userid into the database. The userid goes in but I cannot get
> the file name inserted.
> 
> Here is the form:
> enctype="multipart/form-data" name="form1">
>   
>value="">
>disabled>
>   
> 

The uploaded file name will be $HTTP_POST_FILES["filename"]["name"] -- use
that rather than $_POST["filename"].

HTH

--
Lowell Allen
--- End Message ---
--- Begin Message ---
> The uploaded file name will be $HTTP_POST_FILES["filename"]["name"] -- use
> that rather than $_POST["filename"].

I'm sorry I don't understand. What is the extra ["name"] for? When I use
this in the insert into the value that is inserted into the database is
Array, as opposed to the actual filename.

Thanks
 -V

--- End Message ---
--- Begin Message ---
On Sunday 21 March 2004 22:53, Vernon wrote:
> > The uploaded file name will be $HTTP_POST_FILES["filename"]["name"] --
> > use that rather than $_POST["filename"].
>
> I'm sorry I don't understand. What is the extra ["name"] for? When I use
> this in the insert into the value that is inserted into the database is
> Array, as opposed to the actual filename.

manual > Handling file uploads

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
SEMPER UBI SUB UBI
*/
--- End Message ---
--- Begin Message ---
>> The uploaded file name will be $HTTP_POST_FILES["filename"]["name"] -- use
>> that rather than $_POST["filename"].
> 
> I'm sorry I don't understand. What is the extra ["name"] for? When I use
> this in the insert into the value that is inserted into the database is
> Array, as opposed to the actual filename.

The $HTTP_POST_FILES array works for me. Maybe you need to 

php-general Digest 21 Mar 2004 13:09:45 -0000 Issue 2659

2004-03-21 Thread php-general-digest-help

php-general Digest 21 Mar 2004 13:09:45 - Issue 2659

Topics (messages 181060 through 181077):

Re: Inconv in PHP5 compile
181060 by: PHPDiscuss - PHP Newsgroups and mailing lists

php and CSS level 2
181061 by: Andy B
181062 by: Aidan Lister
181068 by: Ben Ramsey
181069 by: Richard Davey
181073 by: Ben Ramsey

Re: Function to check a valid date
181063 by: Tom Reed

Re: ip to country
181064 by: Tom Reed
181066 by: Filip de Waard

Re: string function that inserts a char
181065 by: Five

Re: Comparing values / Regex ?
181067 by: Ben Ramsey

Forum notify
181070 by: thies.thieso.net

Upload file field not working as a form element
181071 by: Vernon
181072 by: Ben Ramsey
181076 by: Vernon

PHP 5 Free Hosting
181074 by: David Costa

Re: CMS Templating with Standards Based HTML Delima...
181075 by: Justin French

Timing a MySQL response
181077 by: Richard Davey

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
--- Begin Message ---
I'm having PHP5 compile problems as well. Here's some shortened output
from commands giving a picture of my problem.

The first thing that troubles me is vi giving this output:

[EMAIL PROTECTED] php-5.0.0RC1]# vi ext/mysql/php_mysql.c
"ext/mysql/php_mysql.c" 2514L, 70348C
Error detected while processing modelines:
line 2512:
E518: Unknown option: fdm=marker
Hit ENTER or type command to continue

I ran into this after:

[EMAIL PROTECTED] php-5.0.0RC1]# gcc --version
gcc (GCC) 3.3.2 20031022 (Red Hat Linux 3.3.2-1)
..


[EMAIL PROTECTED] php-5.0.0RC1]# ./configure
--with-apsx2=/usr/local/apache2/bin/apxs --with-mysql=/data/sw/mysql-4.0.18
..


[EMAIL PROTECTED] php-5.0.0RC1]# make
..

..
gcc  -Iext/mysql/ -I/data/sw/php-5.0.0RC1/ext/mysql/ -DPHP_ATOM_INC
-I/data/sw/php-5.0.0RC1/include -I/data/sw/php-5.0.0RC1/main
-I/data/sw/php-5.0.0RC1 -I/data/sw/php-5.0.0RC1/Zend
-I/usr/include/libxml2 -I/data/sw/mysql-4.0.18/include 
-I/data/sw/php-5.0.0RC1/TSRM  -g -O2  -c
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c -o ext/mysql/php_mysql.o  &&
echo > ext/mysql/php_mysql.lo
In file included from /data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:59:
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.h:51:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:72:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:82:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:86:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:90:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:101:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:122:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:181:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:376:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c: In function
`php_mysql_do_connect':
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:482: error: syntax error at
'@' token
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:482: error: syntax error at
'@' token
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:482: error: `MYSQL_TCP_PORT'
undeclared (first use in this function)
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:482: error: (Each undeclared
identifier is reported only once
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:482: error: for each function
it appears in.)
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:485:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:502: error: syntax error at
'@' token
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:502: error: syntax error at
'@' token
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:639:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:666:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:674: warning: comparison
between pointer and integer
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:703:5: token "@" is not valid
in preprocessor expressions
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:706: error: `handler'
undeclared (first use in this function)
/data/sw/php-5.0.0RC1/ext/mysql/php_mysql.c:715:5: token "@" i

php-general Digest 21 Mar 2004 00:45:35 -0000 Issue 2658

2004-03-20 Thread php-general-digest-help

php-general Digest 21 Mar 2004 00:45:35 - Issue 2658

Topics (messages 181020 through 181059):

Re: too much trimming
181020 by: Gerben
181021 by: Gerben

Image size ??
181022 by: Tom Wuyts
181023 by: Marek Kilimajer

Re: [PEAR] Auth
181024 by: Firman Wandayandi
181026 by: Firman Wandayandi

Re: Turn on E_ALL Error Reporting
181025 by: Jason Wong

Apache - PHP Load-n-Go ?
181027 by: gordon stewart

HELP! Apache dies on regular MySQL query :-/
181028 by: -{ Rene Brehmer }-
181057 by: Raditha Dissanayake

mail headers
181029 by: Will

PS : [PHP] Apache - PHP Load-n-Go ? : FIXED
181030 by: gordon stewart

Convert Date Format?
181031 by: Jeff Oien
181033 by: trlists.clayst.com
181035 by: Jeff Oien
181036 by: John W. Holmes
181037 by: Michael Lewis

This Group
181032 by: gordon stewart
181034 by: John W. Holmes

9 Months Ago
181038 by: Jeff Oien
181039 by: Red Wingate

string function that inserts a char
181040 by: Five
181041 by: Five
181043 by: Jason Giangrande

Coding Style Guide Neded
181042 by: Sheeraz Fazal
181044 by: Michal Migurski

ip to country
181045 by: Enda Nagle
181046 by: Manuel Lemos
181055 by: Marek Kilimajer
181056 by: Filip de Waard

Re: PHP encounters Access Violation
181047 by: Ben Ramsey

Scheduling PHP on Windows
181048 by: Ben Ramsey

Function to check a valid date
181049 by: Chris Bruce
181050 by: Ben Ramsey

CMS Templating with Standards Based HTML Delima...
181051 by: Adam Reiswig
181052 by: Ben Ramsey
181053 by: Filip de Waard
181054 by: Yann Larrivee

Re: Comparing 2 files
181058 by: Raditha Dissanayake

Re: Question on PDF upload
181059 by: Raditha Dissanayake

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 ---
you need to add an space after "?>" for to output the newline after it.


"Ivan Sergio Borgonovo" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I've simple code like this:
>
> -- begin --
> #!/usr/bin/php -q
>  $pippo='goofy'
> ?>
>
> hey my name is 
> and
> I feel good
> -- end --
>
> I would expect this output:
>
> -- begin --
>
> hey my name is goofy
> and
> I feel good
> -- end --
>
> but I obtain this:
> -- begin --
>
> hey my name is goofy and
> I feel good
> -- end --
>
> Lines are indented with tabs.
> I suspect something related to -w flag, but I haven't been able to
> switch this behaviour off.
>
> thx
--- End Message ---
--- Begin Message ---
you need to add an space after "?>" for to output the newline after it.



"Ivan Sergio Borgonovo" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I've simple code like this:
>
> -- begin --
> #!/usr/bin/php -q
>  $pippo='goofy'
> ?>
>
> hey my name is 
> and
> I feel good
> -- end --
>
> I would expect this output:
>
> -- begin --
>
> hey my name is goofy
> and
> I feel good
> -- end --
>
> but I obtain this:
> -- begin --
>
> hey my name is goofy and
> I feel good
> -- end --
>
> Lines are indented with tabs.
> I suspect something related to -w flag, but I haven't been able to
> switch this behaviour off.
>
> thx
--- End Message ---
--- Begin Message ---
Hi, 
 
Is there any way to know the size of an image ??
 
 
Thanx in advance,
RCTycooner
 
-
Admin of The Silver Luna Forums
http://www.wuyts.org/tom/phpbb2/
[EMAIL PROTECTED]
-
--- End Message ---
--- Begin Message ---
http://www.php.net/getimagesize

Tom Wuyts wrote:
Hi, 
 
Is there any way to know the size of an image ??
 
 
Thanx in advance,
RCTycooner
 
-
Admin of The Silver Luna Forums
http://www.wuyts.org/tom/phpbb2/
[EMAIL PROTECTED]
-

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

Stefan right, I just notice on the error
Fatal error: _factory(): Failed opening required 'Auth/Container/DB.php'
(include_path='.:') in /www/news/Auth-1.2.3/Auth.php on line 218

I'd bet you didn't turned On include_path directive on php.ini. Please
correct
thism, just remove semicolon at front of include_path.

include_path = "path/to/pear"

Firman

- Original Message -
From: "Stefan Neufeind" <[EMA

php-general Digest 20 Mar 2004 12:43:29 -0000 Issue 2657

2004-03-20 Thread php-general-digest-help

php-general Digest 20 Mar 2004 12:43:29 - Issue 2657

Topics (messages 181007 through 181019):

Re: What does it take to give a good technical presentation?
181007 by: John Coggeshall

Blank Page instead of Errors
181008 by: Jonathan Duncan
181009 by: John W. Holmes
181011 by: Jonathan Duncan

Re: Question on PDF upload
181010 by: Jeffrey Lee

Simple question
181012 by: webmaster
181013 by: John W. Holmes
181014 by: Richard Davey

Re: gmdate
181015 by: David Robley

Re: php/mysql email
181016 by: David Robley

Re: CMS advice needed
181017 by: Justin French

Comparing 2 files
181018 by: Jens Schmeiser

Important notify about your e-mail account.
181019 by: management.php.net

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 ---
On Fri, 2004-03-19 at 15:53, John W. Holmes wrote:
> 1) Rehearse: This is a must. You have to run through your presentation a
> couple times and preferably in front of other people so they can provide
> feedback. Some people are really good at impromptu speaking and can wing it,

This is a valid issue, but as a speaker I can tell you that after a few
conferences under my belt things don't always go as planned. There was
one talk in particular on the cruise where I had no choice but to "wing
it" based on what I had in front of me. It happens, 

> 2) Dry Run: As important as rehearsing before hand is doing a dry run of the
> presentation in the actual place where you'll be giving the presentation and
> preferably with the actual equipment you'll be using. What looks good on

I again agree, that too often people use a font that is too small to be
seen and that was something that presenters could have done a better job
with. However when it comes to the cables part, I have to defend the
speakers. The conference had no idea that one projector would have only
an s-video input, and if they had I consider it the job of the
conference to inform us of that -- I've never been to a conference that
didn't provide an vga-input and would personally fully expect to see one
that did. 

> 3) Typing Code: Don't type code during your presentation. I'd bet money that
> everyone watching you already knows how to type. If it's a PHP conference,
> I'd bet they know how to type PHP, too. We don't need you to show us how.
> When you begin a presentation by opening up a text editor and typing

The last session I gave was on Smarty, during which I had 10 slides and
the rest of the talk I was in my IDE doing stuff with code. Given I did
have examples prepared, I did do a fair amount of "typing" during the
talk and from everything I've heard it was a very successful talk. One
of the most successful presentations I've ever seen was given by Don Box
at Microsoft... it was a small group of us and he just started off his
talk by asking for a list of XML-related topics we wanted to hear
about... he wrote them all down on the whiteboard and just started
talking off-the-cuff. One of the most entertaining and educational
presentations I've ever seen. 

> , I'm walking out. Either work the code (or snippets of it) into your
> slides, or open up a text editor and show an already completed file. If you
> need to make or illustrate changes to the code, either put that on
> subsequent slides or load sequential files where the code is already
> completed.

Also, on that note -- attendees seem to really love when things go
wrong. I've been told, see, and actually experienced this phenomenon.
When your trying to give a presentation and something doesn't quite go
as expected, the experience of watching how you solve that problem
(since they probably have experienced the same) is very valuable to
them. It seems counter-intuitive, but many of the best things in the
world often are I find :)

> 5) Have a Buddy: This kind of goes along with all of the above suggestions;
> try to have a buddy that can help you rehearse and give your presentation.
> If you rehearse well enough, you can have your buddy flipping slides and
> scrolling at the right times without you having to say "next slide" or
> anything else. If you _really_ have to type, like filling out a form for
> example (as a demo), then have your buddy doing that while you're explaining
> things or make changes while you explain why he's doing so and what the
> results will be (for example). Hell, you can even make your buddy the bad
> guy that keeps you on track and on time and cuts off questions when
> necessary.

I don't agree wit

php-general Digest 19 Mar 2004 11:26:30 -0000 Issue 2655

2004-03-19 Thread php-general-digest-help

php-general Digest 19 Mar 2004 11:26:30 - Issue 2655

Topics (messages 180926 through 180950):

Re: E-mail account disabling warning.
180926 by: Jeffrey Shaw
180930 by: Chris W. Parker
180931 by: Ryan A

Re: Retain form values...
180927 by: Chris W. Parker
180928 by: Shane McBride
180929 by: Chris W. Parker
180936 by: Shane McBride
180937 by: Tom Rogers
180938 by: John W. Holmes

Passing Access Variables to a Browser
180932 by: Tyger Gilbert
180933 by: Tyger Gilbert
180934 by: Tyger Gilbert
180935 by: Justin Patrin

Re: Javascript Mouseover Help
180939 by: Jake McHenry
180940 by: Tom Rogers

Re: Solution to display the results of an exec/system + rsh command
180941 by: Frédéric Martin

Guru's advice needed [Security: SQL injection]
180942 by: Tariq Murtaza
180944 by: Chris Shiflett

DB connection problem
180943 by: Khalid Judeh

Re: Thank you, Microsoft! Now I need an alternate loginmethod
180945 by: Marek Kilimajer
180946 by: Marek Kilimajer

Php mailer
180947 by: Mrs. Geeta Thanu
180948 by: Evan Nemerson

Mysql look up and then rename
180949 by: Brent Clark

Re: too much trimming
180950 by: Marek Kilimajer

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 ---
There seems to be a lot of these going around.

Remember:

Don't open attachments unless you are sure of what you are getting!

Keep your Virus Scan program up to date.  Any database over 14 days old
should be updated.

Many times, the Headers and addresses of the messages are faked.  This is
easy to do.  So if there is any doubt, send an e-mail to an address listed
at the website the email originates from and ask for more information.

These virus writers are relying on people to unwittingly open their
attachments so they may go through with their evil plans.

Is there any Php.net official on this list that can shed more light on this
please

JL Shaw
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.620 / Virus Database: 399 - Release Date: 3/11/2004
--- End Message ---
--- Begin Message ---
Jeffrey Shaw <mailto:[EMAIL PROTECTED]>
on Thursday, March 18, 2004 3:20 PM said:

> Is there any Php.net official on this list that can shed more light
> on this please

nothing to shed light on really... (unless i've missed something.)

it's not from the people at php.net so your best bet is to just ignore
it.



chris.
--- End Message ---
--- Begin Message ---

On 3/19/2004 12:20:17 AM, Jeffrey Shaw ([EMAIL PROTECTED]) wrote:
> There seems to be a lot of these going around.
>
> Remember:
>
> Don't open attachments unless you are sure of what you are getting!
>
> Keep your Virus Scan program up to date.  Any database over 14 days old
> should be updated.
>
> Many times, the Headers and addresses of the messages are faked.  This is
> easy to do.  So if there is any doubt, send an e-mail to an address listed
> at the website the email originates from and ask for more information.
>
> These virus writers are relying on people to unwittingly open their
> attachments so they may go through with their evil plans.
>
> Is there any Php.net official on this list that can shed more light on
this
> please

This is not just from the php.net site, I've gotten this email from a number
of our sites and had to
email all our members informing them not to open any attachments even if it
seems we sent it, if
we require them to download anything it will be AT our site and not
attached.

They ARE getting sneakier arnt they?

-Ryan
--- End Message ---
--- Begin Message ---
Shane McBride <mailto:[EMAIL PROTECTED]>
on Thursday, March 18, 2004 2:50 PM said:

> How about passing the form variables to a hidden field on the next
> page? I used this for several page forms before.

that won't work because he's not doing a multi-page form. he just wants
to send the form data back *if* the form fails his validation.



chris.
--- End Message ---
--- Begin Message ---
Gotcha. I typically use javascript to validate before the form is posted to
validate.

shane

-Original Message-
From: Chris W. Parker [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 18, 2004 6:23 PM
To: Shane McBride; PHP
Subject: RE: [PHP] Retain form values...


Shane McBride <mailto:[EMAIL PROTECTED]>
on Thursday, March 18, 2004 2:50 PM said:

> How about passing the form variables to a hidden field on the next
> page? I used this for several page for

php-general Digest 16 Mar 2004 10:00:10 -0000 Issue 2649

2004-03-16 Thread php-general-digest-help

php-general Digest 16 Mar 2004 10:00:10 - Issue 2649

Topics (messages 180493 through 180528):

Re: PHP Certification
180493 by: Rasmus Lerdorf
180497 by: Ryan A
180503 by: Richard Davey

Re: Regex help (SOLVED)
180494 by: Michal Migurski

Pear Package...
180495 by: Scott Fletcher
180498 by: Evan Nemerson
180499 by: Greg Beaver
180501 by: Scott Fletcher
180502 by: Scott Fletcher

Re: tracking emails
180496 by: Rob Adams
180500 by: Ryan A
180504 by: Rob Adams

current url function
180505 by: Luis Mirabal
180507 by: Marek Kilimajer
180508 by: Luis Mirabal
180509 by: Richard Davey

dbg extension...
180506 by: Luis Mirabal
180516 by: Tom Rogers

e - comerce website
180510 by: if02005.students.del.ac.id

Re: Problem with mkdir() under windows.
180511 by: Luis Mirabal

Re: Printing landscape
180512 by: Luis Mirabal
180527 by: Michael Nolan

Efficieny: Include vs Array vs Function
180513 by: Rob Paxon
180519 by: Raditha Dissanayake
180520 by: Rob Paxon
180522 by: Tom Rogers
180524 by: Rob Paxon
180528 by: Raditha Dissanayake

Re: windows 2003 server configuration
180514 by: Nadim Attari

Licensing System
180515 by: Jakes

Anyone Can Help Me?
180517 by: Harry
180521 by: Clifford W. Hansen

how do i detect the exsistens of a network printer?
180518 by: Shay

Presence of a program (PHP)
180523 by: Brent Clark
180525 by: Jyry Kuukkanen

Re: help with storing multiple values in session variables.
180526 by: Vimala  S.P.

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 ---
On Mon, 15 Mar 2004, Sheeraz fazal wrote:
> I need information about the php certification, from www.expertrating.com .
> Does this site has good market reputation?
> Does www.php.net has some plans to introduce certification path?

No plans from us, no.  Running a certification program is a lot of work 
and I would prefer to see developers develop, not try to manage a 
certification program.

As for the www.expertrating.com thing?  Never heard of it.  If a resume 
crossed my desk with a reference to something like that on it I would 
probably chuckle and think the person got bilked out of the $9.95 it 
apparently costs.  It may of course be very good, I have no idea, I just 
don't hold certification programs in very high regard in general.

-Rasmus
--- End Message ---
--- Begin Message ---
Give a good graphics guy some $$ and he'll make you one of the best
certificates that your $$ can buy...that does not mean that you can actually
program in the language thats written on the certificate...

When I was learning computers I studied COBOL, Hated it and cant remember
crap about it now...not even 2 lines...but my (old) certificate says I'm
pretty good at it :-)

Basically it all comes down to how good you can actually prove yourself in
your field..certificates most of the time are not worth the paper they are
printed on but look good once you hang it on the wall ;-)

Just my $0.2

Cheers,
-Ryan

*
HI,

I need information about the php certification, from www.expertrating.com .
Does this site has good market reputation?
Does www.php.net has some plans to introduce certification path?

Comments welcome.

Thanks,
Sheri,

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Hello Sheeraz,

Monday, March 15, 2004, 4:05:42 PM, you wrote:

Sf> I need information about the php certification, from www.expertrating.com .
Sf> Does this site has good market reputation?
Sf> Does www.php.net has some plans to introduce certification path?

Unless they are internationally and industry recognised like the
Novell, Cisco, Oracle or Microsoft certificates it's probably not
worth the money (if any?) involved in obtaining it. You would be
better off spending your time working on a solid portfolio that
showcases both sites AND code that you've written. If you already have
those then I don't see how that expertrating thing can hurt, but don't
bank on it holding too much sway.

-- 
Best regards,
 Richard Davey
 http://www.phpcommunity.org/wiki/296.html
--- End Message ---
--- Begin Message ---
>Thanks to everyone who gave me examples, links and suggested alternatives
>like explode(), but personally I thought explode too was a regex..:-(.

explode() is not, split() is.

-
michal migurski- contact info and pg

php-general Digest 15 Mar 2004 08:48:16 -0000 Issue 2647

2004-03-15 Thread php-general-digest-help

php-general Digest 15 Mar 2004 08:48:16 - Issue 2647

Topics (messages 180396 through 180415):

Re: Mail
180396 by: Jason Davidson
180397 by: Will

User denided function
180398 by: nblanco

XML architecture question
180399 by: Jabro
180402 by: Ray Hunter

Re: Classes & Objects.
180400 by: Marco Schuler

Re: Web based php  development tool
180401 by: Marco Schuler

[Q] PHP code embedded in html files - What happens?
180403 by: Michael T. Peterson
180405 by: Jeffrey Lee
180407 by: EastLothianDirectory
180408 by: EastLothianDirectory
180409 by: Steve Edberg

Re: Scripts creating files and folders into un/grp "Nobody" on Apache
180404 by: Jay

Anyway to access a class variable without using a return function?
180406 by: Terence
180410 by: Tom Rogers

Behind the scenes coding?
180411 by: Dustin Wish with INDCO Networks
180412 by: Jason Wong
180413 by: Ryan A
180414 by: Dustin Wish with INDCO Networks

Re: servers in php
180415 by: DvDmanDT

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 ---
Check the manual to be sure, but it appears that you have the arguments
for the mail function in the wrong order .

mail(to, subject, msg, headers) ... i beleive is the correct order.

Jason

"Will" <[EMAIL PROTECTED]> wrote:
> 
> Hello All,
> I am having a problem with sending a reply from a form.  It is giving me a
> 550 error: There is no valid sender in any header line.
> 
> My form is:
>  include ("inc/setup.php");
> 
> // Mail reply to Orginial poster
> $recipient .= "[EMAIL PROTECTED], $_POST[email]\n";
> $mailheaders .= "To: $_POST[email]\n";
> $mailheaders .= "From: $_POST[email]\n";
> 
> $subject .= "$_POST[subject]";
> 
> $msg .= "Please do not reply to this email!!!\n\n";
> 
> $msg .= "Here is our answer:   \r$_POST[message]\n\n";
> 
> $msg .= "Please use your username/password that was assigned to you.\n\n";
> 
> mail($recipient, $mailheaders, $subject, $msg);
> 
> $add_reply = "INSERT into $table_name25 values ('', now(),
> '$_POST[subject]', '$_POST[name]',
> '$_POST[email]', '$_POST[message]')";
> mysql_query($add_reply,$conn) or die(mysql_error());
> 
> header("Location: support_archive.php");
> exit;
> ?>
> 
> And when I recieive the one email there are no from and reply to in the
> email client.  Plus it is in the subject line!!!  What the heck am I doing
> wrong???
> 
> Thanks in advance,
> ~WILL~
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
--- End Message ---
--- Begin Message ---
Thank you very much!!! That was it

~WILL~


-Original Message-
From: Jason Davidson [mailto:[EMAIL PROTECTED] 
Sent: Sunday, March 14, 2004 2:40 PM
To: Will
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Mail

Check the manual to be sure, but it appears that you have the arguments
for the mail function in the wrong order .

mail(to, subject, msg, headers) ... i beleive is the correct order.

Jason

"Will" <[EMAIL PROTECTED]> wrote:
> 
> Hello All,
> I am having a problem with sending a reply from a form.  It is giving
me a
> 550 error: There is no valid sender in any header line.
> 
> My form is:
>  include ("inc/setup.php");
> 
> // Mail reply to Orginial poster
> $recipient .= "[EMAIL PROTECTED], $_POST[email]\n";
> $mailheaders .= "To: $_POST[email]\n";
> $mailheaders .= "From: $_POST[email]\n";
> 
> $subject .= "$_POST[subject]";
> 
> $msg .= "Please do not reply to this email!!!\n\n";
> 
> $msg .= "Here is our answer:   \r$_POST[message]\n\n";
> 
> $msg .= "Please use your username/password that was assigned to
you.\n\n";
> 
> mail($recipient, $mailheaders, $subject, $msg);
> 
> $add_reply = "INSERT into $table_name25 values ('', now(),
> '$_POST[subject]', '$_POST[name]',
> '$_POST[email]', '$_POST[message]')";
> mysql_query($add_reply,$conn) or die(mysql_error());
> 
> header("Location: support_archive.php");
> exit;
> ?>
> 
> And when I recieive the one email there are no from and reply to in
the
> email client.  Plus it is in the subjec

php-general Digest 14 Mar 2004 19:31:17 -0000 Issue 2646

2004-03-14 Thread php-general-digest-help

php-general Digest 14 Mar 2004 19:31:17 - Issue 2646

Topics (messages 180379 through 180395):

Re: gd installation problem
180379 by: Firman Wandayandi

Re: how to convert array into integer
180380 by: Firman Wandayandi
180381 by: Five
180383 by: Raditha Dissanayake

Re: objects in session
180382 by: Nick F

Re: Regarding PHP Installation on linux
180384 by: Raditha Dissanayake

Re: ext/dom: Namespaces
180385 by: Vivian Steller

Re: [PHP-DEV] PHP5: ext/dom: Namespaces
180386 by: Derick Rethans

Re: servers in php
180387 by: Comex

Re: Installation of 4.3.4
180388 by: edwardspl.ita.org.mo
180389 by: Jason Wong
180393 by: edwardspl.ita.org.mo
180394 by: Jason Wong

memory_limit doesn't work (4.3.3, Mac OS X)
180390 by: Adam Nohejl
180392 by: Jason Wong

Re: .sit download problems
180391 by: Brian Dunning

Mail
180395 by: Will

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 ---
Hi QT,

Sorry I don't where the turtorial can be found. :( But can you check you
php.ini? this is the most problem have been posted to the list.

Regards,
Firman

- Original Message -
From: "QT" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 14, 2004 9:59 AM
Subject: [PHP] gd installation problem


> dear Sirs,
>
> I did what says in
> http://www.php.net/manual/en/install.windows.php#Installation of Windows
> extensions
>
> but still I can not run php_gd2.dll extensions on win2000
>
> where can I find more solutions about this
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
Hi Kenneth,

You can implode an array first, and convert it to integer, see below.

$number = (int) implode('', $yourarray);

Good Luck,
Firman

- Original Message - 
From: "Kenneth" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 14, 2004 12:48 PM
Subject: [PHP] how to convert array into integer


> To all,
> I have an Array ( [0] => 2 [1] => . [2] => 2 [3] => 0 [4] => 8 )
> but i want to convert it into integer 2.208 in order to use it to plot
> graphhow can i convert it?
> thx,
> Kenneth
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
--- End Message ---
--- Begin Message ---

"Firman Wandayandi" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> Hi Kenneth,
>
> You can implode an array first, and convert it to integer, see below.
>
> $number = (int) implode('', $yourarray);
>
> Good Luck,
> Firman
>
> - Original Message - 
> From: "Kenneth" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, March 14, 2004 12:48 PM
> Subject: [PHP] how to convert array into integer
>
>
> > To all,
> > I have an Array ( [0] => 2 [1] => . [2] => 2 [3] => 0 [4] => 8 )
> > but i want to convert it into integer 2.208 in order to use it to plot
> > graphhow can i convert it?
> > thx,
> > Kenneth
> >
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >

implode(,)

T'hat's a good one. What won't they think of next?
Now I can get rid of my loops.
--- End Message ---
--- Begin Message ---
Oh yes!  why did i forget that one? :-(

Firman Wandayandi wrote:

Hi Kenneth,

You can implode an array first, and convert it to integer, see below.

$number = (int) implode('', $yourarray);

Good Luck,
   Firman
- Original Message - 
From: "Kenneth" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 14, 2004 12:48 PM
Subject: [PHP] how to convert array into integer

 

To all,
I have an Array ( [0] => 2 [1] => . [2] => 2 [3] => 0 [4] => 8 )
but i want to convert it into integer 2.208 in order to use it to plot
graphhow can i convert it?
thx,
Kenneth
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
   

 



--
Raditha Dissanayake.
---
http://www.radinks.com/upload/ 
Drag and Drop Upload thousands of files and folders in a single
transfer.  (HTTP or FTP) 
--- End Message ---
--- Begin Message ---
You can use serialize() to convert an object (or 

php-general Digest 14 Mar 2004 07:06:00 -0000 Issue 2645

2004-03-13 Thread php-general-digest-help

php-general Digest 14 Mar 2004 07:06:00 - Issue 2645

Topics (messages 180351 through 180378):

Re: MySQL Writes Exception for PHP in License
180351 by: Red Wingate
180354 by: Rasmus Lerdorf

Re: Create table .. script[via LSMTP - see www.lsoft.com]
180352 by: Firman Wandayandi

Re: PHP and Apache 2
180353 by: Rasmus Lerdorf
180374 by: trlists.clayst.com

fw:¤£°eªáªº²z¥Ñ.
180355 by: ©÷­ô

gd installation problem
180356 by: QT

HTML Utilities
180357 by: Jeff Oien
180358 by: Red Wingate
180359 by: Red Wingate

Safari download problems
180360 by: Brian Dunning
180370 by: Michal Migurski

selecting text from a database and displaying it in a html form
180361 by: Bernie McKeown
180362 by: Brian V Bonini

objects in session
180363 by: marc serra

Web based php  development tool
180364 by: Joseph Ross Lee

servers in php
180365 by: Comex
180366 by: Norbert Pfeiffer
180367 by: Comex
180371 by: DvDmanDT

Re: [PERL] Excel sheet reading
180368 by: Raditha Dissanayake

Re: [PHP-WIN] servers in php
180369 by: Robert Twitty

[Q] Session management when WEB site is based on template
180372 by: Michael T. Peterson
180373 by: Mike Mapsnac

Classes & Objects.
180375 by: Elliot J. Balanza

how to convert array into integer
180376 by: Kenneth
180377 by: Raditha Dissanayake

Regarding PHP Installation on linux
180378 by: balaji.ankem.wipro.com

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 ---
When you compile PHP --with-mysql=/path/to/mysql you will use the
libs from the installed MySQL dist , when using the bundled MySQL
libs by compiling --with-mysql you can use MySQL feature even if
you haven't installed on your maschine.

Am Samstag, 13. März 2004 19:24 schrieb Karl Timmermann:
> So I guess PHP 5 can now include the MySQL libraries.
>
> Anyone know if they will include them with the first release of PHP 5,
> or have plans to?
>
> What difference will this make? I ask, because I read that just
> configuring with "--with-mysql=/usr" allows you to use MySQL with PHP
> 5. THis is how I always compiled with PHP 4, so I guess I don't really
> get how they included them before, and what the differences were/are
> going to be without the libraries?
>
>
> Thanks!
> Karl
--- End Message ---
--- Begin Message ---
No, there are no plans to bundle the client library with PHP5.  We are
bundling SQlite instead.  That of course doesn't mean any less support for
MySQL.  The MySQL extension, 2 of them in fact in PHP5, will still be
there and you simply build it against your own copy of the MySQL client
library.

-Rasmus

On Sat, 13 Mar 2004, Karl Timmermann wrote:

> So I guess PHP 5 can now include the MySQL libraries.
>
> Anyone know if they will include them with the first release of PHP 5,
> or have plans to?
>
> What difference will this make? I ask, because I read that just
> configuring with "--with-mysql=/usr" allows you to use MySQL with PHP
> 5. THis is how I always compiled with PHP 4, so I guess I don't really
> get how they included them before, and what the differences were/are
> going to be without the libraries?
>
>
> Thanks!
> Karl
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Hi Mike,

Try using phpMyAdmin, but sorry I forgot the site :( try google.

Regards,
Firman

- Original Message -
From: "Mike Mapsnac" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, March 13, 2004 11:24 PM
Subject: [PHP] Create table .. script


> Hello
>
> When I need to create table I have to login into mysql and run the query.
Is
> there a way to create some sort of scipt that can create all my tables?.So
> If I need create a table in new database I  just run the script.
>
> I know that I can do mysql_query("QUERY OF TABLE");
> But is there another way of doing this?
>
> Thanks
>
> _____
> One-click access to Hotmail from any Web page - download MSN Toolbar now!
> http://clk.atdmt.com/AVE/go/onm00200413ave/direct/01/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--- End Message ---
--- Begin Message ---
On Sat, 13 Mar 2004 [EMAIL PROTECTED] wrote:

> > So the current situation is that 

php-general Digest 13 Mar 2004 18:24:59 -0000 Issue 2644

2004-03-13 Thread php-general-digest-help

php-general Digest 13 Mar 2004 18:24:59 - Issue 2644

Topics (messages 180316 through 180350):

Re: Apache Config: php_value "auto_prepend_file" & "auto_append_file"
180316 by: electroteque
180320 by: Rasmus Lerdorf

Re: Dumb
180317 by: Burhan Khalid

variable passing
180318 by: Martin S
180319 by: Jason Davidson

Help w/Array Roadblock ( mental )
180321 by: Joey
180322 by: Robert Cummings

help for getimagesize
180323 by: Norbert Pfeiffer
180325 by: Richard Davey
180330 by: Norbert Pfeiffer
180331 by: Firman Wandayandi
180333 by: Richard Davey
180334 by: Richard Davey
180337 by: Firman Wandayandi
180339 by: Firman Wandayandi
180342 by: Norbert Pfeiffer

Re: SMTP Authentication
180324 by: Beauford
180327 by: Elliot J. Balanza
180329 by: Norbert Pfeiffer

PHP and Apache 2
180326 by: trlists.clayst.com

Fetching apache directoryoptions
180328 by: Simon Fredriksson

multipart/form-data and Array POST
180332 by: Andy Lewis
180335 by: Brian V Bonini
180336 by: Raditha Dissanayake
180338 by: Andy Lewis
180340 by: Andy Lewis
180341 by: Andy Lewis
180344 by: Raditha Dissanayake

Create table .. script
180343 by: Mike Mapsnac
180347 by: Filip de Waard

Connect to MS-SQL 2000
180345 by: edwardspl.ita.org.mo
180348 by: Filip de Waard

Re: Installation of 4.3.4]
180346 by: edwardspl.ita.org.mo

[PERL] Excel sheet reading
180349 by: Sakitram

MySQL Writes Exception for PHP in License
180350 by: Karl Timmermann

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
--- Begin Message ---
I've prob asked this before, when will it be possible to be able to use
Apache2 ? I assumed as you said before it was because it was the
"extensions" but are we saying now that libraries that php are compiled on
are too not thread safe ?


-Original Message-
From: Rasmus Lerdorf [mailto:[EMAIL PROTECTED]
Sent: Saturday, March 13, 2004 5:25 PM
To: Chris Wagner
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Apache Config: php_value "auto_prepend_file" &
"auto_append_file"


Yeah, probably a config leak in the Apache2 sapi module.  There is a
reason we don't suggest using PHP with Apache2 yet.  Use Apache1 and I bet
you won't have any problems.

-Rasmus

On Sat, 13 Mar 2004, Chris Wagner wrote:

> hi,
>
> i'm running a server with Fedora Core 1.  this is using Apache 2.0.48
> and PHP 4.3.4.
>
> i have my http server root at /var/www/html/.  i have some virtual hosts
> setup.
>
> i've just installed phpMyAdmin 2.5.6.  my problem lies within the
> auto_prepend_file and auto_append_file directives provided by PHP.  i
> have no default prepended or appended files, but have these directives
> set up for each virtual host.  so, the section of my httpd.conf file
> that takes care of this, looks like so:
>
> 
>   php_value auto_prepend_file /var/www/html/virtual_host1/header.php
>   php_value auto_append_file /var/www/html/virtual_host1/footer.php
> 
>
> 
>   php_value auto_prepend_file /var/www/html/virtual_host2/header.php
>   php_value auto_append_file /var/www/html/virtual_host2/footer.php
> 
>
>
> now, i have no header or footer defined for phpMyAdmin, which lies under
> /var/www/html/phpMyAdmin/.  but what happens, is that the header and
> footer from my 1st virtual host are randomly included, making phpMyAdmin
> look hideous, and often making it not work because it needs to place
> information in the HTML Header.  whether or not these files are included
> seems to be quite random, tho, as it does not happen all the time.  i
> could log into phpMyAdmin just fine, browse through a few tables, and
> then it will begin including the header and footer.  another thing i've
> noticed though, is that these files never get included in the Fedora
> Core Apache Test Page, which lies under /var/www/html/.
>
> i think this looks like a bug in either PHP or Apache...  any ideas?
>
> thanks!
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
It's a chicken and egg problem.  Until enough people, especially core PHP
folks, start using Apache2 seriously, it is not going to have enough
experienced eyes fixing the various little niggly t

php-general Digest 13 Mar 2004 06:24:31 -0000 Issue 2643

2004-03-12 Thread php-general-digest-help

php-general Digest 13 Mar 2004 06:24:31 - Issue 2643

Topics (messages 180273 through 180315):

An extension to CREATE zips??
180273 by: Brian J. Celenza

Re: XSS Vulnerabilities and strip_tags
180274 by: Andre Cerqueira

Re: STrange Problem
180275 by: PHP
180276 by: Richard Davey
180277 by: trlists.clayst.com
180278 by: PHP
180279 by: Richard Davey
180280 by: trlists.clayst.com
180281 by: Richard Davey
180282 by: Richard Davey
180284 by: PHP
180285 by: Richard Davey
180286 by: PHP
180287 by: PHP
180288 by: Richard Davey
180289 by: trlists.clayst.com

Re: Get "nice" variables from POST
180283 by: Jaskirat Singh

creating thumbnails
180290 by: Maxi Yedid
180291 by: Jay Blanchard
180292 by: Brad Pauly

Adding php to the "include_path" in the php.ini???
180293 by: Scott Fletcher
180299 by: Jason Wong

Re: Help with arrays
180294 by: Elliot J. Balanza

Character Question
180295 by: David Westbrooks
180296 by: Pablo Gosse
180300 by: Filip de Waard

New Problem with Arrays won't show the first record of a query.
180297 by: Elliot J. Balanza
180304 by: Rasmus Lerdorf
180309 by: trlists.clayst.com
180311 by: Elliot J. Balanza

Servlet/PHP integration
180298 by: dba user
180302 by: Vail, Warren
180303 by: dba user

test
180301 by: JAMES OXFORD

ereg problem
180305 by: Newman Weekly.
180307 by: Newman Weekly.

SESSIONS SESSIONS SESSIONS
180306 by: Alberto García Gómez
180308 by: Jason Davidson

SMTP Authentication
180310 by: Beauford
180312 by: Elliot J. Balanza
180313 by: Manuel Lemos

Apache Config: php_value "auto_prepend_file" & "auto_append_file"
180314 by: Chris Wagner
180315 by: Rasmus Lerdorf

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 ---
Is there function library capable of creating zip files and adding files to
a zip archive under the windows/apache platform? After some extensive
browsing I can only turn up read-only access functions.

Thank you,
Brian
--- End Message ---
--- Begin Message ---
i didnt know what XSS was, just read it on webopedia.com now, maybe i 
got the wrong idea...

strip_tags should prevent a kind of explotation, but maybe its behavior 
is not exactly what you want...
see also htmlentities (http://www.php.net/htmlentities)

you need to ask yourself how the environment that you are using will 
interpret things
if you are sending "SELECT ... FROM ... WHERE field1='". 
$_POST['field1'] ."'", if $_POST['field1'] is:
0' OR field2=0 AND ''='

the resulting string would be:
SELECT ... FROM ... WHERE field1='0' OR field2=0 AND ''=''
and you probably dont want people making queries as they like hehe

dont let ppl upload files and save them as .php or any other extension 
that would trigger a special behavior on the server that they shouldnt 
be able to

remember you can never trust input data...

[EMAIL PROTECTED] wrote:
Is the general wisdom that using strip_tags on input is sufficient to 
protect against XSS vulnerabilities from that input?  I have been doing 
some reading on it but haven't found anything that suggests a 
vulnerability that removing the tags in this way would not cure.

Are there multi-level encodings that can get past strip_tags?

I probably should also be doing a urldecode before strip_tags to get 
around any hex encodings, or does strip_tags handle that?

Thanks for any info,

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

OK, I do get the following error.
1044: Access denied for user: '@localhost' to database 'mydatabase'

Even though I specify the user in mysql_connect, for some reason,
mysql_select_db is trying to user a blank user,
Any Ideas?



>Hi,
>I am using RH9, Mysql 3.23.58, PHP 4.2.2, apache2.0
>
 >mysql_select_db("mydatabase",$connect_id)
>
>allways fails.
>
>I can use $connect_id = mysql_connect("localhost","apache"); (YES, I do
have this line before the mysql_select_db);
>just fine.
>I can run querys against the database with no problems, but for some
reason,
>
>mysql_select_db("mydatabase",$connect_id)
>
>will allways return false, and I don't see any errors anywhere in any log.
Why can I not select the database with this, but have no problems using the
database >with every other mysql function?
--- End

php-general Digest 8 Mar 2004 15:03:41 -0000 Issue 2634

2004-03-08 Thread php-general-digest-help

php-general Digest 8 Mar 2004 15:03:41 - Issue 2634

Topics (messages 179718 through 179749):

Re: Do not want Undefined variable message
179718 by: Michal Migurski

Re: Job listings
179719 by: Anders Hellström

Re: Programming
179720 by: Phil Dowson
179722 by: Cosmin
179742 by: Jay Blanchard

Help with PPP Strategies
179721 by: Pooya Eslami
179724 by: Burhan Khalid

Mail Function
179723 by: Will
179745 by: Will

MYSQL & Image functions
179725 by: res0b8b6
179730 by: Jason Wong

Re: undefined index  please help 
179726 by: Dominique ANOKRE

calling stored procedures & ORACLE 9i
179727 by: jon

PHP not browser independent?
179728 by: Merlin
179729 by: Richard Davey
179731 by: Mirek Novak
179732 by: Richard Davey

fsockopen() errors.
179733 by: Phil Ewington - 43 Plc
179736 by: "Miguel J. Jiménez"
179738 by: Phil Ewington - 43 Plc

Mail Headers
179734 by: Jarratt Ingram
179737 by: "Miguel J. Jiménez"

Re: __autoload() and Exceptions
179735 by: David Danier

RSA or other private/public key signature  functions?
179739 by: Richard Čepas

Re: {OT}UK Bank Holidays 2
179740 by: Jay Blanchard

Re: Let's start a php-advanced list!
179741 by: Jay Blanchard

Compiling PHP classes/libraries to objects
179743 by: Tariq Murtaza

absolute path
179744 by: Mike Mapsnac
179747 by: Richard Davey
179748 by: Ford, Mike   [LSS]

Re: writing meta information into png
179746 by: Marek Kilimajer

PHP support C++?
179749 by: Kenneth

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 ---
>But when i run the testinclude program I always get "Undefined variable
>errro on very first line. I know it is because vars are not defined yet,
>but i remember last time those warnings never used to come. What setting
>is needed in php.ini file ?

Check the manual for "error reporting."

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html
--- End Message ---
--- Begin Message ---
At 18.42 -0800 2004-03-07, Chris Shiflett wrote:
>--- Larry Brown <[EMAIL PROTECTED]> wrote:
>> I don't see how it could be to anyone's disadvantage.  As a matter of
>> fact, I think that it would be great to also have it available as a soap
>> service as well.
>
>I was thinking the same thing after reading Ben's comment. I think people
>might be more interested in local job boards, but a global resource could
>provide an organized outlet for this by sharing this data via feeds.
>
>So, people can post job openings on this board, and local user groups can
>syndicate this data based on local preferences, or they can even let their
>users sign in and have even more personalized listings (bypassing the
>necessity of searching). Along the same lines, local user groups can help
>syndicate data back to the core PHP job resource as well.

Personally I think a single global resource is the best. Since you would be able to 
search/browse specific locations, local job listings don't have much of an advantage, 
except perhaps that what companies put in their ads varies from country to country, 
and that's generally not a big issue. And people willing to relocate will probably 
appreciate having to look only in one place.

That the job listings should be made available for syndication in some form or another 
always felt so obvious to me I may have failed to mention it. Of course both 
PHPCommunity.org and the local user groups would benefit from having the job listings 
displayed on the web sites of the local user groups, so I'm all for that.

And users on PHPCommunity.org should be able to save default filters/searches for 
easier browsing, as well as have notification of new ads (that match their saved 
settings) sent to them by E-mail.




--
Anders Hellström
PHPCommunity.org: Open Source, Open Community

Dumburken.net: Reklamfria TV-tablåer
--- End Message ---
--- Begin Message ---
Hi,

I have been working with PHP for a few years now, and I feel very 
comfortable with it. I am considering branching out into windows 
application development, and I was wondering what language people would 
recommend for someone comfortable with PHP.

I have heard that PHP can be used in this capacity, would PHP work for 
me to create applications with a GUI?

I am sorry if this really is an off topic post!

Thanks


php-general Digest 8 Mar 2004 02:42:57 -0000 Issue 2633

2004-03-07 Thread php-general-digest-help

php-general Digest 8 Mar 2004 02:42:57 - Issue 2633

Topics (messages 179697 through 179717):

Re: remote stop/start the applications
179697 by: Raditha Dissanayake
179698 by: CurlyBraces Technologies \( Pvt \) Ltd

Re: Let's start a php-advanced list!
179699 by: Larry Brown

writing meta information into png
179700 by: p80

Image creation
179701 by: Kenneth

Re: extra breaks in sent out emails
179702 by: Ben Ramsey
179705 by: Scott Taylor
179706 by: Ben Ramsey

PHP security
179703 by: Martin Nicholls
179704 by: Jason Davidson
179713 by: Martin Nicholls

Re: imagecreatejpeg locks php
179707 by: kringla

Re: How to write this correctly?
179708 by: Tom Rogers

Re: Job listings
179709 by: Anders Hellström
179712 by: Ben Ramsey
179714 by: Larry Brown
179717 by: Chris Shiflett

Re: Question of Charset
179710 by: Ligaya Turmelle
179716 by: edwardspl.ita.org.mo

getting message from file
179711 by: Kenneth

Do not want Undefined variable message
179715 by: Manisha Sathe

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 ---
You can only kill your own processes or you have to rely on a suexec 
mechanism. What you should be doing is SFTA because this topic has been 
discussed many times in the past.

all the best

CurlyBraces Technologies ( Pvt ) Ltd wrote:

By using php web page of a certain webserver can i go into the some other
local plase in the same web server ?
Because for the special request i want kill some prosess which are runs in
the webserver.
All Telent and other remote login restricted from the firewall .
thanx

- Original Message - 
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, March 07, 2004 7:16 PM
Subject: Re: [PHP] Fw: remote stop/start the applications

 

On Sunday 07 March 2004 20:50, CurlyBraces Technologies \( Pvt \) Ltd
   

wrote:
 

Tell me even , is it possible to do so ??
 

Yes.

--
Jason Wong -> Gremlins Associab.php
   

 



--
Raditha Dissanayake.
---
http://www.radinks.net/ftp/applet/
An applet that breaks all the rules. Reads, Writes and Deletes files on 
your hard disk. Uploads what's left to a third party server.
--- End Message ---
--- Begin Message ---
sorry , u didn't get my point ..i will explain it again.
1.web server runs with some php scripts
2.It will show the out put of a certain executable file's result.
3.This file run in the /usr/local/src/./asd.pl
4.I need stop the function of that file , like ctrl+c

can u hel me further ?

thanx


- Original Message - 
From: "Raditha Dissanayake" <[EMAIL PROTECTED]>
Cc: "PHP" <[EMAIL PROTECTED]>
Sent: Sunday, March 07, 2004 8:31 PM
Subject: Re: [PHP] Fw: remote stop/start the applications


> You can only kill your own processes or you have to rely on a suexec
> mechanism. What you should be doing is SFTA because this topic has been
> discussed many times in the past.
>
> all the best
>
> CurlyBraces Technologies ( Pvt ) Ltd wrote:
>
> >By using php web page of a certain webserver can i go into the some other
> >local plase in the same web server ?
> >Because for the special request i want kill some prosess which are runs
in
> >the webserver.
> >All Telent and other remote login restricted from the firewall .
> >
> >thanx
> >
> >- Original Message - 
> >From: "Jason Wong" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Sunday, March 07, 2004 7:16 PM
> >Subject: Re: [PHP] Fw: remote stop/start the applications
> >
> >
> >
> >
> >>On Sunday 07 March 2004 20:50, CurlyBraces Technologies \( Pvt \) Ltd
> >>
> >>
> >wrote:
> >
> >
> >>>Tell me even , is it possible to do so ??
> >>>
> >>>
> >>Yes.
> >>
> >>-- 
> >>Jason Wong -> Gremlins Associab.php
> >>
> >>
> >>
> >>
> >
> >
> >
>
>
> -- 
> Raditha Dissanayake.
> ---
> http://www.radinks.net/ftp/applet/
> An applet that breaks all the rules. Reads, Writes and Deletes files on
> your hard disk. Uploads what's left to a third party server.
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: ht

php-general Digest 7 Mar 2004 14:15:48 -0000 Issue 2632

2004-03-07 Thread php-general-digest-help

php-general Digest 7 Mar 2004 14:15:48 - Issue 2632

Topics (messages 179676 through 179696):

Need Help in shoppin cart
179676 by: New Session
179677 by: Ryan A
179681 by: John Nichel

Re: UK Bank Holidays 2
179678 by: Raditha Dissanayake

Re: PHP and Apache Using up all memory
179679 by: Raditha Dissanayake
179685 by: Juan E Suris
179696 by: Raditha Dissanayake

Re: domain.org/?page=pageName method
179680 by: Raditha Dissanayake

Re: Mail fifth parameter
179682 by: Raditha Dissanayake
179683 by: Jason Davidson
179684 by: joel boonstra
179695 by: Raditha Dissanayake

Re: preg_split - spliting string
179686 by: Burhan Khalid
179692 by: Bambero

Re: extra breaks in sent out emails
179687 by: Scott Taylor

Whom to report a serious bug in Zend Encoder
179688 by: Erdener Gonenc
179689 by: Jason Davidson
179690 by: Erdener Gonenc

Re: remote stop/start the applications
179691 by: CurlyBraces Technologies \( Pvt \) Ltd
179693 by: Jason Wong
179694 by: CurlyBraces Technologies \( Pvt \) Ltd

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 ---
Sir,
I am a web developer, I had made many sites like shooping cart, mangement
leads etc.
 Iam comfortable in PHP as well as in ASP & iam ready to make sites in just
$500.Sites made by me are running successfully and doing great job .I can
make site having following facilities.

 Admin Panel:

 Nice & easy Admin Panel able to make Superuser or subusers.
 Able to log the subusers activites.
 Order management.
 Newsletter management.
 Products management.
 Categories management
 Auto mail generation in case of stock out of order.
 Shipping management.
 Multiples photos for each products.
 CMT management(To dynamically add page later on, or for dynamic contents).
 Bulk Upload(CSV).
 FedEx, Freight, or UPS Shipping
 Sales Tax Integration.
 etc as per client request.

 Front End:

 Nice user friendly Front end with search facility .
 Secure Socket Layer enabled.
 Online linkpoint integration(Credit Card processing).
 Authorization  enabled.
 Drop Down Floating dynamic menus
 Ability to register for fast checkout processing.
 Subscribe for newsletter.
 Product Purchase & Total Shopping cost on every page.
 Ability to track order status
 Auto mail generation on change in order status.
 etc as per client request.

Below are the description of the applications I had made:-

1. The site selling vehicles. It would involve a comprehensive zip search on
dealers within the locality from which a visitor submits   a request. The
concerned dealers would get the request on their corresponding  dash boards
to pursue the leads.The site has a simple backend for adding / modifying /
deleting vehicle categories and descriptions.

2.  The site can help you fulfill your goal of buying or selling your dream
property.

3.  The site is integrated with our online content management tool, thereby
giving the site owner complete control over the content  management.

4.  Site features SSL eCommerce and an interactive JavaScript quote form.

5.  The site has a front end of one page and further access is only
available to their retailers. It consists of a very complex admin panel in
the backend which is capable of Creating accounts for new retailers and fix
a profit % for each retailer. which would  mean that when a retailer logs in
he'd see a price list with the profit % added to the base price. This list
would appear different to  each retailer, as pertaining to his
profile.Administrator can set a different product list for different
retailers. This means that a retailer interested in a particular category/s
of product would only see that category/s and not others. This facilitates
quick order  placement.Administrator has a facility of being notified by
email after each order placement. He can also have generated, various
summary and detailed reports.

6.  The site offers it's wholesale dealers a facility to register with it
and place orders. There is a full fledged backend administration panel
associated with the site, for managing the orders.

7.  The site is a totally back-end driven site. The site admin can create
new links and pages on the fly and populate them from the DB. The admin
panel features an DB import and export tool which is useful to import-export
a large huge amount of data at one go.

8.  The site administrator can send regular preformtted HTML news letters to
the registered clients through the site. The news letters can be fully
customized through a web admin panel.

9.  An online store for great educational products for children. The site
offers a co

php-general Digest 7 Mar 2004 02:14:35 -0000 Issue 2631

2004-03-06 Thread php-general-digest-help

php-general Digest 7 Mar 2004 02:14:35 - Issue 2631

Topics (messages 179647 through 179675):

Re: How to write this correctly?
179647 by: Brian V Bonini
179658 by: joel boonstra
179665 by: Brian V Bonini
179675 by: Tom Rogers

Re: UK Bank Holidays 2
179648 by: Ryan A
179650 by: Raditha Dissanayake
179655 by: Ryan A
179662 by: Ben Ramsey
179663 by: Ryan A

Re: Let's start a php-advanced list!
179649 by: Ryan A
179657 by: Jason Davidson
179670 by: Galen
179671 by: Jason Davidson
179672 by: Marc Greenstock

Scripts for customer - service provider web available?
179651 by: Denis L. Menezes
179656 by: Ryan A

PHP and Apache Using up all memory
179652 by: Juan E Suris

Question of Charset
179653 by: edwardspl.ita.org.mo

Changing Default Charset
179654 by: Junaid Saeed Uppal
179666 by: Brian V Bonini

Re: when is a PDF not a PDF?
179659 by: Jeff Harris

extra breaks in sent out emails
179660 by: Scott Taylor
179661 by: Ben Ramsey

domain.org/?page=pageName method
179664 by: Barýþ

Mail fifth parameter
179667 by: Enrico Comini
179668 by: Jason Davidson
179669 by: Marek Kilimajer

imagecreatejpeg locks php
179673 by: kringla

preg_split - spliting string
179674 by: Bambero

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 ---
On Sat, 2004-03-06 at 08:50, Labunski wrote:
> // or example I have some link:
> 
> About people
> 
> // so this function will output the content of people.txt file:
> 
> if ($action=="people"){
> function output() {
> $file = file("data/people.txt");
> foreach($file as $value ) {
> $output .= "$value";
> }
> return $output;
> }
> $content = output();
> }else{
> error ();
> }
> 
> // How can I improve this function so, that it will work automaticly with
> other links (below) too.
> 
> Factories
> Beautiful pictures
> Zoo
> Contact us
> 
> P.S.
> I have tried to improve If tag and the name of .txt file this way:
> if ($action=="$action"){
> function output() {
> $file = file("data/".$action.".txt");
> 
> .. but the syntax is incorrect.
> What to do?

function output($data_file)
{
$file = file("data/$data_file.txt");

foreach($file as $value ) {
$output .= "$value";
}

return $output;
}


switch($action) {
  case "people":
 output('people');
 break;
  case "industry":
 output('industry');
 break;
  case "art"
 output('art')
 break;
  case "animals":
 output('animal');
 break;
  case "contact":
 output('contact');
 break;
}



-- 
Brian V Bonini <[EMAIL PROTECTED]>
--- End Message ---
--- Begin Message ---
On Sat, Mar 06, 2004 at 09:34:26AM -0500, Brian V Bonini wrote:
> > What to do?
> 
> function output($data_file)
> {
> $file = file("data/$data_file.txt");
> 
> foreach($file as $value ) {
> $output .= "$value";
> }
> 
> return $output;
> }
> 
> 
> switch($action) {
>   case "people":
>  output('people');
>  break;
>   case "industry":
>  output('industry');
>  break;
>   case "art"
>  output('art')
>  break;
>   case "animals":
>  output('animal');
>  break;
>   case "contact":
>  output('contact');
>  break;
> }

Hrm... why the switch() statement?  I can see the need for validating
user-submitted data, but to make it a little more flexible, maybe
something like this:

   

To add more valid actions, you can just extend the array of valid
actions, rather than adding clauses to the switch statement.

joel

-- 
[ joel boonstra | gospelcom.net ]
--- End Message ---
--- Begin Message ---
On Sat, 2004-03-06 at 16:17, joel boonstra wrote:

> Hrm... why the switch() statement?

Ir seemed close to what he already had going.
--- End Message ---
--- Begin Message ---
Hi,

Saturday, March 6, 2004, 11:50:04 PM, you wrote:
L> // or example I have some link:

L> About people

L> // so this function will output the content of people.txt file:

L> if ($action=="people"){
L> function output() {
L> $file = file("dat

php-general Digest 6 Mar 2004 14:08:01 -0000 Issue 2630

2004-03-06 Thread php-general-digest-help

php-general Digest 6 Mar 2004 14:08:01 - Issue 2630

Topics (messages 179621 through 179646):

Re: UK Bank Holidays 2
179621 by: Tom Rogers
179625 by: Ben Ramsey
179627 by: Ryan A
179631 by: Shaun
179633 by: Jason Wong
179634 by: Shaun
179635 by: electroteque
179636 by: Jason Wong

Re: FIle Upload problems
179622 by: Andre Cerqueira
179623 by: Brian V Bonini
179624 by: Jason Wong
179644 by: Brian V Bonini

Re: php/mysql run on  Microsoft Personal Web Server 4.0 ?
179626 by: Five

Let's start a php-advanced list!
179628 by: Galen
179629 by: Rasmus Lerdorf
179630 by: Jason Wong
179632 by: electroteque
179646 by: Brian V Bonini

Am i dreaming or is the php frontpage broken ?
179637 by: electroteque

Newbie
179638 by: Amimu Austin
179645 by: Brian V Bonini

Re: undefined index  please help 
179639 by: Dominique ANOKRE
179641 by: John Nichel

when is a PDF not a PDF?
179640 by: Rick Fleischer

Re: odd, sporatic upload problem ...
179642 by: Raditha Dissanayake

How to write this correctly?
179643 by: Labunski

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 ---
Hi,

Saturday, March 6, 2004, 12:03:15 PM, you wrote:
TR> Hi,

TR> Saturday, March 6, 2004, 10:39:13 AM, you wrote:
S>> Hi,

S>> How can PHP recognise dates that are UK Bank Holidays?

S>> Thanks for your help


TR> Well first question is:
TR> What are the rules for a bank holiday in the UK
TR> is it  the first monday of a month, after christmas day , new year
TR> etc..

TR> If there is such a rule PHP can usually dig it out. If they are
TR> decided by committee then you are on your own :)

TR> -- 
TR> regards,
TR> Tom


This may help you

http://www.dti.gov.uk/er/bankhol.htm

Probably the best way to tackle this is to store the info in a table
as it looks like it is decided by rules, committee and the Queen

-- 
regards,
Tom
--- End Message ---
--- Begin Message ---
WTF? isnt this the second time today this has appeared on the list?

Dude, other than the people in the UK nobody cares about
UK bank holidays...search google for this query and maybe someone from
there has written something for it..or read the manual a couple of times and
you'll see that the bottom question is a real dumb one.
Ryan:  Well, that's not a very nice way to treat someone on the list, 
even if it was the second time you'd seen the question in the same day 
or even if it was a question that is obviously in the manual.  Some 
people are just at different proficiencies in their learning process and 
don't yet know to go to the manual for certain questions.  If we treated 
every newbie like this, then we wouldn't have people coding in PHP!

Shaun: Consequently, the question was a valid one that the manual could 
not answer, and the short answer is, "no."  PHP does not have an 
intrensic way of telling on what dates UK banking holidays fall (mainly 
because not everyone coding PHP lives in the UK).  You will need to 
write your own function for this.  The easiest way would be to just look 
at a calendar for several years in advance and just plug all the dates 
into an array and test the array to see if today's day is in there.  If 
it is, then today is a banking holiday.

Hope that helps.

--
Regards,
 Ben Ramsey
 http://benramsey.com
 http://www.phpcommunity.org/wiki/People/BenRamsey
--- End Message ---
--- Begin Message ---
> Ryan:  Well, that's
> not a very nice way to treat someone on the list,
> even if it was the second time
> you'd seen the question in the same day
> or even if it was a question that is obviously in the manual.  Some
> people are just at different proficiencies in their learning process and
> don't
> yet know to go to the manual for certain questions.  If we treated
> every newbie like this, then we
> wouldn't have people coding in PHP!

Hi _uncle_ Ben,
I have nothing against newbies or newbie questions even though I may read
questions like which is the
best shopping cart, best PHP IDE etc 3+ times in a month, or why
register_globals are better off or why
"this code does not work" when its just a semicolon missing...although I
must say the most frequient seems
to be then ones where people write to the list without even trying to do a
single word search on google.
I too was a newbie and compared to some
guys on the list I still most certainly am. But when you write a question
that does not get answered the first
time round...then retry a bit l

php-general Digest 3 Mar 2004 12:30:59 -0000 Issue 2624

2004-03-03 Thread php-general-digest-help

php-general Digest 3 Mar 2004 12:30:59 - Issue 2624

Topics (messages 179320 through 179336):

Re: resubmitting $POST data to another script
179320 by: Chris Shiflett
179321 by: Marek Kilimajer
179322 by: Chris Shiflett
179323 by: Leif Gregory
179324 by: Chris W. Parker
179333 by: Erwin Kerk

Re: IE6 with latest hotfixes breaks forms ...
179325 by: Marc G. Fournier
179328 by: Chris Shiflett

Re: PHP application design with WAE UML.
179326 by: Lukasz Karapuda

merge array
179327 by: Max
179330 by: Lucian Cozma
179331 by: Lucian Cozma

PHP5 COM get/set property trouble
179329 by: Daniel Daley

Re: numeric characters
179332 by: Dominique ANOKRE
179335 by: Jakes

writing file on server from database?
179334 by: raisinlove

SQLite Support is library call?
179336 by: DAvid Jackson

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 ---
--- Marek Kilimajer <[EMAIL PROTECTED]> wrote:
> Let's not make it complicated:
> 
> confirmation.php:
> 
> 
> 
> email.php:
> 
> $_POST = unserialize(stripslashes($_POST['post']));

I think the other person's suggestion (hidden fields) was made so that the
original poster doesn't lose all other POST data (since he mentioned a
second POST request).

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming mid-2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/
--- End Message ---
--- Begin Message ---
Chris Shiflett wrote:
--- Marek Kilimajer <[EMAIL PROTECTED]> wrote:

Let's not make it complicated:

confirmation.php:



email.php:

$_POST = unserialize(stripslashes($_POST['post']));


I think the other person's suggestion (hidden fields) was made so that the
original poster doesn't lose all other POST data (since he mentioned a
second POST request).
This method does not lose any post data as the whole $_POST array is 
serialized. Then it is unserialized back to $_POST array at the second page.
--- End Message ---
--- Begin Message ---
--- Marek Kilimajer <[EMAIL PROTECTED]> wrote:
> This method does not lose any post data as the whole $_POST array is 
> serialized. Then it is unserialized back to $_POST array at the second
> page.

It loses all new data:





Because of this:

$_POST = unserialize(stripslashes($_POST['post']));

The method is fine, but it's no simpler than the other person's suggestion
when this specific scenario is considered. More logic is necessary to
prevent the loss of data.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming mid-2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/
--- End Message ---
--- Begin Message ---
Hello Charlie,

Tuesday, March 2, 2004, 1:54:43 PM, you wrote:
CFI> I'm creating a form with 170 fields, and I'd like to create an
CFI> intermediary page so the user can review their info before
CFI> submitting it again to the emailing script.

Just a thought. I'm guessing you are dumping this stuff to a database
for the final result. Why don't you create an intermediate table to
hold those fields (keeping track of the record ID in a hidden input
field), then re-read that data back on the validation page, then when
they submit it there, the changes are added to the real table.

My only thinking on this is to keep it simple rather than carrying
over a ton of hidden fields. It may not be the most efficient method,
but it'd work.



Cheers,
Leif Gregory 

-- 
TB Lists Moderator (and fellow registered end-user)
PCWize Editor  /  ICQ 216395  /  PGP Key ID 0x7CD4926F
Web Site <http://www.PCWize.com>
--- End Message ---
--- Begin Message ---
Chris Shiflett <mailto:[EMAIL PROTECTED]>
on Tuesday, March 02, 2004 3:56 PM said:

> It loses all new data:

[snip]

> The method is fine, but it's no simpler than the other person's
> suggestion when this specific scenario is considered. More logic is
> necessary to prevent the loss of data.

it was my understanding that the second page does not introduce any new
data. it was merely a confirmation page where the previous pages data
would be displayed.



chris.
--- End Message ---
--- Begin Message ---
Chris Shiflett wrote:

It loses all new data:




Because of this:

$_POST = unserialize(stripslashes($_POST['post']));
I think array_merge will fix this:

$_POST = array_merge($_POST,unserialize(stripslashes($_POST[

php-general Digest 2 Mar 2004 11:41:41 -0000 Issue 2622

2004-03-02 Thread php-general-digest-help

php-general Digest 2 Mar 2004 11:41:41 - Issue 2622

Topics (messages 179195 through 179225):

IE6 with latest hotfixes breaks forms ...
179195 by: Marc G. Fournier
179196 by: Chris Shiflett
179198 by: Marc G. Fournier
179199 by: Chris Shiflett
179201 by: Beau Hartshorne
179202 by: Marc G. Fournier
179209 by: Chris Shiflett
179210 by: Richard Davey
179217 by: Ford, Mike   [LSS]

Re: FTP alternative to copy() ?
179197 by: Raditha Dissanayake
179212 by: raisinlove
179213 by: raisinlove

Re: timer in php-cli
179200 by: Aidan Lister

Adverse performance of undefined variables and indexes?
179203 by: Rob Paxon
179205 by: Robert Cummings
179207 by: Rob Paxon
179211 by: Richard Davey

Credit Card validation
179204 by: Binay
179219 by: Nadim Attari

openssl - extracting public key
179206 by: Tony Carter

Re: Stumped on a totally wierd problem
179208 by: Phillip Jackson

Re: php newsgroup portal?
179214 by: Zhang Weiwu

Re: check if a variable is declared as private
179215 by: Vivian Steller

re-raise the question: best usenet gateway
179216 by: Zhang Weiwu
179218 by: Zhang Weiwu

Sessions, sessions and... sessions
179220 by: Puiu Hrenciuc
179221 by: Richard Davey
179222 by: electroteque
179223 by: Puiu Hrenciuc
179225 by: Puiu Hrenciuc

Session and MS-IE6
179224 by: Pance

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 ---

We're having a weird problem with some of our PHP forms, where, when a
client uses IE6 with the latest hotfixes, they are reporting that have to
re-submit a couple of times for it to "take" ... as if somehow the data
isn't being passed down properly to the FORM/ACTION ...

We're using sessions to pass the data around, and it seems to work with
every other browser we've used, including IE6 previous to the latest
hotfixes ... but, could it be something that *we* aren't doing right, or
is there a known bug with sessions + IE6?  Some sort of work around?

Thanks ...


Marc G. Fournier   Hub.Org Networking Services (http://www.hub.org)
Email: [EMAIL PROTECTED]   Yahoo!: yscrappy  ICQ: 7615664
--- End Message ---
--- Begin Message ---
--- "Marc G. Fournier" <[EMAIL PROTECTED]> wrote:
> We're having a weird problem with some of our PHP forms, where, when a
> client uses IE6 with the latest hotfixes, they are reporting that have
> to re-submit a couple of times for it to "take" ... as if somehow the
> data isn't being passed down properly to the FORM/ACTION ...

I have heard from numerous sources that the latest patch for IE 6
(released a week or two ago) has a bug that causes it to have trouble
sending a proper POST request.

I don't have access to a Windows machine to test this myself, but it would
be very nice if someone could help pinpoint what circumstances cause this
behavior (surely it's not all POST requests). Capturing the raw request
from a failed transaction would be a good first step, and you can send me
this for interpretation if you like. I'm happy to help.

Chris

=
Chris Shiflett - http://shiflett.org/

PHP Security - O'Reilly
 Coming mid-2004
HTTP Developer's Handbook - Sams
 http://httphandbook.org/
PHP Community Site
 http://phpcommunity.org/
--- End Message ---
--- Begin Message ---
On Mon, 1 Mar 2004, Chris Shiflett wrote:

> --- "Marc G. Fournier" <[EMAIL PROTECTED]> wrote:
> > We're having a weird problem with some of our PHP forms, where, when a
> > client uses IE6 with the latest hotfixes, they are reporting that have
> > to re-submit a couple of times for it to "take" ... as if somehow the
> > data isn't being passed down properly to the FORM/ACTION ...
>
> I have heard from numerous sources that the latest patch for IE 6
> (released a week or two ago) has a bug that causes it to have trouble
> sending a proper POST request.
>
> I don't have access to a Windows machine to test this myself, but it would
> be very nice if someone could help pinpoint what circumstances cause this
> behavior (surely it's not all POST requests). Capturing the raw request
> from a failed transaction would be a good first step, and you can send me
> this for interpretation if you like. I'm happy to help.

k, I have access to at leaset one box running the latest IE6 ...
instructions on how to 'capture the raw request'?  Don't 

php-general Digest 1 Mar 2004 23:41:36 -0000 Issue 2621

2004-03-01 Thread php-general-digest-help

php-general Digest 1 Mar 2004 23:41:36 - Issue 2621

Topics (messages 179158 through 179194):

Re: values from string query
179158 by: Angelo Zanetti
179161 by: Ian Firla

Re: header(Location: question
179159 by: Chris Sandy

Re: How to get the auto-incremented value?
179160 by: Angelo Zanetti
179162 by: Richard Davey
179163 by: John Nichel

FTP alternative to copy() ?
179164 by: raisinlove
179165 by: Richard Davey
179166 by: Raditha Dissanayake
179175 by: raisinlove

Parsing URL's with Apache and PHP
179167 by: Brian J. Celenza
179168 by: Raditha Dissanayake
179169 by: Richard Davey
179178 by: Brian J. Celenza
179179 by: Brian J. Celenza

Undefined offset
179170 by: Jough P
179172 by: Stuart
179173 by: Jough P
179174 by: Raditha Dissanayake
179176 by: Richard Davey
179177 by: Jough P

timer in php-cli
179171 by: nobody

Re: SOLVED: [PHP] Undefined offset
179180 by: Jough P

Re: Cookies
179181 by: Chris Shiflett

Building a C++ extension to PHP
179182 by: Rob Ristroph

need form array help
179183 by: Brian V Bonini
179185 by: Chris W. Parker
179187 by: Chris W. Parker
179188 by: Brian V Bonini
179189 by: Chris W. Parker
179190 by: Brian V Bonini
179191 by: Kelly Hallman

Question about magic quotes NEWBIE QUESTION
179184 by: James Marcinek
179186 by: Richard Davey

proc_open problems
179192 by: Rick Ridgeway

PHP and FLASH progress bar
179193 by: Ryan A

Re: php crash and memory_limit
179194 by: kringla

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 ---
HI, just to let you all know the curly brackets worked!

-Original Message-
From: Ben Ramsey [mailto:[EMAIL PROTECTED]
Sent: Thursday, February 26, 2004 4:05 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP] Re: values from string query


You may want to try putting single quotation marks around your values 
and place your array values within curly braces...

VALUES ('{$a_row['p_name']}', '{$a_row['p_company']}',

.. and so forth.

Also, try echoing $c_query to see if the values are being stored in the 
variable properly, if you haven't already done so.  If the values aren't 
showing up in the variable, then you definitely need to include the 
curly braces.  If they are showing up, then perhaps MySQL needs the 
single quotation marks.

-- 
Regards,
  Ben Ramsey
  http://benramsey.com
  http://www.phpcommunity.org/wiki/People/BenRamsey

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


Disclaimer 
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is 
intended for the attention and use only of the addressee. 
Should you have received this e-mail in error, please delete 
and destroy it and any attachments thereto immediately. 
Under no circumstances will the Cape Technikon or the sender 
of this e-mail be liable to any party for any direct, indirect, 
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to 
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911
--- End Message ---
--- Begin Message ---

Try echoing your query and pasting it into mysql to make sure that the
problem isn't in the structure of your query.

Your connect statement selects a db, right?

Ian

On Thu, 2004-03-25 at 14:01, Angelo Zanetti wrote:
> HI all I have a Select that get a resultset, once I get this then I use the
> values of this resultset to enter them into another table using an INSERT
> statement. I get no errors from the statement but it just doesn't seem to
> see my variables from the recordset,
> 
> below is my code:
> 
> 
> 
> $q="select * from prospects where p_id = '$p_id'";
>   $result=mysql_query($q, $this->link) or die ("".mysql_error());
> 
>   while($a_row=mysql_fetch_array($result))
>   {
>   $c_query="Insert into client (c_name, c_company, c_worktel, 
> c_directtel,
> c_hometel, c_fax, c_cell, c_email, c_address, c_city, c_pcode, c_country)
> VALUES ($a_row['p_name'], $a_row['p_company'], $a_row['p_worktel'],
> $a_row['p_directtel'], $a_row['p_hometel'], $a_row['p_fax'],
> $a_row['

php-general Digest 1 Mar 2004 11:22:50 -0000 Issue 2620

2004-03-01 Thread php-general-digest-help

php-general Digest 1 Mar 2004 11:22:50 - Issue 2620

Topics (messages 179139 through 179157):

Opps
179139 by: Karl Timmermann

Get MySQL table field names
179140 by: Matt Palermo
179141 by: Michael Kunze
179149 by: Five
179151 by: Jason Wong
179153 by: Five
179157 by: Stuart

header(Location: question
179142 by: John
179143 by: DvDmanDT

Re: php crash and memory_limit
179144 by: kringla

Re: PHP Sessions
179145 by: Andre Cerqueira
179150 by: Tom Rogers

A question about permissions.might be a bit 0T
179146 by: Ryan A
179154 by: Burhan Khalid

Re: Text cleaning?
179147 by: Justin French

PHP and determining Business days.
179148 by: Steve

Cookies
179152 by: Paul Higgins

java.lang.UnsatisfiedLinkError: send trying to install PHP as a Servlet for Tomcat 
5.0.18 on FreeBSD
179155 by: Dan Hardiker

Re: Your document
179156 by: damien.seguy.nexen.net

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 ---
Sorry, I didn't know what top posting was, but someone just told me. 
Won't happen again..

Sorry!
Karl
--- End Message ---
--- Begin Message ---
How can I get the field names from a specified MySQL table?  I don't need
the data, I just want to get an array of the tables field names.

Thanks,

Matt
http://sweetphp.com
--- End Message ---
--- Begin Message ---
Matt Palermo wrote:

> How can I get the field names from a specified MySQL table?  I don't need
> the data, I just want to get an array of the tables field names.

use 'DESC table_name;'

-- 
Michael Kunze
http://www.smrealms.de/

Caterva carissima mea est Ille Quis.
--- End Message ---
--- Begin Message ---

"Michael Kunze" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> Matt Palermo wrote:
>
> > How can I get the field names from a specified MySQL table?  I don't need
> > the data, I just want to get an array of the tables field names.
>
> use 'DESC table_name;'
>
> -- 
> Michael Kunze
> http://www.smrealms.de/
>
> Caterva carissima mea est Ille Quis.

Could you elaborate on that a litttle? I spent about an hour researching and 
experimenting with DESC and can't get it to work.
--- End Message ---
--- Begin Message ---
On Monday 01 March 2004 10:04, Five wrote:
> "Michael Kunze" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>
> > Matt Palermo wrote:
> > > How can I get the field names from a specified MySQL table?  I don't
> > > need the data, I just want to get an array of the tables field names.
> >
> > use 'DESC table_name;'
>
> Could you elaborate on that a litttle? I spent about an hour researching
> and experimenting with DESC and can't get it to work.

mysql_list_fields(), read it before you use it.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
A man is only a man, but a good bicycle is a ride
-- Murphy's Laws on Sex n50
*/
--- End Message ---
--- Begin Message ---

"Jason Wong" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED]
> On Monday 01 March 2004 10:04, Five wrote:
> > "Michael Kunze" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]
> >
> > > Matt Palermo wrote:
> > > > How can I get the field names from a specified MySQL table?  I don't
> > > > need the data, I just want to get an array of the tables field names.
> > >
> > > use 'DESC table_name;'
> >
> > Could you elaborate on that a litttle? I spent about an hour researching
> > and experimenting with DESC and can't get it to work.
>
> mysql_list_fields(), read it before you use it.
>
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> --
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> --
> /*
> A man is only a man, but a good bicycle is a ride
> -- Murphy

php-general Digest 29 Feb 2004 22:55:22 -0000 Issue 2619

2004-02-29 Thread php-general-digest-help

php-general Digest 29 Feb 2004 22:55:22 - Issue 2619

Topics (messages 179128 through 179138):

php newsgroup portal?
179128 by: Zhang Weiwu
179129 by: Shane Nelson

Re: mkdir and  rmdir possible but not readdir and opendir???
179130 by: raisinlove

Re: $sring = ARRAY?
179131 by: Michael Lewis

Re: PHP5 only configures mysql 4.1 source with mysqli
179132 by: Raditha Dissanayake

Solved [PHP] Weird Problem with INPUT tag
179133 by: Ahbaid Gaffoor

PHP Sessions
179134 by: Paul Higgins

Mail class to send several e-mails within one smtp connection
179135 by: Juergen Mueller pro.vider.de GmbH
179136 by: Axiom
179137 by: Michael Kunze

Re: What's your favorite PHP weather code?
179138 by: Karl Timmermann

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 ---
Hello. I have been looking for a good php newsgroup reader for some 
time. News portal looks pretty good to me but I haven't tried yet.

There is a very charming project "mynewsgroup" at mynewsgroup.sf.net, 
particularly it has beautiful looking. But that project seems dead. The 
only mailing list is removed, and nobody look into its forum. I wrote to 
each developer about what is going on but none replied me!

What newsgroup reader do you use?
--- End Message ---
--- Begin Message ---
To read this list I use thunderbird:

  http://www.mozilla.org/projects/thunderbird/

It's an email client instead of a newsgroup reader.  Just filter the 
php-general messages into a separate folder and sort it by thread. 
Super easy to use and a very nice piece of software.

Shane

Zhang Weiwu wrote:
Hello. I have been looking for a good php newsgroup reader for some 
time. News portal looks pretty good to me but I haven't tried yet.

There is a very charming project "mynewsgroup" at mynewsgroup.sf.net, 
particularly it has beautiful looking. But that project seems dead. The 
only mailing list is removed, and nobody look into its forum. I wrote to 
each developer about what is going on but none replied me!

What newsgroup reader do you use?

--- End Message ---
--- Begin Message ---
The work-around is to create the directory outside of your web application
from your regular account.  Or if you are allowed to run cgi scripts and
these are set up via cgiwrapper or suExec to run as your own user id, use
this to create the directory.  Once created with the right owner, you can
manipulate it from your regular Apache-embedded PHP scripts.
Thank you! I'm definitely filing this solution for later use. Meanwhile, 
I went back to trying the FTP_MKDIR method and found why that didnt 
work. I realized when accessing the website via ftp that the system path 
was different than the one displayed online. IE: my script path was 
shown as /home/virtual/site... while in my ftp client I was seeing 
/var/www/html...
Changing my path references to the later one fixed everything...so far!

Thanks for the help :)
-s
--- End Message ---
--- Begin Message ---
MYSQL_FETCH_ROW returns an array of the values of the columns in a row. When
you try to use that value as, for example, a string or in a print statement
you get the word Array. What you probably want to do is the following (not
knowing your actual column names):

if (($value = mysql_fetch_array($result)) AND ($value['username'] ==
$username)) {

echo "You are authenticated";

} else {

echo "Your username or password is incorrect";

}



- Original Message -
From: "Axiom" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 28, 2004 11:57 PM
Subject: [PHP] $sring = ARRAY?


Why is it that in the following code that $value comes back with just the
word ‘ARRAY’ instead of the actual result?



if (($value = mysql_fetch_row($result)) AND ($value == $username)) {

echo "You are authenticated";

} else {

echo "Your username or password is incorrect";

}



-Casey


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.598 / Virus Database: 380 - Release Date: 2/28/2004
--- End Message ---
--- Begin Message ---
Hi,

I agree that it's a bad practice not to use a wrapper but it seems most 
people who use PHP took mysql for granted and haven't used any wrappers 
in their code.

Anyway the kind of wrappers commonly used to help separate out 
mysql/pgsql/mssql code probably will not be able to make full use of the 
new features available in mysqli. There's going to be a hell of a lot of 
conversion work ahead  and not all of it can be automated.



electroteque wrote:

Heh i jus

php-general Digest 29 Feb 2004 10:50:49 -0000 Issue 2618

2004-02-29 Thread php-general-digest-help

php-general Digest 29 Feb 2004 10:50:49 - Issue 2618

Topics (messages 179094 through 179127):

Re: creating file links on linux (ln) with php
179094 by: Jeremy

Re: mkdir and  rmdir possible but not readdir and opendir???
179095 by: raisinlove
179097 by: raisinlove
179113 by: Rasmus Lerdorf

Re: 2 OOP or Not 2 OOP
179096 by: Gareth Williams

How to recognize .mov .mp3 file types
179098 by: Radek Zajkowski
179103 by: Radek Zajkowski

Stumped on a totally wierd problem
179099 by: Brian V Bonini
179100 by: Brian V Bonini

Possible Leap Year bug with strtotime (4.3.4)?
179101 by: Rob Petty
179102 by: Rob Petty
179105 by: hitek

Array Question
179104 by: Jason Williard
179106 by: Michal Migurski

2 questions - PHP site Automatic search and slow display
179107 by: Ryan A
179108 by: Andre Cerqueira
179109 by: Rasmus Lerdorf

Re: PHP application design with WAE UML.
179110 by: Manuel Lemos
179112 by: daniel.electroteque.org
179116 by: Manuel Lemos
179118 by: daniel.electroteque.org

Re: - Receive mail with PHP.
179111 by: Manuel Lemos

$sring = ARRAY?
179114 by: Axiom
179120 by: Burhan Khalid

PHPdoc web interface
179115 by: daniel.electroteque.org
179125 by: Andre Cerqueira
179126 by: daniel.electroteque.org

Trying to get PHP to run on Windows
179117 by: Susan Donnelly
179119 by: Susan Donnelly

Re: Allow service to interact with desktop and have network access
179121 by: Burhan Khalid

Weird Problem with INPUT tag
179122 by: Ahbaid Gaffoor
179127 by: Richard Davey

Re: What's your favorite PHP weather code?
179123 by: Burhan Khalid

Re: php package
179124 by: Burhan Khalid

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 ---
RTFM.

http://us2.php.net/manual/en/function.symlink.php

-Original Message-
From: Merlin [mailto:[EMAIL PROTECTED]
Sent: Saturday, February 28, 2004 3:24 PM
To: [EMAIL PROTECTED]
Subject: [PHP] creating file links on linux (ln) with php


Hi there,

I do have a couple of hundred file links to create. I am wondering if 
this could be automated with php.

On a linux shell it would look like this:
ln united-states-map.jpg vereinigte-staaten-karte.jpg

Are there php commands to execute this ln command?

Thanx for any help on that,

Merlin

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
Rasmus Lerdorf wrote:

This is normal.  You are allowed to create the directory because the
directory you are creating it in is owned by the same user id that owns
the script calling mkdir().  However, since your web server runs as some
other user the owner of the newly created dir will be that user and not
your own so you subsequently cannot manipulate that directory.  Same
problem with safe mode and file uploads.  ISP's are generally better off
using open_basedir instead of safe-mode for this very reason.
I see, so there's no way around this then. I'll inquire to my host why 
open_basedir couldnt be used instead of safe-mode.
There's goes my plan of FTP-less website management :(

thanks
-steph
--- End Message ---
--- Begin Message ---
Surely if there is a work-around then safe mode would not be doing its job 
properly?
Well this was part of the purpose of my post, before Rasmus explained 
it, I didn't understand why I couldnt access a directory I had created. 
I was hoping for a function which would achieve the same purpose but 
wouldn't be affected by safe-mode. I've seen many other workaround 
solutions to other problems caused by the safe-mode setting.
Unfortunatly this doesnt seem to be such a case.

-s
--- End Message ---
--- Begin Message ---
On Sat, 28 Feb 2004, raisinlove wrote:

> > Surely if there is a work-around then safe mode would not be doing its job
> > properly?
>
> Well this was part of the purpose of my post, before Rasmus explained
> it, I didn't understand why I couldnt access a directory I had created.
> I was hoping for a function which would achieve the same purpose but
> wouldn't be affected by safe-mode. I've seen many other workaround
> solutions to other problems caused by the safe-mode setting.
> Unfortunatly this doesnt seem to be such a case.

The work-around is to create the directory outside of your web application
from your regular account.  Or if you are allowed to run cgi scripts and
these are set up via cgiwrapper or suExec to run as your own user id, use
this to c

php-general Digest 28 Feb 2004 21:58:44 -0000 Issue 2617

2004-02-28 Thread php-general-digest-help

php-general Digest 28 Feb 2004 21:58:44 - Issue 2617

Topics (messages 179059 through 179093):

Re: Text cleaning?
179059 by: Karl Timmermann
179063 by: Brian V Bonini
179066 by: Jason Wong

PHP to UML ?
179060 by: Rick \[Kitty5\]

- Receive mail with PHP.
179061 by: francesco.automationsoft.biz
179065 by: Raditha Dissanayake

UML from PHP?
179062 by: Rick \[Kitty5\]

Re: What's your favorite PHP weather code?
179064 by: Lowell Allen

Re: PHP5 only configures mysql 4.1 source with mysqli
179067 by: Raditha Dissanayake
179072 by: electroteque

php crash and memory_limit
179068 by: kringla
179084 by: Rasmus Lerdorf
179089 by: kringla

Compare timestamps?
179069 by: Brian Dunning
179083 by: Rasmus Lerdorf

Problem With Session Handling
179070 by: Kyndig
179080 by: Rasmus Lerdorf
179081 by: Rasmus Lerdorf
179082 by: Rasmus Lerdorf
179085 by: Kyndig
179086 by: Rasmus Lerdorf

Allow service to interact with desktop and have network access
179071 by: Vincent Bouret

mkdir and  rmdir possible but not readdir and opendir???
179073 by: raisinlove
179074 by: raisinlove
179075 by: Jason Wong
179077 by: Rasmus Lerdorf

flock problem
179076 by: Armand Turpel
179078 by: Rasmus Lerdorf
179079 by: Armand Turpel

between timestamps
179087 by: Ryan A
179090 by: Robert Cummings

Set Library Path
179088 by: Mike Mapsnac

creating file links on linux (ln) with php
179091 by: Merlin

Re: [PHP-DEV] PHP5: Class behavior: method overloading
179092 by: Cristiano Duarte

2 OOP or Not 2 OOP
179093 by: Monty

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 ---
Like if the sentence is split.

Thanks

On Feb 28, 2004, at 1:34 AM, Jason Wong wrote:

On Saturday 28 February 2004 16:15, Karl Timmermann wrote:
Opps, I failed to mention there can be more paragraphs with legit new
lines, like:
Hello, my name is Karl.
Hello, my name
is Dave.
This is some more example text.
Yes, this is yet some more.
So what is your criteria for "incorrect carriage returns" ?

--
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
The PILLSBURY DOUGHBOY is CRYING for an END to BURT REYNOLDS movies!!
*/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
On Sat, 2004-02-28 at 00:09, Karl Timmermann wrote:
> Does anyone have some PHP code to remove incorrect carriage returns?
> 

Depends on your definition of "incorrect".

-- 
BrianGnuPG -> KeyID: 0x04A4F0DC | URL: www.gfx-design.com/keys
  Key Server: pgp.mit.edu
==
gpg --keyserver pgp.mit.edu --recv-keys 04A4F0DC
GnuPG: http://gnupg.org
http://www.biglumber.com/x/web?qs=0x2C35011004A4F0DC
Linux Registered User #339825 at http://counter.li.org


signature.asc
Description: This is a digitally signed message part
--- End Message ---
--- Begin Message ---
On Saturday 28 February 2004 18:49, Karl Timmermann wrote:

Please do not top post.

> Like if the sentence is split.

1) define your idea of a sentence
2) construct a suitable regex for use with preg_replace()

If you don't know how to do (2) then at least do (1) and then someone might be 
able to help you do (2).

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
I cannot draw a cart, nor eat dried oats; If it be man's work I will do it.
*/
--- End Message ---
--- Begin Message ---
Is there a linux utility to parse a PHP project and spit out some UML
diagrams?
-- 
Rick

Kitty5 NewMedia http://Kitty5.com
POV-Ray News & Resources http://Povray.co.uk
TEL : (+44) 0845 1083740 - ICQ : 15776037

PGP Public Key : http://pgp.kitty5.com
--- End Message ---
--- Begin Message ---
Hi all,
i've two questions today: 
1- it's possible to receive mail with PHP?
There's in PHP a fu

php-general Digest 28 Feb 2004 09:47:38 -0000 Issue 2616

2004-02-28 Thread php-general-digest-help

php-general Digest 28 Feb 2004 09:47:38 - Issue 2616

Topics (messages 179027 through 179058):

arrays and sessions
179027 by: Kermit Short
179030 by: Chris W. Parker
179032 by: Kermit Short
179037 by: Chris W. Parker
179040 by: Justin Patrin

Re: List files in a dir
179028 by: Justin Patrin
179041 by: Raditha Dissanayake

Re: read it immediately
179029 by: Justin Patrin

Math weirdness with doubles...
179031 by: jon roig
179033 by: Daniel Clark
179034 by: D. Wokan
179035 by: jon roig
179036 by: Daniel Clark
179038 by: Marek Kilimajer

PHP application design with WAE UML.
179039 by: Lukasz Karapuda

Timestamp query...
179042 by: Ryan A
179043 by: Michal Migurski
179044 by: Robert Cummings
179045 by: Ryan A
179050 by: Jason Wong

php package
179046 by: edwardspl.ita.org.mo

to more fields in register
179047 by: devil_online
179051 by: Jason Wong
179052 by: devil_online
179053 by: Jason Wong
179054 by: devil_online

Text cleaning?
179048 by: Karl Timmermann
179055 by: Five
179056 by: Karl Timmermann
179057 by: Jason Wong

What's your favorite PHP weather code?
179049 by: Karl Timmermann

PHP5 only configures mysql 4.1 source with mysqli
179058 by: electroteque

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 ---
Uh, sorry, I'm Kermit, not news.php.net


OK gurus, I'm trying to create a page that allows me to create a table in my
MSSQL database.  I'm accepting the field info one by one in a form using a
PHP_SELF action.  This information is supposed to be collected in an array
that's to be stored as a session variable for semi-permanance, until the
array contains all the fields and information for the table.  A second form
will contain an action that sends the sql code for creating the table to the
database server, and viola, I've got myself a new table.  Or not.  If anyone
has any suggestions on how I can get this done I'd appreciate it!  I'd
really rather not post my whole code file, as it's really big and long, and
emphasizes how novice I am at PHP.  Thanks in advance for your help!

-Kermit
--- End Message ---
--- Begin Message ---
Kermit Short <mailto:[EMAIL PROTECTED]>
on Friday, February 27, 2004 1:47 PM said:

> A second form will contain an action that
> sends the sql code for creating the table to the database server, and
> viola, I've got myself a new table.

i prefer the violin, but viola's are cool too. ;)

> If anyone has any
> suggestions on how I can get this done I'd appreciate it!

wait.. i don't understand. you're asking us for a method to accomplish
what you describe or are you looking for help with a problem you're
having?? if the former, your method *sounds* ok to me. if the latter
please post the error you're getting.

> I'd really
> rather not post my whole code file, as it's really big and long, and
> emphasizes how novice I am at PHP.

good choice.


> Thanks in advance for your help!

no problem.


> -Kermit

is your real name Kermit?




chris.
--- End Message ---
--- Begin Message ---
I've got some code and it simply isn't working.  I thought it might be
because each time the form submits data, the array I'm storing information
in is being re-initialized.  If this is the case, I don't have the
multidimensional array I'm trying to get, but just a vector array with the
most recent submission data.  I tried making the array a session variable,
but I'm not even sure the session part of it is working.  So, if you have
any methods that you think might work better than what I'm trying to do, I'd
love to hear about it.  Basically, my file is structured like this:

1. Pull in POST data, and store them in php variables
2. If the POST data is null, display the first form and get the table name,
field name, field type, primary key, and null allowed information.  On
submit, the information is stored in an array.
3. If the POST data is not null, again display the entry form in case the
user needs to add more fields, and step through the array to display the
existing table info that the user has already entered.  A button in a second
form is also displayed.  When clicked, it actually creates the table.

My problems are that when I try to step through the array and display its
current contents, I get index not defined errors on my for loop indices
(?!).  The second problem is, when I try to use the print_r function to
display my arra

php-general Digest 27 Feb 2004 21:42:41 -0000 Issue 2615

2004-02-27 Thread php-general-digest-help

php-general Digest 27 Feb 2004 21:42:41 - Issue 2615

Topics (messages 178991 through 179026):

Re: Passing the value of a variable from PHP to JavaScript.
178991 by: Gareth Williams
178992 by: Prabu Subroto

Re: PHP5 simpleXML bug or am i just being silly :)
178993 by: William Bailey
178994 by: William Bailey

seesions problem
178995 by: Pance
178996 by: Seba
179000 by: Rich Gray
179005 by: Stuart
179008 by: Chris Shiflett
179015 by: Pance
179022 by: Chris Shiflett

Re: bug in PHP
178997 by: Michael Kunze
179007 by: Chris Shiflett

Re: PHP Apache Log Stats and viewer?
178998 by: Michael Kunze

stdClass
178999 by: Jakes

strstr
179001 by: Jakes
179002 by: Richard Davey
179003 by: Burhan Khalid
179006 by: Ben Ramsey

Re: renamed images are now corrupt...
179004 by: Burhan Khalid

Re: Sequential Random Character Generator
179009 by: Burhan Khalid

Importing PDF Text
179010 by: Adam Voigt
179012 by: Stuart
179013 by: Adam Voigt
179014 by: Stuart

Re: Weird result from query...?
179011 by: Jeff Harris

Where to talk business?
179016 by: rogue

php5 and xml
179017 by: Carlos

List files in a dir
179018 by: Shaun
179019 by: Chris W. Parker
179025 by: Ryan A

survey for graduation thesis
179020 by: Joost Wilbrink

read it immediately
179021 by: gaudyc.pt-sd.org

php-mode, emacs, and k&r style
179023 by: James Hughes

PHP and Workflow Engines
179024 by: Pascal Schaedeli

Arrays as session variables
179026 by: news.php.net

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 ---
Try this:

function tes(selCtrl){
document.write('JavaScript');
window.location.replace('http://192.168.23.1/coba/coba.php? 
vtes='+selCtrl.value);

}


or this:

function tes(){
   selCtrl = document.getElementById('vtes');
document.write('JavaScript');
window.location.replace('http://192.168.23.1/coba/coba.php? 
vtes='+selCtrl.value);

}




On 27 Feb 2004, at 10:00, Prabu Subroto wrote:

Dear my friends...

I have my code like this :
==

echo "

<br>
function tes(){<br>
document.write('<p>JavaScript</p>');<br>
window.location.replace('<a  href="http://192.168.23.1/coba/coba.php">http://192.168.23.1/coba/coba.php</a>? 
vtes=$vtes');</tt><br>
<br>
<pre style="margin: 0em;">}


";
echo "diforward ke javascript";

echo "


1
2

";
?>


==
I expect this result on url column of my internet browser:
"
http://192.168.23.1/coba/coba.php?vtes='1'
"
or
"
http://192.168.23.1/coba/coba.php?vtes='1'
"
But I only get this unexpected result:
"
http://192.168.23.1/coba/coba.php?vtes=
"
Lookslike the value of "$vtes" was not passed to JavaScript
interpreter.
Anybody of you have a solution for me?

Please teach me.

Thank you very much.
--
_
Web-based SMS services available at http://www.operamail.com.
From your mailbox to local or overseas cell phones.
Powered by Outblaze

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

--- End Message ---
--- Begin Message ---
Dear my friend, Gareth...

Yes, it worksThank you very much for your help. I really appreciate your help.

Thanks
- Original Message -
From: Gareth Williams <[EMAIL PROTECTED]>
Date: Fri, 27 Feb 2004 10:08:21 +0100
To: "Prabu Subroto" <[EMAIL PROTECTED]>
Subject: Re: [PHP] Passing the value of a variable from PHP to JavaScript.

> Try this:
> 
> > function tes(selCtrl){
> > document.write('JavaScript');
> > window.location.replace('http://192.168.23.1/coba/coba.php? 
> > vtes='+selCtrl.value);
> >
> > }
> 
> 
> 
> or this:
> 
> > function tes(){
> selCtrl = document.getElementById('vtes');
> > document.write('JavaScript');
> > window.location.replace('http://192.168.23.1/coba/coba.php? 
> > vtes='+selCtrl.value);
> >
> > }
> 
> 
> 
> 
> 
> On 27 Feb 2004, at 10:00, Prabu Subroto wrote:
> 
> > Dear my friends...
> >
> > I have my code like this :
> > ==
> >  > echo "
> > 
> > 
> > function tes(){
> > document.write('<p>JavaScrip

php-general Digest 27 Feb 2004 09:00:23 -0000 Issue 2614

2004-02-27 Thread php-general-digest-help

php-general Digest 27 Feb 2004 09:00:23 - Issue 2614

Topics (messages 178959 through 178990):

Re: [PHP-DEV] PHP5: Class behavior: method overloading
178959 by: Walter A. Boring IV

Re: Send Attachments via mail using form
178960 by: Manuel Lemos
178966 by: Justin Patrin

Re: PHP5 simpleXML bug or am i just being silly :)
178961 by: Luke
178989 by: André Cerqueira

Paginate Queries
178962 by: Shaun
178964 by: Tom Rogers

bug in PHP
178963 by: Kyle Goetz
178975 by: Chris W. Parker

php script that sends the user a link to complete validation process
178965 by: bruce

renamed images are now corrupt...
178967 by: Bryan Henry
178969 by: Bryan Henry
178970 by: Michael Nolan
178971 by: Bryan Henry
178972 by: Michal Migurski
178973 by: Bryan Henry
178974 by: Bryan Henry
178976 by: Bryan Henry
178982 by: Adam Bregenzer

Re: fscanf and memory
178968 by: Tom Rogers

Weird result from query...?
178977 by: Ryan A
178978 by: Erwin Kerk
178979 by: Daniel Clark
178980 by: Erwin Kerk
178981 by: Ryan A
178987 by: André Cerqueira

Re: Image resize on upload
178983 by: Will

Re: PHP Apache Log Stats and viewer?
178984 by: Jim Serio

Uploading a file to server behind a firewall
178985 by: Rick Laird
178988 by: André Cerqueira

Re: Question about CGI binary
178986 by: André Cerqueira

Passing the value of a variable from PHP to JavaScript.
178990 by: Prabu Subroto

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 ---
Quoting Vivian Steller <[EMAIL PROTECTED]>:

> Walter A. Boring IV wrote:
> 
> > I say keep compatibility.  If you want to enforce this, then declare an
> > interface.  That is after all why they exist.
> > 
> > Walt
> ...
> 
> Would be nice if you could give a simple example - i really have problems
> working with interfaces :(

interface Entry 
  function __construct($name, $path);
}

class Folder implements Entry {

  var $name = '';
  var $path = '';

  function __construct( $name, $path ) {
$this->name = $name;
$this->path = $path;
  }
}
 

> 
> 
> how could i implement my interfaces? I think interfaces wouldn't solve php4
> compatibility problems...
well, if you are implementing something completely new in php5, there there
are no compatibility issues.  I have many classes in my projects in php4.  I'm
not sure of how many child constructors have different parameters (my guess is
not many), but enforcing strict parameter count for childs classes would break
compatibility.  Which is why I think that one should just use an interface to
enforce this rule.  It seems like the right place for it.

my $0.02
Walt
--- End Message ---
--- Begin Message ---
Hello,

On 02/26/2004 06:54 AM, Dave Carrera wrote:
I would like to allow my visitors to send attachments via my contact form.

I already have email validation, field verifications and other nice bits but
I am stuck on the add attachment bit.
Also would this be limited to one file or can multiple files be allowed ?
You may want to try this class. You can add as many attachments as you want:

http://www.phpclasses.org/mimemessage

--

Regards,
Manuel Lemos
PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/
PHP Reviews - Reviews of PHP books and other products
http://www.phpclasses.org/reviews/
Metastorage - Data object relational mapping layer generator
http://www.meta-language.net/metastorage.html
--- End Message ---
--- Begin Message ---
Dave Carrera wrote:

Hi List,

I would like to allow my visitors to send attachments via my contact form.

I already have email validation, field verifications and other nice bits but
I am stuck on the add attachment bit.
Also would this be limited to one file or can multiple files be allowed ?

Thank you in advance for any help or advise with this.

Yours Truly

Dave C

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.595 / Virus Database: 378 - Release Date: 25/02/2004
 
And for a third possibility, you could try:
PEAR::Mail_Mime
http://pear.php.net/package/Mail_Mime
--
paperCrane 
--- End Message ---
--- Begin Message ---
Dont you need to use " instead of ' as ' is a string literal, while " parses
variables etc in that string

try this instead:
print("$this->user->site[0]::");


Maybe that will help?

-- 
Luke


"William Bailey" <[EMAIL PROTECTED]> wrote in message
news:[EM

php-general Digest 23 Feb 2004 17:11:59 -0000 Issue 2607

2004-02-23 Thread php-general-digest-help

php-general Digest 23 Feb 2004 17:11:59 - Issue 2607

Topics (messages 178511 through 178540):

Re: PHP or MSIE Problem? -- SOLVED
178511 by: Beau Hartshorne

Re: using xp home
178512 by: Jason Merrique

Re: ftp software
178513 by: Jason Merrique

SQLite: getting field information (type etc)
178514 by: Robert S

Re: tow dimenshional arrays
178515 by: joe-at

read and modified getting data
178516 by: Tommi Virtanen
178517 by: Tommi Virtanen
178518 by: "Miguel J. Jiménez"
178519 by: Richard Davey
178520 by: Jason Merrique

Re: Slight cleaning of code needed in str_replace command.
178521 by: Dave G
178524 by: Jason Wong

Split a string on a space, not in side an HTML tag.
178522 by: Stuart Gilbert

Character Encoding Problem
178523 by: roland
178526 by: Lucian Cozma

Php and GpG
178525 by: Paul Marinas
178537 by: Sam Masiello

Embedded MySQL server (libmysqld)?
178527 by: user.domain.invalid

Connection handling and output_buffering
178528 by: neko
178530 by: Matt Matijevich

hello
178529 by: gnat.frii.com

Re: [PEAR] Re: PEAR DB 1.6.0 has been released
178531 by: Justin Patrin
178533 by: Richard Davey

Re: [PHP-DB] Embedded MySQL server (libmysqld)?
178532 by: Adam Voigt
178538 by: user.domain.invalid
178539 by: Adam Voigt

Re: delete a function
178534 by: Michal Migurski

preg guru again.
178535 by: pete M

Re: Self Submitting Form
178536 by: Sam Masiello

Can anyone tell me why this code doesn't insert anything?
178540 by: Brian Dunning

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
--- Begin Message ---
I described a situation where MSIE for Windows would not post all of a
form's fields under fairly unique circumstances. This problem occurs in
MSIE 5, 5.5, and 6 (with the most recent hotfixes applied). No other
browsers seem to be affected. When:

1. A form is submitted with the enctype attribute set to
"multipart/form-data".

2. No http header is sent to explicitly select a character encoding that
matches form input, or if the http header and xml prolog and/or meta
http-equiv="content-type" tag do not select the correct character
encoding[1].

3. The user has input a character into one of the form fields, such as
[TM], a curly quote, or some other character that could have been
copy-pasted from a word processor, that is not defined in the character
set identified by some combination of an http header, xml prolog, and
meta tag.

4. There is at least one unchecked checkbox on contained in the form
(thanks Pablo!).

MSIE will not return all of the name/value pairs sent in the posted form
to the server. If you check the checkbox, the form will post normally.
The earliest reference to this problem that I could find was in a German
Usenet post[2,3], where the special character was the Euro sign.
Although the behaviour is a little buggy, we can't blame MSIE for
getting it wrong.

I've posted a new version of my page that sends the correct header:



And that uses the correct meta tag:



I've omitted the xml prolog because of other problems that it can cause
with MSIE 6.

The page is still posted here:

http://hartshorne.ca/sandbox.php

Thanks!!

Beau

1. <http://ppewww.ph.gla.ac.uk/~flavell/charset/checklist>
2. <http://ppewww.ph.gla.ac.uk/~flavell/charset/form-i18n.html>
3.
<http://groups.google.com/groups?selm=afmkl9%24fghgm%243%40ID-16486.news
.dfncis.de>
--- End Message ---
--- Begin Message ---
Hi Danny,

If you're going to be using PHP for testing purposes on your home PC,
I'd recommend installing EasyPHP. It's basically Apache MySQL and PHP
bundled together. It's pretty easy to set up, just run the installer,
then start the program and you have a PHP enabled webserver.

You should be able to get it at www.easyphp.org

Cheers

Jason

> -Original Message-
> From: danny cobbinah [mailto:[EMAIL PROTECTED] 
> Sent: 22 February 2004 00:12
> To: [EMAIL PROTECTED]
> Subject: [PHP] using xp home
> 
> is it better to use apache 1.3.29 or apache 2.0.48?
> 
> i am having the worst trouble ever trying to get this thing to work
> 
> --
> PHP General Mailing List (http://www.php.net/) To 
> unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 
--- End Message ---
--- Begin Message ---
I second that,

What I like the most about WSFTP is that you can edit files on the
remote site. Very handy!

 

> -Original Message-
> From: Pooya Eslami [mailto:[EMAIL PROTECTED] 
> Sent: 22 Februa

php-general Digest 23 Feb 2004 05:09:19 -0000 Issue 2606

2004-02-22 Thread php-general-digest-help

php-general Digest 23 Feb 2004 05:09:19 - Issue 2606

Topics (messages 178493 through 178510):

[SQLite] safe_mode_gid or safe_mode_exec_dir
178493 by: user.domain.invalid

Re: Safe Mode
178494 by: Jason Wong
178495 by: user.domain.invalid

type casting problem
178496 by: Armand Turpel

Detecting Binaries
178497 by: Axel IS Main

Local define?
178498 by: Robin 'Sparky' Kopetzky
178500 by: Marek Kilimajer

ftp software
178499 by: Nathan McIntyre
178501 by: Pooya Eslami
178502 by: electroteque
178507 by: Shane Nelson

Re: Slightly off - was [PHP] ftp software
178503 by: electroteque

Padding the decimals
178504 by: Simon Fredriksson
178505 by: Adam Bregenzer
178508 by: John Nichel

include(...) errors
178506 by: Kyle Goetz

Possible to write CRC/MD5 to the file?
178509 by: Simon Fredriksson
178510 by: Evan Nemerson

Administrivia:

To subscribe to the digest, e-mail:
[EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]

To post to the list, e-mail:
[EMAIL PROTECTED]


--
--- Begin Message ---
I want to be able to use SQLlite on my hosted (virtual) site.
SQlite will be placed in my  /home/www/bin.
And need to be exicutable by Apache user or group?
Would either safe_mode_gid or safe_mode_exec_dir accomplish this?

TIA,
David
--- End Message ---
--- Begin Message ---
On Monday 23 February 2004 00:55, [EMAIL PROTECTED] wrote:
> >>> Can safe mode be turned off in the .htaccess file?

[snip]

> According the safe-mode page http://us4.php.net/features.safe-mode in
> http.conf :
> 
>php_admin_value open_basedir /docroot
> # In  your case safe_mode_include_dir
> 
>
> Can "php_admin_value" be inlcuding in the *.php pages and/or .htaccess.

manual > ini_set()

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
What an artist dies with me!
-- Nero
*/
--- End Message ---
--- Begin Message ---

According the safe-mode page http://us4.php.net/features.safe-mode in
http.conf :

  php_admin_value open_basedir /docroot
# In  your case safe_mode_include_dir

Can "php_admin_value" be inlcuding in the *.php pages and/or .htaccess.


manual > ini_set()

It would seem form the ini_set() comments that the answer to both is yet:

-
There is another possibility by changing PHP Settings!
If your Webspace is able to handle ".htaccess" files, you're able to 
change PHP_INI Settings through this file!

To disable register_globals you have to set:
php_value register_globals 0
If you wanna set other settings, feel free, because there is no problem!

These Settings are set before running the script, e.g. the results of 
register_globals, when setting a parameter in the URL like 
'foo.php?foo=stuff', is not present, $foo is unset.


If it´s not your server and therefore you want to hide the data in your 
session variables from other users, it´s very useful to set the 
session.save_handler in your scripts to shared memory with:

"ini_set('session.save_handler','mm')".

Remember: You have to set it in every script that uses the session 
variables BEFORE "session_start()" or php won´t find them.

David
--- End Message ---
--- Begin Message ---
Hi,
Is it possible that some functions in different php versions (4.1 .
4.1.2 ) has problems with type castings so that the following script has
different results in different php versions?


";


if(FALSE == is_file('a'))
echo "is_file == no file";


if(FALSE === file_exists('a'))
echo "file_exists === no file";


if(FALSE == file_exists('a'))
echo "file_exists == no file";


if(FALSE === is_dir('a'))
echo "is_dir === no dir";


if(FALSE == is_dir('a'))
echo "is_dir == no dir";

?>
--- End Message ---
--- Begin Message ---
I'm using file_get_contents() to open URLs. Does anyone know if there is 
a way to look at the result and determine if the file is binary? I'd 
like to be able to block binaries from being processed without having to 
try to think of all the possible binary extensions and omit them with a 
function that looks for these extensions.

Nick
--- End Message ---
--- Begin Message ---
Greetings!!

If you define a constant within a function, is it local or global?

Example:

fun

php-general Digest 22 Feb 2004 16:48:17 -0000 Issue 2605

2004-02-22 Thread php-general-digest-help

php-general Digest 22 Feb 2004 16:48:17 - Issue 2605

Topics (messages 178468 through 178492):

Objects and Arrays - need help?
178468 by: John Romero

PHP Error
178469 by: Tim Trimble
178471 by: John Nichel

running php through cron
178470 by: Pablo Gosse
178472 by: Jason Wong
178473 by: Adam Bregenzer
178474 by: Pablo Gosse

sql expression
178475 by: Marc Greenstock
178477 by: Marc Greenstock
178478 by: John W. Holmes

Email - format
178476 by: Sheni R. Meledath
178479 by: John W. Holmes
178480 by: Manuel Lemos

help please
178481 by: ajay
178482 by: adwinwijaya
178483 by: ajay
178484 by: adwinwijaya

crc32
178485 by: Armand Turpel
178486 by: Armand Turpel

Re: delete a function
178487 by: Sztankó Demeter
178491 by: Marek Kilimajer

Re: using xp home
178488 by: zerof
178489 by: XMG

Re: [PHP-XML-DEV] Re: [PHP] PHP5: ext/dom - set namespace of node manually
178490 by: Rob Richards

Re: Safe Mode
178492 by: user.domain.invalid

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 ---
Here is my code. Two files: 1) myclass.php 2)test.php to instantiate the
objects.

I have two classes. One is a "parts" class with some basic properties in an
array. And the other class is the "repair" class which needs to hold MANY
parts. In the "repair" class, I have a $partsarray so that I can just add
them to the array and then process them later.

The problem is that when I need to get the parts out of the repair class -
they are not there. I made a method called getPartsCount and it always
returns 0. Can someone take a look at this code and help me?  Thanks in
advance.

_data[$attributeName];
  }
  function setData($attributeName, $value) {
$this->_data[$attributeName] = $value;
  }
}

//make a REPAIR class
class repair {
  //properties
  var $_data = array();
  var $_partsarray = array();

  //methods
  function getData($attributeName) {
return $this->_data[$attributeName];
  }
  function setData($attributeName, $value) {
$this->_data[$attributeName] = $value;
  }

 function getPart($pos) {
  return $this->_partsarray[$pos];
 }
  function addPart($partsclass, $pos) {
   //pos will actually be a string value
 $this->_partsarray['$pos'] = $partsclass;
  }
  function deletePart($pos) {
unset($this->_partsarray['$pos']);
  }

  function countParts() {
return count($_partsarray);
  }

  function getParts() {
return $_partsarray;
  }
}
?>

setData('1', 'val1');
$partsclass->setData('2', 'val2');
$partsclass->setData('3', 'val3');

$partsclass2 = new part;
$partsclass2->setData('1', 'val1');
$partsclass2->setData('2', 'val2');
$partsclass2->setData('3', 'val3');

$repairclass = new repair;
$repairclass->setData('test1', 'value1');
$repairclass->addPart($partsclass1, '1');
$repairclass->addPart($partsclass2, '2');

echo 'the test value is' . $repairclass->getData('test1');
echo 'and the part counter is: ' . $repairclass->countParts();

$partsclasstemp = new part;
$partsclasstemp = $repairclass->getPart('1');
echo 'parts data is: ' . $partsclasstemp->getData('2');
echo '';
$temparray = array();
$temparray = $repairclass->getParts();

echo count($temparray);
?>
--- End Message ---
--- Begin Message ---
Can anyone tell me what linux and php is asking for here, this dir. and file is at 
this location, and chmoded to 755.

Failed opening required './libraries/grab_globals.lib.php' 
(include_path='.:/php/includes:/usr/share/php') 

I guess what I'm asking is, it says the path is ".:/php/includes" I can't find that on 
the machine anywere

and "/usr/share/php" that I did find, and I put the libraries dir. at that location, 
it still says it's not there

What am I doing wrong   Thanks...Tim--- End Message ---
--- Begin Message ---
Tim Trimble wrote:
Can anyone tell me what linux and php is asking for here, this dir. and file is at this location, and chmoded to 755.

Failed opening required './libraries/grab_globals.lib.php' (include_path='.:/php/includes:/usr/share/php') 

I guess what I'm asking is, it says the path is ".:/php/includes" I can't find that on the machine anywere

and "/usr/share/php" that

  1   2   3   4   5   6   7   8   9   10   >