[PHP] Unicode Ordinal

2003-04-01 Thread Roy Huggins
Hola.

I would love if someone could point out a way to get the Unicode ordinal
value of a character in PHP (I could use mb_encode_numericentity() and strip
out the non-number characters, but there's gotta be a better way, right?)
I'm sure I've missed something in all my searches, but I've given up looking
on my own. I have both multi-byte and iconv support enabled, but they don't
seem to have what I need. Thanx.

For clarity: ord() is not what I need, as it can only recognize ASCII chars.
I need to be able to get ordinal data about the whole range of Unicode
characters.

-Roy


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



RE: [PHP] checkdate function

2003-04-01 Thread Jon Haworth
Hi Siva,

 checkdate function verifies whether the date is valid or
 not by taking month, day and year as arguments.
 The problem is when someone enters a three digit year by
 mistake (200 instead of 2003), this function does not catch it.

Yes, I've been bitten by this as well :-)

 We are separating the year part from the string and validating
 separately to solve this problem. Is there a better way to do it?

I think you're stuck with the extra validation step, but you can do it quite
neatly with a replacement function that looks something like this:

function myCheckdate ($m, $d, $y, $min = 1900, $max = 2100)
{

  // check whether $y is within allowable range
  if ($y = $min || $y = $max)
return false;

  // the year is OK: checkdate can do its stuff
  return (checkdate($m, $d, $y))

}

You can adjust the default allowable years to match what you usually need,
and then override them as necessary.

Personally I'd like to see PHP's checkdate() work a bit like the one above,
or maybe have checkReasonableDate() and checkImprobableDate(): I'm prepared
to believe that some PHP developers need to validate three- and five- digit
years, but I can't believe that it's *that* common :-)

Cheers
Jon

--
Need a web or desktop developer in the London area?
Hire me! http://www.laughing-buddha.net/jon/


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



[PHP] How to pass the $db connexion under object ?

2003-04-01 Thread Froggy / Froggy Corp.
Hi,

Im looking for a solution to how pass the $id connexion for postgreSQL
db under different object.
At this moment i use allways object-read($db) but i think it is not
the best solution for a program oriented object.

Thx in advance for all answers.
Regards,

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



[PHP] month

2003-04-01 Thread Diana Castillo
how do you get just the month (in numeric format ) of a specific date. (not
today)
same for day and year.  The date is in -dd-mm format to start with.
thanks.



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



Re: [PHP] month

2003-04-01 Thread Chris Hayes
At 12:16 1-4-03, you wrote:
how do you get just the month (in numeric format ) of a specific date. (not
today)
same for day and year.  The date is in -dd-mm format to start with.
thanks.
if you obtain it directly you should try to alter the way you get the date.

If it is from e.g. a database or something, you can choose:

$date=2003-04-01;

example 1:
$date_elements = explode ('-',$date);
echo The date has exploded in a day {$date_elements[2]}, a month 
{$date_elements[1]} and the year{$date_elements[0]}.;

example 2:

