[PHP] PHP not working with Apache

2004-01-31 Thread Mark Mark
I am running Apache 1.3.29 and PHP 4.3.3. I installed apache first and got it to work. 
Then, I install the php installer and and copied the windows binary files. I followed 
the instruction to run as a module and I even uninstalled the php files and tried to 
run PHP as just a CGI binary, both methods failured. I created a test php script 
called hello.php and the web page was blank when I tried to access it. I could view 
the code... Any ideas? I am running WIN 2K server sp4.
 
Thanks in adavnce


-
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!

[PHP] multiline regex

2002-12-11 Thread mark
Im trying to grab some info from a file, usual way (fopen,fread,flose then
regex), I need to get to separate bits of data, first one is a title works
fine because its the  tag and it all on one line, but the second is
returning a null array, I think it may have something to do with the content
being on separate lines with white space.anyone got any ideas?

This is the regex im using:

preg_match_all("|(.*)|U",$content, $body, PREG_PATTERN_ORDER);

the example text im trying to grab is below - Anyone got any ideas, Ive
tried pattern modifying with /m but I cant implement it.
Please help
Thanks
Mark

=


text text text text text text text text text text text text text text text

 text text text text text text text text text text text text text text text
text text
 text text text text text text text text text text text text text text text
text text

 text text text text text text text text text text text
 text text text text text.



Cheers,
mark




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




Re: [PHP] multiline regex

2002-12-11 Thread mark
I know I have to use pattern modifiers, but thats what Im saying its spewing
errors when I try to implement it.

I have been trying to fix it, but Im just lost.



"Bahwi" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Over here will help:
> http://www.php.net/manual/en/ref.pcre.php
> http://www.php.net/manual/en/pcre.pattern.modifiers.php
>
> (From the second page:
>
> /m/ (PCRE_MULTILINE)
>
> By default, PCRE treats the subject string as consisting of a single
> "line" of characters (even if it actually contains several
> newlines). The "start of line" metacharacter (^) matches only at the
> start of the string, while the "end of line" metacharacter ($)
> matches only at the end of the string, or before a terminating
> newline (unless /D/ modifier is set). This is the same as Perl.
>
> When this modifier is set, the "start of line" and "end of line"
> constructs match immediately following or immediately before any
> newline in the subject string, respectively, as well as at the very
> start and end. This is equivalent to Perl's /m modifier. If there
> are no "\n" characters in a subject string, or no occurrences of ^
> or $ in a pattern, setting this modifier has no effect.
>
> No, I'm not posting this angrily, but sometimes it's easier to answer a
> question via cut and paste than writing up an answer yourself. =) I'm
> lazily helpful!
>
> --Joseph Guhlin - http://www.josephguhlin.com/
> Was I helpful?  Let others know:
> http://svcs.affero.net/rm.php?r=bahwi
>
>



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




[PHP] Re: [PHP-DB] Making Join

2003-02-28 Thread Mark

--- Daniel Harik <[EMAIL PROTECTED]> wrote:
> > > Hello,
> > >
> > > I have 2 tables users table, that stores user info, and photos
> table,
> > > i want to select all users with one photo form photos table,
> but i don't
> > > want it to be photos * users = result.
> > >
> > > Is there way to do it?
> > 
> > Assuming you mean, you have a table called user_info and another
> called
> > photos and each of them has a common element AND there must be a
> photo for
> > the user then you could use this sort of select...
> > 
> > select user_info.name, photo.image from user_info, photo where 
> user_info.id
> > = photo.user_id
> > 
> > The above will not display anything if there are no matching id
> to user_id
> > so if one of your users didn't have a photo they would not get
> displayed.
> > Also, if a user had more than one photo they would all be
> displayed.
> > 
> > If your users are expected to have one and only one photo then
> you may 
> want
> > get rid of the photo table and just put the photo in the user
> table.
> > 
> > HTH
> 
> 
> Thank You for your reply, but the problem is that users may have
> many
> photos, and i need to get only one, i use folllowing sql:
> SELECT users.username, photos.file FROM users left join photos on
> users.id=photos.userid
> 
> 
> And i get:
> 
>  username file
> dan  9a2de085e456e78ed66f079572638ff3.jpg
> dan  852d28e6fa730f6d29d69aacd1059ae7.jpg
> dan  672df2f16e89e3dc92ff74e3a0fa4b4f.jpg
> dan  8bae6f20ed6e12ba1c86d04b8ebc9e1f.jpg
> dan  7de9d2db2b2096cfc3f072f8c15a9e50.jpg 
> 404  f474a8ee5965f0a792e5b626fb30c2cd.jpg
> 404  3acd391cf7abafa032c5e3b21eb7b322.jpg
> 404  4e5df8cfa4bce5dd30c1166b8a86fa23.jpg
> Bedman  NULL
> 
> but i want only 3 users from this join, not 3x3=9

If you only want the users, and not the photos, then the previous
post should do what you want. But if you also want the photo, and
there's more than one photoo for a user, how will the code know which
photo you want? Do you want a random photo from each user? The last
photo from each user? The first?

Mark

=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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



[PHP] Re: [PHP-DB] How to Connect remote DB server?

2003-03-12 Thread Mark
A couple of things. First, I believe it's pg_connect(), not
pgsql_connect(). Also, note that according to the docs, the old
syntax with multiple parameters 
$conn = pg_connect("host", "port", "options", "tty", "dbname") 
has been deprecated.

But more importantly, can you ping the postgres/mssql server from the
web server? Can you connect to them via the command line or via ODBC?
Try to narrow it down to the network, PHP, or your code.


--- Patrick LOK <[EMAIL PROTECTED]> wrote:
> There is no firewall within the LAN environment.
> 
> I tried the mssql_connect too using mssql_connect("testdb","sa","")
> but same
> error returned!
> Any idea?
> 
> ./pl
> 
> "Jason Wong" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > On Wednesday 12 March 2003 19:28, Patrick LOK wrote:
> > > It is possible to connect a remote db server using
> x_connect?
> > > e.g. a PostgreSQL in server PSQLDB, ip=192.168.0.100  and a
> MSSQL server
> > > MSSQLDB, ip=192.168.0.110
> > >
> > > I tried pgsql_connect("psqldb","administrator","") &
> > > pgsql_connect("192.168.0.100","administrator","") but failed!
> > >
> > > Error is "Unable to connect to server: psqldb in psqltest.php
> on line 2"
> &
> > > "Unable to connect to server: 192.168.0.100 in psqltest.php on
> line 2"
> >
> > Yes, it is possible to connect to a remote DB server. You have to
> make
> sure
> > that:
> >
> > a) the DB server in question is configured to accept remote
> connections
> > b) any intervening firewall is correctly configured to allow DB
> traffic
> >
> >
> > --
> > 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-db
> > --
> > /*
> > Dr. Livingston?
> > Dr. Livingston I. Presume?
> > */
> >
> 
> 
> 
> -- 
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com

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



Re: [PHP] php-general as REPLY TO

2003-07-01 Thread Mark
But that would not solve the problem being discussed. None of the
webmail services that I've tried have a "reply-to-list" feature.