echo 'The date is ' .substr($date, 8,2). '(day)'
.substr($date, 5,2). '(month)'
.substr($date, 0,4). '(year)';
(I'm not 100% sure about the 8 and the 5 )

Chris H. 

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


RE: [PHP] GMT strtotime() problem today!!

2003-04-01 Thread Ford, Mike [LSS]
 -Original Message-
 From: Stuart Cochrane [mailto:[EMAIL PROTECTED]
 Sent: 31 March 2003 15:45
 
 I have a script that runs on over 250 Servers, all are running NT4.
 here is the script:
 
 [php]
 function last_sunday() {
   return gmdate(Y-m-d, strtotime(Last Sunday));
 }
 echo Last Sunday is returned as: .last_sunday();
 [/php]
 
 Some servers have 'automatically adjust clock for daylight saving 
 changes' switched on, some have this off - (im in the UK GMT +0).
 
 With daylight saving on the above script returns: 2003-03-29
 With daylight saving off the above script returns: 2003-03-30
 
 Im puzzled with this one - any ideas?

Well, since this is clearly a DST problem, I'd adopt the classic
DST-avoiding solution and specify a *time* that won't cause date-shifts if
it gets DST adjusted.  Also, as you're using gmdate, I think I'd specify
that in strtotime() too.  Taken together, this would give you something
like:

return gmdate(Y-m-d, strtotime(Last Sunday 12:00 GMT));

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



Re: [PHP] 1. april

2003-04-01 Thread Nicolas Costes
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Le Mardi 1 Avril 2003 12:57, Thomas Richter a écrit :
 check the output of phpinfo(). I prefer php version 4.2.3...

 thomas

Php 4.1.2 = I see nothing strange... 
Oh ! The PHP logo has disappeared, that's all :-(

What shoud we see ?

- -- 
   ,,
  ( °  Nicolas Costes
  /||\IUT de La Roche / Yon
 ( ^ )   Nicolas.Costes AT iut-laroche.univ-nantes.fr
  ^ ^   Clé publique: http://www.keyserver.net/


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+iXTpNc2aXy7LuOgRAilVAKCD7m1mFv+cMSJV2J14tLKwxKCbGwCgmWlB
kYprQrn9NBNlcv39YbRw64g=
=2oxb
-END PGP SIGNATURE-


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



[PHP] writing file

2003-04-01 Thread Diksha Neel
dear all,

hi! i have a php script from which i am creating
an html file as under.
my problem is that when i open aditya.html, i can see
the variable values and hi!.
but when i want to put the value of $cname in the center
of the screen by using div tag as:
  div align=center $cname /div
i get a parse error.
why is the div tag not working?
regards,
diksha.
$fp = fopen (aditya.html, w);
$string=html
 headtitleaditya/title/headbodycentre
 h1u$cname/u/h1/centrehi!$city 
$bemail/body/html;
$contents=fwrite($fp, $string);
echo '$contents';
fclose($fp);

___
Odomos - the only  mosquito protection outside 4 walls -
Click here to know more!
http://r.rediff.com/r?http://clients.rediff.com/odomos/Odomos.htmodomoswn
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] 1. april

2003-04-01 Thread Dan Rossi
http://electroteque.dyndns.org:1023/phpinfo.php ??

-Original Message-
From: Thomas Richter [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 8:57 PM
To: [EMAIL PROTECTED]
Subject: [PHP] 1. april


check the output of phpinfo(). I prefer php version 4.2.3...

thomas



-- 
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] writing file

2003-04-01 Thread Chris Hayes
Double quotes inside double quotes!

  div align=center $cname /div
$string=html
 headtitleaditya/title/headbodycentre
 h1u$cname/u/h1/centrehi!$city $bemail/body/html;



echo '$contents';
and you do not need these quotes.



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


RE: [PHP] writing file

2003-04-01 Thread M.A.Bond
If you want to use the  in within the string, you should use ' to surround
the string ie:

$string='html..   div align=center.';


Thanks

Mark


-Original Message-
From: Diksha Neel [mailto:[EMAIL PROTECTED] 
Sent: 01 April 2003 12:21
To: [EMAIL PROTECTED]
Subject: [PHP] writing file


dear all,

hi! i have a php script from which i am creating
an html file as under.
my problem is that when i open aditya.html, i can see
the variable values and hi!.
but when i want to put the value of $cname in the center
of the screen by using div tag as:
   div align=center $cname /div
i get a parse error.
why is the div tag not working?

regards,
diksha.

$fp = fopen (aditya.html, w);
$string=html
  headtitleaditya/title/headbodycentre
  h1u$cname/u/h1/centrehi!$city 
$bemail/body/html;
$contents=fwrite($fp, $string);
echo '$contents';
fclose($fp);

___
Odomos - the only  mosquito protection outside 4 walls -
Click here to know more!
http://r.rediff.com/r?http://clients.rediff.com/odomos/Odomos.htmodomosw
n


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

2003-04-01 Thread Jason Wong
On Tuesday 01 April 2003 17:49, Justin French wrote:
 on 01/04/03 9:16 PM, Diana Castillo ([EMAIL PROTECTED]) wrote:
  how do you get just the month (in numeric format ) of a specific date.
  (not today)
  same for day and year.  The date is in -dd-mm format to start with.
  thanks.

 If your date was -mm-dd, you could do this:

 ?
 $date = '2002-03-18';
 echo date('m', strtotime($date));
 ?

 But, because yours isn't:

 ?
 $date = '2002-03-18';
 list($y,$d,$m) = explode('-',$date);
 echo date('m', strtotime({$y}-{$m}-{$d}));
 ?

I don't want to be awkward, but wouldn't $m be holding the required info 
already? -- ignoring the fact that you have an invalid date.

-- 
Jason Wong - Gremlins Associates - www.gremlins.biz
Open Source Software Systems Integrators
* Web Design  Hosting * Internet  Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
What would you expect to gain from XIP besides being buzzword
compliant?

- Erik Mouw on linux-arm-kernel
*/


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



RE: [PHP] 1. april

2003-04-01 Thread Chris Hayes
At 13:26 1-4-03, you wrote:
http://electroteque.dyndns.org:1023/phpinfo.php ??
you may not live on april 1 like most of us.

I see a developers face on php 4.0.1pl3 - 4.2.3 and an animal on 4.3.0

For those who are firsttimers with this gag:
http://www.eeggs.com/items/16437.html
http://www.faqts.com/knowledge_base/view.phtml/aid/116/fid/28
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] exec(), passthru(), system() and shell_exec() hang.

2003-04-01 Thread Lasse Riis
Hi everyone.

I'm running a RedHat Linux 8.0 server with php 4.2.2 on apache. I'm
having trouble using the system execution commands. If any of these
commands are included in my script it hangs, I don't even get output
that is flushed before the command:
echo 'Text to be flushed';
flush();
$ud = passthru('command parameters');
What's wrong? The command executed is sudo service dansguardian
restart. I'm making a web interface for updating a config file for the
service dansguardian. But the changes won't be used before the service
has been restarted. On my old setup (RH 7.3) i could at least get the
output with system() or passthru(), but the script would still hang. Now
I get nothing. Well except if I comment out the system command, then
everything works fine (no infinite loops that could cause the hang), but
that doesn't get my service restarted
I have edited my /etc/sudoers file so that the apache user can execute
/sbin/service. It works fine in console (with another username (can't
really su to apache))
Help me
Lasse Riis
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] month

2003-04-01 Thread Justin French
on 01/04/03 10:31 PM, Jason Wong ([EMAIL PROTECTED]) wrote:

 I don't want to be awkward, but wouldn't $m be holding the required info
 already? -- ignoring the fact that you have an invalid date.

yes.  I just re-read the OP... *slaps forehead*.

?
$date = '2002-03-18';
list($y,$d,$m) = explode('-',$date);
echo $m;
?

Justin


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



[PHP] Re:[PHP] excel 2 csv 2 mysql

2003-04-01 Thread Geoff Caplan
Justin,

For reading, you could try this:

http://www.zakkis.ca/products/abc_excelparser/index.php

Cost is 150 CAD - quite steep. Tried the online demo - seems to work. Will only work
with cells containing strings though - doesn't resolve formulae. If
you purchase it, perhaps you could let me know how you get on?

For writing, there seems to be a module in Pear:

http://pear.php.net/package-info.php?pacid=156

 hi guys i am trying to work out how to dynamically be able to upload an excel
 file , export it to csv to be able to import into mysql , is there any
 examples out there ? fopen gave me binary code :|

-- 
Geoff Caplan
Advantae Ltd
http://www.advantae.com


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



Re: [PHP] Problem installing PHP 4.3.1 - won't compile due to odderror.

2003-04-01 Thread Marek Kilimajer
Run ./configure --help, it will tell you how to specify the path to curl 
libraries

Don wrote:

Hi,

Trying to install PHP 4.3.1 but getting the following error message:

configure error: cURL version 7.9.8 or later is required to compile php
with cURL support
I have curl installed; when I issue a curl -V, the version number reported
is 7.10.3
Can anyone tell me what the install is looking for?

Thanks in advance,
Don


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003
 



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


Re: [PHP] can't get imagecopy, etc. function to work.

2003-04-01 Thread Marek Kilimajer
If imagecopy function does not exists, gd is not either installed or 
enabled. Check your php.ini if it is enabled and the extension dir if 
the extenssion is there. If it is not there, run configure once again 
with the right options, also read INSTALL.

Wo Chang wrote:

Dear Experts,

Seems like I can't use any of the followings even
though I'm running PHP 4.3.2-RC1:
 * imagecreatefromjpeg
 * imagecopy
 * etc.
Am I right the gd-2.x has already integrated with
PHP 4.3.2-RC1 and the gd also has the jpeg integrated?
Or, should do I have to bring in the jpeg-6x myself?

If I need to bring in the jpeg-6x myself, should I
install it within the ext/gd sub-dir?
Thing wanted to do: create a separate thumbnail jpeg
file from an org. jpeg file.  Any better idea?
Please advice.

Thanks in advanced.

--Wo
- Original Message - 
From: Wo Chang [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Friday, August 23, 2002 2:33 PM
Subject: how can php applications use session control to track multiple users?

 

Dear Experts,

I know you can use session_register to register varialbes,
but how do you use sessions for multiple users?
Ex.

$valid_user = $username; // let's say $username has JSmith
session_register(valid_user);
but if another user (SWhite) logins, then the valid_user now
has the value of SWhite and the earlier user JSmith is
gone.  So, how do you make the sessions looks like:
JSmith|s:6:JSmith;SWhite|s:6:SWhite;

Is this the way how people usually implment to track multiple
users?
Any hints would be greatly appreciated!

--Wo

   



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


[PHP] I'ld like to submit teh ppts

2003-04-01 Thread praveen
Dear List,
 Recently I've conducted internal training program on PHP, MySQL in my
company. I'ld like to submit the presentations and sample code
prepared for that training program. How can I submit and where can I?
I hope that might use to the people who are new to PHP. Let me
contribute to my favorite scripting language.:)
Regards
Praveen



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



[PHP] Detect Current Page

2003-04-01 Thread shaun
Hi,

I would like to display certain items on certain pages. Is it possible to
detect the page i am going to and if so display an item. I could add an
identifer to the link but there a lot of pages linking to this page so it
could get tricky?

Thank in advance for any advice



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



Re: [PHP] excel 2 csv 2 mysql

2003-04-01 Thread Marek Kilimajer
The quotes are valid, use fgetcsv() function, it will strip them

daniel wrote:

ok guys are you ready ,

/www_tools/apache/catdoc/bin/xls2csv test.xls  test2.csv

gave me this

column1`,column2,column3
faffafs,fsafsa,fsafs
fssfa,fasfs,fasfs
fasaf,fasfs,asffaf
fafs,sfafsa,fasfas
sfafs,fssfa,fassfa
sfasfa,asfafs,fasfas
asffas,sfaaf,sfafsa
fssaf,asffsa,asffas
sfasfa,sfasaf,fasasf
unfortunately its putting quotes in, have to strip them

 

= Original Message From [EMAIL PROTECTED] =
Yeah... you're going to have to use COM or something similar on a windows
server to get effective access to the server.
Another option is dynamically adding at as an odbc datasource and querying
it. Again, this will only work on a windows server...
It's all much easier if you can convince users to upload csv files.

	- jon

-
jon roig
senior manager, online production
epilepsy foundation
http://jonroig.com
-Original Message-
From: daniel [mailto:[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 7:48 PM
To: [EMAIL PROTECTED]
Subject: [PHP] excel 2 csv 2 mysql
hi guys i am trying to work out how to dynamically be able to upload an
excel
file , export it to csv to be able to import into mysql , is there any
examples out there ? fopen gave me binary code :|


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


[PHP] Help needed

2003-04-01 Thread Andy
Hi all

Can someone help?
I am new to PHP and need some help, i have tried to build a members only
section to my website but i am finding it very hard.

I get this error when i go to the login page:

Parse error: parse error in /home/.sites/112/site***/web/Members/Login.php
on line 201

But the only thing on line 201 is:
default:

I don't understand?
I get the feeling i will need more help even if someone solves this for me
:o)

Thank you



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



RE: [PHP] Help needed

2003-04-01 Thread Clint Tredway
Please post more of your code. It is difficult for us to help you without
seeing your code.

Clint

-Original Message-
From: Andy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 8:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Help needed


Hi all

Can someone help?
I am new to PHP and need some help, i have tried to build a members only
section to my website but i am finding it very hard.

I get this error when i go to the login page:

Parse error: parse error in /home/.sites/112/site***/web/Members/Login.php
on line 201

But the only thing on line 201 is:
default:

I don't understand?
I get the feeling i will need more help even if someone solves this for me
:o)

Thank you



-- 
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] Using PHP Credit Card orders

2003-04-01 Thread Phil Schwarzmann
Where can I find information on using PHP along with secure online Credit
Card orders?

 

Thanks!



[PHP] Re: Help needed

2003-04-01 Thread J.Veenhuijsen
Missing ;   ?

Jochem

Andy wrote:
Hi all

Can someone help?
I am new to PHP and need some help, i have tried to build a members only
section to my website but i am finding it very hard.
I get this error when i go to the login page:

Parse error: parse error in /home/.sites/112/site***/web/Members/Login.php
on line 201
But the only thing on line 201 is:
default:
I don't understand?
I get the feeling i will need more help even if someone solves this for me
:o)
Thank you




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


RE: [PHP] Help needed

2003-04-01 Thread Mike Brum
Realize that when you see error line... it doesn't mean that the error is
definately on that line. PHP is only *so* smart. You'll find that making
mistakes on line X will result in errors being reported on line X+1 or
further down in your code.

Don't take the errors at face value all the time - they're an amazingly
useful tool, but it's only a machine and is forced by a set of rules.

-Mike

-Original Message-
From: Andy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 9:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Help needed


Hi all

Can someone help?
I am new to PHP and need some help, i have tried to build a members only
section to my website but i am finding it very hard.

I get this error when i go to the login page:

Parse error: parse error in /home/.sites/112/site***/web/Members/Login.php
on line 201

But the only thing on line 201 is:
default:

I don't understand?
I get the feeling i will need more help even if someone solves this for me
:o)

Thank you



--
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] Help needed

2003-04-01 Thread Andy
Hi Clint
OK hope this is not too much and there are likely to be more errors in it.
Thank you
Andy

?php
  session_start();
session_register('auth');
session_register('logname');
  include(simba.inc);
  switch (@$do)
  {
case login:
$connection = mysql_connect($host, $user,$password)
or die (Couldn't connect to server.);
  $db = mysql_select_db($database, $connection)
   or die (Couldn't select database.);

  $sql = SELECT username FROM Members
WHERE username='$fusername';
  $result = mysql_query($sql)
  or die(Couldn't execute query.);
  $num = mysql_num_rows($result);
  if ($num == 1)  // login name was found{
 $sql = SELECT username FROM Members
WHERE username='$fusername'
 AND password=password('$fpassword');
 $result2 = mysql_query($sql)
   or die(Couldn't execute query.);
 $num2 = mysql_num_rows($result2);
 if ($num2  0)  // password is correct  {
   $auth=yes;
   $logname=$fusername;
   $today = date(Y-m-d h:m:s);
   $sql = INSERT INTO Login (username,loginTime)
   VALUES ('$logname','$today');
   mysql_query($sql) or die(Can't execute query.);
   header(Location: Member_page.php);
 }
 else// password is not correct
 {
   unset($do);
   $message=The Username, '$fusername' exists,
 but you have not entered the correct
 password! Please try again.br;
   include(login_form.inc);
 }
  }
  elseif ($num == 0)  // login name not found
  {
 unset($do);
 $message = The Username you entered does not
 exist! Please try again.br;
 include(login_form.inc);
  }
break;

case new:
  foreach($HTTP_POST_VARS as $key = $value)
  {
if ($key != phone)
{
  if ($value == )
  {
unset($do);
$message_new = Required information is missing.
Please try again.;
include(login_form.inc);
exit();
  }
}
if (ereg({company),$key))
{
 if (!ereg(^[A-Za-z' -]{1,50}$,$key))
 {
   unset($do);
   $message_new = $company is not a valid name.
Please try again.;
   include(login_form.inc);
   exit();
 }
}
if (ereg({name),$key))
{
 if (!ereg(^[A-Za-z' -]{1,50}$,$key))
 {
   unset($do);
   $message_new = $name is not a valid name.
Please try again.;
   include(login_form.inc);
   exit();
 }
}
if (ereg({address),$key))
{
 if (!ereg(^[A-Za-z' -]{1,50}$,$key))
 {
   unset($do);
   $message_new = $address is not valid.
Please try again.;
   include(login_form.inc);
   exit();
 }
}
if (ereg({town),$key))
{
 if (!ereg(^[A-Za-z' -]{1,50}$,$key))
 {
   unset($do);
   $message_new = $town is not a valid town.
Please try again.;
   include(login_form.inc);
   exit();
 }
}
if (ereg({county),$key))
{
 if (!ereg(^[A-Za-z' -]{1,50}$,$key))
 {
   unset($do);
   $message_new = $county is not valid.
Please try again.;
   include(login_form.inc);
   exit();
 }
}
$$key = strip_tags(trim($value));
  }
  if (!ereg(^[0-9]{5,5}(\-[0-9]{4,4})?$,$postcode))
  {
unset($do);
$message_new = $postcode is not a valid postcode.
Please try again.;
include(login_form.inc);
exit();
  }
  if (!ereg(^[0-9)(xX -]{7,20}$,$phone))
  {
unset($do);
$message_new = $phone is not a valid phone number.
Please try again.;
include(login_form.inc);
exit();
}
  }
  if (!ereg([EMAIL PROTECTED],$email))
  {
unset($do);
$message_new = $email is not a valid email address.
 Please try again.;
include(login_form.inc);
exit();
  }
  /* check to see if login name already exists */
  $connection = mysql_connect($host,$user,$password)
or die (Couldn't connect to server.);
  $db = mysql_select_db($database, $connection)
or die (Couldn't select database.);
  $sql = SELECT username FROM Members
WHERE username='$newname';
  $result = mysql_query($sql)
or die(Couldn't execute query.);
  $num = mysql_numrows($result);
  if ($num  0)
  {
unset($do);

Re: [PHP] Detect Current Page

2003-04-01 Thread Jason Sheets
If you are intending to do this with PHP $_SERVER['PHP_SELF'] is a 
variable containing the file name of the script being accessed.

Jason

shaun wrote:

Hi,

I would like to display certain items on certain pages. Is it possible to
detect the page i am going to and if so display an item. I could add an
identifer to the link but there a lot of pages linking to this page so it
could get tricky?
Thank in advance for any advice



 



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


Re: [PHP] Help needed

2003-04-01 Thread Chris Hayes
At 16:17 1-4-03, you wrote:
Hi all

Can someone help?
I am new to PHP and need some help, i have tried to build a members only
section to my website but i am finding it very hard.
I get this error when i go to the login page:

Parse error: parse error in /home/.sites/112/site***/web/Members/Login.php
on line 201
But the only thing on line 201 is:
default:
The parse error is starting to be a problem on line 201, but that may be 
caused by something you ommitted in an earlier line, maybe you did not 
close a quoted string, or maybe you did not end a line with a ;semicolon;.
If you get a very strange error message try to find the translation on 
www.zend.com rather than on www.php.net. Hint: with Google you can look 
for  [ site:www.zend.com   StrangeErrorWord ].

I don't understand?
I get the feeling i will need more help even if someone solves this for me
:o)
In deed. Well you got PHP working so that already shows you're computer 
literate.

The best book to start with that i know of  is the PHP Bible second 
edition, by Converse and Parker. It is an inve$tment though...

On php.net is a simple tutorial with links: 
http://www.php.net/manual/en/tutorial.php. Also please (!) do read the 
first chapters of the online manual on www.php.net, this manual then 
proceeds with a lot of functions, have a quick look at them and dig a bit 
deeper in the functions for strings, arrays, datetime, and your database.

I collected some specific links on www.hieris.info/over/php. I wrote it in 
Dutch and the layout is primitive but do try the links!!

Then there was a usefull list of do's and don'ts on zend, let me look 
http://www.zend.com/zend/art/mistake.php about classic mistakes. Don't be 
intimidated by it though. PHP is very flex.

Chris Hayes.

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


Re: [PHP] Help needed

2003-04-01 Thread Chris Hayes
I would suppose that you have an unbalanced {} somewhere.

Restructure your code (yes, even more!) so it is easier to see such a mistake.

Some coders prefer this:

if () {
code
 }
but i prefer
if ()
 {
code
 }
so i see immediately what {braces} belong together.
With nested braces I nest each brace set one tab deeper.

Start with the   case new: part as i removed some of your if  brace-sets 
within that condition and then i saw it had some closing braces left within 
the case:, and that is a _sin_.



Chris
PS Do you have a colorcoding editor?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Problem with mail

2003-04-01 Thread Haseeb Iqbal
hi all while sending mail from php i keep getting this 
Server Error  on line 2
and this is on line 2
mail([EMAIL PROTECTED], the subject, hi,From: [EMAIL PROTECTED].Reply-To: 
[EMAIL PROTECTED].X-Mailer: PHP/ . phpversion());

what is wrong with this what i am going wrong
??
regards
Haseeb


Re: [PHP] Help needed

2003-04-01 Thread Ernest E Vogelsinger
At 16:27 01.04.2003, Andy spoke out and said:
[snip]
Hi Clint
OK hope this is not too much and there are likely to be more errors in it.
Thank you
Andy
[snip] 

At the line 
if ($num == 1)  // login name was found{
you have the curly bracket after the comment slashes - this is
diesregarded. Put it before the comment slashes.

At the line 
if ($num2  0) // password is correct  {
you have the curly bracket after the comment slashes - this is
diesregarded. Put it before the comment slashes.

After this construct
$message_new = $phone is not a valid phone number.
Please try again.;
include(login_form.inc);
exit();
you have a closing curly brace that doesn't belong here. Remove it.


Now your code should run without errors (syntax errors, that is)

Hint: You should make a habit of using a more clear indentation (if your
code is actually as it is in the mail). A single column indentation is not
enough to make block levels clear at the first sight. You better use 4 or 8
columns indentation width.


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



Re: [PHP] Help needed

2003-04-01 Thread Andy
Same error clint. I think the error is between
case new: foreach($HTTP_POST_VARS as $key = $value)
and
  /* check to see if login name already exists */
I copied the code from PHP for Dummies (while trying to learn it) and
changed the code between the above to add in the extra fields for my form, i
think this is where the error is but i cannot see it!

Andy


Clint Tredway [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Please post more of your code. It is difficult for us to help you without
 seeing your code.

 Clint

 -Original Message-
 From: Andy [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 01, 2003 8:17 AM
 To: [EMAIL PROTECTED]
 Subject: [PHP] Help needed


 Hi all

 Can someone help?
 I am new to PHP and need some help, i have tried to build a members only
 section to my website but i am finding it very hard.

 I get this error when i go to the login page:

 Parse error: parse error in /home/.sites/112/site***/web/Members/Login.php
 on line 201

 But the only thing on line 201 is:
 default:

 I don't understand?
 I get the feeling i will need more help even if someone solves this for me
 :o)

 Thank you



 --
 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] Help needed

2003-04-01 Thread Andy
Thank you Ernest

I am a little confused with the closing curly bracket after
$message_new = $phone is not a valid phone number etc

which one should i delete?
}
  if (!ereg(^[0-9)(xX -]{7,20}$,$phone))
{
unset($do);
$message_new = $phone is not a valid phone number.
Please try again.;
include(login_form.inc);
exit();

Andy

Ernest E Vogelsinger [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 At 16:27 01.04.2003, Andy spoke out and said:
 [snip]
 Hi Clint
 OK hope this is not too much and there are likely to be more errors in
it.
 Thank you
 Andy
 [snip]

 At the line
 if ($num == 1)  // login name was found{
 you have the curly bracket after the comment slashes - this is
 diesregarded. Put it before the comment slashes.

 At the line
 if ($num2  0) // password is correct  {
 you have the curly bracket after the comment slashes - this is
 diesregarded. Put it before the comment slashes.

 After this construct
 $message_new = $phone is not a valid phone number.
 Please try again.;
 include(login_form.inc);
 exit();
 you have a closing curly brace that doesn't belong here. Remove it.


 Now your code should run without errors (syntax errors, that is)

 Hint: You should make a habit of using a more clear indentation (if your
 code is actually as it is in the mail). A single column indentation is not
 enough to make block levels clear at the first sight. You better use 4 or
8
 columns indentation width.


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



Re: [PHP] Help needed

2003-04-01 Thread Chris Hayes
At 17:17 1-4-03, you wrote:
Thank you Ernest

I am a little confused with the closing curly bracket after
$message_new = $phone is not a valid phone number etc
there are two, and there is nothing inbetween, so technicaly it does not 
matter to the PHP interpreter.



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


Re: [PHP] Help needed

2003-04-01 Thread J.Veenhuijsen
Maybe the error is here -
 $emess =$emess1.$emess2.$emess3.$emess4.$emess5.$emess6.emess7;
Shouldnt it be $emess7  ???
Jochem

Andy wrote:
Same error clint. I think the error is between
case new: foreach($HTTP_POST_VARS as $key = $value)
and
  /* check to see if login name already exists */
I copied the code from PHP for Dummies (while trying to learn it) and
changed the code between the above to add in the extra fields for my form, i
think this is where the error is but i cannot see it!
Andy

Clint Tredway [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Please post more of your code. It is difficult for us to help you without
seeing your code.
Clint

-Original Message-
From: Andy [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 8:17 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Help needed
Hi all

Can someone help?
I am new to PHP and need some help, i have tried to build a members only
section to my website but i am finding it very hard.
I get this error when i go to the login page:

Parse error: parse error in /home/.sites/112/site***/web/Members/Login.php
on line 201
But the only thing on line 201 is:
default:
I don't understand?
I get the feeling i will need more help even if someone solves this for me
:o)
Thank you



--
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] Help needed

2003-04-01 Thread Ernest E Vogelsinger
At 17:17 01.04.2003, Andy spoke out and said:
[snip]
Thank you Ernest

I am a little confused with the closing curly bracket after
$message_new = $phone is not a valid phone number etc

which one should i delete?
}
  if (!ereg(^[0-9)(xX -]{7,20}$,$phone))
{
unset($do);
$message_new = $phone is not a valid phone number.
Please try again.;
include(login_form.inc);
exit();

directly here after the exit(); line.


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



Re: [PHP] cookies with internet explorer on macs

2003-04-01 Thread Brent Baisley
One thing to check is the time zone that you have set on the server and 
the client machines. I remembering reading about cookie duration issues 
before, but I forget exactly where the problem was.

There is a link between IE and Entourage/Outlook Express on the Mac. 
One thing I see as a problem is that quitting out of IE does not 
release the session cookies if Entourage or Outlook Express is open. 
You have to quit both program to clear session cookies. I haven't 
actually tested this in the very latest versions, but it worked this 
way under OS9.

On Monday, March 31, 2003, at 11:53 PM, Lowell Allen wrote:

A designer I work with was having problems with his sessions sometimes
expiring after a few minutes. He uses OS X/Internet 
Explorer/Entourage. He
determined that whenever he checks his email with Entourage, his 
session
cookie is no longer recognized. He got Microsoft support to duplicate 
and
acknowledge the problem. I use Mac OS 9/Internet Explorer/Outlook 
Express --
no problem.

--
Brent Baisley
Systems Architect
Landover Associates, Inc.
Search  Advisory Services for Advanced Technology Environments
p: 212.759.6400/800.759.0577
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Is_readable()

2003-04-01 Thread Liam Gibbs
 Check that whole path leading up to the file is accessible (+x) and
readable
 (+r) by the webserver.

No. I'm positive. I did the whole chmod 777 * -R at the public_html
directory, and did the proper grouping and ownership in the same way (with
the appropriate commands).


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



Re: [PHP] Detect Current Page

2003-04-01 Thread shaun
exactly what i wanted, thanks

Jason Sheets [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 If you are intending to do this with PHP $_SERVER['PHP_SELF'] is a
 variable containing the file name of the script being accessed.

 Jason

 shaun wrote:

 Hi,
 
 I would like to display certain items on certain pages. Is it possible to
 detect the page i am going to and if so display an item. I could add an
 identifer to the link but there a lot of pages linking to this page so it
 could get tricky?
 
 Thank in advance for any advice
 
 
 
 
 




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



Re: [PHP] Problem installing PHP 4.3.1 - won't compile due to odd error.

2003-04-01 Thread Don
I altered the configuration to say -- --with-curl=/usr/bin  as that is the
location of the curl executable but I am still getting the compile error.
Any other suggestion?

- Original Message -
From: Marek Kilimajer [EMAIL PROTECTED]
To: Don [EMAIL PROTECTED]
Cc: php list [EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 7:27 AM
Subject: Re: [PHP] Problem installing PHP 4.3.1 - won't compile due to odd
error.


 Run ./configure --help, it will tell you how to specify the path to curl
 libraries

 Don wrote:

 Hi,
 
 Trying to install PHP 4.3.1 but getting the following error message:
 
 configure error: cURL version 7.9.8 or later is required to compile php
 with cURL support
 
 I have curl installed; when I issue a curl -V, the version number
reported
 is 7.10.3
 
 Can anyone tell me what the install is looking for?
 
 Thanks in advance,
 Don
 
 
 
 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003
 
 
 
 



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003


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



Re: [PHP] problem with mysql.

2003-04-01 Thread Ryan Vennell
yeah i did send it to the right place.  everything was configured as it should have 
been.  thats why i dont get this.  nothing i try works for this.  it's perplexing.

-Ryan

 Tim Burden[EMAIL PROTECTED] 03/31/03 05:22PM 
Right, defaults to /usr/local/ for the source versions of MySQL, in that
case, use
--with-mysql=/usr/local

- Original Message -
From: Jon Haworth [EMAIL PROTECTED]
Newsgroups: php.general
To: Ryan Vennell [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Monday, March 31, 2003 5:00 PM
Subject: RE: [PHP] problem with mysql.


 Hi Ryan,

  when configuring php i use --with-mysql and it configures just
  fine.  i've even added an =/path/to/php after it to no avail.

 Try --with-mysql=/path/to/mysql instead of --with-mysql=/path/to/php.

 Cheers
 Jon




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



[PHP] Re: Using PHP Credit Card orders

2003-04-01 Thread Ryan Vennell
php.resourceindex.com has some credit card handling scripts i believe.  

here: http://php.resourceindex.com/Complete_Scripts/Commerce_and_Finance/  is where 
you may find what you're looking for, but if you maybe want just a certain function or 
class for it they have a whole section for just stuff like that.  this is usually the 
first place i go if i want something that i dont feel like writing.

-Ryan

 Phil Schwarzmann[EMAIL PROTECTED] 04/01/03 08:29AM 
Where can I find information on using PHP along with secure online Credit
Card orders?

 

Thanks!


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



[PHP] Re: Problem with mail

2003-04-01 Thread Ryan Vennell
here's some things you can check out:

- make sure the path to sendmail is correct/default
- make sure sendmail is running
- check: http://www.php.net/manual/en/function.mail.php and make sure that everything 
you're doing in that function is allowed and correct.

 Haseeb Iqbal[EMAIL PROTECTED] 04/01/03 09:49PM 
hi all while sending mail from php i keep getting this 
Server Error  on line 2
and this is on line 2
mail([EMAIL PROTECTED], the subject, hi,From: [EMAIL PROTECTED].Reply-To: 
[EMAIL PROTECTED].X-Mailer: PHP/ . phpversion());

what is wrong with this what i am going wrong
??
regards
Haseeb

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



Re: [PHP] Problem installing PHP 4.3.1 - won't compile due to odderror.

2003-04-01 Thread Don
Ok. I seemed to have solved the problem but it seemed really dumb to me.  I
did a curl -version from teh command prompt and it outputed 7.10.3

BUT, when I looked at the curl-config file, it specified the following for
the --version section:

--version)
 echo libcurl 7.9.5
 exit 0
 ;;

So, all I did was change the 7.9.5 to 7.10.3 and no more compile error.
Silly huh?

- Original Message -
From: Adam Voigt [EMAIL PROTECTED]
To: Don [EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 11:19 AM
Subject: Re: [PHP] Problem installing PHP 4.3.1 - won't compile due to
odderror.


 Just out of curiosity, try --with-curl=/usr.

 On Tue, 2003-04-01 at 11:12, Don wrote:
  I altered the configuration to say -- --with-curl=/usr/bin  as that is
the
  location of the curl executable but I am still getting the compile
error.
  Any other suggestion?
 
  - Original Message -
  From: Marek Kilimajer [EMAIL PROTECTED]
  To: Don [EMAIL PROTECTED]
  Cc: php list [EMAIL PROTECTED]
  Sent: Tuesday, April 01, 2003 7:27 AM
  Subject: Re: [PHP] Problem installing PHP 4.3.1 - won't compile due to
odd
  error.
 
 
   Run ./configure --help, it will tell you how to specify the path to
curl
   libraries
  
   Don wrote:
  
   Hi,
   
   Trying to install PHP 4.3.1 but getting the following error message:
   
   configure error: cURL version 7.9.8 or later is required to compile
php
   with cURL support
   
   I have curl installed; when I issue a curl -V, the version number
  reported
   is 7.10.3
   
   Can anyone tell me what the install is looking for?
   
   Thanks in advance,
   Don
   
   
   
   ---
   Outgoing mail is certified Virus Free.
   Checked by AVG anti-virus system (http://www.grisoft.com).
   Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003
   
   
   
   
  
 
 
  ---
  Outgoing mail is certified Virus Free.
  Checked by AVG anti-virus system (http://www.grisoft.com).
  Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003
 
 
  --
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 --
 Adam Voigt ([EMAIL PROTECTED])
 The Cryptocomm Group
 My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003


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



[PHP] Re: Help needed

2003-04-01 Thread Ryan Vennell
make sure you have a semicolon on line 200 or it could cause an error on line 201.  am 
i right in assuming that this is a switch?  can you provide us with a small block of 
code  before and after this line?  maybe 5 lines on either side...

-Ryan

 Andy[EMAIL PROTECTED] 04/01/03 08:17AM 
Hi all

Can someone help?
I am new to PHP and need some help, i have tried to build a members only
section to my website but i am finding it very hard.

I get this error when i go to the login page:

Parse error: parse error in /home/.sites/112/site***/web/Members/Login.php
on line 201

But the only thing on line 201 is:
default:

I don't understand?
I get the feeling i will need more help even if someone solves this for me
:o)

Thank you





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



[PHP] Re: I'ld like to submit teh ppts

2003-04-01 Thread Ryan Vennell
talk to the php authors.  just e-mail someone @php.net.  those guys can most likely 
host your stuff under their documents area if they like them.

-Ryan


 [EMAIL PROTECTED] 04/01/03 07:39AM 
Dear List,
 Recently I've conducted internal training program on PHP, MySQL in my
company. I'ld like to submit the presentations and sample code
prepared for that training program. How can I submit and where can I?
I hope that might use to the people who are new to PHP. Let me
contribute to my favorite scripting language.:)
Regards
Praveen





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



Re: [PHP] Re: Using PHP Credit Card orders

2003-04-01 Thread Daniel McCullough
Were you looking for online autho handlers or mod checks?

Phil Schwarzmann[EMAIL PROTECTED] 04/01/03 08:29AM 
Where can I find information on using PHP along with secure online Credit
Card orders?


Thanks!

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


_
Add photos to your messages with MSN 8. Get 2 months FREE*.  
http://join.msn.com/?page=features/featuredemail

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


Re: [PHP] Problem installing PHP 4.3.1 - won't compile due to odderror.

2003-04-01 Thread Marek Kilimajer
You might have it installed twice (e.g. once from rpm and once from 
source). Try
locate curl-config

Don wrote:

Ok. I seemed to have solved the problem but it seemed really dumb to me.  I
did a curl -version from teh command prompt and it outputed 7.10.3
BUT, when I looked at the curl-config file, it specified the following for
the --version section:
--version)
echo libcurl 7.9.5
exit 0
;;
So, all I did was change the 7.9.5 to 7.10.3 and no more compile error.
Silly huh?
- Original Message -
From: Adam Voigt [EMAIL PROTECTED]
To: Don [EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 11:19 AM
Subject: Re: [PHP] Problem installing PHP 4.3.1 - won't compile due to
odderror.
 

Just out of curiosity, try --with-curl=/usr.

On Tue, 2003-04-01 at 11:12, Don wrote:
   

I altered the configuration to say -- --with-curl=/usr/bin  as that is
 

the
 

location of the curl executable but I am still getting the compile
 

error.
 

Any other suggestion?

- Original Message -
From: Marek Kilimajer [EMAIL PROTECTED]
To: Don [EMAIL PROTECTED]
Cc: php list [EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 7:27 AM
Subject: Re: [PHP] Problem installing PHP 4.3.1 - won't compile due to
 

odd
 

error.

 

Run ./configure --help, it will tell you how to specify the path to
   

curl
 

libraries

Don wrote:

   

Hi,

Trying to install PHP 4.3.1 but getting the following error message:

configure error: cURL version 7.9.8 or later is required to compile
 

php
 

with cURL support

I have curl installed; when I issue a curl -V, the version number
 

reported
 

is 7.10.3

Can anyone tell me what the install is looking for?

Thanks in advance,
Don


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003


 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
 

--
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc
   



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003
 



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


[PHP] Re: Help needed

2003-04-01 Thread Andy
Thank you to all who helped, I have it working, well sort of.

I now get the form but when I fill it in I get
URL cannot be found on this server.
The pages are there but it looks like i am not communicating with the
database and the email is not being sent.
I am now getting cross-eyed looking at all this code.  Maybe I should get
someone to do my website and I should stick to solving windows problems
instead.

Andy [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 Hi all

 Can someone help?
 I am new to PHP and need some help, i have tried to build a members only
 section to my website but i am finding it very hard.

 I get this error when i go to the login page:

 Parse error: parse error in /home/.sites/112/site***/web/Members/Login.php
 on line 201

 But the only thing on line 201 is:
 default:

 I don't understand?
 I get the feeling i will need more help even if someone solves this for me
 :o)

 Thank you





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



[PHP] Array Question

2003-04-01 Thread Mark McCulligh
I have two tables that I want to display together as if they were one table
and order them by a common date field.

Because I am using MySQL I can't use the usually way I would do this. Create
a store procedure or view.

I was thinking of creating two separate queries in PHP then loading the data
into one Array. In short loop though both tables copying the records into an
array.

Then I was going to sort the Array my a common date field. Then of course
loop through printing the Array.

My question is: Is this the best way to do this or is there another way.
Also how can you sort an Array by one date field.

Any ideas on how to do link two tables together and sort my a common date
field.

Thanks,
Mark.



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



[PHP] Another Problem installing PHP 4.3.1 - won't compile due to odderror.

2003-04-01 Thread Don
Ok, now that I've solved my 'curl' problem, I've run in to another problem.
Now I am getting teh following error:

configure: error: snmp.h not found. Check your SNMP installation.

I've installed the ucd-snmp rpms so what am I missing?

Thanks,
Don

- Original Message -
From: Marek Kilimajer [EMAIL PROTECTED]
To: Don [EMAIL PROTECTED]
Cc: php list [EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 11:45 AM
Subject: Re: [PHP] Problem installing PHP 4.3.1 - won't compile due to
odderror.


 You might have it installed twice (e.g. once from rpm and once from
 source). Try
 locate curl-config


 Don wrote:

 Ok. I seemed to have solved the problem but it seemed really dumb to me.
I
 did a curl -version from teh command prompt and it outputed 7.10.3
 
 BUT, when I looked at the curl-config file, it specified the following
for
 the --version section:
 
 --version)
  echo libcurl 7.9.5
  exit 0
  ;;
 
 So, all I did was change the 7.9.5 to 7.10.3 and no more compile
error.
 Silly huh?
 
 - Original Message -
 From: Adam Voigt [EMAIL PROTECTED]
 To: Don [EMAIL PROTECTED]
 Sent: Tuesday, April 01, 2003 11:19 AM
 Subject: Re: [PHP] Problem installing PHP 4.3.1 - won't compile due to
 odderror.
 
 
 
 
 Just out of curiosity, try --with-curl=/usr.
 
 On Tue, 2003-04-01 at 11:12, Don wrote:
 
 
 I altered the configuration to say -- --with-curl=/usr/bin  as that is
 
 
 the
 
 
 location of the curl executable but I am still getting the compile
 
 
 error.
 
 
 Any other suggestion?
 
 - Original Message -
 From: Marek Kilimajer [EMAIL PROTECTED]
 To: Don [EMAIL PROTECTED]
 Cc: php list [EMAIL PROTECTED]
 Sent: Tuesday, April 01, 2003 7:27 AM
 Subject: Re: [PHP] Problem installing PHP 4.3.1 - won't compile due to
 
 
 odd
 
 
 error.
 
 
 
 
 Run ./configure --help, it will tell you how to specify the path to
 
 
 curl
 
 
 libraries
 
 Don wrote:
 
 
 
 Hi,
 
 Trying to install PHP 4.3.1 but getting the following error message:
 
 configure error: cURL version 7.9.8 or later is required to compile
 
 
 php
 
 
 with cURL support
 
 I have curl installed; when I issue a curl -V, the version number
 
 
 reported
 
 
 is 7.10.3
 
 Can anyone tell me what the install is looking for?
 
 Thanks in advance,
 Don
 
 
 
 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003
 
 
 
 
 
 
 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003
 
 
 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 
 --
 Adam Voigt ([EMAIL PROTECTED])
 The Cryptocomm Group
 My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc
 
 
 
 
 
 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003
 
 
 
 



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003


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



Re: [PHP] Array Question

2003-04-01 Thread skate
look into things like JOIN and SORT BY in MySQL, they're quicker and more efficient 
than PHP for doing DB stuff (so i'm told)

took me awhile to get my head around JOIN, but once you've got it, you'll never be 
without it ;)


Mark McCulligh [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]
 I have two tables that I want to display together as if they were one table
 and order them by a common date field.
 
 Because I am using MySQL I can't use the usually way I would do this. Create
 a store procedure or view.
 
 I was thinking of creating two separate queries in PHP then loading the data
 into one Array. In short loop though both tables copying the records into an
 array.
 
 Then I was going to sort the Array my a common date field. Then of course
 loop through printing the Array.
 
 My question is: Is this the best way to do this or is there another way.
 Also how can you sort an Array by one date field.
 
 Any ideas on how to do link two tables together and sort my a common date
 field.
 
 Thanks,
 Mark.
 
 
 
 -- 
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php
 
 
 

Re: [PHP] Is_readable()

2003-04-01 Thread Jason Wong
On Tuesday 01 April 2003 23:46, Liam Gibbs wrote:
  Check that whole path leading up to the file is accessible (+x) and

 readable

  (+r) by the webserver.

 No. I'm positive. I did the whole chmod 777 * -R at the public_html
 directory, and did the proper grouping and ownership in the same way (with
 the appropriate commands).

If you're positive that the permissions are correct then:

1) Check the user notes in the online manual

2) Try with a different version of PHP

3) Check whether or not it has been reportd as a bug (bugs.php.net)


-- 
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
--
/*
Q:  How many college football players does it take to screw in a lightbulb?
A:  Only one, but he gets three credits for it.
*/


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



Re: [PHP] Array Question

2003-04-01 Thread Chris Hayes
At 18:58 1-4-03, you wrote:
I have two tables that I want to display together as if they were one table
and order them by a common date field.
Because I am using MySQL I can't use the usually way I would do this. Create
a store procedure or view.
Does every row in tableA has a sibling row in tableB and vice versa, and is 
there some field that could combine them? For instance this date field, is 
it unique (one entry for every date) ?

If the answer is yes to both:

$query=SELECT title, text, date FROM tableA as A, tableB as B WHERE 
A.date=B.date ORDER BY date

Now (AFAIK) if table A has 2 entries on april1 and table B has 3 entries on 
april1, you would get 2x3=6 resulting rows with all possible combinations.
You could also link with any combination of fieldnames, like
  WHERE A.category=B.the_category
  WHERE A.category=B.catID

If that does not work for you look up the array sort functions. Best 
also do a search in the webpage from this list (see ww.php.net - 
emaillists - archive), look for array and sort.



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


Re: [PHP] Array Question

2003-04-01 Thread Mark McCulligh
I can't link the two tables at all.

I need to loop through one displaying its information, then loop through the
other table displaying its information.  For if I have 5 records in table A
and 6 records in table B, I get 11 records total. Each table only has 4-5
fields and they exist in both table. The two tables have the same structure
minus one field.  The two tables should have been one table but I didn't
design the database but have to make it work. Using I would use a view to
make one master table then order it by the common date field. But MySQL
doesn't have view let.

The reason I can't just display one table after the other is that I need the
PHP page to have the results ordered by the common date field.

I can't link the two tables together in the SQL.

Mark.



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



Re: [PHP] Passing data between the web to an Intranet

2003-04-01 Thread Randy
Thursday, March 27, 2003, 5:00:10 PM, you wrote:
 Sorry. What I mean is that we have an externally hosted website.
 Currently all the forms etc update tables in the web hosted mysql DB. I
 am in the process of building a small CRM system and want the data to
 drop into our non public domain Intranet server. Is this possible?

If you can configure your apache, you could set up your remote
web as a reverse proxy to a form on your local intranet. When
this is done, the only access to your local form would be from
the web host, not the user. To the user, it looks like they never
went anywhere else.

You would have something like:

ProxyPass /yourwebdirectory/ http://yourlocalsite/filloutdbform.html

Some info on it is here:
http://www.devshed.com/Server_Side/Administration/ApacheProxy/page1.html 


Best regards,
 Randy   


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



Re: [PHP] Array Question

2003-04-01 Thread Mark McCulligh
I have looked at the different JOINs but I can't link any fields together.
There is no relationship between the tables. The two table are basically the
same table. But the DBA didn't make them one like he should have.

Mark.


Skate [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
look into things like JOIN and SORT BY in MySQL, they're quicker and more
efficient than PHP for doing DB stuff (so i'm told)

took me awhile to get my head around JOIN, but once you've got it, you'll
never be without it ;)


Mark McCulligh [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
 I have two tables that I want to display together as if they were one
table
 and order them by a common date field.

 Because I am using MySQL I can't use the usually way I would do this.
Create
 a store procedure or view.

 I was thinking of creating two separate queries in PHP then loading the
data
 into one Array. In short loop though both tables copying the records into
an
 array.

 Then I was going to sort the Array my a common date field. Then of course
 loop through printing the Array.

 My question is: Is this the best way to do this or is there another way.
 Also how can you sort an Array by one date field.

 Any ideas on how to do link two tables together and sort my a common date
 field.

 Thanks,
 Mark.



 --
 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] Another Problem installing PHP 4.3.1 - won't compile dueto odderror.

2003-04-01 Thread Marek Kilimajer
Assuming you also installed ucd-snmp-devel-*.rpm, likely you need to 
specify --with-snmp=/usr or --with-snmp=/usr//include/ucd-snmp

Don wrote:

Ok, now that I've solved my 'curl' problem, I've run in to another problem.
Now I am getting teh following error:
configure: error: snmp.h not found. Check your SNMP installation.

I've installed the ucd-snmp rpms so what am I missing?

Thanks,
Don
- Original Message -
From: Marek Kilimajer [EMAIL PROTECTED]
To: Don [EMAIL PROTECTED]
Cc: php list [EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 11:45 AM
Subject: Re: [PHP] Problem installing PHP 4.3.1 - won't compile due to
odderror.
 

You might have it installed twice (e.g. once from rpm and once from
source). Try
locate curl-config
Don wrote:

   

Ok. I seemed to have solved the problem but it seemed really dumb to me.
 

I
 

did a curl -version from teh command prompt and it outputed 7.10.3

BUT, when I looked at the curl-config file, it specified the following
 

for
 

the --version section:

--version)
   echo libcurl 7.9.5
   exit 0
   ;;
So, all I did was change the 7.9.5 to 7.10.3 and no more compile
 

error.
 

Silly huh?

- Original Message -
From: Adam Voigt [EMAIL PROTECTED]
To: Don [EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 11:19 AM
Subject: Re: [PHP] Problem installing PHP 4.3.1 - won't compile due to
odderror.


 

Just out of curiosity, try --with-curl=/usr.

On Tue, 2003-04-01 at 11:12, Don wrote:

   

I altered the configuration to say -- --with-curl=/usr/bin  as that is

 

the

 

location of the curl executable but I am still getting the compile

 

error.

 

Any other suggestion?

- Original Message -
From: Marek Kilimajer [EMAIL PROTECTED]
To: Don [EMAIL PROTECTED]
Cc: php list [EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 7:27 AM
Subject: Re: [PHP] Problem installing PHP 4.3.1 - won't compile due to
 

odd

 

error.



 

Run ./configure --help, it will tell you how to specify the path to

   

curl

 

libraries

Don wrote:



   

Hi,

Trying to install PHP 4.3.1 but getting the following error message:

configure error: cURL version 7.9.8 or later is required to compile

 

php

 

with cURL support

I have curl installed; when I issue a curl -V, the version number

 

reported

 

is 7.10.3

Can anyone tell me what the install is looking for?

Thanks in advance,
Don


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003




 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


 

--
Adam Voigt ([EMAIL PROTECTED])
The Cryptocomm Group
My GPG Key: http://64.238.252.49:8080/adam_at_cryptocomm.asc


   

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003


 



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003
 



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


[PHP] PHPSESSID Handling...

2003-04-01 Thread Dan Joseph
Hi Everyone,

I'm working on securing my application, and am running into a slight issue
that I cannot seem to find a fix for. If the attacker changes his PHPSESSID
cookie to contain illegal characters, it causes an error on the screen upon
session_start().

How can I check to see if this is a valid number, and if it is not, exit the
application?

-Dan Joseph


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



Re: [PHP] PHP, ASP, IIS and MySQL

2003-04-01 Thread Jeppe
Thanks for your thoughts!

/ Jeppe

John W. Holmes wrote:
My questions for you:
1) Is there a penelty/drawback when coding PHP instead of ASP on IIS
(towards MySQL)?


No, not really. I'm sure ASP has some little tricks built in that you'd
have to recreate in PHP, but the two are basically the same, regardless
of the OS.

2) Do you see any problems in having both ASP-code and PHP-code on the
same server (it seems to work fine for me)?


No.


3) (on the edge of topic) Do you have any comments or thoughts
concerning the choice of DB. MySQL appears to like Win more than
Postgres, or?


MySQL seems to be more cross platform and more popular, but PG has a
larger feature set. Depends totally upon the complexity of your project
which one you use.
---John Holmes...




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


Re: [PHP] PHP and Front Page XP

2003-04-01 Thread Tomás Liendo
Thanks! Your help solved my problems!
Is there some form of obtaining the complete path??? I tried $f1_path, but
don't work... :-)

Thank you very much,

Tom.

Marek Kilimajer [EMAIL PROTECTED] escribió en el mensaje
news:[EMAIL PROTECTED]
$f1 is the temporary file namen your server, you need to use $f1_name,
or even better $_FILES['f1']['name']

Tomás Liendo wrote:

Hello people, I have the following strange problem:

I designed a form with Front Page XP, and with PHP I save the fields in a
MySQL data base. All fields work perfect, except one. This is a control to
upload files:
INPUT type=file name=f1
The problem is that in the data base the value selected for the user is not
recorded. Instead of that a value as /tmp/phpd7Fski is recorded.
I don't know if my problem is Front Page, PHP or my Web server (Apache)...
As a test I printed the value of the varible $f1:
?
echo $f1
?
 This shows the following: /tmp/phpd7Fski, instead the value selected by
the user.

Well I hope somebody can help me, from already thank you very much,

Tom.











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



[PHP] FTP

2003-04-01 Thread Tomás Liendo
Hi people I need help with FTP functions:

What's the meaning of this error?: FTP_PUT: Could not determine CWdir: No
such directory.

Thank you very much,

Tom.



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



Re: [PHP] Problems with post data

2003-04-01 Thread Frank Westerbeke
John,

Thanks for your patience.

I've been trying to get a grip on PHP/MySQL with a book written by Jay
Bulger and Jay Geenspan.
Obviously a wrong choice since your solution is not mentioned in their book.

I will check the manual more often.

Frank
John W. Holmes [EMAIL PROTECTED] schreef in bericht
news:[EMAIL PROTECTED]
  Does this bug also applies to passing variables in an URL.
 
  I'v noticed  that when the directive register_globals is set to off as
 it
  is
  recommended in the php.ini file no variables are passed on to other
 pages.
  Switching it to on would be the simplest solution, but scripts like
  phpMyAdmin do not seem to have these problems.

 The variables are passed, you just have to reference them as
 $_GET['variable'] or $_POST['variable'], which is also mentioned many
 times in the manual.

 ---John W. Holmes...

 PHP Architect - A monthly magazine for PHP Professionals. Get your copy
 today. http://www.phparch.com/





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



Re: [PHP] Array Question

2003-04-01 Thread Tim Burden
If you added a dummy field in the table that is minus one field, you might
use the merge table, but I honestly have no idea whether this would be more
or less efficient than sorting arrays in memory. Guess that would depend on
the sizes of the tables and the number of records you'll be returning.

http://www.mysql.com/doc/en/MERGE.html

- Original Message -
From: Mark McCulligh [EMAIL PROTECTED]
Newsgroups: php.general
To: [EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 12:33 PM
Subject: Re: [PHP] Array Question


 I have looked at the different JOINs but I can't link any fields together.
 There is no relationship between the tables. The two table are basically
the
 same table. But the DBA didn't make them one like he should have.

 Mark.


 Skate [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
 look into things like JOIN and SORT BY in MySQL, they're quicker and more
 efficient than PHP for doing DB stuff (so i'm told)

 took me awhile to get my head around JOIN, but once you've got it, you'll
 never be without it ;)


 Mark McCulligh [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  I have two tables that I want to display together as if they were one
 table
  and order them by a common date field.
 
  Because I am using MySQL I can't use the usually way I would do this.
 Create
  a store procedure or view.
 
  I was thinking of creating two separate queries in PHP then loading the
 data
  into one Array. In short loop though both tables copying the records
into
 an
  array.
 
  Then I was going to sort the Array my a common date field. Then of
course
  loop through printing the Array.
 
  My question is: Is this the best way to do this or is there another way.
  Also how can you sort an Array by one date field.
 
  Any ideas on how to do link two tables together and sort my a common dat
e
  field.
 
  Thanks,
  Mark.
 
 
 
  --
  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] Another Problem installing PHP 4.3.1 - won't compile due to error.

2003-04-01 Thread Don
Ok, that problem solved but now another one pops up when I run 'make'.
Please note that it is complaining about code that came with the PHP tarball
and I haven't changed anything.  Below are the errors for your viewing
(dis)pleasure.  Any guidance would be appreciated.  This isn't supposed to
be so hard.

In file included from /usr/local/php-4.3.1/ext/curl/curl.c:45:
/usr/local/php-4.3.1/ext/curl/php_curl.h:115: parse error before `CURLM'
/usr/local/php-4.3.1/ext/curl/php_curl.h:115: warning: no semicolon at end
of struct or union
/usr/local/php-4.3.1/ext/curl/php_curl.h:124: parse error before `mcode'
/usr/local/php-4.3.1/ext/curl/php_curl.h:124: warning: data definition has
no type or storage class
/usr/local/php-4.3.1/ext/curl/php_curl.h:127: parse error before `}'
/usr/local/php-4.3.1/ext/curl/php_curl.h:127: warning: data definition has
no type or storage class
/usr/local/php-4.3.1/ext/curl/curl.c: In function `zm_startup_curl':
/usr/local/php-4.3.1/ext/curl/curl.c:182: `CURLOPT_CAPATH' undeclared (first
use in this function)
/usr/local/php-4.3.1/ext/curl/curl.c:182: (Each undeclared identifier is
reported only once
/usr/local/php-4.3.1/ext/curl/curl.c:182: for each function it appears in.)
/usr/local/php-4.3.1/ext/curl/curl.c:221: `CURLINFO_REDIRECT_TIME'
undeclared (first use in this function)
/usr/local/php-4.3.1/ext/curl/curl.c:222: `CURLINFO_REDIRECT_COUNT'
undeclared (first use in this function)
/usr/local/php-4.3.1/ext/curl/curl.c:278: `CURL_NETRC_OPTIONAL' undeclared
(first use in this function)
/usr/local/php-4.3.1/ext/curl/curl.c:279: `CURL_NETRC_IGNORED' undeclared
(first use in this function)
/usr/local/php-4.3.1/ext/curl/curl.c:280: `CURL_NETRC_REQUIRED' undeclared
(first use in this function)
/usr/local/php-4.3.1/ext/curl/curl.c: In function `zif_curl_setopt':
/usr/local/php-4.3.1/ext/curl/curl.c:732: `CURLOPT_CAPATH' undeclared (first
use in this function)
/usr/local/php-4.3.1/ext/curl/curl.c: In function `zif_curl_getinfo':
/usr/local/php-4.3.1/ext/curl/curl.c:1053: `CURLINFO_REDIRECT_COUNT'
undeclared (first use in this function)
/usr/local/php-4.3.1/ext/curl/curl.c:1077: `CURLINFO_REDIRECT_TIME'
undeclared (first use in this function)
make: *** [ext/curl/curl.lo] Error 1



 Assuming you also installed ucd-snmp-devel-*.rpm, likely you need to
 specify --with-snmp=/usr or --with-snmp=/usr//include/ucd-snmp

 Don wrote:

 Ok, now that I've solved my 'curl' problem, I've run in to another
problem.
 Now I am getting teh following error:
 
 configure: error: snmp.h not found. Check your SNMP installation.
 
 I've installed the ucd-snmp rpms so what am I missing?
 
 Thanks,
 Don
 
 - Original Message -
 From: Marek Kilimajer [EMAIL PROTECTED]
 To: Don [EMAIL PROTECTED]
 Cc: php list [EMAIL PROTECTED]
 Sent: Tuesday, April 01, 2003 11:45 AM
 Subject: Re: [PHP] Problem installing PHP 4.3.1 - won't compile due to
 odderror.
 
 
 
 
 You might have it installed twice (e.g. once from rpm and once from
 source). Try
 locate curl-config
 
 
 Don wrote:
 
 
 
 Ok. I seemed to have solved the problem but it seemed really dumb to
me.
 
 
 I
 
 
 did a curl -version from teh command prompt and it outputed 7.10.3
 
 BUT, when I looked at the curl-config file, it specified the
following
 
 
 for
 
 
 the --version section:
 
 --version)
 echo libcurl 7.9.5
 exit 0
 ;;
 
 So, all I did was change the 7.9.5 to 7.10.3 and no more compile
 
 
 error.
 
 
 Silly huh?
 
 - Original Message -
 From: Adam Voigt [EMAIL PROTECTED]
 To: Don [EMAIL PROTECTED]
 Sent: Tuesday, April 01, 2003 11:19 AM
 Subject: Re: [PHP] Problem installing PHP 4.3.1 - won't compile due to
 odderror.
 
 
 
 
 
 
 Just out of curiosity, try --with-curl=/usr.
 
 On Tue, 2003-04-01 at 11:12, Don wrote:
 
 
 
 
 I altered the configuration to say -- --with-curl=/usr/bin  as that