--- Jim Lucas <[EMAIL PROTECTED]> wrote:
> You could signup with a company like yahoo.com or hotmail or
> bend.com and
> you could then have a web based email service.
> 
> You ALWAYS have choices...  :)
> 
> Jim Lucas
> - Original Message -
> From: "Ford, Mike [LSS]" <[EMAIL PROTECTED]>
> To: "'Derick Rethans'" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Tuesday, July 01, 2003 3:08 AM
> Subject: RE: [PHP] php-general as REPLY TO
> 
> 
> > > -Original Message-
> > > From: Derick Rethans [mailto:[EMAIL PROTECTED]
> > > Sent: 30 June 2003 22:47
> > >
> > > On Mon, 30 Jun 2003, Doug Essinger-Hileman wrote:
> > >
> > > > Having said this, I suspect that you and I will continue to
> > > disagree,
> > > > which is perfectly okay. If this list changes the default I
> will be
> > > > happy. If it doesn't, I will learn to adjust. One request I
> make is
> > > > that folk, including you, Derick, refrain from sending
> > > replies to my
> > > > email to both the list *and* my personal inbox. There's no
> need to
> > > > waste the bandwidth.
> > >
> > > You'll have to learn to adjust then I guess. And do those 2k
> really
> > > matter? Come on...  Just get a good mailer that defaults to
> > > "Reply-All"
> > > (like, mutt, pine, pcpine)
> >
> > Some of us don't have the choice -- we work in a corporate or
> institutional environment where the decision is made centrally. 
> (Hence M$
> Outlook 98 here!!!)
> >
> > Cheers!
> >
> > Mike
> >
> >
>
-
> > Mike Ford,  Electronic Information Services Adviser,
> > Learning Support Services, Learning & Information Services,
> > JG125, James Graham Building, Leeds Metropolitan University,
> > Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
> > Email: [EMAIL PROTECTED]
> > Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211
> >
> > --
> > 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
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: [PHP] 2values on form, help in catching as one.

2003-07-02 Thread Mark
It's not clear what you're trying to do. If the values are for a
radio button or checkbox, use the same name for both buttons. 

The values have to be mutually exclusive for what you;re trying to do
to work.

You could do something like this:

if (isset($_REQUEST['TemplateOne']) {
  $test=$_REQUEST['TemplateOne'];
} elseif (isset($_REQUEST['TemplateTwo']) {
  $test=$_REQUEST['TemplateTwo'];
} else {
  $test="";
}

echo $test;

--

or this:
$test=0
if (isset($_REQUEST['TemplateOne']) {
  $test=1;
}
if (isset($_REQUEST['TemplateTwo']) {
  $test+=2;
}

switch ($test) {
  case 1:
  echo "one";
  break;
  case 2:
  echo "two";
  break;
  case 3:
  echo "one and two";
  break;
}

Without knowing what you're actually trying to do, however, we're all
just shooting in the dark.

--- "Miranda, Joel Louie M" <[EMAIL PROTECTED]> wrote:
> I have this php code (below), My form passes 2 values w/c is
> TemplateOne and
> TemplateTwo I was wondering how could I make that in php to catch
> the value
> as one only? I tried this and it didn't work. But if the value is
> just one
> the case display it. Any ideas?
> 
>$v_template = $_REQUEST['TemplateOne'] ;
>   $v_template = $_REQUEST['TemplateTwo'] ;
> 
> switch($v_template) {
>  case 'TemplateOne':
>  echo "one";
>  break;
> 
>  case 'TemplateTwo':
>  echo "two";
>  break;
> }
> ?>
> 
> --
> Thank you,
> Miranda, Louie
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: [PHP] Request Network ID

2003-07-07 Thread Mark
Are you trying to find out who is currently logged on locally? Who
the webserver is running as? If you want to know who is logged in
locally, you can use whoami from the command line (or via exec,
passthru, or system). You can also check out
http://www.sysinternals.com for some neat comand line tools for
Win2k. 

--- "Haitham A. Khaiyat" <[EMAIL PROTECTED]> wrote:
> Hi, I need you help please.
> 
>  
> 
> I am looking for a function can give the Network ID from LAN. For
> example, our LAN is based on Windows 2000.
> 
>  
> 
> How can I get user network account. VB.NET has this built in
> function
> 
> Request.ServerVariables("LOGON_USER")
> 
>  
> 
> Can you help?:
> 
>  
> 
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: [PHP] Spammer! Re: [PHP] ANNOUNCING: Rekall V2.0.0 for Linux/UNIX....

2003-07-07 Thread Mark
If you had actually read the reply, you would have seen that Steve
was commenting on your declaring the list an "open-source" list, not
saying it was fine for John to send his email to this list (or any
other list).


--- "Apollo (Carmel Entertainment)" <[EMAIL PROTECTED]> wrote:
> Well, lets see. I want free advertising too. How about I go to all
> the lists I
> am member of and send emails like John from Rekall did "announcing"
> widgets or
> services my company does. How will you react to that? We all have
> something to
> sell or advertise. Opensource or non-opensource, if you are
> charging for
> something you can not free-ride on free mailing lists, pay for
> adveritising. If
> something like that is tolerated, maybe I should start marketing my
> stuff on all
> the lists I am.
> 
> 
> > At 7/7/2003 03:07 PM, Apollo (Carmel Entertainment) wrote:
> > 
> >  > If you are charing for your product and your source is not
> open, you 
> > have no place on
> >  > opensource lists.
> > 
> > Just out of curiosity, where did you get the idea this is an
> "open source" 
> > mailing list? There are plenty of commercial PHP products that
> have been 
> > mentioned and recommended by list members, including Zend
> products.
> > 
> > I'm not condoning posting ads to the list the way John, but I
> think that 
> > declaring it an "open source" list will discourage people who
> have created 
> > PHP-based systems that aren't free or open-source from
> contributing.
> > 
> > 
> > --
> > S. Keller
> > UI Engineer
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: [PHP] Wrong parameter count for fgets

2003-07-08 Thread Mark
Without seeing any code, we can only guess. But do you have at least
two, and no more than three parameters for the fputs() fuction? 

fputs
(PHP 3, PHP 4 )

fputs -- Writes to a file pointer
Description
int fputs ( resource handle, string str [, int length])


fputs() is an alias to fwrite(), and is identical in every way. Note
that the length parameter is optional and if not specified the entire
string will be written. 


--- "Miranda, Joel Louie M" <[EMAIL PROTECTED]> wrote:
> > Warning: Wrong parameter count for fgets() in
> I had this error on of my scripts, any ideas on this part?
> How come this error occur?
> 
> 
> --
> Thank you,
> Louie
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



RE: [PHP] Retaining formatting problem[Scanned]

2003-07-08 Thread Mark

--- Michael Egan <[EMAIL PROTECTED]> wrote:
> I've experienced the same problem. It's not that the line returns
> disappear - they will still be retained but stored as /n or /r.  
> 
> You'll need to find a way of replacing the line breaks with a html
> paragraph break - assuming your required output is html. Perhaps
> some of the regexp functions will help in this - I haven't got the
> code I used for this to hand.

You mean something like the nl2br() function?

> 
> HTH,
> 
> Michael Egan
> 
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: 08 July 2003 10:30
> To: [EMAIL PROTECTED]
> Subject: [PHP] Retaining formatting problem[Scanned]
> 
> 
> Hello everyone,
> 
> I have a long running problem that i just want to get covered, I
> have a standard text box for people to insert long lengths of text.
> 
> This text box is in a standard  but when I
> insert it into the database the line returns dissapear, eg 
> 
> "this 
> 
> little amount of
> 
> text"
> 
> will enter like
> 
> "this little amount of text will enter like"
> 
> Please help me it is p!!$$!ng me right off :P
> 
> Cheers in advance
> 
> -- 
> 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
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: [PHP] Big problem....need help

2003-07-09 Thread Mark
First, you might want to use more descriptive subjects. That might
describe your urgency, but it doesn't tell us what you need.

As for the question, try this:

$sql = "SELECT *, count(products.mark_name) as count 
FROM products, category 
WHERE category.name_category=products.name_category
AND category_id=".$_GET['category_id']." 
GROUP BY products.mark_name";


but if you don't need all the other data in the rows, just do this:

$sql = "SELECT p.mark_name, count(p.mark_name) as count 
FROM products as p, category as c
WHERE c.name_category=p.name_category
AND category_id=".$_GET['category_id']." 
GROUP BY p.mark_name";

--- phpu <[EMAIL PROTECTED]> wrote:
> 10x a lot. it worked.
> Now I have another problem. How to find the number of the records
> in the table.
> this is the way i want (in this case}
> 
> Name: aaa   2 times
> Name  ddd   1 times
> 
> Please help with this one
> 
> 
> 
> 
> - Original Message - 
>   From: Haseeb 
>   To: [EMAIL PROTECTED] ; [EMAIL PROTECTED] 
>   Cc: [EMAIL PROTECTED] 
>   Sent: Thursday, July 10, 2003 8:18 AM
>   Subject: Re: [PHP] Big problemneed help
> 
> 
>  try like this
> 
> $sql = "SELECT * FROM products, category WHERE
> category.name_category=products.name_category and
> category_id=".$_GET['category_id']." GROUP BY products.mark_name";
>   
> 
> 
> 
> 
> ---Original Message---
> 
> From: phpu
> Date: Wednesday, July 09, 2003 09:51:08 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] Big problemneed help
> 
>   It isn't work. it gives me an error at this line.
> 
> - Original Message -
> From: "Nicolas Costes"
> <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 09, 2003 4:49 PM
> Subject: Re: [PHP] Big problemneed help
> 
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Le Mercredi 9 Juillet 2003 15:13, phpu a écrit :
> > I have a table like this:
> 
> > ..
> > $sql = "SELECT * FROM products, category WHERE
> > category.name_category=products.name_category and
> > category_id=".$_GET['category_id'] ;
> 
> >
> > When i choose the category catg 1 the result is
> > Name: aaa
> > Name: aaa
> > Name: ddd
> >
> > As you can see the name aaa appears 2 times insted 1.
> > How to make the result look like this:
> > Name: aaa
> > Name: ddd
> 
> Use "GROUP BY" 
> 
> $sql = "SELECT * FROM products, category WHERE
> category.name_category=products.name_category and
> category_id=".$_GET['category_id'] GROUP BY
> products.mark_name;
> 
> 
> - --
> ,,
>(°> Nicolas Costes
>/|\ IUT de La Roche / Yon
>   ( ^ ) Clé publique: http://www.keyserver.net/
>^ ^ http://www.gnu.org/philosophy/can-you-trust.fr.html
> 
> 
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.2.1 (GNU/Linux)
> 
>
> iD8DBQE/DB2GNc2aXy7LuOgRAmE6AKCIeGpWg78san/72M7vbhwJXQKXbQCfVxAJ
> OgayWbAh0cOXc5OCdVy2uWs=
> =vH6U
> -END PGP SIGNATURE-
> 
> 
> --
> 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
>
>
>
>   
> IncrediMail - Email has finally evolved - Click Here
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: [PHP] Re: mail() - how to attach file to the message???

2003-07-09 Thread Mark
>From your question, it seems you're more concerned with how to get
the file from the user to the server. To upload a file, you need the
following format for your web form:


Upload file: 



That will let you move the file to the server. How you email it from
their is a whole 'nuther matter.



--- szparag <[EMAIL PROTECTED]> wrote:
> ok.
>  
> i have those classes.
> but if it is possible i would like to send message with file
> attachment without using classes.
>  
> i know that it should look something like:
> in form : 
>  
> in script run be something like:
>  
>  
> if (is_uploaded_file($attach))
> {
>  $headers .= "MIME-Version: 1.0\r\n"; 
>  
>  $headers .= "Content-Type: ".$attach_type.";
> name=".$attach_name.";
> Content-Disposition: attachment";
>  $headers .= "X-Attach: $attach"; 
> }
>  
>  
> but it doesn't work.i miss something.
>  
> szparag
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: [PHP] Re: mail() - how to attach file to the message???

2003-07-09 Thread Mark
Also note that the uploaded file will be in the $_FILES[] array.

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

--- Mark <[EMAIL PROTECTED]> wrote:
> From your question, it seems you're more concerned with how to get
> the file from the user to the server. To upload a file, you need
> the
> following format for your web form:
> 
>  enctype="multipart/form-data">
> Upload file: 
> 
> 
> 
> That will let you move the file to the server. How you email it
> from
> their is a whole 'nuther matter.
> 
> 
> 
> --- szparag <[EMAIL PROTECTED]> wrote:
> > ok.
> >  
> > i have those classes.
> > but if it is possible i would like to send message with file
> > attachment without using classes.
> >  
> > i know that it should look something like:
> > in form : 
> >  
> > in script run be something like:
> >  
> >  
> > if (is_uploaded_file($attach))
> > {
> >  $headers .= "MIME-Version: 1.0\r\n"; 
> >  
> >  $headers .= "Content-Type: ".$attach_type.";
> > name=".$attach_name.";
> > Content-Disposition: attachment";
> >  $headers .= "X-Attach: $attach"; 
> > }
> >  
> >  
> > but it doesn't work.i miss something.
> >  
> > szparag
> > 
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> 
> 
> =
> Mark Weinstock
> [EMAIL PROTECTED]
> ***
> You can't demand something as a "right" unless you are willing to
> fight to death to defend everyone else's right to the same thing.
> ***
> 
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: [PHP] Windows 2k, Apache, MySQL, PHP 4.3.2, Smarty

2003-07-10 Thread Mark

--- Michael Smith <[EMAIL PROTECTED]> wrote:
> Problem with Smarty. My application is giving me an error when i
> try to 
> use smarty on a new WAMP install. Smarty is in my include path.
> Getting 
> this error:
> 
> *Fatal error*: Call to undefined function: () in 
> *c:\htdocs\smarty\Smarty.class.php* on line *1658
> 
> *line 1658 is:
> 
> $_source_return = $resource_func($resource_name, $template_source,
> $this);

shouldn't that be 
$_source_return = resource_func($resource_name, $template_source,
$this);

I assume resource_func() is not a variable...

> 
> I think it has something to do with PHP not liking the
> $resource_fun 
> being submitted for the function name. It works fine on my updated
> LAMP 
> environment any help woudl be much appreciated.
> 
> -Michael
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: [PHP] Re: mail() - how to attach file to the message???

2003-07-10 Thread Mark
You had an  tag in your email, so I assumed you were trying to
upload the file. If the file is not already on the server, you *will*
have to upload it before emailing it. But that's a whole other
matter.

If you look at the classes and see how they attach a file, you should
be able to figure it out. Basically, you need to set the correct
headers (content-type) and attach an encoded version of the file in
the body of the email. 

An easy way to see what you need it to send yourself an email with an
attachment and look at the raw source of the email you receive. It
should look a bit like this (with a whole lot more headers in it):

From: "Mark" <[EMAIL PROTECTED]>
To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
Subject: FW: test
Content-Type: multipart/mixed;
boundary="_=_NextPart_000_01C346F1.7A8C7496"

This message is in MIME format. Since your mail reader does not
understand
this format, some or all of this message may not be legible.

--_=_NextPart_000_01C346F1.7A8C7496
Content-Type: multipart/alternative;
boundary="_=_NextPart_001_01C346F1.7A8C7496"


--_=_NextPart_001_01C346F1.7A8C7496
Content-Type: text/plain;
charset="iso-8859-1"

This is the body of the email 
 <> 


--_=_NextPart_000_01C346F1.7A8C7496
Content-Type: image/jpeg;
name="test.jpg"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="test.jpg"

/9j/4AAQSkZJRgABAQEBLAEsAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHR
HBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMj
MjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCAJaAb
AhEBAxEB/8QAHwAAAQUBAQEBAQEAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAw
AAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKS
ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmq
.
.
.
--_=_NextPart_000_01C346F1.7A8C7496--


--- szparag <[EMAIL PROTECTED]> wrote:
> no.
> 
> i`m not trying to upload file on server.
> i want to send e-mail with attachments but if it's possible without
> using classes.
> 
> i thought that file should be first uploaded and then send with
> e-mail as
> attachment, maybe uploading isn't correct...
> 
> i don't know how to do it.
> 
> szparag
> 
> >
> >  
> >
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: [PHP] SQL select

2003-07-10 Thread Mark
> Jiøí Nìmec wrote:
> 
> > hello,
> > 
> > i have got a problem with SQL select:
> > 
> > I have got a table such this:
> > 
> > id_k typ name id
> >  1   f   bla1   1
> >  2   f   bla2   1
> >  2   i   bla3   1
> >  3   z   bla4   1
> >  3   f   bla5   1
> >  4   i   bla6   1
> >  4   z   bla7   1
> >  5   z   bla8   1
> > 
> > and id = 1 and I need select these rows:
> > 
> > id_k  typ nazev id
> >  1 f   bla1  1
> >  2 f   bla2  1
> >  3 f   bla5  1
> >  4 i   bla6  1
> > 
> > so, when doesn'i exist component (id_k = component) type "f" so I
> want
> > component with type "i", but when doesn't exist type "f" noir "i"
> I
> > don't want to select row with type "z".
> > 

I don't think you can do what you want in a simple SQL statement. You
seem to want to return rows based on what is in other rows of the
same table. There may be ways to join the table to itself, but I'm
not aware of a straightforward way to do this only in SQL. In PHP,
it's probably not too tough.

Just to be sure we all understand, I assume you want the following:
-At most, one row for each id_k
-If there is a row with an 'f' in the type column, return that row.
-If there is no record with an 'f' in the type column for that id_k,
and there is a record with an 'i', return that row.
-If there is no record with an 'f', nor a record with an 'i' in the
type column, do not return a row.

Is that right?

> > jiri nemec, ICQ: 114651500
> > www.menea.cz - www stránky a aplikace
> > 
> > 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: [PHP] function is_executable

2003-07-10 Thread Mark
>From the manual:

"is_executable() became available with Windows in PHP version 5.0.0."
Not sure what the problem might be if you're using linux.

--- "Gilberto Garcia Jr." <[EMAIL PROTECTED]> wrote:
> Hey guys,
> 
> I made a class to work with file upload.
> 
> I used the php function is_executable. and in php 4.2.x it works
> ok, on linux and on windows.
> 
> Last week I update my php to 4.3.x and this function stop work. In
> fact I got this error. undefinied function.
> 
> Does anyone can help?
> 
> 
> thanks


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: [PHP] Open new browser window

2003-07-10 Thread Mark

--- Karina S <[EMAIL PROTECTED]> wrote:
> Hello,
> 
> I want to make a php application, which displays different text in
> separate
> windows. I mean for example a new window will open with text "Hello
> 1" and a
> second window opens with text "Hello 2".
> 
> How is it possible with php?
> 

It's not. You'd have to use Javascript. Now, if you wanted to use PHP
pages in those windows, you can call the PHP files from the
Javascript that opens the windows.

window.open(, , )

 can point to a PHP file.


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


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Fwd: Re: [PHP] How to hide url on a php link NOT post...

2003-07-11 Thread Mark
--- Jeff Harris <[EMAIL PROTECTED]> wrote:
> On Jul 10, 2003, "Joey" claimed that:
> 
> |How can I hide this link so value can't be changed?
> |I don't want to change anything at the server level, and its not
> from a
> |form so I cant do a post -vs- a get.
> |
>
|http://www.abcd.com/popup_SearchRepSet.php?searchby=cust_no&search=1&value=WOR032
> |
> |Thanks !
> |
> 
> #1) [Not PHP] Make it a post that looks like a link. See previous
> posting
> at
> http://marc.theaimsgroup.com/?l=php-general&m=105597453308214&w=2

He said it's not a form, so he can't change the method to POST.

> 
> #2) [Not PHP] If the values will never change, try
> http://tinyurl.com. If
> you're keeping track of referrals, it might mess up your
> statistics.

Also, this does not hide the URL once it's been clicked. it expands
it, and allows someone to see the variables, which can then be
changed and resubmitted.

> 
> #3) [Not PHP] Make that link inside a frame. One frameset would
be
> invisible, the other would be the link.

Not quite sure how this would work. If I can click on the link, I
can see (and copy) the full URI.
 
He might want to look into cURL and
libcURL(http://curl.haxx.se/libcurl/php/) I believe there are tools
there for doing a POST through a standard clickable URL.

> 
> -- 
> Registered Linux user #304026.
> "lynx -source http://jharris.rallycentral.us/jharris.asc | gpg
> --import"
> Key fingerprint = 52FC 20BD 025A 8C13 5FC6  68C6 9CF9 46C2 B089
> 0FED
> Responses to this message should conform to RFC 1855.
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: [PHP] So in summary this can't be done due to permission problems?

2003-07-11 Thread Mark

--- Steve Jackson <[EMAIL PROTECTED]> wrote:
> As part of a CMS I wanted to get the user to:
> 1) Create a new recordset via a form (with a uniqueid).
> 2) Press submit whereupon php gets the ID of the record just
> created in
> the DB, writes a new page to the server with that unique id and
> saves it
> as a filename determined by the user.
> 
> No way around that due to permission settings on the webroot?
> 
> So there is no way that PHP can write to the server unless the
> directory
> it's writing in is executable?

That is correct. According to the docs, if the directory is not
executable, you can't even get the permissions on the files in it.
I'm confused, though. 

Let me state at the begining that I'm not a linux guy. Learning, but
slowly.

-Doesn't PHP run as some user?

-Is the issue giving that user execute permissions in the web root? 

-Why the concern about letting that user have execute permissions,
and then prevent anyone (execpt those that have valid reasons) from
having write/execute permission to the webroot.

Am I missing something basic? Quite possibly...


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: Fwd: Re: [PHP] How to hide url on a php link NOT post...

2003-07-11 Thread Mark

--- Mark <[EMAIL PROTECTED]> wrote:
> --- Jeff Harris <[EMAIL PROTECTED]> wrote:
> > On Jul 10, 2003, "Joey" claimed that:
> > 
> > |How can I hide this link so value can't be changed?
> > |I don't want to change anything at the server level, and its not
> > from a
> > |form so I cant do a post -vs- a get.
> > |
> >
>
|http://www.abcd.com/popup_SearchRepSet.php?searchby=cust_no&search=1&value=WOR032
> > |
> > |Thanks !
> > |
> > 
> > #1) [Not PHP] Make it a post that looks like a link. See previous
> > posting
> > at
> > http://marc.theaimsgroup.com/?l=php-general&m=105597453308214&w=2
> 
> He said it's not a form, so he can't change the method to POST.
> 

D'oh! Stupid me. Didn't read the rest of you archived email.

=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: Fwd: Re: [PHP] How to hide url on a php link NOT post...

2003-07-11 Thread Mark

--- Daniel Guerrier <[EMAIL PROTECTED]> wrote:
> Umm.. 
> Maybe you should use sessions.

Oh sure, come up with the EASY way ;-)

> 
> --- Mark <[EMAIL PROTECTED]> wrote:
> > --- Jeff Harris <[EMAIL PROTECTED]> wrote:
> > > On Jul 10, 2003, "Joey" claimed that:
> > > 
> > > |How can I hide this link so value can't be
> > changed?
> > > |I don't want to change anything at the server
> > level, and its not
> > > from a
> > > |form so I cant do a post -vs- a get.
> > > |
> > >
> >
>
|http://www.abcd.com/popup_SearchRepSet.php?searchby=cust_no&search=1&value=WOR032
> > > |
> > > |Thanks !
> > > |
> > > 
> > > #1) [Not PHP] Make it a post that looks like a
> > link. See previous
> > > posting
> > > at
> > >
> >
> http://marc.theaimsgroup.com/?l=php-general&m=105597453308214&w=2
> > 
> > He said it's not a form, so he can't change the
> > method to POST.
> > 
> > > 
> > > #2) [Not PHP] If the values will never change, try
> > > http://tinyurl.com. If
> > > you're keeping track of referrals, it might mess
> > up your
> > > statistics.
> > 
> > Also, this does not hide the URL once it's been
> > clicked. it expands
> > it, and allows someone to see the variables, which
> > can then be
> > changed and resubmitted.
> > 
> > > 
> > > #3) [Not PHP] Make that link inside a frame. One
> > frameset would
> > be
> > > invisible, the other would be the link.
> > 
> > Not quite sure how this would work. If I can click
> > on the link, I
> > can see (and copy) the full URI.
> >  
> > He might want to look into cURL and
> > libcURL(http://curl.haxx.se/libcurl/php/) I believe
> > there are tools
> > there for doing a POST through a standard clickable
> > URL.
> > 
> > > 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: Re[2]: [PHP] So in summary this can't be done due to permission problems?

2003-07-11 Thread Mark

--- Burhan Khalid <[EMAIL PROTECTED]> wrote:
> On Friday, July 11, 2003, 5:07:49 PM, Mark wrote:
> 
> [ snip ]
> 
> M> That is correct. According to the docs, if the directory is not
> M> executable, you can't even get the permissions on the files in
> it.
> M> I'm confused, though. 
> 
> M> Let me state at the begining that I'm not a linux guy. Learning,
> but
> M> slowly.
> 
> M> -Doesn't PHP run as some user?
> 
> PHP runs with the same permissions as Apache.

Understood.
> 
> M> -Is the issue giving that user execute permissions in the web
> root? 
> 
> If Apache cannot create a file in a directory, then PHP can't do it
> either.

Understood as well. 
> 
> M> -Why the concern about letting that user have execute
> permissions,
> M> and then prevent anyone (execpt those that have valid reasons)
> from
> M> having write/execute permission to the webroot.
> 
> I don't think the problem is with execute permissions. It just
> needs
> to be able to write and read from a directory, not necessarily
> execute. Although I'm not too sure about this.
> 
> M> Am I missing something basic? Quite possibly...
> 
> This isn't the easiest of things...

I guess I have two questions, then.

1-What is the risk of allowing apache to write to the webroot as
opposed to a directory under the webroot? I guess it would prevent
website defacement, but other than that, can't I do anything
malicious in a webroot subdirectory that I can do in the webroot?

2-Is "this is not the easiest of things" about letting the apache
user read/write, but not other users? If so, I must have
misunderstood what I've read about linux security (again, quite
possibly). I thought users could be in a group, and that group given
permissions to a directory/file.

Trying to learn...

Mark


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: [PHP] So in summary this can't be done due to permission problems?

2003-07-11 Thread Mark
Thanks to all who explained it to me. Sorry if I inadvertently
hijacked the thread.

--- Jason Wong <[EMAIL PROTECTED]> wrote:
> File and directory permissions (so that people searching the
> archives have 
> something to look for).
> 
> > That is correct. According to the docs, if the directory is not
> > executable, you can't even get the permissions on the files in
> it.
> > I'm confused, though.
> 
> 1) To be able to _access_ a directory and its contents you need at
> minimum, 
> execute permissions, on all directories in the path.
> 
> 2) To be able to create files (ie write _new_ files) in a
> directory, you need 
> write permission for the directory in which the file is to be
> created (as 
> well as (1)).
> 
> 3) To be able to change the contents of existing files you need (1)
> and you 
> need write permissions on the file that you want to change.
> 
> 4) To be able to rename files, you need (1) and read permissions on
> the source 
> files and (2) on the destination directory.
> 
> 5) To be able to _list_ the contents of a directory (as opposed to
> just having 
> _access_) then you need (1) and read permissions on that directory.
> 
> 
> > -Doesn't PHP run as some user?
> 
> Yes, usually as the user which runs the webserver.
> 
> > -Is the issue giving that user execute permissions in the web
> root?
> 
> Not just execute, you need write as well.
> 
> > -Why the concern about letting that user have execute
> permissions,
> > and then prevent anyone (execpt those that have valid reasons)
> from
> > having write/execute permission to the webroot.
> 
> Because in many shared-hosting environments, such an arrangement
> will mean 
> that your fellow co-hosts will be able to read/write/trash files in
> your web 
> space.
> 
> That is why it was suggested that the OP used the FTP functions to
> write the 
> files into his own web space.
> 
> -- 
> 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
> --
> /*
> Stone's Law:
>   One man's "simple" is another man's "huh?"
> */
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: [PHP] How to hide URL but it's not from a form just a link ?

2003-07-11 Thread Mark
As someone mentioned earlier, put them into a session (or a cookie).

Is this a repost, or is it a duplicate?

--- Joey <[EMAIL PROTECTED]> wrote:
> How can I hide this link so value can't be changed?
> I don't want to change anything at the server level, and its not
> from a 
> form so I cant do a post -vs- a get.
> 
>
http://www.abcd.com/SearchSet.php?searchby=cust_no&search=1&value=WOR032
> 
> Thanks !
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: [PHP] How unsafe is register_globals?

2003-07-17 Thread Mark
http://httpd.apache.org/docs-2.1/mod/core.html#allowoverride

You can indicate which directives can be overrriden, and which
cannot.

--- Paul Chvostek <[EMAIL PROTECTED]> wrote:
> On Thu, Jul 17, 2003 at 01:56:57PM +0800, Jason Wong wrote:
> > >
> > > gets the error "php_flag not allowed here".  I see from the
> comments at
> > > http://www.php.net/register_globals that I need AllowOverride
> Options to
> > > make that function ... but is it possible to have fine-grained
> enough an
> > > AllowOverride statement that only register_globals can be
> changed?
> > >
> > > I wouldn't want a user to use his .htaccess file to turn off
> safe_mode
> > > or open_basedir.
> > 
> > Take control of the setting yourself by setting it httpd.conf,
> inside the 
> > container of the virtual host in question.
> 
> Not so easy with mod_vhost_alias, given that I want it to apply
> only to
> certain users, and possibly only for directories for those users.
> 
> The .htaccess solution is the right one unless "AllowOverride
> Options"
> allowed the user to turn off safe_mode and open_basedir.  I don't
> have a
> non-production machine to test it on at the moment.
> 
> Any idea how I give the user local register_globals control without
> also
> letting them alter the other php.ini options?
> 
> -- 
>   Paul Chvostek
> <[EMAIL PROTECTED]>
>   Operations / Abuse / Whatever
>   it.canada, hosting and development  
> http://www.it.ca/
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



RE: [PHP] Mail From option in PHP.ini

2003-07-18 Thread Mark
>From the php website, it appears that the [EMAIL PROTECTED] can be
put in the fifth parameter of the mail() function:

Example 3. Sending mail with extra headers and setting an additional
command line parameter.

mail("[EMAIL PROTECTED]", "the subject", $message,
 "From: [EMAIL PROTECTED]", "[EMAIL PROTECTED]");
 

Note: This fifth parameter was added in PHP 4.0.5. Since PHP 4.2.3
this parameter is disabled in safe_mode and the mail() function will
expose a warning message and return FALSE if you're trying to use it.


--- "Brian S. Drexler" <[EMAIL PROTECTED]> wrote:
> Yes, sorry...forgot to include that one...:-)
> 
> -Original Message-
> From: M.A.Bond [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 18, 2003 11:31 AM
> To: 'sysadmin'; 'sven'; php-general
> Subject: RE: [PHP] Mail From option in PHP.ini
> 
> 
> I take it you've also tried setting Reply-To: ??
> Same format as From:
> 
> Mark
> 
> -Original Message-
> From: Brian S. Drexler [mailto:[EMAIL PROTECTED] 
> Sent: 18 July 2003 16:25
> To: 'sven'; php-general
> Subject: RE: [PHP] Mail From option in PHP.ini
> 
> 
> No, I tried this too.  Here is what I've tried
> 
> $hdrs = array(
>   'From'=> '"'.$FullName.'" <'.$Email.'>',
>   'Return-Path'   =>  $Email,
>   //'From'=>  $Email,
>   //'Disposition-Notification-To' => '"'.$FullName.'"
> <'.$Email.'>',
>   'Disposition-Notification-To' => $Email,
>   'Return-Receipt-To' => '"' .$FullName.'"
> <'.$Email.'>',
>   //'Return-Path' => $Email,
>   'Subject' => 'Your Quote # '.$Theresult
>   );
> The commented out ones were also tried
> 
> 
> -Original Message-
> From: sven [mailto:[EMAIL PROTECTED]
> Sent: Friday, July 18, 2003 11:23 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Mail From option in PHP.ini
> 
> 
> ... and how about this?
> $headers .= "Return-Path: $email_address_from_your_database\r\n";
> tell me, if it works.
> 
> ciao SVEN
> 
> 
> Brian S. Drexler wrote:
> > I tried the extra header.  The problem is with the return
> receipts.
> > The mail is being generated by a server other than my main e-mail
> > server, so if I want a delivery/read receipt I have to specify a
> > "From" e-mail address or else it will default to the user
> executing
> > the script, i.e. [EMAIL PROTECTED]  ini_set() does not appear to
> > work with sendmail_path. sendmail_path is in the PHP_INI_SYSTEM
> group
> > so it can only be set in the php.ini or httpd.conf...Thanks for
> the
> > suggestion though...
> >
> > -Original Message-
> > From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
> > Sent: Friday, July 18, 2003 11:09 AM
> > To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> > Subject: Re: [PHP] Mail From option in PHP.ini
> >
> >
> >> Ok, I want to specify who the mail is coming from by using the
> >> sendmail_path option in the PHP.ini.  I've added the
> >> [EMAIL PROTECTED] to it, but I want to be able to dynmaically
> change
> >> [EMAIL PROTECTED] to [EMAIL PROTECTED] or whatever else.  Anyone
> have
> >> any ideas how I can do this?  I'm pulling the e-mail I'd like to
> >> change it to from a MySQL database but can I rewrite the php.ini
> >> file on the fly or am I stuck.  Any help is greatly appreciated.
> >
> > Why not just put it in the extra headers?
> >
> > $headers .= "From: $email_address_from_your_database\r\n";
> >
> > Or you could possibly use ini_set() to change the php.ini
> setting.
> >
> > ---John Holmes...
> 
> 
> 
> -- 
> 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
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: [PHP] paypal and ecommerce

2003-07-18 Thread Mark
I assume you're going to try to make money at this. if so, maybe YOU
should get paid by the customer, then either weekly or monthly, send
out a check (or transfer via paypal) to the sellers - minus your fee,
of course.

You can easily automate this if you interface with Paypal.


--- Edward Peloke <[EMAIL PROTECTED]> wrote:
> Looking for opinions as to the best way to handle this.
> 
> I am using a php ecommerce product(osCommerce) to create an 'online
> yardsale'.  This will not be an auction site but items for sale at
> a
> straight price.  Currently the site is set up so the user can place
> several
> things in their basket, check out and the website owner is credited
> (via
> paypal accounts).  The problem is, when we allow anyone to post
> items, you
> may go to the site, chose five items to buy but they are all from
> different
> people.  How do you handle the check out?  We don't want them to
> have to
> check out five times so all of the five sellers can have their
> accounts
> credited.
> 
> Any help would be greatly appreciated.
> 
> Thanks,
> Eddie
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: [PHP] changing the name of a variable by another variable.

2003-07-22 Thread Mark
try echo ${variable$increment}

--- Tony Crockford <[EMAIL PROTECTED]> wrote:
> I really am having a difficult day.
> 
> I want to do an incrementing while loop that will echo out the
> values of
> $variable1 , $variable2, $variable3 which exist previously.
> 
> so how do I get the incrementing number onto the word variable? to
> make
> a new variable that matches thename of the existing ones..
> 
> I tried echo $variable$increment ; but $variable doesn't exist
> alone so
> all I get is $increment.
> 
> I'm not sure what I should be looking for in the manual - google's
> not
> much help either.
> 
> anyone give me a clue?
> 
> TIA
> 
> Tony
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: [PHP] Get Local IP Address

2003-07-28 Thread Mark
For Win9x, use winipcfg instead of ipconfig.
--- Chris Lee <[EMAIL PROTECTED]> wrote:
> >Try this:
> > >exec('ipconfig',$catch);
> >foreach($catch as $line){
> >if(eregi('IP Address',$line)){
> >list($t,$ip) = split(':',$line);
> >echo 'IP is '.$ip."\n";
> >}
> >}
> >?>
> 
> Thanks Tom, but I think it only work for Win NT, how about Win 9x?
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: [PHP] Re: looking for some kind of CMS breakthough (slightly OT)

2003-07-30 Thread Mark
But isn't this just defining your own version of something like
bbcode? And wouldn't you be better off using bbcode in that case,
when there are plenty of classes for parsing it already out there?

You could even edit the parsers to limit the set of tags available to
your users.


--- bill <[EMAIL PROTECTED]> wrote:
> I'd recommend starting simple.
> 
> Paragraph breaks are two carriage returns (Enter, Enter).  Give the
> writers some
> ability to do bold, italic, etc. by using something that isn't html
> (I don't
> store html tags in text fields).  For example +b+would make this
> bold-b-, or
> +i+would make this italic-i-.  You can also have +c+ to center -c-
> and could do
> the same thing with +16+sizes-16- and +red+colors-red-
> 
> Then, when displaying the text, translate what they have into html.
>  +b+ becomes
>  and -b- becomes .  +c+ become  and -c-
> become
> , etc.
> 
> Images are a bit different.  I let them specify the content and
> order of images
> (uploaded with the content), but I have the script align them where
> appropriate
> (count the number of paragraphs, insert the images in between
> appropriately,
> alternating sides [right, left, right, etc.]).
> 
> I find these simple things work for two reasons.  First, authors
> are used to
> editors doing things with their text; think of a magazine or
> newspaper editing,
> cutting, putting in pictures, etc.  Second, authors don't want to
> learn html any
> more than they want to learn page layout programs.  Give them some
> basic
> formatting stuff and add more as needed.
> 
> kind regards,
> 
> bill
> 
> Justin French wrote:
> 
> > Hi all,
> >
> > I've been writing CMS's for years now, and at the moment, I find
> myself
> > looking for some breakthrough, or at the very least, a change in
> the
> > way I do things.
> >
> > Anyone can write a CMS to manage simple articles with a data
> structure
> > like:
> >
> > id
> > author
> > date_written
> > heading
> > body
> > keywords
> > description
> > publish_date
> > expires_date
> >
> > But, it still requires the writer to know a little mark-up
> > (p,b,h1,h2,i,a,img,etc) in order to create an article with
> multiple
> > paragraphs, sections, headings, images, etc, with well
> structured,
> > valid mark-up.
> >
> > So, I've started thinking about how this can be tackled.
> >
> > Idea #1 was to have an unlimited number of 'blocks' or 'objects'
> > *related* to an article, resulting in two tables:
> >
> > ARTICLE
> > id, author, date, title, keywords, desc, etc
> >
> > BLOCKS
> > id, articleid, heading, content, order, etc
> >
> > But the reality is that different types of pages will require
> different
> > types of blocks (some with headings, some with images, some with
> > captions, etc).  On the surface, this seems either too big to
> tackle,
> > or too complex to expect the writer/contributor to grasp.
> >
> > I'd be really interested in hearing how any one else is tackling
> this
> > stuff, even if it is only remotely related to PHP.
> >
> > Justin
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: [PHP] retrieving multi-select form values

2003-07-31 Thread Mark
Not sure if you got a reply to this, but you need to make list an
array. Use list[] in your form as the variable name, and then
$_GET["list"] will be an array of your values.


--- Hank TT <[EMAIL PROTECTED]> wrote:
> Given the following querystring generated by, for example, a
> multi-select
> form list (menu), the contents of $_GET['list'] is expected to be
> an array
> holding 3 elements:
> 
> http://awebsite.net/formlist.php?list=2&list=3&list=99
> 
> Yet I only see the last value returned as a lone string.  Is this
> expected?
> 
> Thanks.
> 
> 
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: [PHP] Hitler and Recent Threads

2003-08-06 Thread Mark
I believe according to Godwin's Law, Mr. Cummings has now lost the
argument.

> > > > That kind of thinking leads to things like Hitler :|


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: [PHP] setting function variables

2003-08-08 Thread Mark
Use a database abstraction class (ADODB, Pear, or something from
phpclasses.org). You're trying to assign a variable to a function's
actions, when you can only assign the variable to teh ooutput of the
function.


--- Micah Montoy <[EMAIL PROTECTED]> wrote:
> I am trying to specify a single php file to contain all the
> variables and I
> just call this file where necessary.  What I am running into is
> that I want
> to do this for all the built in functions (i.e. mssql_query) as
> well.  I've
> tried numerous attempts but can't get it to operate without wanting
> to run
> the functions or return an error.  Something like this:
> 
> $runQuery = @mssql_query;
> $qryResults = @mssql_result;
> $getRow = @mssql_fetch_row;
> $getRowNums = @mssql_num_rows;
> 
> I've tried using the %, $, "",'', and the @ symbol without any
> luck.  Anyone
> know of way to do this, so I can use a generic name for all the
> functions
> and be able to distribute it to those using either SQL Server or
> MySQL
> without them having to go through the code and manually change it?
> 
> thanks
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: VOT: [PHP] Hitler and Recent Threads

2003-08-08 Thread Mark

--- "CPT John W. Holmes" <[EMAIL PROTECTED]> wrote:
> From: "Mark" <[EMAIL PROTECTED]>
> >
> > And as they say, "Never argue with a fool. People will
> > not be able to tell the differnce."
> 
> I thought it was "Never argue with an idiot. They drag you down to
> their
> level and beat you with experience"
> 
> :)
> 

Now that's one I haven't heard! Gotta file it away for future use...


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: [PHP] Problem sortiing dyn query

2003-08-09 Thread Mark

--- Creative Solutions New Media <[EMAIL PROTECTED]> wrote:
> Hi John,
> 
> Thanks.
> 
> Just wanted to make sure we were on the same page as the line of
> code in
> question wrapped in my original message.
> 
> You saying the solution is
> 
> $query_Recordset1 = sprintf("SELECT * FROM sti_tracking ORDER BY %s
> %s",$reSort_Recordset1,$direction_Recordset1);

I'm curious. Is there an advantage to using the above format, rather
than 

$query_Recordset1 = "SELECT * FROM sti_tracking ORDER BY
$reSort_Recordset1 $direction_Recordset1";

Is the result the same?

=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: [PHP] setting function variables

2003-08-14 Thread Mark

--- "CPT John W. Holmes" <[EMAIL PROTECTED]> wrote:
> 
> A good suggestion, since this is what your creating, basically.
> 
> Anyhow, if you really want to do it your way, it'd be like this:
> 
> $runQuery = 'mssql_query';
> $getRow = 'mssql_fetch_row';
> 
> Then you'd use them like this:
> 
> $result = $runQuery("select ... ");
> while($row = $getRow($result))
> {
>   ...
> }
> 

I seem to learn something new every time you or Jennifer post (many
others as well). I never knew about variable functions. Cool!

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


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: [PHP] Hitler and Recent Threads

2003-08-14 Thread Mark
As much as I'd like to get into the details of Godwin's Law and
Quirk's Exception, I'll leave it with a minor explanation. Quirk's
exception essentially says that you can't say "Hilter! There, the
threads over." It doesn't say anything about invoking Godwin's Law.

Quirk's Exception: Intentional invocation of this so-called "Nazi
Clause" is ineffectual.

Perhaps you could do a bit more reading on it. But the bottom line
is, the thread HAS outlived its usefulness (if it ever had any) and,
like discussions about religion or politics, is not going to change
anyone's mind. And as they say, "Never argue with a fool. People will
not be able to tell the differnce."



--- Robert Cummings <[EMAIL PROTECTED]> wrote:
> Godwin's law in no way states that that the argument has been lost.
> Only
> that the thread has outlived it's usefulness. Unfortunately your
> invocation of Godwin's law forces it to fall under Quirk's
> exception
> which generally makes you the fool.
> 
> Cheers,
> Rob.
> 
> 
> On Wed, 2003-08-06 at 23:11, Mark wrote:
> > I believe according to Godwin's Law, Mr. Cummings has now lost
> the
> > argument.
> > 
> > > > > > That kind of thinking leads to things like Hitler :|
> > 
> > 
> > =
> > Mark Weinstock
> > [EMAIL PROTECTED]
> > ***
> > You can't demand something as a "right" unless you are willing to
> fight to death to defend everyone else's right to the same thing.
> > ***
> > 
> > __
> > Do you Yahoo!?
> > Yahoo! SiteBuilder - Free, easy-to-use web site design software
> > http://sitebuilder.yahoo.com
> > 
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> > 
> > 
> -- 
> .-.
> | Worlds of Carnage - http://www.wocmud.org   |
> :-----:
> | Come visit a world of myth and legend where |
> | fantastical creatures come to life and the  |
> | stuff of nightmares grasp for your soul.|
> `-'
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: [PHP] setting function variables

2003-08-14 Thread Mark

--- Micah Montoy <[EMAIL PROTECTED]> wrote:
> Tried this and it returns errors of type:
> 
> Warning: Wrong parameter count for mssql_result() in
> c:\inetpub\wwwroot\webpage10\example\utilities\dsp_del_images.php
> on line 78
> 
> Warning: mssql_result(): supplied argument is not a valid MS
> SQL-result
> resource in
> c:\inetpub\wwwroot\webpage10\example\utilities\dsp_del_images.php
> on line 79
> 
> Warning: Wrong parameter count for mssql_result() in
> c:\inetpub\wwwroot\webpage10\example\utilities\dsp_del_images.php
> on line 78
> 
> Warning: mssql_result(): supplied argument is not a valid MS
> SQL-result
> resource in
> c:\inetpub\wwwroot\webpage10\example\utilities\dsp_del_images.php
> on line 79
> 
> Lines 78 and 79 read like this:
> 
> $img_numbers = $qryResults("SELECT COUNT(img_id) AS TotalImages

This should be $runQuery(), not $qryResults()

> FROM images
> WHERE category_id = '$row[0]'");
> $img_count = $qryResults($img_numbers,0,"TotalImages")
> 
> The variables are specified as
> 
> $runQuery = 'mssql_query';
> $qryResults = 'mssql_result';
> 
> Any ideas of why it would be doing this?  Everything works fine
> when I don't
> try to use the variables.
> 
> thanks
> 
> "Cpt John W. Holmes" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > From: "Mark" <[EMAIL PROTECTED]>
> > > --- Micah Montoy <[EMAIL PROTECTED]> wrote:
> > > > I am trying to specify a single php file to contain all the
> > > > variables and I
> > > > just call this file where necessary.  What I am running into
> is
> > > > that I want
> > > > to do this for all the built in functions (i.e. mssql_query)
> as
> > > > well.  I've
> > > > tried numerous attempts but can't get it to operate without
> wanting
> > > > to run
> > > > the functions or return an error.  Something like this:
> > > >
> > > > $runQuery = @mssql_query;
> > > > $qryResults = @mssql_result;
> > > > $getRow = @mssql_fetch_row;
> > > > $getRowNums = @mssql_num_rows;
> > >
> > > Use a database abstraction class (ADODB, Pear, or something
> from
> > > phpclasses.org). You're trying to assign a variable to a
> function's
> > > actions, when you can only assign the variable to teh ooutput
> of the
> > > function.
> >
> > A good suggestion, since this is what your creating, basically.
> >
> > Anyhow, if you really want to do it your way, it'd be like this:
> >
> > $runQuery = 'mssql_query';
> > $getRow = 'mssql_fetch_row';
> >
> > Then you'd use them like this:
> >
> > $result = $runQuery("select ... ");
> > while($row = $getRow($result))
> > {
> >   ...
> > }
> >
> > ---John Holmes...
> >
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: [PHP] Category and sub-category logic

2003-08-15 Thread Mark
I'm trying to get a handle on this algorithm as well. If you add
additional children to a parent record, doesn't that require
renumbering all the rgt and lft values in the lineage? For example
(table shamelessly stolen from a website):

Personnel 
 emp lft  rgt 
 ==
 'Albert'  1   12 
 'Bert'23 
 'Chuck'   4   11 
 'Donna'   56 
 'Eddie'   78 
 'Fred'9   10 

If I want to add 'Joe' as a subordinate to 'Fred', doesn't that mean
I have to change the lft values for Fred, Chuck, and Albert? Yes,
deleting definitely seems easier. I'm curious about adding...

Mark



--- "Chris W. Parker" <[EMAIL PROTECTED]> wrote:
> David Otton <mailto:[EMAIL PROTECTED]>
> on Thursday, August 14, 2003 4:58 PM said:
> 
> > The advantage of doing it this way is that your tree structure is
> > generic and can have many levels. The disadvantage is that you
> may
> > need many SQL queries to fully traverse the tree (though people
> > rarely want to do this, and sub-selects, clever joins or
> post-query
> > processing can reduce the overhead).
> 
> Which is why you should use the Modified Preorder Tree Traversal
> method
> instead. With that method you've got one table that defines the
> categories AND their relationships to each other.
> 
> Your SQL queries end up looking something like this.
> 
> SELECT name
> FROM categories
> WHERE lft >= x
>   AND rgt <= y
> 
> 
> 
> Chris.
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: [PHP] configure smtp error

2003-08-15 Thread Mark

--- Jackson Miller <[EMAIL PROTECTED]> wrote:
> It looks like sendmail_from should be an smtp server, not an email
> address.
> 
> Try setting it to your outgoing mail server that you use with your
> email 
> client (i.e. Outlook).  If you can send email from your email
> client then the 
> firewall will have no bearing.
> 
> -Jackson
> 
> 
> On Thursday 14 August 2003 11:24, merryE wrote:
> > I am using LAN in my college and there is firewall. will it
> effect my mail
> > function in php.
> >
> > I configure my server name as localhost at apache http.conf. and
> inphp.ini
> > i configure my SMTP like this:
> >
> > [mail function]
> >
> > ; For Win32 only.
> >
> > SMTP= POP ; for Win32 only

This should be the fully qualified domain name or IP address ofhte
SMTP server that you want to use. If you look in your configuration
in Outlook, you should be able to find the SMTP server that you have
access to. But note that if that server requires SMTP AUTH (username
and password to send mail), you can;t use PHP's mail function
directly,. You'll need to use one of the mail classes.

> >
> > ; For Win32 only.
> >
> > sendmail_from= [EMAIL PROTECTED] ; for Win32 only

This is correct. It should be the email address from which teh mail
should be sent. I beleive PHP uses this as the SMTP MAIL FROM
parameter (not to be confused with the From: mail header ).

> >
> > but i got warning: mail(): Failed to connect to mailserver at
> "POP" port
> > 25, verify your "SMTP" and "smtp_port" setting in php.ini or use
> ini_set()
> > in c:\program files\apache group\apache\htdocs\do_feedback.php on
> line 12
> 
> -- 
> jackson miller
>  
> cold feet creative
> 615.321.3300 / 800.595.4401
> [EMAIL PROTECTED]
>  
>  
> cold feet presents Emma
> the world's easiest email marketing
> Learn more @  http://www.myemma.com
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: [PHP] Category and sub-category logic

2003-08-15 Thread Mark
--- "CPT John W. Holmes" <[EMAIL PROTECTED]> wrote:
> From: "Mark" <[EMAIL PROTECTED]>
> 
> 
> > I'm trying to get a handle on this algorithm as well. If you add
> > additional children to a parent record, doesn't that require
> > renumbering all the rgt and lft values in the lineage? For
> example
> > (table shamelessly stolen from a website):
> >
> > Personnel
> >  emp lft  rgt
> >  ==
> >  'Albert'  1   12
> >  'Bert'23
> >  'Chuck'   4   11
> >  'Donna'   56
> >  'Eddie'   78
> >  'Fred'9   10
> >
> > If I want to add 'Joe' as a subordinate to 'Fred', doesn't that
> mean
> > I have to change the lft values for Fred, Chuck, and Albert? Yes,
> > deleting definitely seems easier. I'm curious about adding...
> 
> Yes, you will have to update all of the right and left numbers to
> the right
> (or higher) than the node where you are inserting. Deleting is
> basically the
> same method done in reverse, but can get complicated when you
> delete a node
> and have to determine what to do with the children.
> 
> I'd recommend, if you're really interested in this, to do some
> searching on
> nested set tutorials. You could specifically search for Joe Celko
> who has
> written a lot of information on the topic.

Thanks. I'll take a look. I'm considering changing to this algorithm
from my basic parent-ID table.

> 
> While it seems like a big deal to have to update all of the
> numbers, it's
> really not. It can be done with a single query (with subselects).
> Yes, it's
> more costly than inserting a name into an adjacentcy list model,
> but it's
> worth it for all that you gain from the nested set model.
> 
> ---John Holmes...
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: [PHP] Any IMAP portal system

2003-08-18 Thread Mark
http://www.horde.org

--- Dasmeet <[EMAIL PROTECTED]> wrote:
> Hi! Is there any PHP Portal system (scripts) that have IMAP/SMTP,
> calendar, notebook and other utilities build in to it alongwith
> other 
> general portal utilities? Any information would be of great help.
> Thanks
> Dasmeet
> 
> 
> --
> Domainwala.com
> Domain Names from $7.99 at http://www.domainwala.com
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: [PHP] Your details

2003-08-20 Thread Mark
This is the only time I'm glad I use Yahoo mail for this list. Seems
either their AV software or their mangling of attachments provided
some level of protection. Though I knew they were viri, I wanted to
check one out. They came across as text files with nothing but the
list signature in them.


--- "John W. Holmes" <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> 
> > Please see the attached file for details.
> > 
> 
> Did anyone's AV pick up a virus in this email? It went right
> through 
> mine but obviously doesn't belong on this list. I just got the
> latest 
> definitions from Norton, too...
> 
> -- 
> ---John Holmes...
> 
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
> 
> PHP|Architect: A magazine for PHP Professionals – www.phparch.com
> 
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: [PHP] PHP Class for IP CIDR notation

2003-06-06 Thread Mark
Here's a quick function of the top of my head. I'm not sure if
x.x.0.x or x.0.x.x are valid IP addresses. Adjust as necessary.

255) {
  echo "First octet of IP address cannot exceed 255";
  return false;
}
$ip_list[]=implode(".",$octet);

  }
  return $ip_list;

}

$arr=cidr("192.168.1.0",23);
echo "";
print_r($arr);
echo "";


?>



--- Rob Lacey <[EMAIL PROTECTED]> wrote:
> does anyone know of a class that is able to extrapolate a list of
> IPs given an 
> address in cidr notation. I have used the Net::Netmask module in
> perl, so I 
> was just wondering if there was a PHP equivalent.
> 
> Thanks
> 
> Rob
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: [PHP] PHP CLI question

2003-06-06 Thread Mark
Wrap it in a shell script or batch file. 

Something like:

REM ---Start cli.bat---
./cli/php.exe -c <> %1 %2 %3 %4 %5 %6 %7 %8 %9
@exit
REM ---End cli.bat---


--- Monte Ohrt <[EMAIL PROTECTED]> wrote:
> Hi Adam,
> 
> I know it can be altered with a command-line switch, but it is the
> default that I want to change. I don't want to have to remember to
> set
> the -c flag everytime, or go back and change all my existing
> scripts.
> 
> Monte
> 
> On Thu, 2003-06-05 at 09:53, Adam Voigt wrote:
> > >From a ./php -h:
> > 
> >  -c | Look for php.ini file in this directory
> > 
> > The "|" means "OR", so logic would dictate you can point
> > directly to the file with the -c option.
> > 
> > 
> > On Thu, 2003-06-05 at 10:35, Monte Ohrt wrote:
> > > Hi Cal,
> > > 
> > > I may be missing something, but I don't see how this page
> answers either
> > > of my questions. ini_set() is for setting configuration
> options.
> > > 
> > > Monte
> > > 
> > > On Thu, 2003-06-05 at 09:23, Cal Evans wrote:
> > > > http://www.php.net/manual/en/function.ini-set.php
> > > > 
> > > > * Cal Evans
> > > > * http://www.christianperformer.com
> > > > * Stay plugged into your audience
> > > > * The measure of a programmer is not the number of lines of
> code he writes
> > > > but the number of lines he does not have to write.
> > > > *
> > > > 
> > > > - Original Message -
> > > > From: "Monte Ohrt" <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Cc: <[EMAIL PROTECTED]>
> > > > Sent: Thursday, June 05, 2003 9:22 AM
> > > > Subject: [PHP] PHP CLI question
> > > > 
> > > > 
> > > > > Hi,
> > > > >
> > > > > A couple of questions:
> > > > >
> > > > > 1) Is there a way to make the CLI version of PHP ignore
> certain settings
> > > > > in the php.ini file? For instance, I don't want the ioncube
> accelerator
> > > > > invoked when using PHP from the command line. My current
> work around is
> > > > > to use two separate init files, php.ini and php-cli.ini ...
> and this
> > > > > brings me to my second question:
> > > > >
> > > > > 2) Is there a way to specify a different name for the
> php.ini file,
> > > > > apart from hacking php_ini.c ? It seems I can only change
> the _path_ to
> > > > > the file, but not the filename itself.
> > > > >
> > > > > TIA
> > > > > Monte
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > PHP General Mailing List (http://www.php.net/)
> > > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > > >
> > > > >
> -- 
> Monte Ohrt <[EMAIL PROTECTED]>
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: [PHP] scheduled tasks

2003-06-06 Thread Mark
If the issue is running a cron job on the server, you could run the
cron job or scheduled task on a client with lynx. The client would
just need to be on and have access to the server at the time it fires
up the task.

--- Matt Palermo <[EMAIL PROTECTED]> wrote:
> Does anyone know if there is any other way to have a php script run
> automatically (everyday, or week, or month, etc...) besides a cron
> job or scheduled task?  Thanks.
> 
> Matt
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: [PHP] Automatic Headers and Footers

2003-06-06 Thread Mark
Well, my understanding of mod_rewrite is nonexistent (heck, I'm not
even sure that's the correct name), but I believe you do the
following. Write a php script to parse the file and output it with
the added lines you want where you want them. Then setup apache/php
to accept something like

http://www.yourserver.com/directory/phpscript/yourfile.html

where  is the path to where the files are located,
 is the php script (located (in )that parses
the html files, and  is... one of your HTML files.

It's not ideal, but it will let you wrap something around existing
HTML files without modifying them or their location.

--- Wendell Brown <[EMAIL PROTECTED]> wrote:
> Ok guys, I think I have a challenge for you (actually, I don't
> think
> this can be done, but I've been proven wrong every time I've made
> that
> assumption with php in the past, so I'll ask anyway).  Here's the
> question:
> 
> Is there a way to have php insert headers and/or footers into all
> of
> the html files in a given directory on the fly (not actually
> modifying
> the files)?  And by this I mean take an existing valid HTML file
> and
> add headers and footers and end up with a valid HTML file.
> 
> Now, before some of you get trigger happy and tell me to read the
> manual and point me to things like .htaccess, auto_prepend_file,
> google
> and the like, think about what I'm really asking  It needs to
> insert the header after the -body- tag and put the footer in before
> the
> -/body- tag.  It needs to do this without modifications to the HTML
> file.  
> 
> And yes, I understand that by default HTML files aren't going to be
> effected by the auto_prepend_file (since they aren't php files) -
> so it
> will require adding HTML to the list of php parsed file types.
> 
> For instance, the goal would be to take the following code:
> 
> -HTML-
> -Head-
> -Title-This is a test-Title-
> -body-
> 
> Well, did it work?
> 
> -/body-
> -/html-
> 
> and convert it to this:
> 
> -HTML-
> -Head-
> -Title-This is a test-Title-
> -body-
> -h1-This is a page header-/h1-
> 
> Well, did it work?
> 
> -h3-This is the footer-/h3-
> -/body-
> -/html-
> 
> Can it be done?  I don't think so, but I leave it up to your wiles
> to
> suggest a solution
> 
> Thanks!!!
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: [PHP] Heredoc question

2003-06-06 Thread Mark
Or you can just escape out of PHP like so:


This is a test of the emergency broadcasting system. If this had been
an actual emergency, you would have been instructed to

read from the chapters of Matthew, Mark, Luke and DUCK!!


--- Sparky Kopetzky <[EMAIL PROTECTED]> wrote:
> I did figure a way around heredoc last night. Here's the solution
> if anyone
> can use it:
> 
>  $truth = true;
> $head = "brain bucket";
> $message = << This is a test of the emergency broadcasting system.
> If this had been an actual emergency, you would have
> been instructed to
> TEST;
> 
> if ($truth)
> {
> $message .= " place your {$head} between your legs and\n";
> }
> 
> $message .= << read from the chapters of Matthew, Mark, Luke
> and DUCK!!
> TEST;
> 
> print $message;
> ?>
> $message is actually works in heredoc just like any other string.
> Didn't
> expect that.
> Hope this helps someone else who is trying the same thing as I am.
> 
> Robin E. Kopetzky
> Black Mesa Computers/Internet Services
> www.blackmesa-isp.net
> 
> - Original Message -
> From: "Jennifer Goodie" <[EMAIL PROTECTED]>
> To: "Sparky Kopetzky" <[EMAIL PROTECTED]>; "PHP General"
> <[EMAIL PROTECTED]>
> Sent: Thursday, June 05, 2003 16:47
> Subject: RE: [PHP] Heredoc question
> 
> 
> > > Can one use  within the heredoc syntax or is there
> > > another way?? I'm trying to dynamically generate email from
> > > generic text but with obvious additions, like this:
> >
> > http://us4.php.net/types.string says that heredoc acts just like
> double
> > quoted, which would mean it expands variables, so I would try
> just
> throwing
> > them in there like this...
> >
> >
> >  $message = << >  Name: {$lot->get_name()}
> >
> >  Lot {$lot->get_id()} has been approved. Here is the
> >  link to the lot:
> >  my_message;
> >
> >
> > There's an example of almost exactly like this on that page.
> >
> >
> >
> >
> >
> >
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: [PHP] Mail problem

2003-05-27 Thread Mark
I don't believe you can use the form of "Someone <[EMAIL PROTECTED]>".
I believe this is what the MTA receives as the MAIL TO (not to be
confused with eth To: header), and it's not a legal format for that.

--- Rosen <[EMAIL PROTECTED]> wrote:
> Hi,
> I'm using PHP 4.3.1 on Win98 and I have a problem with sending
> E-mail with
> "CC:" header.
> 
> I use following code:
> *---
> $to="[EMAIL PROTECTED]";
> $message="sometext...";
> $subject="somesubject";
> 
> $headers  = "MIME-Version: 1.0\r\n";
> $headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
> 
> $headers .= "From: Somebody <[EMAIL PROTECTED]>\r\n";
> 
> $headers .= "Cc: Support <[EMAIL PROTECTED]>\r\n";
> 
> mail($to, $subject, $message, $headers);
> --
> 
> The problem is in the "Cc: Support
> <[EMAIL PROTECTED]>\r\n".
> If I write it "Cc: [EMAIL PROTECTED]" - i.e. only
> E-mail
> adress without "Support <..mailadress>" - it works.
> 
> Can someone tell me where is the problem ?
> Thanks,
> Rosen
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.
http://search.yahoo.com

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



Re: [PHP] heavy traffic portal site

2003-06-03 Thread Mark
I see you posted this to the Horde list, so you're aware of that
project. Horde has been used in a few very large installations, but
more important than the number of users is the load on the app. Will
the 100k users be on it very frequently? Rarely? What kind of hit
level are we talking about? Much of that could also be dependent on
the hardware you have available.

Also, are you looking for a "single", (semi)-integrated app such as
Horde, or would you be interested in individual solutions that could
be merged together?

--- Adrian Teasdale <[EMAIL PROTECTED]> wrote:
> Hi there
> 
> We have been contacted about creating a portal site which will have
> some
> heavy usage.  They are talking about having 100,000 subscribed
> users to the
> system which will have the following:
> 
> 1. Web based email
> 
> 2. Calender (for the persons own use, not shared)
> 
> 3. File store (and sharing) and image store (and sharing)
> 
> and a few other things.  The above are the areas that we think
> would create
> the most "load" on the system.  Firstly, does anyone have an Open
> Source
> application that they would recommend for the above and are there
> any
> examples of other people using this in the real world? If there is
> no
> application that would handle all of the above, what would people
> suggest?
> 
> Thanks
> 
> Ade
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: [PHP] Re: PHP and base32 encryption

2003-06-04 Thread Mark
There's a dec2bas() function on this page that might be helpful...
http://us3.php.net/bc - search the page for base32

There are also a number of references that come up quickly on google
that will explain base32 encoding. You should be able to reverse
engineer it.

--- DvDmanDT <[EMAIL PROTECTED]> wrote:
> I've never even heard of base32... Only base64... Maybe mcrypt but
> nah,
> can't see why mcrypt would include that... Errmm... Maybe you
> should check
> for some RFC about this... geektools.com seems to let you search
> RFC's...
> "Cditty" <[EMAIL PROTECTED]> skrev i meddelandet
> news:[EMAIL PROTECTED]
> > Someone has sent me a line of text that is base32 encrypted that
> I need to
> > decrypt.  Does anyone know of a php module or snippet that can
> decrypt
> > this?  I have searched on google and the php.net site, but was
> unable to
> > find anything that can help.
> >
> > Thanks
> >
> > CDitty
> >
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: [PHP] Table issue

2003-06-10 Thread Mark
What application are you copying the data from? We've run into some
odd problems when text from MS Word is copied into a textarea field
and put into a database. Certain characters that one would think were
standard ASCII ended up being odd special characters. That migh tbe
breaking the db update.

Or not...

M


--- Steve Marquez <[EMAIL PROTECTED]> wrote:
> Yes,
> 
> I am assuming that because PHP MyAdmin works with the long article
> that it
> is my script that is the issue.
> 
> The table is a "longtext" table. All permissions are correct. The
> exact same
> script works perfectly on my server.
> 
> The funny thing is that every single line text field inserts into
> the DB,
> however, the multi line does not.
> 
> If I write the article in the multi-line field, it works (as far as
> I know,
> I have only attempted about 40 lines), but when I copy and paste
> the article
> in, it does not.
> 
> This is really strange...
> 
> -Steve
> 
> 
> 
> > [snip]
> > I am attempting to insert an article into a MySQL table on a
> remote
> > server, via a PHP Forms script.
> > 
> > I am able to insert the article on my server, and PHP MyAdmin
> works on
> > both servers, however, when I use my script on the remote server
> it does
> > not allow for long articles. (The articles have not more than 5
> > paragraphs at the most.)
> > 
> > Is there anyone that has run into this problem before? Any
> suggestions?
> > [/snip]
> > 
> > 
> > Have you checked all of the usual suspects? Permissions? Database
> > configuration (is the article column large enough)? What errors
> have you
> > trapped?
> > 
> > HTH!
> > 
> > Jay
> > 
> > --
> > 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
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: [PHP] undefined variable: action

2003-06-11 Thread Mark
Or you can simply turn off NOTICE error reporting in the php.ini file
or use ini_set or error_reporting() to not include notices. This
should not affect functionality. 


--- Lars Torben Wilson <[EMAIL PROTECTED]> wrote:
> On Wed, 2003-06-11 at 12:22, Ryan M wrote:
> > Thanks for the advice... The link worked Now it is saying
> this:
> > 
> > Notice: Undefined index: action in
> > 
> > It only says this if there is no action...it goes away once I
> click the link
> > and the action=someaction Is there a way to fix my php so
> that I dont
> > have to change all of the web sites hosted on my server?? Thanks!
> > 
> > Ryan
> 
> Check and initialize your input variables:
> 
> if (!isset($_GET['action'])) {
> $action = '';
> } else {
> $action = $_GET['action'];
> }
> 
> switch ($action) {
> case 'something':
>do_something();
> break;
> case 'something_else':
>do_something_else();
> break;
> default:
>echo "Unrecognized action given";
> break;
> }
> 
> If this is something you need to do for every page on your site,
> put
> the if() check into an auto-prepended file or something.
> 
> 
> Hope this helps,
> 
> Torben
> 
> 
> -- 
>  Torben Wilson <[EMAIL PROTECTED]>   
> +1.604.709.0506
>  http://www.thebuttlesschaps.com 
> http://www.inflatableeye.com
>  http://www.hybrid17.com     
> http://www.themainonmain.com
>  - Boycott Starbucks!  http://www.haidabuckscafe.com
> -
> 
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: [PHP] Sending TCP/IP string using PHP??

2003-06-11 Thread Mark
--- AES Security - Brian Celenza <[EMAIL PROTECTED]> wrote:
> Okay hopefully I can explain this system well enough.
> 
> What I am trying to do is send a tcp/ip request to a visual basic
> program
> using php.
> 
> Is there anyway to send raw data over tcp/ip using php, or how
> would i be
> able to make some sort of adapter to take the request and be able
> to read it
> from a vb program running on the server?
> 

Assuming the VB app can act as a server, check out
http://www.php.net/sockets

> Thanks, sorry if this is confusing.
> 
> Brian
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: [PHP] Re: mail() function & exchange

2003-06-12 Thread Mark
re using Linux, you just need to use the
> > mail() function because 
> > it just uses sendmail by default.
> > 
> > If you still have problems, just use the classes
> > that I mentioned 
> > enabling direct delivery mode in the SMTP sending
> > attributes. That does 
> > the same as sendmail but at least if it fails you
> > can enable debugging 
> > to see what the SMTP protocol dialog reveals.
> > 
> > 
> > 
> > >  --- Manuel Lemos <[EMAIL PROTECTED]> schrieb: >
> > Hello,
> > > 
> > >>On 06/10/2003 04:44 PM, Matthias Wulkow wrote:
> > >>
> > >>>a friend of mine is trying to set up an automated
> > >>
> > >>mailing function.
> > >>
> > >>>The platform is Windows & he's using the last PHP
> > >>
> > >>release at this
> > >>
> > >>>time.
> > >>>He asks me how to do it with Exchange, because it
> > >>
> > >>doesn't speak SMTP
> > >>
> > >>>or not correctly? What is the matter? Is that
> > >>
> > >>true? But that's not
> > >>
> > >>>really the question... could somebody point me to
> > >>
> > >>some documents where
> > >>
> > >>>I could find out, what has to be done to make it
> > >>
> > >>work?
> > >>
> > >>I do not see what he means by not speaking SMTP
> > >>correctly. Anyway, if it 
> > >>receives e-mail that you get, it also can relay
> > >>messages that you send. 
> > >>I think in the worst case you need to
> > authenticate.
> > >>
> > >>In that case you may want to try this class for
> > >>composing and sending 
> > >>messages. It comes with a sub class for sending
> > >>messages via SMTP that 
> > >>supports authentication.
> > >>
> > >>http://www.phpclasses.org/mimemessage
> > >>
> > >>You also need this class for the actual message
> > >>delivery:
> > >>
> > >>http://www.phpclasses.org/smtpclass
> 
> 
> __
> 
> Gesendet von Yahoo! Mail - http://mail.yahoo.de
> Logos und Klingeltöne fürs Handy bei http://sms.yahoo.de
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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



Re: [PHP] str_replace() problems actually *_replace() problems to be more accurate

2003-06-16 Thread Mark

--- Thomas Bolioli <[EMAIL PROTECTED]> wrote:
> I am a perl/java/c++ programmer who is doing something in php and
> have 
> run accross something I am stumped with. I am trying to replace
> carriage 
> returns with  or  tags (p's in groups of two and br's for
> any 
> unmatched cr's). I have tried all of the *_replace() functions
> including 
> string_*, ereg_* and preg_*. None have worked the way they seem to 
> should. Note, I am a perl programmer and preg_replace() did not
> work 
> while a test perl script did. I have tried multiple forms of
> patterns 
> from "\r\n" to "\n" to "\r" to "/\r?\n/ei" (in the *reg_*
> functions). I 
> even took code verbatim from examples in the docs to no avail. I
> have 
> included the entire block of code (and mysql_dump output) since
> there is 
> something I have apparently not done right and it may not be in the
> 
> pattern matches.
> Thanks in advance,
> Tom
> 
> 
> *The offending code:*
> 
> }elseif($_REQUEST['add']){
> $desc = $_REQUEST['description'];
> str_replace("\r\n\r\n", "", $desc);
> str_replace("\r\n", "", $desc);

I believe you need to assign this to something. So your lines would
look more like:

$desc=str_replace("\r\n\r\n", "", $desc);
$desc=str_replace("\r\n", "", $desc);

> $result = mysql_query('INSERT INTO hr_listings 
> (title,description,location,end_date,posting_date) 
>
VALUES("'.$_REQUEST['title'].'","'.$desc.'","'.$_REQUEST['location'].'","'.$_REQUEST['end_date'].'",
> 
> NOW())',$db)
> or trigger_error("MySQL error nr ".mysql_errno().":
> ".mysql_error());
>   
> 
> *Output of mysql_dump showing the \r\n's going in*
> INSERT INTO hr_listings VALUES 
> (15,'test',5,'2003-06-16','2003-09-11',NULL,'This
>   is one line\r\nThis is the next\r\n\r\nThis is another 
> paragraph\r\n\r\n');
> INSERT INTO hr_listings VALUES 
> (16,'test2',1,'2003-06-16','2004-09-11',NULL,'Thi
> s is one line\r\nThis is the next\r\n\r\nThis is another 
> paragraph\r\n\r\n');
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: [PHP] sorting an array

2003-06-17 Thread Mark
perhaps asort()?
"This function sorts an array such that array indices maintain their
correlation with the array elements they are associated with."


--- Diana Castillo <[EMAIL PROTECTED]> wrote:
> Hi , I am trying to sort this:
> array[numrooms] => Array ( [3] => 2 [2] => 5 [1] => 1 )
> I want to get a result like this:
> 2=>5
> 3=>2
> 1=>1
> ( I want the keys to stay attached to the results)
> 
> I used this to sort it :
>  array_multisort ($request_array['numrooms'], SORT_NUMERIC,
> SORT_DESC);
> 
> but instead I get this:
>  [numrooms] => Array ( [0] => 5 [1] => 2 [2] => 1 )
> 
> any suggestionis?
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



[PHP] Secur32.dll and php_imap.dll

2003-06-22 Thread Mark
Win NT4.0
Apache 2.0.45

I've searched the archives and google, but haven't been able to quite
find a solution to this problem. I just upgraded from php4.3.1
(pre-release version) to php4.3.2. I am now getting the following two
errors, which I'm sure I've gotten and fixed in the past, but can't
figure out now...

ERROR 1 (An Apache error)

The dynamic link library Secur32.dll could not be found in the
specified path 

I click OK, and get the following php error:

Unknown() Unable to load dynamic library
'c:\winnt\system32\php_imap.dll' The specified module could not be
found.

Secur32.dll is not on my system, and hasn't been in the past.
php_imap.dll was copied to c\winnt\system32

php extension dir is c:\winnt\system32 (tried it with
c:\php\extensions as well).

My apologies - I can't imagine this is a new problem, and I'm sure
many others have found and solved it. I just can't seem to find it
logged anywhere.

Mark

=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: [PHP] Secur32.dll and php_imap.dll

2003-06-22 Thread Mark
Well, I'm not sure if I did a smart thing, but it appears that
secur32.dll and security.dll are the same file, just differnt
versions. It seems that the file is secur32.dll on all Windows
versions except WinNT (I could be wrong). I simply copied and renamed
security.dll to secur32.dll.

So far so good. I just hope I didn't start a ticking timebomb.

Mark

--- Mark <[EMAIL PROTECTED]> wrote:
> Win NT4.0
> Apache 2.0.45
> 
> I've searched the archives and google, but haven't been able to
> quite
> find a solution to this problem. I just upgraded from php4.3.1
> (pre-release version) to php4.3.2. I am now getting the following
> two
> errors, which I'm sure I've gotten and fixed in the past, but can't
> figure out now...
> 
> ERROR 1 (An Apache error)
> 
> The dynamic link library Secur32.dll could not be found in the
> specified path 
> 
> I click OK, and get the following php error:
> 
> Unknown() Unable to load dynamic library
> 'c:\winnt\system32\php_imap.dll' The specified module could not be
> found.
> 
> Secur32.dll is not on my system, and hasn't been in the past.
> php_imap.dll was copied to c\winnt\system32
> 
> php extension dir is c:\winnt\system32 (tried it with
> c:\php\extensions as well).
> 
> My apologies - I can't imagine this is a new problem, and I'm sure
> many others have found and solved it. I just can't seem to find it
> logged anywhere.
> 
> Mark
> 
> =
> Mark Weinstock
> [EMAIL PROTECTED]
> ***
> You can't demand something as a "right" unless you are willing to
> fight to death to defend everyone else's right to the same thing.
> ***
> 
> __
> Do you Yahoo!?
> SBC Yahoo! DSL - Now only $29.95 per month!
> http://sbc.yahoo.com
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: [PHP] Impossible bug!

2003-06-26 Thread Mark
In additon to the previous comment about resetting $*_color, you're
multiplying the decimal value by 100 to get a percentage. But then
you're comparing it to 1, not 100. 

EWither don't multiply it by 100, or check to see if it's > 100. Or
do you really want $*_color to be set if it's greater than 1%?


--- John Wulff <[EMAIL PROTECTED]> wrote:
> Where the heck is my problem?  No matter what the value for *_color
> is
> always 1!!!
> 
> $example_data = array(
> array("Mar-99",100,2000,5945.33,1234,10),
> array("Feb-99",908,3454,47648.90,4321,50),
> array("Jan-99",542,8000,13365.52,6012,60)
> );
> 
> $high = 47648.90;
> if(!isset($num))
> {
>  $num = 1;
> }
> while($num <= 100 && $num >= 1)
> {
> 
> foreach ($example_data as $key=>$value)
> {
>  list($month, $a, $b, $c, $d, $e) = $value;
> 
>  $a_percent = ($a / $high) * 100;
>  if($a_percent > $num) { $a_color = 1; }
> 
>  $b_percent = ($b / $high) * 100;
>  if($b_percent > $num) { $b_color = 1; }
> 
>  $c_percent = ($c / $high) * 100;
>  if($c_percent > $num) { $c_color = 1; }
> 
>  $d_percent = ($d / $high) * 100;
>  if($d_percent > $num) { $d_color = 1; }
> 
>  $e_percent = ($e / $high) * 100;
>  if($e_percent > $num) { $e_color = 1; }
>  }
> 
> $num = $num + 1;
> }
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



RE: [PHP] Impossible bug!

2003-06-26 Thread Mark
--- "Ford, Mike   [LSS]" <[EMAIL PROTECTED]> wrote:
> > -Original Message-
> > From: Mark [mailto:[EMAIL PROTECTED]
> > Sent: 26 June 2003 15:16
> > To: John Wulff; [EMAIL PROTECTED]
> > Subject: Re: [PHP] Impossible bug!
> > 
> > 
> > In additon to the previous comment about resetting $*_color,
> you're
> > multiplying the decimal value by 100 to get a percentage. But
> then
> > you're comparing it to 1, not 100. 
> > 
> > EWither don't multiply it by 100, or check to see if it's > 100.
> Or
> > do you really want $*_color to be set if it's greater than 1%?
> 
> Actually, if you look really carefully, you'll see he's comparing
> it
> successively to every integer between the initial value of $num (or
> 1 if it
> wasn't set) and 100 -- but as he's never remembering these, all
> he'll get
> out of this is whether the percentages are greater then one of
> these values
> (which, if the loop starts at 1, it's more then likely they all
> will be!).

Very true. I didn't look carefully enough at the code.

> 
> Mind you, if this is a snip of the real script and there's some
> output
> making use of these values each time round the loop, this may
> actually be
> what's required. ;)

I would hope something else is happening. It'd be a pretty boring
application otherwise! ;^)


> 
> Cheers!
> 
> Mike
> 
>
-
> Mike Ford,  Electronic Information Services Adviser,
> Learning Support Services, Learning & Information Services,
> JG125, James Graham Building, Leeds Metropolitan University,
> Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
> Email: [EMAIL PROTECTED]
> Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 
> 
> 
> > --- John Wulff <[EMAIL PROTECTED]> wrote:
> > > Where the heck is my problem?  No matter what the value for
> *_color
> > > is
> > > always 1!!!
> > > 
> > > $example_data = array(
> > > array("Mar-99",100,2000,5945.33,1234,10),
> > > array("Feb-99",908,3454,47648.90,4321,50),
> > > array("Jan-99",542,8000,13365.52,6012,60)
> > > );
> > > 
> > > $high = 47648.90;
> > > if(!isset($num))
> > > {
> > >  $num = 1;
> > > }
> > > while($num <= 100 && $num >= 1)
> > > {
> > > 
> > > foreach ($example_data as $key=>$value)
> > > {
> > >  list($month, $a, $b, $c, $d, $e) = $value;
> > > 
> > >  $a_percent = ($a / $high) * 100;
> > >  if($a_percent > $num) { $a_color = 1; }
> > > 
> > >  $b_percent = ($b / $high) * 100;
> > >  if($b_percent > $num) { $b_color = 1; }
> > > 
> > >  $c_percent = ($c / $high) * 100;
> > >  if($c_percent > $num) { $c_color = 1; }
> > > 
> > >  $d_percent = ($d / $high) * 100;
> > >  if($d_percent > $num) { $d_color = 1; }
> > > 
> > >  $e_percent = ($e / $high) * 100;
> > >  if($e_percent > $num) { $e_color = 1; }
> > >  }
> > > 
> > > $num = $num + 1;
> > > }
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: [PHP] $_POST problem

2003-06-27 Thread Mark
You need to use $_GET, not $_POST, if the varaibles are passed in the
URL.


--- Sparky Kopetzky <[EMAIL PROTECTED]> wrote:
> Hi, it's me again...
> 
> I've got my script kinda running but am unable to retrieve any
> values with $_POST. I turned on register_globals in the php.ini and
> am using this url: http://www.fttta.com/auction.php?action=reg.
> (Sorry, it's local for now...)
> 
> I'm using this kind of line to check for values:
> elseif ('reg' == $_POST['action'])
> {
> do something;
> }
> 
> What am I doing wrong here???
> Robin E. Kopetzky
> Black Mesa Computers/Internet Services
> www.blackmesa-isp.net
> 
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



Re: [PHP] web site security: how to hide login info for mysql-connection

2003-06-30 Thread Mark
How do you handle storing the login info then? Do you encrypt the
file and decrypt it on the fly? Where would you store the key? I'm in
the process of setting up a new application, and I've always used the
"login info outside the webroot" method but if there's something more
I can do, I'd like to know...


--- Jaap van Ganswijk <[EMAIL PROTECTED]> wrote:
> At 2003-06-29 17:21 +0100, Avvio - Frank wrote:
> >basically you need to append to your include_path and you can
> probably
> >create a local .htaccess file and set an include path in there
> (look up
> >php_value syntax for .htaccess)
> >
> >otherwise start your script with a customised version of the
> following:
> >
> >ini_set("include_path",ini_get("include_path").":".
> "/your/path/here/");
> >
> >then include/require as normal
> 
> I think you can also use an include statement
> like this:
> include "../../php/include/file.inc";
> 
> The same mechanism can also be used for data
> files that also shouldn't be in the WWW accessible
> directory tree, I think. (But I'm not an expert.)
> 
> I always try to write my programs very portable
> and I have found that using "../application_data/file.txt"
> isn't a problem, but using "../../xxx/application_data/file.txt"
> is usually a problem, because you don't want to
> hardcode the name of the directory above the current
> directory (in this case 'xxx'). Sometimes however
> you have to go two levels up to go out of the
> WWW-acessable directory three.
> 
> By the way, I think it's unwise to keep the MySQL
> login data uncoded on the Unix system, because
> other users or the system managers could read it.
> Generally these files have to be readable by Apache
> and therefore other users on the system can often
> also read them.
> 
> Greetings,
> Jaap
> 
> 
> >- Original Message - 
> >From: "anders thoresson" <[EMAIL PROTECTED]>
> >To: <[EMAIL PROTECTED]>
> >Sent: Sunday, June 29, 2003 4:33 PM
> >Subject: Re: [PHP] web site security: how to hide login info for
> >mysql-connection
> >
> >
> >> > Be aware that wherever you store the settings folder, your
> php.ini
> >should
> >> > have that path in it's include_directories setting, and the
> webserver
> >> > must
> >> > have read permissions for that file.
> >>
> >>  I don't have access to php.ini on my ISP's web server. Is there
> a way for
> >> a user to make their own set ow include_directories?
> >>
> >> -- 
> >> anders thoresson
> >>
> >> -- 
> >> 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
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



RE: [PHP] web site security: how to hide login info for mysql-connection

2003-07-01 Thread Mark
That's where this thread started...

--- Wendell Brown <[EMAIL PROTECTED]> wrote:
> On Mon, 30 Jun 2003 13:50:21 -0600, Peter Janett wrote:
> 
> >My concern is that a shell emulating PHP or
> >Perl script run as Apache can read or copy ANY PHP script used
> with PHP as
> >an Apache module.
> 
> It seems to me like the safest way to handle this would be to
> create a
> function that opens the database (with the user_id and password
> hard
> coded) and returns a handle to the open db.  Then put this function
> into a "include" directory outside the document root (you might
> have to
> disable fopen_with_path).
> 
> function openDB() {
> 
>   $MYSQL_Server   = "localhost";
>   $MYSQL_DB   = "db";
>   $MYSQL_User = "user";
>   $MYSQL_Password = "password";
> 
>   // Connect to database
>   $dbID = mysql_connect($MYSQL_Server, $MYSQL_User,
> $MYSQL_Password)
>   or die("Could not connect");
> 
>   mysql_select_db( $MYSQL_DB )
>   or die("Could not select database");
> 
>   return( $dbID );
> }
> 
> Then call openDB() from your module
> 
>  
>   include "hidden.php";
> 
>   $dbHandle = openDB();
> 
>   // whatever you want to do with the db here
> 
> ?>
> 
> Comments??
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com

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



[PHP] exec problem

2002-08-27 Thread Mark

i'm basicly trying to execute an executeable with this following script.

$command = "../theApp/theapp";
exec ( $command ,  $ValueIn,  $ValueOut);
echo $ValueOut;

I'm getting a value of 0 returned, but from a command line the executable
works fine and does what it is suposed to do is there any other way i can do
this or ami i doing it work ??

Cheers



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




[PHP] hide system output from header

2002-08-30 Thread Mark

i execute a system function which works great only prob is it breaks the
header so what i need to know is how i can prevent the output from this and
append it to a variable, i allready tried appending to variable but still
outputted
Regards
Mark



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




Re: [PHP] is this not possible?

2002-11-19 Thread Mark
I'd say you've already determined the simplest way to do it. 
When the page is generated by PHP, have it insert the 
necessary data into appropriate places in a javascript function.

When a user clicks the 'recharge' button, they are prompted for
the amount they wish to use to recharge, and then are shown another
javascript pop-up confirming the changes. The javascript function
then refreshes the calling page, with the appropriate values,
using one of the functions Ernest mentioned.

When you say "it can take sometime for this page load at times",
do you mean that all page requests take a while sometimes, or simply
that page because of the amount of data it shows, and certain processing
that needs to be done in order to display that page?

If it's the latter, then you could redirect the user to a much
simpler page for the purposes of recharging their card, and do away
with javascript completely (which means you don't have to worry
about people disabling javascript).

-Mark


- Original message -
From: "Jeff Bluemel" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: Mon, 18 Nov 2002 17:24:52 -0700
Subject: Re: [PHP] is this not possible?

here's the URL if case somebody decides to look at it;

http://obi-wan.domintcom.com
user: guest
pass: domintcom

go to customer service, prepaid pin, and then look up 3077876962  -
activate, deactivate, and recharge

this is for customer service of prepaid phone cards.

now - when I reload this page to refresh the information sometimes it can
really take awhile.

I need to somehow get the information from the user on how much to
recharge
the pin for.  now, before I refresh the page I need to get how much the
user
wants to recharge, process the recharge, and then refresh the page that
all
of this started on.

I thought it would be the simplest if I could somehow use javascript to
prompt the user for a value, confirm if the user wants to recharge
x
pin for $xx.xx, recharge the pin, and then refresh the calling page so it
now reflects the new balance.

I don't want to refresh original page until this is all done because it
can
take sometime for this page load at times.

is everybody lost now?

"Ernest E Vogelsinger" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> At 22:39 18.11.2002, Jeff Bluemel spoke out and said:
> [snip]
> >I'm been ignored on this question for 4-5 days now.  even if it is not
> >possible could somebody please verify this?
> >
> >is it possible to pass a variable from javascript directly to php WITHOUT
> >using either a link, or a form submit to pass the variables?  I've gotten
a
> >work around to call an image that's actually a php file, but run my
script,
> >and then return an image file.
> >
> >is this the only way?
> [snip]
>
> Generally spoken, yes - the browser needs to pass the data back to the
> server somehow.
>
> What are you really up to? Do you want to transmit data to the server
> without the user clicking on a link or a button?
>
> You can always use JavaScript to submit a form (even a hidden-only form),
> or to reload the document with the same or a different URL.
>
> URL-Reload:
>
> document.location.href = url;
>
> Form submit:
>
> document.forms[formname].submit();
>
>
> --
>>O Ernest E. Vogelsinger
>(\) ICQ #13394035
> ^ http://www.vogelsinger.at/
>



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




Re: [PHP] How can i resize images after upload?

2002-06-06 Thread Mark

On Thu, 6 Jun 2002 23:44:06 +0200, Ragnar wrote:
>Is there a way in php to change the size of a posted/uploaded image
>regardless of the imagetype?

install imagemagick and then do something like:

exec("/path/to/mogrify -geometry ".$width."x".$height." ".$file);



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




Re: [PHP] UNSET & Arrays

2002-06-06 Thread Mark

first try quoting your strings and see if that helps :)
$foo[0]["magazine"]

On Thu, 6 Jun 2002 18:04:47 -0700, Jason Caldwell wrote:
>i'm trying to unset an array element within my array --
>
>my array looks like;
>
>$foo[0][magazine]
>$foo[0][subscription]
>$foo[0][term]
>$foo[0][rate]
>
>$foo[1][magazine]
>$foo[1][subscription]
>$foo[1][term]
>$foo[1][rate]
>
>and so forth --
>
>when i call unset($foo[0]) for example, the entire array goes away,
>not just
>the [0] elements.
>
>how can i unset a multi-dimensional array?  i have no problems using
>unset
>single-dimension arrays.
>
>thanks
>jason
>
>
>
>




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




RE: [PHP] Getting users monitor size

2002-06-09 Thread Mark

He asked about detecting monitor size, not screen resolution. I don't
think any javascript will ever be able to do this.

On Sun, 09 Jun 2002 20:42:58 -0400, Miva Guy wrote:
>Currently, I'm developing a site that makes full use of a 1024 x 768
>display
>since 90% of my users have that config.
>
>In the off chance they have a smaller display, I have this in the
>header of
>my HTML template:
>
>
>var smallver = {SCREEN_SIZE};
>if(!smallver && screen.width < 1000)
>self.location.replace("{RESIZED_SMALL}");
>else if(smallver && screen.width > 1000)
>self.location.replace("{RESIZED_LARGE}");
>
>
>Where:
>'SCREEN_SIZE' => $sessiondata['session_small'] ? 1 : 0,
>'RESIZED_SMALL' => $PHP_SELF."?resize=1&".$QUERY_STRING,
>'RESIZED_LARGE' => $PHP_SELF."?resize=0&".$QUERY_STRING
>
>What all this means is that I store a Boolean variable in a sessions
>table
>for 'session_small'. In the php header of each page, I simply look
>at that
>variable to decide how to draw the page.
>
>The JavaScript is necessary since only client-side scripting can
>pick up
>that value for you automatically. If it sees that the screen size is
>set to
>normal (large) and the display won't allow it, it runs the page
>again with
>'resize=1' in the query string to allow the change of the variable
>in the
>sessions table. Alternatively, if the 'session_small' variable true
>and the
>display will allow more, the page is reloaded with the correct value
>in the
>table.
>
>Hope this helps,
>Mark
>
>-Original Message-
>From: Tom Ray [mailto:[EMAIL PROTECTED]]
>Sent: Sunday, June 09, 2002 2:39 PM
>To: [EMAIL PROTECTED]
>Subject: [PHP] Getting users monitor size
>
>
>Is there a way to do this with PHP? I couldn't find it in the online
>docs and the archive search is offline :(
>
>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




RE: [PHP] PHP function for listing number of columns in table

2002-06-10 Thread Mark

yes, I think getting the result set for 'describe $table' or 'show
fields from $table' and then doing mysql_num_rows() on that is best
because it will return right away and will work for empty tables as
well.

On Mon, 10 Jun 2002 09:00:41 +0100, Tim Ward wrote:
>Just off the top of my head wouldn't describe then mysql_num_rows()
>be a lot
>more efficient.
>
>Tim Ward
>www.chessish.com 
>[EMAIL PROTECTED] 
>
>--
>From:  John Holmes [SMTP:[EMAIL PROTECTED]]
>Sent:  09 June 2002 18:29
>To:  [EMAIL PROTECTED]; [EMAIL PROTECTED]
>Subject:  RE: [PHP] PHP function for listing number of columns
in
>table
>
>No. There is, however, a function that'll tell you how many
columns
>are
>in a result set. So, if you select all columns, then you can use
>that
>function to find out how many columns are in the table.
>
>www.php.net/mysql_num_fields
>
>---John Holmes...
>
>> -Original Message-
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
>> Sent: Sunday, June 09, 2002 12:54 AM
>> To: [EMAIL PROTECTED]
>> Subject: [PHP] PHP function for listing number of columns in
table
>>
>> Pardon the probably stupid question but,
>>
>> Is there a PHP function for listing number of columns in a
mySQL
>table?
>>
>> Thanks in advance
>>
>> JJ Harrison
>> [EMAIL PROTECTED]
>> www.tececo.com
>
>
>




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




Re: [PHP] Installing & Syncronizing

2002-06-20 Thread Mark

I think you're confused. the only WinGate I know of is an alternative
to windows' internet connection sharing. It's not a web server.

and what's a T connection?

On Thu, 20 Jun 2002 19:26:37 -0300, César Aracena wrote:
>Hello all,
>
>I have this client who has a T connection and would like to run a
>PHP /
>MySQL based program in local mode, but also be able to make the data
>available from the web but hosted in a remote server… kinda strange
u
>think? Me too… The problem is that his server doesn’t run with IIS
>but
>with a little ap called WinGate, which gives him all the approach
for
>his little network. Have anyone installed the PHP / MySQL under MS
>NT4.0
>running WinGate before? Anything to tell me that will help me in the
>process?
>
>Also, I would need the MySQL people to tell me how can I make the
>local
>& remote databases to stay synchronized let’s say with a one hour
>interval top… Is this possible? FYI the remote db is hosted under a
>Cobalt RAQ4i server running Red Hat Linux Apache Web server.
>
>Thanks in advance.
>
> Cesar Aracena
>CE / MCSE+I
>Neuquen, Argentina
>+54.299.6356688
>+54.299.4466621
>
>




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




Re: [PHP] Javascript to PHP?

2002-06-29 Thread Mark

On Sat, 29 Jun 2002 16:58:50 -0300, Jed Verity wrote:
>Hello, Chris,
>
>Many thanks for the thorough description. It does make sense, of
>course...I
>was just hoping that there was some kind of funky loophole that
>small brains
>like mine couldn't comprehend.

well if it's one-way only communication, you could load an image in
javascript that is really a php page. that way you can send
information to a php script without the browser reloading. there's
probably other ways that a javascript guru could come up with (maybe
loading content into an invisible layer??) this isn't the best place
to be asking a javascript question tho.

hth.
- Mark


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




Re: [PHP] Re: [PHP-DB] blob versus file

2002-07-01 Thread Mark

On Mon, 1 Jul 2002 14:20:30 +0200, Pierre-Alain Joye wrote:
>On Mon, 1 Jul 2002 14:17:53 +0200
>"andy" <[EMAIL PROTECTED]> wrote:
>
>>Hi there,
>>
>>I am wondering if anybody has experiance in saving images to blob
>>in mysql.
>>
>>I do save images with 1 K and 4 KB to blob fields while I used to
>>save them
>>to file. It seams to me that this is much slower accessing the
>>files. The
>>images take a bit (really short but absolutly noticable) to show up
>>on the
>>site. Is there a way to improve the performance, and why is this
>>happening?
>>I thought the performance might even boost after storing them to
>>blobs.
>
>Not really, the OS filesystem contains features that makes it always
>faster than a sql query

not necessarily for small files like he's talking about. it depends
on the fs but I would guess they'd be pretty close.

>that will increase your network traffic too.

only if the db is accessed across a network (he didn't say it was)

>Inserting images or whatever binary data in a database does not
have>much sense, you could not do a query with this field, cannot
be>indexed (dunno if exists a DB that implement a image indexer ;) ).

the blob field can't be indexed but others (id, filename, keywords,
caption etc..) can, there's lots of cases where it makes sense to put
images in a database.

if I had to guess the problem I'd say its either
1) the db is across a network like you said
or (more likely)
2) you need to create an index on the table. try running the query
manually and see how long it takes to get a result set. when you get
it down to .01 seconds you;re in good shape
hth,


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




Re: [PHP] Re: URGENT BUSINESS RELATIONSHIP

2003-09-12 Thread Mark

--- [EMAIL PROTECTED] wrote:
> lol The Lodge
> 
> hey check this out
> 
> http://www.potifos.com/fraud/
> and this
> 
> http://www.nigerian419fraud.freeserve.co.uk/
> 
> i did find a link from this list about a site where the guy
> actually sent
> false details and the guy believed him, i think he sent a passport
> of
> himself as captian kirk LOL

http://www.haxial.com/spls-soapbox/nigerian-fraud/
http://www.scamorama.com/threebucks.html


> 
> > No!  That $15 million is mine!  I feel so honoured that you have
> picked
> > me!
> >
> > Send me the details!  Address them to
> >
> > The Lodge
> > Canberra ACT
> > Australia
> >
> > Perhaps I can fly over to meet you and your money.  I have no
> > suspicions that you will kill me or anything!
> >
> >
> > Regards,
> > Bob Irwin
> > Server Admin & Web Apps
> > - Original Message -
> > From: "Cody Phanekham" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, September 12, 2003 10:36 AM
> > Subject: RE: [PHP] Re: URGENT BUSINESS RELATIONSHIP
> >
> >
> > What are you talking about? This is a once in a life time
> opportunity!
> > who hasnt dreamt of receiving 15 million for doing absolutely
> nothing
> >
> > contact me benny boy !! my number is 0055 all night long O_o
> >
> >> -Original Message-
> >> From: Shadow [mailto:[EMAIL PROTECTED]
> >> Sent: Friday, 12 September 2003 04:14
> >> To: [EMAIL PROTECTED]
> >> Subject: [PHP] Re: URGENT BUSINESS RELATIONSHIP
> >>
> >>
> >> God!!! This crap is even following me to the newsgroups!
> >> Shadow
> >>
> >> --
> >> PHP General Mailing List (http://www.php.net/)
> >> To unsubscribe, visit: http://www.php.net/unsub.php
> >>
> >>
> >
> >
> >
>

> > *
> > This e-mail, including any attachments to it, may contain
> confidential
> > and/or personal information.
> > If you have received this e-mail in error, you must not copy,
> > distribute, or disclose it, use or take any action
> > based on the information contained within it.
> >
> > Please notify the sender immediately by return e-mail of the
> error and
> > then delete the original e-mail.
> >
> > The information contained within this e-mail may be solely the
> opinion
> > of the sender and may not necessarily
> > reflect the position, beliefs or opinions of Salmat on any issue.
> >
> > This email has been swept for the presence of computer viruses
> known to
> > Salmat's anti-virus systems.
> >
> > For more information, visit our website at  www.salmat.com.au.
> >
>

> > *
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
> >
> > Scanned by PeNiCillin http://safe-t-net.pnc.com.au/
> >
> > --
> > 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
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



Re: [PHP] PHP and Palm

2003-09-17 Thread Mark

--- Charles Kline <[EMAIL PROTECTED]> wrote:
> I have a project in mind where I would like to be able to Sync my
> Palm 
> with the calendar in my CRM. Anyone have info on doing this?
> 
> Thanks,
> Charles

You might want to look into the Horde Project (http://www.horde.org).
There's been on-again-off-again development of a conduit for sync'ing
their apps with a Palm. I'm not sure what the status of the project
is.

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


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



RE: [PHP] Edit a String

2003-09-17 Thread Mark

--- Jay Blanchard <[EMAIL PROTECTED]> wrote:
> [snip]
> I have addresses stored in my database. I am trying to create a
> page
> that
> generates a letter automatically for the user to print. Given a
> string
> of
> format ', x, x, xxx' how can I edit it so that the
> comma's
> are
> replaced with line breaks i.e. /n. This will enable me to display
> the
> address correctly at the top of the page.
> [/snip]
> 
> http://www.php.net/ereg_replace , or don;t we use the manual? 
> 

Or the less demanding str_replace()

> Have a pleasant and productive day.
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

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



[PHP] fgets prob... !?

2003-09-28 Thread mArK
H!

I have this segment of script...

...
$resp = fgets( $sock, 512 );
echo $resp;
...

the output must be:
[EMAIL PROTECTED]

but here came php and take the 3 "#" and convert
they in only one "#", and the output currently is:

[EMAIL PROTECTED]

How I say to php: "STOP", leave my "#" in peace?
--

mArk

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



Re: [PHP] location= Construct Doc

2003-11-11 Thread Mark
--- Lee Stewart <[EMAIL PROTECTED]> wrote:
> It's version 4.0.3
> Lee

In v4.3.2, it throws a "Parse error: parse error, unexpected '=' in
/path/to/file/test.php on line 23".

> 
> Chris Shiflett wrote:
> > --- Lee Stewart <[EMAIL PROTECTED]> wrote:
> > 
> >>Here's a *working* section of code...  Note the
> >>location = "browse.php";
> >>on line 23
> > 
> > 
> > How does that not generate a parse error? I must be missing
> something.
> > 
> > It seems to me that either a dollar sign is missing, or the line
> is
> > intended to define a constant (although I prefer my constants to
> be
> > uppercase), in which case the wrong syntax is being used.
> > 
> > What version of PHP are you using that does not generate a parse
> error?
> > 
> > Chris
> > 
> > =
> > My Blog
> >  http://shiflett.org/
> > HTTP Developer's Handbook
> >  http://httphandbook.org/
> > RAMP Training Courses
> >  http://www.nyphp.org/ramp
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

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



[PHP] Help with scripts to add records to a database

2003-11-11 Thread Mark
I am following the tutorial at
http://www.freewebmasterhelp.com/tutorials/phpmysql/
The source code is on the website on the left hand side
http://www.freewebmasterhelp.com/static/tutorials/phpmysql/example.zip


My software:
PHP version 4.3.4 on Windows 2000
MYSQL version 4.0.16 on Windows 2000
Apache version 1.3.29 on Windows 2000

The problem is I cannot get the database to add a new records aside from
the auto-increment field. All the other fields are left blank when the
add.html is subitted. 

I have the add.html with the following code exactly the same as the
source code.


First Name: 
Last Name: 
Phone: 
Mobile: 
Fax: 
E-mail: 
Web: 




The insert.php
 



Any help would be much appreciated.

Regards,
Mark

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



RE: [PHP] Help with scripts to add records to a database

2003-11-11 Thread Mark
Sorry guys, I have tried all the suggestions so far with no luck.

Regards,
Mark



try to include field name:
$query = "INSERT INTO contacts(first,$last,phone,mobile,fax,email,web)
VALUES ('$first','$last','$phone','$mobile','$fax','$email','$web')";
mysql_query($query);
___
rgds
[xm]


> I am following the tutorial at 
> http://www.freewebmasterhelp.com/tutorials/phpmysql/
> The source code is on the website on the left hand side 
> http://www.freewebmasterhelp.com/static/tutorials/phpmysql/example.zip
>
>
> My software:
> PHP version 4.3.4 on Windows 2000
> MYSQL version 4.0.16 on Windows 2000
> Apache version 1.3.29 on Windows 2000
>
> The problem is I cannot get the database to add a new records aside 
> from the auto-increment field. All the other fields are left blank 
> when the add.html is subitted.
>
> I have the add.html with the following code exactly the same as the 
> source code.
>
> 
> First Name: 
> Last Name: 
> Phone: 
> Mobile: 
> Fax: 
> E-mail: 
> Web: 
> 
> 
>
>
> The insert.php
>  include("dbinfo.inc.php"); 
> mysql_connect(localhost,$username,$password);
> @mysql_select_db($database) or die( "Unable to select database");
>
> $query = "INSERT INTO contacts VALUES 
> ('','$first','$last','$phone','$mobile','$fax','$email','$web')";
> mysql_query($query);
>
> mysql_close();
> ?>
>
>
>
> Any help would be much appreciated.
>
> Regards,
> Mark

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



Re: [PHP] Re: Delete Temporary Internet Files

2003-11-12 Thread Mark

--- Kim Steinhaug <[EMAIL PROTECTED]> wrote:
> Hmm..
> 
> This shouldnt be a problem from what I know. Though it woldt be a
> perfect
> system,
> 
> all you would need to do, is have a script that does :
> 
> 1: Read the IE cache directory and puts all the entries into an
> array (all
> the files),

How do you propose to read the files from the client? You can read
any files you like (and have permission to) on the server, but you
can't read the client files with PHP.

> 2: unlink all the files in the array.
> 

Just as you can't read files on a client, you can't unlink a file on
a client with PHP either. unlink() works on files on the server, not
a client.

> This would in my opinion work nice, except that alot of the files
> you cant
> delete
> at a given time, just try doing it manually. But itll clean the
> most. I
> wouldnt recommend
> this way of doing it, but it should work.
> 
> As for other files on the windows system, just be sure that hey
> arnt write
> protected, as
> PHP cant unlink / delete them then.
> 
> Kim
> 
> "Joe Mack" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > I am trying to use PHP to delete temporary internet files in IE6.
>  I would
> > also like to access other "Internet Options" functions.  Any
> assistance
> > would be appreciated.
> >
> > Thanks.
> >
> > Joe
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

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



Re: [PHP] Re: Delete Temporary Internet Files

2003-11-12 Thread Mark

--- Kim Steinhaug <[EMAIL PROTECTED]> wrote:
> The original question didnt consert the OS, or where the user was
> at.
> Concerning cleaning the IE directory I would assume that he's
> installed
> PHP and IIS / Apache on his local machine.
> 
> Using a webpage online on the internet to fix your local machine
> doesnt
> sound logical to me, therefore I assume local innstallation on
> local
> machine.
> 
> And when your on your local machine there are no problems accessing
> your
> files,
> even if they belong to the windows environment. Overwriting them
> can be
> problematic at times, since processed may use the file.

But why in the world would you want to edit other "Internet Options"
for a PC that is acting as a web server? I stand by my assumption
that the OP wanted to change the client machine's settings (and
delete the client temp files), and not the settings on the server. Of
course, I could be wrong. It happens daily.


=
Mark Weinstock
[EMAIL PROTECTED]
***
You can't demand something as a "right" unless you are willing to fight to death to 
defend everyone else's right to the same thing.
***

__
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

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



[PHP] Help with exec syntax

2003-11-16 Thread Mark
Php 4.3.4
Win 2000
I am attempting to have the exec function open a file for editing. The 
file opens, however php hangs until I close the file that was orginally 
opened. I read in the php manual that states:

"If you start a program using this function and want to leave it running 
in the background, you have to make sure that the output of that program 
is redirected to a file or some other output stream or else PHP will 
hang until the execution of the program ends."

I am not real sure as to what this means and have spent considerable 
time looking on the www for an answer.

The syntax I am using is this.
system('cmd/c start notepad my.txt', $results);
or
exec('start notepad my.txt', $results);
As stated above the file actually opens for editing, but php hangs in 
the background until I close the php.ini file. Of course, having php 
hang until the file editing is done is not the most desirable thing
What would be the proper syntax for this??

Any help will be much apreciated.

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


Re: [PHP] Help with exec syntax

2003-11-16 Thread Mark
John W. Holmes wrote:

Mark wrote:

The syntax I am using is this.
system('cmd/c start notepad my.txt', $results);
or
exec('start notepad my.txt', $results);


You shouldn't be using exe() or system() for this, use fopen() to open a 
file from within PHP for editing.
Thanks for the reply. The fopen() works fine, now if I were to apply the 
  exec, or system function to start or run a pgrogram ie: (Mercury mail)
exec('start mercury.exe', $results);
I am still facing the same issue...what what would be the solution to this?

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


Re: [PHP] some array help :)

2001-03-10 Thread Mark

Its a function.

in php4, easy: http://php.net/manual/en/function.in-array.php

there will be an example for php 3 as well.

At 11:36 AM 3/10/2001 +0100, you wrote:
>hello,
>
>i'm trying to do something like
>
>$tmparray = array("foo", "foo1", "foo2");
>if ($i in $tmparray) then do something
>..
>but i dont know how to do it.
>any help would be appriciated
>
>
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
art-nude.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Simple PHP 4 and MySQL question about query

2001-03-19 Thread Mark

try somethin' like this...

$result = mysql_query("SELECT 'islname' FROM $table WHERE id='$id'");

// For one row.. use a zero
$islname = mysql_result($result, 0, "islname");

// Otherwise, loop through

$islname=mysql_result($result, $i, "islname");


At 02:15 AM 3/20/2001 -, you wrote:
>Hi,
>
>I'm trying to get a result from the following query:
>
>   $result = mysql_query("SELECT 'islname' FROM $table WHERE id='$id'");
>
>Because "id" is a unique key in my table, I know it has only one value. What
>mysql_funtion should I use to echo the result and with what parameters?
>
>(I have tried many most of the functions but I don't get the correct result,
>and the manual is not helping me :)
>
>Regards,
>Sumarlidi Einar Dadason
>
>SED - Graphic Design
>
>--
>Phone:   (+354) 4615501
>Mobile:  (+354) 8960376
>Fax: (+354) 4615503
>E-mail:  [EMAIL PROTECTED]
>Homepage:www.sed.is <- New Homepage!
>--
>
>
>-- 
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>
>
art-nude.com


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] php-lib questions

2001-04-16 Thread Mark

Here is the script

"request.php" 62 lines, 1585 characters
 "Repository_Session"));

  if (!isset($s)) { $s=0; };
  $sess->register("s");



site_header("Request a Document - Document Cart");

echo 'Below
  is your Document Cart.
  
  Any
  time you request a document we will store it here. You may 
 return to your search
  results at any time and choose another document
  or you may perform a New Search.
  
  You may also
Increase
  or Decrease the Number of copies you wish to request by using the Add/Remove
  links, or completly empty the cart with the Clear
  cart link.
  
  Whenever
  you are done selecting documents click the Checkout
  link to process your request.
';
global $scart;
global $obj_id;
$scart->start();



switch($action)
{
case add:
$scart->add_item($obj_id,1);
break;
case remove:
$scart->remove_item($obj_id,1);
break;
case clearcart:
$scart->reset();
break;
}
$scart->show_all();
page_close();

site_footer();

?>


I'm not familiar with the ob* functions, is this phplib or just php, I'll
look for some docs on it and give it a try though thanks.

-Mark

""Plutarck"" <[EMAIL PROTECTED]> wrote in message
9b4bb7$1tf$[EMAIL PROTECTED]">news:9b4bb7$1tf$[EMAIL PROTECTED]...
> That sounds like a problem with the way you handle sessions.
>
> What happens is your program tries to start a session, but the page isn't
> sent if a session isn't started. It still shouldn't reply with a 404
> though...search your script for header and see if you send any.
>
> Once someone has the session, then the page will load correctly.
>
> Muck through your php code and see if there are any conditions or loops
> which require a session to be running.
>
>
> Still, that shouldn't happen and it's probably one of those bugs that you
> can't figure out why they happen, or what causes them, but after tinkering
> around suddenly everything works.
>
>
> One thing to try, if it's available, is use the ob_* functions as a
> debugger. Stick an obstart at the begining and a ob_end_flush at the end,
> and see if the problem disappears magically.
>
> Odd what sometimes fixes things...
>
>
> --
> Plutarck
> Should be working on something...
> ...but forgot what it was.
>
>
> ""Mark"" <[EMAIL PROTECTED]> wrote in message
> 9b4ar1$t6i$[EMAIL PROTECTED]">news:9b4ar1$t6i$[EMAIL PROTECTED]...
> > I have a php script which is like a modified shopping cart.
> >
> > It starts with a search that calls a perl script ( I know, but it's the
> only
> > way I can include certain proprietary functionality I need).  This
returns
> a
> > results set of documents that can be either downloaded or requested
> > depending on permissions.
> >
> > If you click to request a document a php script request.php is called it
> is
> > sort of like a cart script, and uses phplib sessions and db_oci8.
> >
> > The strange problem I am having is this:
> >
> > If it is the first time you have reqeusted this script since last
opening
> > your browser, you will get a 404, if you hit back/forward or refresh the
> > script works fine as if nothing ever happened.  You will not get this
> error
> > again as long as you do not close and reopen your browser.  Any ideas?
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] MIME Decoding of a string

2001-05-14 Thread mark

"Jeroen Geusebroek" <[EMAIL PROTECTED]> wrote:

> The reason i need this, is because i am creating a message archive similair
> to Geocrawler and MARC and it's quite irratating to not be able to decode
> messages
> when they are mime encoded.

Take a look at my project: http://www.webgadgets.com/phpost

It's a webmail app but it includes code to fully parse MIME messages,
including quoted printable encoding, etc.  It uses no third party
libraries or classes, only functions that are native to PHP.

I am about to release 1.06 (tonight likely) which greatly improves the
MIME handling (seems to handle MIME better than Eudora or Outlook now,
especially nested multipart sections).

Mark


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] detecting HTML tags

2001-05-15 Thread mark

bill <[EMAIL PROTECTED]> wrote:
> 
> Is there a way to detect the presence of HTML tags?
> 
> I don't want them stripped out, I just want to know if a string contains
> them.
> 
> I'm rolling my own mailing program and want it to detect the HTML if
> present and send it appropriately.
> 
> kind regards,
> 
> bill hollett
> 

Regex is the way to go, but as an aside - the mere presence of html
tags in a mail message body does not make it an HTML message.  It is
perfectly reasonable to send a message containing something like this:

   "That HTML tag you're looking for is "

and expect it to NOT be rendered as HTML on the other end but displayed
exactly as you typed it.

Likewise it's legitimate to send a "text/html" message that contains
no HTML elements at all.

When sending HTML mail a program should only set the content-type
to "text/html" if the sender explicitly requests it, not when it
detects HTML elements in the body.

Mark

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Running Crontab on php script

2001-05-23 Thread mark

Richard Kurth <[EMAIL PROTECTED]> wrote:
> 
> I have a php script that runs at root. I have php compiled as a cgi to
> do this.
> My question is what is the best way to run a crontab so that it does
> not send a message every time it runs. This script runs every 5 min
> and it can get pretty frustrating to get this email.
> The script runs only if there is another file present if the file is
> not there it shuts down. But I still get the email.
> I have it set this way right know and I only get an email if there is
> an error. Is there a better way to do it
> 
> 5 * * * * /home/sites/home/auto/creatacct.php > /tmp/logdump.LOG
> 0 0 * * * /home/sites/home/auto/mail.php > /tmp/logdump.LOG
>  

Like this:

5 * * * * /home/sites/home/auto/creatacct.php > /tmp/logdump.LOG 2>&1
0 0 * * * /home/sites/home/auto/mail.php > /tmp/logdump.LOG 2>&1

It makes stderr go to the same place stdout goes, which is to your log
file in this case.

Mark

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] NEWBIE IN DISTRESS: Install Instructions are not work for PHP 4.1.1!!!

2002-01-04 Thread Mark

I apologize if the title of this post sounds overly aggresive, but I have
followed the instructions to a 'T' and got nowhere!!  I have tried the
"auto" install version of PHP and manual instructions for installing PHP
4.1.1.  Neither of them work.  I added the lines to my httpd.conf file for
both types of installs (not at the same time) as discribed in the
Install.txt file, along with the instructions on the website, and can get no
"test" scripts to run or PHP for that matter.  All I get is a blank screen
when running the CGI version or can not even get apache to load when I try
the Module version (Get a "Requested Operation Failed" message).  can
someone please help?  My system is as follows:

Windows 2000 SP2
Apache 2.0.28 (I have also tried version 1.3.22 with same results as
mentioned above)
PHP 4.1.1
MDAC 2.7
MySQL 3.23.46a

Thanks in advance!!

Mark



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] headers showing up in browser

2002-01-10 Thread Mark

I've got this problem that won't go away.

The headers are showing up at the top of the page when I run php in
cgi mode. any ideas?

thanks,
- Mark


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] headers showing up in browser

2002-01-10 Thread Mark

On Thu, 10 Jan 2002 12:53:33 -0700, mike cullerton wrote:
>#!/usr/local/bin/php -q

I don't think you understood what I meant. I want the headers to get
sent, but they're showing up in the browser as part of the page
content.

I had this working before on a different machine where everything to
do with apache and php were exactly the same so I don't understand
why I'm suddenly having this problem.

thanks,
- Mark

>on 1/10/02 12:16 PM, Mark at [EMAIL PROTECTED] wrote:
>
>> I've got this problem that won't go away.
>>
>> The headers are showing up at the top of the page when I run php
in
>> cgi mode. any ideas?
>
>
> -- mike cullerton
>
>
>




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




RE: [PHP] headers showing up in browser

2002-01-10 Thread Mark

lets say I have a page that contains just this code:


the output I get is:
Location: /myfile.html Content-type: text/html

- Mark

On Thu, 10 Jan 2002 14:03:26 -0600, Rick Emery wrote:
>what does your code look like?
>
>-Original Message-
>From: Mark [mailto:[EMAIL PROTECTED]]
>Sent: Thursday, January 10, 2002 1:17 PM
>To: PHP
>Subject: [PHP] headers showing up in browser
>
>
>I've got this problem that won't go away.
>
>The headers are showing up at the top of the page when I run php in
>cgi mode. any ideas?
>
>thanks,
>- Mark
>
>




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Form Question

2002-01-10 Thread Mark

Just let the browser cache it.

On Thu, 10 Jan 2002 16:30:01 -0400, Lerp wrote:
>Hi there, how do I keep values in a form if the user has to go back
>and fill
>in some missing fields?
>
>Thx Joe :)
>
>
>




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Specific References Incident

2002-01-10 Thread Mark

On Thu, 10 Jan 2002 16:49:45 -0700, Ken Kinder wrote:
>That's what I had thought too, but no:
>
>Parse error: parse error, expecting `T_VARIABLE' or `'$'' in
>/home/ken/Projects/kwidgets/widgets.inc on line 74

how about this:
foreach ($this->children as $key => $value) {
  $child=&$this->children[$key];

>On Thursday 10 January 2002 04:51 pm, Martin Towell wrote:
>> does this work?? change
>>foreach ($this->children as $child) {
>> to
>>foreach ($this->children as &$child) {
>>
>>
>> -Original Message-
>> From: Ken Kinder [mailto:[EMAIL PROTECTED]]
>> Sent: Friday, January 11, 2002 10:44 AM
>> To: [EMAIL PROTECTED]
>> Subject: [PHP] Specific References Incident
>>
>>
>> I have one specific incident I could use some help with too. I
>>have the
>> following method:
>>
>>  function validate() {
>>   if ($this->returning) {
>>$errors = array();
>>
>>foreach ($this->children as $child) {
>> $child->error = "Foo";
>> $error = $child->validate();
>> if ($error) {
>>  $this->errors_exist = 1;
>>  array_push ($errors, $error);
>> }
>>}
>>   }
>>
>>   $this->errors = $errors;
>>  }
>>
>> The $this->children attribute should be an array of (references
to)
>> objects.
>>
>> I think somehow in the foreach ($this->children as $child) the
>>objects are
>> being copied, as $child->validate(); seems not to effect the
>>original
>> objects.
>




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Fixed! Re: [PHP] headers showing up in browser

2002-01-11 Thread Mark

After lots of trial and error I traced the problem back to a missing
browscap.ini, I commented out that line in php.ini and it worked
fine. I guess it was causing php to think the it wasn't dealing with
a browser so it sent the headers differently (or something)

thanks to everyone.

- Mark


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




  1   2   3   4   5   6   7   8   9   10   >