is
 
 
 
 
 the
 
 
 
 
 location of the curl executable but I am still getting the compile
 
 
 
 
 error.
 
 
 
 
 Any other suggestion?
 
 - Original Message -
 From: Marek Kilimajer [EMAIL PROTECTED]
 To: Don [EMAIL PROTECTED]
 Cc: php list [EMAIL PROTECTED]
 Sent: Tuesday, April 01, 2003 7:27 AM
 Subject: Re: [PHP] Problem installing PHP 4.3.1 - won't compile due
to
 
 
 
 
 odd
 
 
 
 
 error.
 
 
 
 
 
 
 Run ./configure --help, it will tell you how to specify the path to
 
 
 
 
 curl
 
 
 
 
 libraries
 
 Don wrote:
 
 
 
 
 
 Hi,
 
 Trying to install PHP 4.3.1 but getting the following error
message:
 
 configure error: cURL version 7.9.8 or later is required to
compile
 
 
 
 
 php
 
 
 
 
 with cURL support
 
 I have curl installed; when I issue a curl -V, the version number
 
 
 
 
 reported
 
 
 
 
 is 7.10.3
 
 Can anyone tell me what the install is looking for?
 
 Thanks in advance,
 Don
 
 
 
 ---
 Outgoing mail is certified Virus Free.
 Checked by AVG anti-virus system (http://www.grisoft.com).
 Version: 6.0.465 / Virus Database: 263 - Release Date: 3/25/2003
 
 
 
 
 
 
 
 
 ---
 Outgoing mail is 

[PHP] PHP Email Attachment problem

2003-04-01 Thread Mike
Hello,
I want to send an email attachment using PHP and the below code works
locally but when i upload to my RAQ Cobalt server it doesn't send the
attachment and i can't figure out why. If you can offer me any guidance as
to why this is happening it is greatly appreciated.
**The sendmail is a custom function listed below also, not the one inherent
to PHP.**

Thanks,
Mike

-Begin Code--

case(send_message):

// Obtain file upload vars
$fileatt  = $_FILES['fileatt']['tmp_name'];
$fileatt_type = $_FILES['fileatt']['type'];
$fileatt_name = $_FILES['fileatt']['name'];
$from = [EMAIL PROTECTED];

if (is_uploaded_file($fileatt)) {
  // Read the file to be attached ('rb' = read binary)
  $file = fopen($fileatt,'rb');
  $data = fread($file,filesize($fileatt));
  fclose($file);

  // Generate a boundary string
  $semi_rand = md5(time());
  $mime_boundary = ==Multipart_Boundary_x{$semi_rand}x;

  // Add the headers for a file attachment
  $messaggio = \nMIME-Version: 1.0\n .
  Content-Type: multipart/mixed;\n .
   boundary=\{$mime_boundary}\;

  // Add a multipart boundary above the plain message
  $messaggio .= This is a multi-part message in MIME format.\n\n .
 --{$mime_boundary}\n .
 Content-Type: text/plain; charset=\iso-8859-1\\n .
 Content-Transfer-Encoding: 7bit\n\n .
 $messaggio . \n\n;

  // Base64 encode the file data
  $data = chunk_split(base64_encode($data));

  // Add file attachment to the message
  $messaggio .= --{$mime_boundary}\n .
  Content-Type: {$fileatt_type};\n .
   name=\{$fileatt_name}\\n .
  //Content-Disposition: attachment;\n .
  // filename=\{$fileatt_name}\\n .
  Content-Transfer-Encoding: base64\n\n .
  $data . \n\n .
  --{$mime_boundary}--\n;
}

// Send the message
include(header.php);
SendMail($ml, $member_mail, $oggetto, $messaggio, $linkpage);
echoh2brbrbrbr$message_success/h2brbrbrbr\n;
break;

---Sendmail Function-
function SendMail($from_address, $to_address, $subject_mail, $message_mail,
$site_address){
$from=$from_address;
$to =$to_address;
$subject=$subject_mail;
$message=$message_mail;


// removes html tags and whitespace from input data
$to =strip_tags(trim($to));
$subject =strip_tags(trim($subject));
$from =strip_tags(trim($from));

$message .=\n\n;
$message .=\n-\n;
$message .= $site_address\n;
$message .= $headers\n;
$from_address=[EMAIL PROTECTED];
@$send=mail($to,$subject,$message,From: $from_address\r\nReply-To:
$from_address\r\nX-Mailer: ADP_FormMail);
}
---End Sendmail function

---End Code




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



Re: [PHP] Theme selector?

2003-04-01 Thread Steve Keller
At 3/30/2003 12:42 PM, Lars Tvedt wrote:

 i would have used templates: heres one http://smarty.php.net

 Liam Gibbs [EMAIL PROTECTED] wrote in message
  I'd store your themes in stylesheets instead.
Question, Lars, does Smarty allow for easy template changing? I haven't 
used it very much.

Otherwise, if you're using CSS-P for your site, it'd be a snap just to 
store a cookie that includes which CSS file the user wants for their theme 
and just change the header.

style type=text/css media=all@import ?
$cookieValue = $_COOKIE['templatecookie'];
echo $cookieValue; ?.css;/style
--
S. Keller
UI Engineer
The Health TV Channel, Inc.
(a non - profit organization)
3820 Lake Otis Pkwy.
Anchorage, AK 99508
907.770.6200 ext.220
907.336.6205 (fax)
Email: [EMAIL PROTECTED]
Web: www.healthtvchannel.org
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Fusebox: now easier to go to/fro PHP and Lasso

2003-04-01 Thread Bill Doerrfeld
Thought some of your advanced developers may be interested in this.

If you're looking for a structured application framework and 
methodology to aid the development and maintenance of your Web 
application development projects, you may be interested to learn that 
the popular Fusebox framework and methodology is know available for 
both PHP and Lasso.

Using this framework, it's easy to take Fusebox-compliant solutions 
built for ColdFusion, PHP, JSP and JSP and switch to/fro Lasso for 
enhanced productivity. Or, you can just use Fusebox for all of your 
Web projects for enhanced control.

If you're new to the idea of using a structured framework and 
methodology, you owe it to yourself to check this out.

Last bit of info, the Fusebox framework and methodology is FREE!

For details, see 
http://www.blueworld.com/blueworld/news/04.01.03-FuseBox.html.

Enjoy!

Bill
--
-
Bill Doerrfeld[EMAIL PROTECTED]
Blue World Communications, Inc.   http://www.blueworld.com/
-
 Build and serve powerful data-driven Web sites
  with Lasso Studio and Lasso Professional.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP Email Attachment problem

2003-04-01 Thread Jason Wong
On Wednesday 02 April 2003 03:33, Mike wrote:

 I want to send an email attachment using PHP and the below code works
 locally but when i upload to my RAQ Cobalt server it doesn't send the
 attachment and i can't figure out why. If you can offer me any guidance as
 to why this is happening it is greatly appreciated.
 **The sendmail is a custom function listed below also, not the one inherent
 to PHP.**

[snip]

1) How does the server setups differ?

2) How does your code not work?

-- 
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
--
/*
This isn't brain surgery; it's just television.
- David Letterman
*/


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



[PHP] Html forms to php scripts

2003-04-01 Thread VanZee, Timothy
I have the following issue between my html forms and php scripts.

Html file (input.html) looks like this:
form action=input.php method=post
  input type=text name=ttt
  pinput type=submit name=submit value=Submit/p
/form

Php file (input.php) looks like this:
?
echo $ttt;
?

I can input text (i.e. superman) and then click submit.  The resulting
php page returns:

supermanttt=superman

It seems to me that it must be something in the php.ini file that needs
to be changed, but I can't identify what exactly.  Any help would be
appreciated.

php 4.2.2


Tim Van Zee
ITS Network Specialist
Governors State University




[PHP] getting values from objects

2003-04-01 Thread Charles Kline
hi there,

if this:

$res_pform-getSubmitValue(investigator5);

returns an array, how do I get to the individual values in that array 
without first setting it to a variable like:

$myvar = $res_pform-getSubmitValue(investigator5);

echo $myvar['field'];

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


RE: [PHP] PHPSESSID Handling...

2003-04-01 Thread John W. Holmes
 I'm working on securing my application, and am running into a slight
issue
 that I cannot seem to find a fix for. If the attacker changes his
 PHPSESSID
 cookie to contain illegal characters, it causes an error on the screen
 upon
 session_start().
 
 How can I check to see if this is a valid number, and if it is not,
exit
 the
 application?

if(ereg('[^0-9a-f]',$_REQUEST['PHPSESSID']))
{ die(Error in session id); }

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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



Re: [PHP] getting values from objects

2003-04-01 Thread Jason Wong
On Wednesday 02 April 2003 03:58, Charles Kline wrote:

 $res_pform-getSubmitValue(investigator5);

 returns an array, how do I get to the individual values in that array
 without first setting it to a variable like:

 $myvar = $res_pform-getSubmitValue(investigator5);

 echo $myvar['field'];

You can try:

 list($field1, $field2, ...) = $res_pform-getSubmitValue(investigator5);

-- 
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
--
/*
e-credibility: the non-guaranteeable likelihood that the electronic data 
you're seeing is genuine rather than somebody's made-up crap.
- Karl Lehenbauer
*/


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



Re: [PHP] getting values from objects

2003-04-01 Thread Charles Kline
My objective was to try and NOT use a temporary variable.

for example I can do this:

foreach ($res_pform-getSubmitValue(investigator5) AS $k=$v){
echo $k . br;
}
I was just wondering in other circumstances, how I can maybe just get 
to the value of one of the keys without setting it first to a variable 
(which is the only way I know how to now).

Thanks,
Charles
On Tuesday, April 1, 2003, at 03:18 PM, Dan Joseph wrote:

Have you tried:

extract ($myvar = $res_pform-getSubmitValue(investigator5));

-Dan Joseph

-Original Message-
From: Charles Kline [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 2:58 PM
To: [EMAIL PROTECTED]
Subject: [PHP] getting values from objects
hi there,

if this:

$res_pform-getSubmitValue(investigator5);

returns an array, how do I get to the individual values in that array
without first setting it to a variable like:
$myvar = $res_pform-getSubmitValue(investigator5);

echo $myvar['field'];

thanks
charles
--
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] use web hyperlink to insert data into MySQL?

2003-04-01 Thread Levi Zander
I am trying to use PHP to create a hyperlink button that writes data to
MySQL database and sends the user to a new page.. is this possible?  if so
would you post the syntax/site where I can find out how to do this... thx!



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



Re: [PHP] PHP Email Attachment problem

2003-04-01 Thread Michael Arena
the only difference in the server setup is on my remote server it's a RAQ
and locally i'm using Xitami with PHP. I don't understand why it won't send.
I get the email over the RAQ but no attachment...are there any other
settings that could differ that I would need to set? Like in the php.ini
file?

Thanks,
Mike


- Original Message -
From: Jason Wong [EMAIL PROTECTED]
Newsgroups: php.general
To: [EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 2:49 PM
Subject: Re: [PHP] PHP Email Attachment problem


 On Wednesday 02 April 2003 03:33, Mike wrote:

  I want to send an email attachment using PHP and the below code works
  locally but when i upload to my RAQ Cobalt server it doesn't send the
  attachment and i can't figure out why. If you can offer me any guidance
as
  to why this is happening it is greatly appreciated.
  **The sendmail is a custom function listed below also, not the one
inherent
  to PHP.**

 [snip]

 1) How does the server setups differ?

 2) How does your code not work?

 --
 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
 --
 /*
 This isn't brain surgery; it's just television.
 - David Letterman
 */




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



[PHP] Humour in programming?

2003-04-01 Thread Liam Gibbs
Sorry if this is OT, but... heheheh... has anyone taken a look at the PHP site? Check 
out the upper-left corner. Who is that? Nice to know the guys at PHP can have a laugh.


[PHP] Stylesheets, are they run?

2003-04-01 Thread Liam Gibbs
Here I go again with the stylesheets. ;) Anyway, if a user has stylesheets turned off, 
is a stylesheet file even run? Like, if I have them turned off and I have a 
stylesheet, say, SS.php. Will SS.php run or will it be ignored altogether?


[PHP] whats this!!!!

2003-04-01 Thread Chris Edwards
read: http://php.weblogs.com/

-- 
Chris Edwards
Web Application Developer
Outer Banks Internet, Inc.
252-441-6698
[EMAIL PROTECTED]
http://www.OuterBanksInternet.com


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



RE: [PHP] Humour in programming?

2003-04-01 Thread Sysadmin
Yeah...check out the phpinfo() function on your machine

? phpinfo(); ?

-Original Message-
From: Liam Gibbs [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 3:36 PM
To: php list
Subject: [PHP] Humour in programming?


Sorry if this is OT, but... heheheh... has anyone taken a look at the 
PHP site? Check out the upper-left corner. Who is that? Nice to know 
the guys at PHP can have a laugh.


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



RE: [PHP] whats this!!!!

2003-04-01 Thread Clint Tredway
This has to be an April Fools joke..

-Original Message-
From: Chris Edwards [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 2:36 PM
To: [EMAIL PROTECTED]
Subject: [PHP] whats this


read: http://php.weblogs.com/

-- 
Chris Edwards
Web Application Developer
Outer Banks Internet, Inc.
252-441-6698
[EMAIL PROTECTED]
http://www.OuterBanksInternet.com


-- 
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] File Searching problem

2003-04-01 Thread Poon, Kelvin (Infomart)
Hi,

I need to work on a tiny little program, and was wondering if anyone could
help me.

I need just a simple program that searches a phrase (inputted by the user in
a form) from all the php files in the directory.  Let's say the user inputed
How to Log on to XXX, then my programs needs to search this phrase in all
of the php files that are in the directory.  

My problem is I don't know how to open all of the files in the directory,
since I don't know the name of the files.  These php files keep updating,
and the names would be KB_XX.php, where XX is the ID of that
particular file.  I need to open ALL of these files and search the phrase in
it.  Any body have any idea how I can open these files?  I am probably going
to be using RE to search, so maybe I can use fread() to store a file in a
variable and search one file at a time.

Please Advice.

Thanks
Kelvin

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



Re: [PHP] Humour in programming?

2003-04-01 Thread Aaron Gould
Hehe, I though something was wrong with my machine when I checked out
phpinfo() on one of my boxes today.  It didn't even occur to me that it
might be related to April Fools.

I know it's usually the PHP logo, but how is that picture generated anyway?

--
Aaron Gould
Web Developer
Parts Canada


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 3:32 PM
Subject: RE: [PHP] Humour in programming?


 Yeah...check out the phpinfo() function on your machine

 ? phpinfo(); ?

 -Original Message-
 From: Liam Gibbs [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 01, 2003 3:36 PM
 To: php list
 Subject: [PHP] Humour in programming?


 Sorry if this is OT, but... heheheh... has anyone taken a look at the
 PHP site? Check out the upper-left corner. Who is that? Nice to know
 the guys at PHP can have a laugh.


 --
 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] Humour in programming?

2003-04-01 Thread Sysadmin
Yeah, same thing happened to me last year.  I was freaking out, thought 
my box had been hacked.  Then it hit me...April Fools day...

-Original Message-
From: Aaron Gould [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 3:37 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: [PHP] Humour in programming?


Hehe, I though something was wrong with my machine when I checked out
phpinfo() on one of my boxes today.  It didn't even occur to me that it
might be related to April Fools.

I know it's usually the PHP logo, but how is that picture generated 
anyway?

--
Aaron Gould
Web Developer
Parts Canada


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 3:32 PM
Subject: RE: [PHP] Humour in programming?


 Yeah...check out the phpinfo() function on your machine

 ? phpinfo(); ?

 -Original Message-
 From: Liam Gibbs [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 01, 2003 3:36 PM
 To: php list
 Subject: [PHP] Humour in programming?


 Sorry if this is OT, but... heheheh... has anyone taken a look at the
 PHP site? Check out the upper-left corner. Who is that? Nice to know
 the guys at PHP can have a laugh.


 --
 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] whats this!!!!

2003-04-01 Thread Bryan Brannigan
the world has come to an end :-P

- Original Message - 
From: Chris Edwards [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 3:35 PM
Subject: [PHP] whats this


 read: http://php.weblogs.com/
 
 -- 
 Chris Edwards
 Web Application Developer
 Outer Banks Internet, Inc.
 252-441-6698
 [EMAIL PROTECTED]
 http://www.OuterBanksInternet.com
 
 
 -- 
 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] Humor in programming?

2003-04-01 Thread Daniel Negron/KBE

I noticed a similar thing in phpinfo(); in php 4.3.1, there is a dog in
place of the php logo


Thank you,


---
-Daniel Negron

  // \\*
 /  _  __ ___  \Lotus Notes Admin / Developer
|  | |/ /| _ )  |   KB Electronic, Inc.
|  | '  | _ \  |   12095 NW 39th Street
|  |_|\ \|___/  |   Coral Springs, FL. 33065
 \ \_\ /954.346.4900 x 122
  \\ // email: [EMAIL PROTECTED]

-   http://www.kbelectronics.com
---



|+--
||  Aaron Gould   |
||  [EMAIL PROTECTED]|
||  anada.com  |
||  |
||  04/01/2003 03:36|
||  PM  |
||  Please respond  |
||  to Aaron Gould|
||  |
|+--
  
|
  |
|
  |  To: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] 
 |
  |  cc:   
|
  |  Subject: Re: [PHP] Humour in programming? 
|
  
|




Hehe, I though something was wrong with my machine when I checked out
phpinfo() on one of my boxes today.  It didn't even occur to me that it
might be related to April Fools.

I know it's usually the PHP logo, but how is that picture generated anyway?

--
Aaron Gould
Web Developer
Parts Canada


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 3:32 PM
Subject: RE: [PHP] Humour in programming?


 Yeah...check out the phpinfo() function on your machine

 ? phpinfo(); ?

 -Original Message-
 From: Liam Gibbs [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 01, 2003 3:36 PM
 To: php list
 Subject: [PHP] Humour in programming?


 Sorry if this is OT, but... heheheh... has anyone taken a look at the
 PHP site? Check out the upper-left corner. Who is that? Nice to know
 the guys at PHP can have a laugh.


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



Re: [PHP] Humour in programming?

2003-04-01 Thread Kevin Stone
The image is grabbed from their servers.

- Original Message -
From: Aaron Gould [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 1:36 PM
Subject: Re: [PHP] Humour in programming?


 Hehe, I though something was wrong with my machine when I checked out
 phpinfo() on one of my boxes today.  It didn't even occur to me that it
 might be related to April Fools.

 I know it's usually the PHP logo, but how is that picture generated
anyway?

 --
 Aaron Gould
 Web Developer
 Parts Canada


 - Original Message -
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Tuesday, April 01, 2003 3:32 PM
 Subject: RE: [PHP] Humour in programming?


  Yeah...check out the phpinfo() function on your machine
 
  ? phpinfo(); ?
 
  -Original Message-
  From: Liam Gibbs [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, April 01, 2003 3:36 PM
  To: php list
  Subject: [PHP] Humour in programming?
 
 
  Sorry if this is OT, but... heheheh... has anyone taken a look at the
  PHP site? Check out the upper-left corner. Who is that? Nice to know
  the guys at PHP can have a laugh.
 
 
  --
  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



[PHP] security flaw?

2003-04-01 Thread Edward Peloke
Hello all,

As part of my website, I need to allow the users to upload data from an
access db to my mysql db.  This is all done with a small delphi utility by
way of odbc.  The problem is, my webhost will only allow me to have one user
set up for the db so when I set up the odbc connection for the client (by
way of an install), I have to set up the main username to the db and the
main password.  When I go back into odbc, the password appears to be hidden
from the user but is it really?  How can I give them access into this table
without such a security risk?

Thanks,
Eddie


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



RE: [PHP] Humour in programming?

2003-04-01 Thread Sysadmin
By PHP?  The HTML source points to 
my.server.com/script.php?=PHPE9568F36-D428-11d2-A769-00AA001ACF42

-Original Message-
From: Kevin Stone [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 3:43 PM
To: Aaron Gould; [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Subject: Re: [PHP] Humour in programming?


The image is grabbed from their servers.

- Original Message -
From: Aaron Gould [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 1:36 PM
Subject: Re: [PHP] Humour in programming?


 Hehe, I though something was wrong with my machine when I checked out
 phpinfo() on one of my boxes today.  It didn't even occur to me that 
it
 might be related to April Fools.

 I know it's usually the PHP logo, but how is that picture generated
anyway?

 --
 Aaron Gould
 Web Developer
 Parts Canada


 - Original Message -
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Tuesday, April 01, 2003 3:32 PM
 Subject: RE: [PHP] Humour in programming?


  Yeah...check out the phpinfo() function on your machine
 
  ? phpinfo(); ?
 
  -Original Message-
  From: Liam Gibbs [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, April 01, 2003 3:36 PM
  To: php list
  Subject: [PHP] Humour in programming?
 
 
  Sorry if this is OT, but... heheheh... has anyone taken a look at 
the
  PHP site? Check out the upper-left corner. Who is that? Nice to know
  the guys at PHP can have a laugh.
 
 
  --
  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


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



Re: [PHP] Humour in programming?

2003-04-01 Thread Aaron Gould
Exactly...  it seems to be generated in code somehow?
--
Aaron Gould
[EMAIL PROTECTED]
Web Developer
Parts Canada


- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 3:47 PM
Subject: RE: [PHP] Humour in programming?


 By PHP?  The HTML source points to
 my.server.com/script.php?=PHPE9568F36-D428-11d2-A769-00AA001ACF42

 -Original Message-
 From: Kevin Stone [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 01, 2003 3:43 PM
 To: Aaron Gould; [EMAIL PROTECTED]; [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Subject: Re: [PHP] Humour in programming?


 The image is grabbed from their servers.

 - Original Message -
 From: Aaron Gould [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Sent: Tuesday, April 01, 2003 1:36 PM
 Subject: Re: [PHP] Humour in programming?


  Hehe, I though something was wrong with my machine when I checked out
  phpinfo() on one of my boxes today.  It didn't even occur to me that
 it
  might be related to April Fools.
 
  I know it's usually the PHP logo, but how is that picture generated
 anyway?
 
  --
  Aaron Gould
  Web Developer
  Parts Canada
 
 
  - Original Message -
  From: [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
  Sent: Tuesday, April 01, 2003 3:32 PM
  Subject: RE: [PHP] Humour in programming?
 
 
   Yeah...check out the phpinfo() function on your machine
  
   ? phpinfo(); ?
  
   -Original Message-
   From: Liam Gibbs [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, April 01, 2003 3:36 PM
   To: php list
   Subject: [PHP] Humour in programming?
  
  
   Sorry if this is OT, but... heheheh... has anyone taken a look at
 the
   PHP site? Check out the upper-left corner. Who is that? Nice to know
   the guys at PHP can have a laugh.
  
  
   --
   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


 --
 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] Humour in programming?

2003-04-01 Thread Hatem Ben
hehe and the good news, ppl don't have to upgrade to the latest PHP 2.0.2
... coz the php 2.0.1 don't seems to be seriously buggy ;-)

Cheers,
Hatem

- Original Message -
From: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 10:40 PM
Subject: RE: [PHP] Humour in programming?


 Yeah, same thing happened to me last year.  I was freaking out, thought
 my box had been hacked.  Then it hit me...April Fools day...

 -Original Message-
 From: Aaron Gould [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, April 01, 2003 3:37 PM
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED];
 [EMAIL PROTECTED]
 Subject: Re: [PHP] Humour in programming?


 Hehe, I though something was wrong with my machine when I checked out
 phpinfo() on one of my boxes today.  It didn't even occur to me that it
 might be related to April Fools.

 I know it's usually the PHP logo, but how is that picture generated
 anyway?

 --
 Aaron Gould
 Web Developer
 Parts Canada


 - Original Message -
 From: [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
 Sent: Tuesday, April 01, 2003 3:32 PM
 Subject: RE: [PHP] Humour in programming?


  Yeah...check out the phpinfo() function on your machine
 
  ? phpinfo(); ?
 
  -Original Message-
  From: Liam Gibbs [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, April 01, 2003 3:36 PM
  To: php list
  Subject: [PHP] Humour in programming?
 
 
  Sorry if this is OT, but... heheheh... has anyone taken a look at the
  PHP site? Check out the upper-left corner. Who is that? Nice to know
  the guys at PHP can have a laugh.
 
 
  --
  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



Re: [PHP] use web hyperlink to insert data into MySQL?

2003-04-01 Thread Hugh Danaher
Levi,
Very easy to do exactly what you want using php
1. write your link to a php page (described below) which includes the items
you want stored appended to the link a
href=page.php?var1=somethingvar2=something_elsego to next page/a
2. create a php page which contains the following:
?php
$var1=$_GET['var1']; // converts $_GET[] var to something easier to type
; )
$var2=$_GET['var2'];
'evaluate var1 and var2 with conditional statements'
'open your mysql database' // you'll need to put your code here
$result=mysql_query(insert into table_name (var1, var2) values
('$var1', '$var2') ); // stores data
mysql_close($link);
header(location: another_page.htm);  // sends user to your next page.
php?

Easy enough, but you'll need a form if you want user supplied info.  Also,
since the appended data could be altered before sent, this method is not
secure from tampering.  You'll need to evaluate the input to determine that
it's what you expect.
Hugh


- Original Message -
From: Levi Zander [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 12:21 PM
Subject: [PHP] use web hyperlink to insert data into MySQL?


 I am trying to use PHP to create a hyperlink button that writes data to
 MySQL database and sends the user to a new page.. is this possible?  if so
 would you post the syntax/site where I can find out how to do this... thx!



 --
 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] whats this!!!!

2003-04-01 Thread Jason k Larson
It's an April Fools joke ... nicely done too.

Chris Edwards wrote:
read: http://php.weblogs.com/



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


Re: [PHP] Stylesheets, are they run?

2003-04-01 Thread Leif K-Brooks
Most likely not, but this has to do with the browser and not PHP.

Liam Gibbs wrote:

Here I go again with the stylesheets. ;) Anyway, if a user has stylesheets turned off, is a stylesheet file even run? Like, if I have them turned off and I have a stylesheet, say, SS.php. Will SS.php run or will it be ignored altogether?

 

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.


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


RE: [PHP] Stylesheets, are they run?

2003-04-01 Thread Clint Tredway
Your ss.php will still run, but the browser will not render the styles in
the page.

Clint

-Original Message-
From: Leif K-Brooks [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 3:49 PM
To: Liam Gibbs
Cc: php list
Subject: Re: [PHP] Stylesheets, are they run?


Most likely not, but this has to do with the browser and not PHP.

Liam Gibbs wrote:

Here I go again with the stylesheets. ;) Anyway, if a user has stylesheets
turned off, is a stylesheet file even run? Like, if I have them turned off
and I have a stylesheet, say, SS.php. Will SS.php run or will it be ignored
altogether?

  


-- 
The above message is encrypted with double rot13 encoding.  Any unauthorized
attempt to decrypt it will be prosecuted to the full extent of the law.




-- 
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] Stylesheets, are they run?

2003-04-01 Thread Leif K-Brooks
Not true, any decently-optimized browser won't fetch a style sheet it 
doesn't plan to use.

Clint Tredway wrote:

Your ss.php will still run, but the browser will not render the styles in
the page.
Clint

-Original Message-
From: Leif K-Brooks [mailto:[EMAIL PROTECTED]
Sent: Tuesday, April 01, 2003 3:49 PM
To: Liam Gibbs
Cc: php list
Subject: Re: [PHP] Stylesheets, are they run?
Most likely not, but this has to do with the browser and not PHP.

Liam Gibbs wrote:

 

Here I go again with the stylesheets. ;) Anyway, if a user has stylesheets
   

turned off, is a stylesheet file even run? Like, if I have them turned off
and I have a stylesheet, say, SS.php. Will SS.php run or will it be ignored
altogether?
 



   

 

--
The above message is encrypted with double rot13 encoding.  Any unauthorized attempt 
to decrypt it will be prosecuted to the full extent of the law.



[PHP] UTF-8 encoding/decoding

2003-04-01 Thread Michael Mulligan
Hi

So say I have some UTF-8 (not certain, but probably in UTF-8 format, I need
to check some more) encoded text. The text comes in encoded already, so it's
not an htmlspecialchars kind of quick fix. For instance, I get 'ê' and I
want to output 'ê'--how do I convert from the two high ASCII characters to
the one special character? Are their built-in functions for this?

Thanks in advance 

-m^2

__
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me
spread!
__ 



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



Re: [PHP] Files uploads problem

2003-04-01 Thread Adrian Greeman
Thank you very much - you are very observant and have just taught me a good
lesson about checking minor errors even outside the obvious PHP code.  It
works now except for the
unlink as you said.


Regards
Adrian Greeman



 Original Message -
From: Kevin Stone [EMAIL PROTECTED]
To: Adrian Greeman [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Monday, March 31, 2003 11:37 PM
Subject: Re: [PHP] Files uploads problem



 - Original Message -
 From: Adrian Greeman [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Monday, March 31, 2003 3:04 PM
 Subject: [PHP] Files uploads problem


snip  
  But I am having real trouble making a file upload programme work. It
needs
  substitution of $FileName given in the example with $_FILES array values
  which I have done and use of isset instead of a raw if().  But I still
  cannot get it to work
 
  May I put the code here and ask if anyone can tell me the problem.
.. 




 Couple of HTML problems to point out.  Where you have br // form\n,
/
 form is an invalid tag.  Remove the space.  Also where you have
 enctype=\multipart/form-data\ you need quotes after the slashes (ie.
\)
 otherwise PHP is going to assume that you want the litteral slash in the
 HTML.

 Niether of these errors will return visable error code but both will
result
 in you not being able to submit the form.

 Also when you go to unlink($File); you're going to see an error becuase
 $File is not a valid file path, it's an array.  Besides you shouldn't
worry
 about trying to clean up the temp file.  PHP will do it automatically when
 the script exists.  :-)

 HTH,
 Kevin/snip






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



[PHP] getimagesize

2003-04-01 Thread Sebastian
little problem with getimagesize function. I have a form upload and want the
images resized only if greater than 1024, if greater than 1024 then i want
it to resized, the problem is i do not know if getimagesize is getting the
form data:


FORM action= encType=multipart/form-data method=post name=sendform
INPUT name=MAX_FILE_SIZE type=hidden value=1000
INPUT maxLength=128 name=image type=file ACCEPT=image/jpeg, image/jpg
INPUT name=Submit type=submit value=Submit
INPUT name=Reset  type=reset value=Reset

// some if's ...

$imagewidth = getimagesize($form_data);

if($imagewidth[0] = 1024) {
$img_width  = 1024;
} else {
$img_width  = *;
}

// rest of the script to resize...

so an i doing it the proper way of getting $form_data?


cheers,
- Sebastian


  1   2   >