[PHP] Amount of memory per user

2004-03-08 Thread Cesar Cordovez
Hi List!

I was just wondering...  How can I know how much memory my scrips are 
using per connection, thread, or user?

TIA

Cesar

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


Re: [PHP] Notify about your e-mail account utilization.

2004-03-04 Thread Cesar Cordovez
And I suppose this is a virus?  (They are getting smart, huh?)

[EMAIL PROTECTED] wrote:

Dear user of e-mail server Php.net,

Some  of  our clients complained about the spam  (negative e-mail content)
outgoing from your e-mail account. Probably, you have been infected  by
a  proxy-relay trojan server. In order to keep your computer safe,
follow the  instructions.
Further details can be obtained from attached file.

For security purposes the attached file is password protected. Password  is 21553.

Kind regards,
   The Php.net team   http://www.php.net

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


Re: [PHP] pathinfo() basename()

2004-02-04 Thread Cesar Cordovez
extension is a string, $fullpath (parameter 1) is not.  It is an array!

Cesar =)

John Taylor-Johnston wrote:

I'm getting this error:

Warning: basename() expects parameter 1 to be string, array given in /home/users/q/qx04t9mu/www/calendars/test3.php on line 8

What did I do wrong? $extension is a string?!

line 2$fullpath = pathinfo($_SERVER[SCRIPT_FILENAME]);
line 3echo $fullpath[extension] . br\n;  #echoes php
line 4
line 5$extension = $fullpath[extension];
line 6
line 7echo $extension . br\n; #echoes php
line 8$filename = basename($fullpath, $extension);
line 9echo $filename . br\n;


http://ca3.php.net/manual/en/function.pathinfo.php
http://www.php.net/manual/en/function.basename.php


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


Re: [PHP] Document generation from XML

2004-02-03 Thread Cesar Cordovez
I had exactly the same problem some time ago...  My solution was very 
similiar of what you are trying to do, but my internal format is not 
XML but a group of arrays (faster processing).  Then using some OOP I 
created the diferent output formats for my reports, therefore I have a 
microsoft excel object, a pdf object, a html, an xml object, etc.  (you 
get the idea).



Russell Seymour wrote:

Good evening list,

I apologise profusely if after reading anyone thinks that is OT, but I
relally need some pointers with a project I am working on.  I have searched
the Internet for information on XML document generation but there is too
much information that I cannot decide which way to go.  Thanks lots in
advance.
I am currently writing a web based application using PHP that created
reports on the fly from a multitude of data sources.
In the beginning only one output format was required, HTML and then PDF was
a requirement.  More and more formats are now required by my users and
rather than create a new output script for each different format I am
thinking about outputting the final report as XML and then putting that
through 'something' to render in the format that I require.
However I am unclear as to the best way to do this as there seems to be many
different ways.  I have looked at using Apache FOP and DocBook, but they all
spawn off in different directions and bringing in other things such as Jade.
This post maybe slightly OT, but if nayone has any pointers on how I amy go
about doing this I would be very very grateful.
Thanks very much.

Russell

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


[PHP] Urgent: PHP Programmer

2004-02-02 Thread Cesar Cordovez
REQ-2004-01
Programmer I
Position reference #166370
Job will go offline on 2/26/2004
ALeNet, Inc. is a privately held firm based in Coral Gables, Florida. We 
are a leading provider of enterprise system consulting services in the 
areas of eBusiness, enterprise resource planning (ERP) and customer 
relationship management (CRM).

ALeNet has teamed up with leading technology providers to offer the most 
comprehensive, integrated suite of ERP, CRM and web solutions available 
today.

Our industry recognized IT professionals will focus your ERP, CRM and 
e-business strategy efforts to achieve the greatest possible return on 
investment (ROI) and highest levels of customer service.

Qualifications
* Knowledge of: PHP (min. 5 years experience)
* HTML+CSS+JavaScript is a must.
* OOP
* SQL or MySQL (preferred)
Position description
Under the general supervision of the Product Development Manager, 
reviews, analyzes, and modifies programming systems including encoding, 
testing, debugging and installing to support an organization's business 
applications. Gathers requirements from users and creates specifications 
and develops code. Designs and writes codes to support existing 
application. Familiar with standard concepts, practices, and procedures 
using PHP, MySQL, HTML, and JavaScript. Relies on limited experience and 
judgment to plan and accomplish goals. Performs a variety of IT related 
tasks.

Additional information

Locations :  Miami, Fort Lauderdale,FL, United States
Percentage travel :  No Travel
Position starts :  2/15/2004
Openings available :  3
Work Types :  FullTime, Regular, Paid
Contact information

Cesar Cordovez
501 Brickell Key Drive
Suite 203
Miami, FL, United States
33131
Primary Phone : (305) 379- Ext: 15
Email : [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Encoding for uploaded files

2004-01-29 Thread Cesar Cordovez
Hi list!

How can I know the encoding for an uploaded file?

Thanks!

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


Re: [PHP] Encoding for uploaded files

2004-01-29 Thread Cesar Cordovez
I don't know if you are right here, or maybe I don't understood 
correctly... the file type is actually the encoding of the file?  If a 
file type is text/plain, where is the encoding format?  ISO-8859-1?

Puzzled!

Cesar

craig wrote:

check out http://www.php.net/manual/en/features.file-upload.php,
it spells out the entire upload process
specifally, you want:
$_FILES['userfile']['type'] = The mime type of the file, if 
the browser provided this information. An example would 
be image/gif. 

-Craig


-Original Message-
From: Cesar Cordovez [mailto:[EMAIL PROTECTED]
Sent: January 29, 2004 10:35 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Encoding for uploaded files
Hi list!

How can I know the encoding for an uploaded file?

Thanks!

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



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


Re: [PHP] Tip For The Day

2004-01-28 Thread Cesar Cordovez
Jay Blanchard wrote:
I think that you meant to its already been broughten!, didn't you? Did
you know that you will find that bracing style has been debated since
the days of FORTRAN?


Oh! Fortran 77!  I remember those times! =)  And I still think inline 
braces wins hands down!!!

Cesar

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


Re: [PHP] pass by reference

2004-01-23 Thread Cesar Cordovez


Kevin Waterson wrote:

This one time, at band camp, Justin French [EMAIL PROTECTED] wrote:



In other words, you HTML source looks like this:

img src='images.php?id=45'

NOT

img src='{RAW BINARY DATA HERE}'
Kevin, et all.

Can this be posible? I mean img src='{RAWDATA}' where RAWDATA beening 
any image?

Cesar

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


Re: [PHP] How New Is HERE?

2003-12-26 Thread Cesar Cordovez
Change:

$txtBoxCounter = $_POST['txtBoxCounter]
$hdnCounter = $_POST['hdnCounter]
to

$txtBoxCounter = $_POST['txtBoxCounter'];
$hdnCounter = $_POST['hdnCounter'];
(Notice the ' at the end of txtBoxCounter and hdnCounter.

Merry X'mas

[EMAIL PROTECTED] wrote:
Okay, for everyone took a break for Christmas, and to update Jasper and
Jeremy--who've tried big-time to help me--here's again the sitch and where
I stand as of now.
I'm on a Macintosh PowerBook running OS X.2.1 and PHP 4.3.0. I'm tryning to
run the following code:
html
head
title
persistence demo
/title
/head
body

h1Persistence Demo/h1
form
?php
//increment the counters
$txtBoxCounter++;
$hdnCounter++;
print HERE

input type = text
name = txtBoxCounter
value = $txtBoxCounter
input type = hidden
name = hdnCounter
value = $hdnCounter
h3The hidden value is $hdnCounter/h3
input type = submit
value = click to increment counters
HERE;
?

/form
/body
/html
What that gets me is:

Parse error: parse error, unexpected $ in [my path to this file] on line 33

register_globals is, of course, off. So I add $txtBoxCounter =
$_POST['txtBoxCounter] and $hdnCounter = $_POST['hdnCounter] as separate
line right after ?php. And that gets me an unexpected TVARIABLE message.
Anyone, please?

Thank you.

Steve Tiano


mail2web - Check your email from the web at
http://mail2web.com/ .
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] How New Is HERE?

2003-12-26 Thread Cesar Cordovez
Please post your code from line 30 to 40.  Place a mark in line 34.

=)



[EMAIL PROTECTED] wrote:
parse error: parse error, unexpected $ in [my path to this file] on line 34
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Addslashes limit

2003-12-17 Thread Cesar Cordovez
HI!

Is it just me or addslahes truncates the result to 65535 chars?  Any 
comments? Or can it be that a blob field in a MySQL database is just 
65535 chars, I don't think so...

Cesar.

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


Re: [PHP] Addslashes limit [SOLVED]

2003-12-17 Thread Cesar Cordovez
Hi.

Turns out that addslashes is not guilty of truncating it's result. 
Marek is right here.  Changed the type of the field from BLOB to 
LONGBLOB and everything works great!

Thanks!

Marek Kilimajer wrote:
Cesar Cordovez wrote:

HI!

Is it just me or addslahes truncates the result to 65535 chars?  Any 
comments? Or can it be that a blob field in a MySQL database is just 
65535 chars, I don't think so...

Cesar.

BLOB is just 65535 chars. Use MEDIUMBLOB (2^24 bytes) or LONGBLOB (2^32 
bytes). Also textarea field in browsers has a limit.

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


Re: [PHP] Re: mail question (mime)

2003-12-16 Thread Cesar Cordovez
...and talking about mail, is there a class to parse an incoming mail? 
Let me explain: I'm using the great POP3 pear class to receive mail, but 
I'm having trouble separating the different parts in an 
multipart/alternative type of msg.  Is there a class to receive the 
result from POP3 class and convert it into an array of all the specific 
parts of an mail?

Thanks!

Justin Patrin wrote:

You may want to try using PEAR's Mail_Mime class.

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


Re: [PHP] Re: mail question (mime)

2003-12-16 Thread Cesar Cordovez
W cool.  I went there, but I thought this class only worked for 
sending mails.  Great!

Justin Patrin wrote:
Well, you could look for yourself. ;-)
Yes, there is. Mail_Mime does both encoding and decoding.
http://pear.php.net/package/Mail_Mime
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] PHP header command crashes IE6x/PC

2003-12-12 Thread Cesar Cordovez
Somebody, IIRC, told the list that the argument for header(Location... 
has to be a complete url, not just a directory, ie:

header(Location: http://www.alenet.com/;);
exit();
HTH

Cesar

Matt MacLeod wrote:
John,

Have tried this but unfortunately had no effect.

Everything appears to fine if the session variable does not exist ie: 
the user is redirected to the log in page.

It's just when the user has logged in and the session is set that IE 
throws it's toys out of the pram.

Cheers,
Matt
On Friday, December 12, 2003, at 03:15 PM, CPT John W. Holmes wrote:

From: Matt MacLeod [EMAIL PROTECTED]

if (!ISSET($_SESSION['loggedin'])) {
header(Location: /admin/login/);


put exit(); after your header redirect and use a full URL for your 
location.

---John Holmes...

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

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


[PHP] Sync Outlook with MySQL via PHP

2003-12-12 Thread Cesar Cordovez
Hi List.

I need to know how to sync Outlook with MySQL via PHP.  I know this is 
an old topic, but I cant find a clue (is it friday?).  Please advise.

Thanks, Cesar

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


Re: [PHP] What do you say to someone who says...

2003-12-04 Thread Cesar Cordovez
People (and some boots):

I'm not against or in favor of all this stuff, but exactly all the 
opposite... (lmao)

Seriously, there is no kiddie nor professional languages out there, what 
is important is what you do with them.  PHP will power yahoo in a couple 
of months more, that is a company that generates millions of dollars a 
year.  I work on a project 100% made in PHP and MySQL that costs a lot 
of money (6 figures) a copy.

On the other hand, my web site (cesamo.com) has php and costs a little 
more than 0.02 cents.  And actually is not working!

So there you go!  We are all greek!!!

Cesar.

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


Re: [PHP] What do you say to someone who says...

2003-12-04 Thread Cesar Cordovez
I'm byting my tongue off...  I have to resist...  I've signed a do not 
tell anybody thingy...  It is huge, as in database with a million 
records, huge...  But...

I can't tell.  Sorry.  Anyhow, we chose PHP over Java, C++, C#, 
coldfusion and asp to do this.  The process was very simple: it is 
cheap, fast, scalable, cheap, reliable, cheap, easy to program and 
maintain, lots of info source (think this list), cheap, etc.

Cesar

PD.  Did I mention that it is cheap and reliable.  Also, secure and 
cross platform, too.

Chris W. Parker wrote:

Cesar Cordovez mailto:[EMAIL PROTECTED]
on Thursday, December 04, 2003 9:25 AM said:

I work on a project 100% made in PHP and MySQL that
costs a lot of money (6 figures) a copy.


Ok... I can't let this go.

Do tell! What is it? Or at the very least, what does it do?



Chris.
--
Don't like reformatting your Outlook replies? Now there's relief!
http://home.in.tum.de/~jain/software/outlook-quotefix/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] What do you say to someone who says...

2003-12-04 Thread Cesar Cordovez
I was refering that the system we are building will be sold for about a 
half a mill, plus hardware, consultants, instalation, training, 
migration, etc, etc will be about one mill per client.  Huge.

LAMPHP are cheap and reliable.  And we love it.  Our clients love it. 
They don't have to pay a fortune for each client or development station 
(think visual studio) or database hits (think microsoft sql server).

Cesar



CPT John W. Holmes wrote:
From: Cesar Cordovez [EMAIL PROTECTED]

I work on a project 100% made in PHP and MySQL that
costs a lot of money (6 figures) a copy.
PD.  Did I mention that it is cheap and reliable.  


Please tell me in what world is 6 figures considered cheap??

---John Holmes...




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


Re: [PHP] Intuitive Interfaces

2003-11-25 Thread Cesar Cordovez


Chris Shiflett wrote:
Some Web sites I have visited think it is helpful to use some client-side
scripting to move the focus from the first text field to the second after
three numbers have been entered. So, when the user hits tab after entering
the first three numbers, the second text field is skipped entirely.
Isn't this a really terrible thing to do? It's an almost exact analogy to
mangling mail headers. It has the same characteristics:
I think this is the worst thing to do.  If they are going to this jump 
to the next field when this is full script why don't they put one field 
to start with?  Can somebody explain why some developers do this?

cesar

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


Re: [PHP] Add Reply-To to this list(s)

2003-11-25 Thread Cesar Cordovez
I had the same problem here until, I installed Netscape to handle my 
personal mail (this list).  Works great!

Chris: Why don't you give it a try?

Chris W. Parker wrote:
The problem with your theory is that some of us are in corporate
environments where personal email is not allowed and therefore a
separate client would not work. And we especially cannot abandon Outlook
because afaik there are no other email clients that can talk to Exchange
as well as Outlook can.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] duvida com value

2003-11-18 Thread Cesar Cordovez
Mi portugues is very rusty, but I think the solution is:

$url = a href='alterar.php?value= . urlencode($row-nome) . ';

and then print $url where ever you want.  Notice the quotes and single 
quotes around the url.

You can learn more about this on php.net/urlencode

Cesar

Carlos Eduardo wrote:

alguem poderia me ajudar na seguinte duvida..
em uma pagina php tenho esse campo nela.
a href=alterar.php?value=$row-nome
para ele jogar o conteudo da linha nome para a proxima pagina
alterar.php..
mas ele joga apenas por ex:
se o nome é carlos eduardo
vai apenas
carlos , tudo que tem depois do espacamento nao vai para a pagina
alterar.php.
alguem poderia me ajudar com isso ?
Agradeço desde já
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Miami User Group

2003-11-11 Thread Cesar Cordovez
And talking about user groups, is anybody interested in creating a 
Miami/Fort  Lauderdale/Palm Beaches PHP user group?

Contact me, off the list please.

Cesar

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


Re: [PHP] dictionary

2003-11-05 Thread Cesar Cordovez
To the original poster:

The data you posted is not text.  Or it has been encrypted.  I don't 
think that the idea of the dictionary will work.  Keep us posted with 
your findings!  I'll love to see the conclusion.

Cesar

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


[PHP] problem with intval and !=

2003-10-23 Thread Cesar Cordovez
Can somebody explain me why is this happening?

$value = 12.3;
$number = intval($value);
echo Number: $number, Value: $valuebr;
// echoes: Number: 12, Value: 12.3
if ($number != $value) {
echo Bad;
} else {
echo Good;  // echoes Good!!
}
The previous should be echoing Bad.  (I think!)

Cesar

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


Re: [PHP] problem with intval and !=

2003-10-23 Thread Cesar Cordovez
Curt:

My fault!  You are right, but thats not what I want. $value comes from a 
form filled by a user.  I want $value to be an integer.  Not a float. 
So if the user types 12.3 the system has to send an error msg.

Therefore the procedure.

By-the-way, Im using PHP 4.3.3 (on windows XP profesional.  Don't say a 
thing!!! I rather work on my mac!)  =)

Cesar

Curt Zirzow wrote:

* Thus wrote Cesar Cordovez ([EMAIL PROTECTED]):

Can somebody explain me why is this happening?

$value = 12.3;
$number = intval($value);
echo Number: $number, Value: $valuebr;
// echoes: Number: 12, Value: 12.3


I'm guessing you wondering why the .3 is removed.  Thats because
12.3 isn't an integer but a float.
$number = floatval($value);


if ($number != $value) {
echo Bad;
} else {
echo Good;  // echoes Good!!
}
The previous should be echoing Bad.  (I think!)


correct. If you use the floatval() it will echo Good.

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


Re: [PHP] problem with intval and !=

2003-10-23 Thread Cesar Cordovez
The other purpose of this procedure is if the user types 12asdasd into 
$value, $number will be assigned 12 so $value and $number are not the 
same, meaning $value is not a number.  Which is correct, but the 
procedure is not working correctly in PHP when it should.  (It works in 
c, c++, fortran and, believe it or not HyperCard!!!)

Cesar.



Cesar Cordovez wrote:

Curt:

My fault!  You are right, but thats not what I want. $value comes from a 
form filled by a user.  I want $value to be an integer.  Not a float. So 
if the user types 12.3 the system has to send an error msg.

Therefore the procedure.

By-the-way, Im using PHP 4.3.3 (on windows XP profesional.  Don't say a 
thing!!! I rather work on my mac!)  =)

Cesar

Curt Zirzow wrote:

* Thus wrote Cesar Cordovez ([EMAIL PROTECTED]):

Can somebody explain me why is this happening?

$value = 12.3;
$number = intval($value);
echo Number: $number, Value: $valuebr;
// echoes: Number: 12, Value: 12.3


I'm guessing you wondering why the .3 is removed.  Thats because
12.3 isn't an integer but a float.
$number = floatval($value);


if ($number != $value) {
echo Bad;
} else {
echo Good;  // echoes Good!!
}
The previous should be echoing Bad.  (I think!)


correct. If you use the floatval() it will echo Good.

Curt


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


Re: [PHP] problem with intval and !=

2003-10-23 Thread Cesar Cordovez
This is getting weird by the minute.  I changed the script:

if ($number != $value) {
echo Bad;
} else {
echo Good;  // echoes Good!!
}
to:
($number != $value)
($number !== $value)
($number === $value)
and I get the Good stuff...

At this point, I think I have to change the procedure.  This is not 
good.  Any sugestions on how to now if the user types an integer number 
in a field?

Cesar

Curt Zirzow wrote:

* Thus wrote Cesar Cordovez ([EMAIL PROTECTED]):

Curt:

My fault!  You are right, but thats not what I want. $value comes from a 
form filled by a user.  I want $value to be an integer.  Not a float. 
So if the user types 12.3 the system has to send an error msg.


Yeah, after reading merek's response I realized I missed what
exactly your problem is.

Therefore the procedure.

By-the-way, Im using PHP 4.3.3 (on windows XP profesional.  Don't say a 
thing!!! I rather work on my mac!)  =)


Thats odd, I come up with a 'Bad' echo also.  The only thing I can
think of is there is some sort of implicit casting happening to the
$value within the comparison.  But it does seem very strange that
XP would cast but *nix doesn't
In that case test the condition reversed:
  if ($value != $number)
I'm at a loss as to why it doesn't work on your system.

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


Re: [PHP] problem with intval and !=

2003-10-23 Thread Cesar Cordovez
Because is_integer(12thisisnotanumber) retuns true.



Andrea Pinnisi wrote:

why don't you use this??

http://it.php.net/manual/it/function.is-integer.php

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


Re: [PHP] problem with intval and !=

2003-10-23 Thread Cesar Cordovez
Sorry, typo, this is what I meant,

!is_integer(12thisisnotanumber) retuns true.

but also,

is_integer(12) return false.

therefore,

is_integer(12) return true.

So, how can I check if what ever the user writes is an integer or not, 
knowing that he will write it in a string field.

Any how, I solved the problem with preg_match(/^([0-9]+)$/, $value)

Thanks for your help, list

=)

Robert Cummings wrote:

On Thu, 2003-10-23 at 11:41, Cesar Cordovez wrote:

Because is_integer(12thisisnotanumber) retuns true.



Not for me it doesn't. Returns false. Prolly because it's a string. Even
the following returns false for me:
is_integer(12)

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


Re: [PHP] problem with intval [CONCLUSION]

2003-10-23 Thread Cesar Cordovez
Everybody:

This problem solved.  It is not PHP's fault, It is mine. When I fixed 
some problems that I thought where non intrusive in this problem, 
everything started working as a charm.

Here is the finished function, it is part of a class called xValidate.

function integer($msg, $prompt, $value, $min, $max, $name) {
$number = intval($value);

if ($value == ) {
$msg[$prompt] = You have to write a number in this field.;
} elseif (!is_numeric($value)) {
$msg[$prompt] = The contents of this field should be a number.;
} elseif ($value != $number) {
$msg[$prompt] = This number should be an integer.;
} else {
xValidate::number($msg, $prompt, $number, $min, $max, $name);
}
}
and just for the curious here is xValidate::number...

function number($msg, $prompt, $number, $min, $max, $name) {		
	if (!empty($min) and ($number  $min)) {
		$msg[$prompt] = This value should be a number greater than or equal 
to $min.;
	} elseif (!empty($max) and ($number  $max)) {
		$msg[$prompt] = This value should be a number less than or equal to 
$max.;
	}
}

Thanks for your interest,

Cesar.

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


Re: [PHP] Slow searches in large database

2003-10-16 Thread Cesar Cordovez
Manu, et al,

The database in alenet.com is rather tiny (about 28 docs, as you 
mentioned).  I developed the procedure for a intranet with some 5000 
records.  It is working fine.  It has some 20+ clients that are 
constantly hitting the database.  The server is a desktop (nothing out 
of the ordinary, running win32)



Manuel Vázquez Acosta wrote:
I used a variant of this scheme a time ago and it worked well though I had
not reached 2 000 records.
I separated the words using strtok().

Manu.

PD: How large is the http://www.alenet.com DB; I searched the word 'the'
(which is likely to be in every english doc) and it returned only 28 docs.
Manu.

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


Re: [PHP] Slow searches in large database

2003-10-16 Thread Cesar Cordovez
Curt, et al:

You just described my procedure!  I do exacly that, plus, I also save a 
soundex or metaphone code for each word so I can check spelling and 
closest matches.

Cesar.

Curt Zirzow wrote:
Instead of just adding a word to table of words, you add a field
that holds the qty of times it appears in the document.  So now the
sql looks something like:
select qty, docid  from keywords where word='people' order by qty

With an index on qty, the query should be rather fast. And now you
can join the keyword table and the main document table together so
you can display the results:
select k.qty, doc.*  from keywords k, documents doc 
  where k.docid = doc.id k.word='people' 
  order by k.qty

I do this very exact thing for my graphs and reports listed below.

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


Re: [PHP] Slow searches in large database

2003-10-14 Thread Cesar Cordovez
Hi!

I think that you will need a keyword table to speed up this procedure. 
 The basic idea is to create an index of words in your fields, 
therefore you will not use like but = making things run much, much 
faster.

The steps for doing this are:

1.  Every time you save a record in the table docs, take all the text 
fields in it and separate it into words.  You can use explode to do 
this.  Like for example: $words = explode( , $record[fieldone] .   
.$record[fieldtwo], {etc, etc});

2. save in the keyword table the non repeating words in the array with a 
reference to the original document, for example the document id.

3.  Then, if you want to search for, let say, people you will do:

select distinct(docid) from keywords where word='people'

and you will have a list (cursor) with all the documents that have the 
word people.

Very fast.

For an example of this, go to http://www.alenet.com and search for 
something.  With very little more effort you can add a spelling thingy 
(type peeple on the search field) and porcentajes for each document.

I use the exactly the same procedure in a 5000 record database, and the 
time it uses to search is about the same that in alenet.com

Cesar

An example of one of our search strings is:

select docs.* from docs where 1 and CY IN ('GB')  and (TI like
'%searchstring%' or PD like '%searchstring%' or ND like '%searchstring%'
or DR like '%searchstring%' or DS like '%searchstring%' or DD like
'%searchstring%' or DT like '%searchstring%' or RN like '%searchstring%'
or HD like '%searchstring%' or TD like '%searchstring%' or NC like
'%searchstring%' or PR like '%searchstring%' or RP like '%searchstring%'
or AA like '%searchstring%' or TY like '%searchstring%' or AC like
'%searchstring%' or PC like '%searchstring%' or RC like '%searchstring%'
or RG like '%searchstring%' or AU like '%searchstring%' or TW like
'%searchstring%' or CO like '%searchstring%' or AB like '%searchstring%'
or TX like '%searchstring%')
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] One variable not equal to 2 values.

2003-09-25 Thread Cesar Cordovez
corection to last postBut then... you have to use and not or 
like:/corection to last post

if (($thisvar != this value) and ($thisvar != thatvalue)) {
 // do stuff
 }
Cesar Cordovez wrote:

if (($thisvar != this value) or ($thisvar != thatvalue)) {
// do stuff
}
cesar =)

Ed Curtis wrote:

 How would I write this statement:

if $thisvar is not equal to this value or that value. { do stuff }

Thanks,

Ed


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


Re: [PHP] PHP Editor - which to use?

2003-09-24 Thread Cesar Cordovez
THE best text/code editor in this planet is BBEdit. No questions about 
it.  It is a pitty it only runs on Macs.  I have used it to write text, 
code fortran, pascal, c, c++, html, css and php (among others). It is 
great, I love it.  Kudos to Bare Bones!  Great find/replace utility. 
Incredible adaptation to your needs.  Owesome syntax coloring.  Terminal 
included.  FTP, mail, telnet, terminal, macro, perl included.  Try it, now!

Cesar

(If any one cares, I also think that Dreamweaver Sucks!, big Time, 
capital S)

Kevin Bruce wrote:

FYI- New to this list but have been a php coder for 2 years.

I know a lot of you out there are going to groan inwardly, but I use
Dreamweaver, mainly because that's what I used since it's inception when I
was writing static sites. I use OSX for my writing platform and occasionally
use BBedit as well. If someone could point out a better PHP editor for the
Mac, please speak up:) BTW- Dreamweaver has pretty decent PHP highlighting.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] count() numerical arrays....

2003-09-09 Thread Cesar Cordovez
Use explode instead...

$num_list_array = explode(, $num_list)

more information at php.net/explode

Cesar

CF High wrote:
Hey all.

Another simple, yet baffling for me, question:

I have a comma delimited list of numbers; e.g. $num_list = 1,2,3,4

I split the number list to array -- $num_list_array = split(, $num_list)

I then count the number of elements -- $count = count($num_list_array);

I do not get 4 for $count, rather 1!

I can't stand coming up with cludgy workarounds just to count the number of
elements in a numerical list.
Any ideas?

--Noah

--

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


Re: [PHP] can pdf forms be used to submit data into db?

2003-08-27 Thread Cesar Cordovez
Yes you can!

All the information is on www.php.net/fdf.

Cesar

[EMAIL PROTECTED] wrote:
hi guys and gals, aloha from hawaii,

Not sure if this is the right place to ask, but i just need to know if it
is technically possible to have a pdf form be filled out online and then
once the user hits submit, php takes the data and puts it into a db or some
sort of db technology and if the need arises to pull up that record once
more, php fetches the data from the db and dynamically fills out the pdf
form and presents it to the end user...can do?  or anyone know who i can
talk to about this...
thanks and mahalo from hawaii

incentive
if anyone can help me or point me in the right direction, i MAY be inclined
to send some macadamia nuts to the continental US
/incentive
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Cannot pass values from one page to another

2003-08-27 Thread Cesar Cordovez


CPT John W. Holmes wrote:
From: [EMAIL PROTECTED]

Ok this is a major vulnerability that you are coding. Register globals 
on and password being stored in the session is like having a banner on 
your home page saying 'come and hack me'.


Please explain how you've come to this conclusion...

---John Holmes...

Yes, please explain this... I'm very curious!

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


Re: [PHP] HIPAA EDI X12 stuff?

2003-08-26 Thread Cesar Cordovez
Is this related with HIPPA compliance?  I'm VERY interested too...

Richard Lynch wrote:

I don't suppose anybody has any HIPAA stuff implementing something like:
ASC X12N 270/271 (004010X092) or its subsequent standards in PHP?...
Email off-list if you have any idea what I'm talking about, since *I*
don't even want to really do this, so I doubt too many others are
interested...
What I *really* want is to just curl POST to their web-server, or
something similar, but I've been bounced through 4 different
departments/people, and am reduced to reading the 270/271 specs for fun
while waiting for them to give me a single straight answer.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] redhat 8: upgrade php from 4.2.2 to 4.3.2

2003-08-15 Thread Cesar Cordovez
You can use apachetoolbox.com to install apache and php...

Chris W. Parker wrote:
I want to upgrade my php install from 4.2.2 to 4.3.2. I'm pretty new to
linux so I don't know how to install from source and I haven't been able
to find any Redhat 8 rpm's.


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


Re: [PHP] FDF support in RedHat

2003-08-14 Thread Cesar Cordovez
Now I have 4 versions: FDFTK.H, fdftk.h, FdfTk.h, Fdftk.h.  Same problem.



Cesar Cordovez wrote:
Weird. Is the file Fdftk.h or fdftk.h?



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


Re: [PHP] FDF support in RedHat (make error)

2003-08-14 Thread Cesar Cordovez
I didn't read the fine manual.  Where in the manual says: [move 
fdftk.h to /usr/local/includes and libfdftk.so to 
/usr/local/lib]? Huh?  The manual only says:

manual source=php.net/fdf
Note:  If you run into problems configuring PHP with fdftk support, 
check whether the header file fdftk.h and the library libfdftk.so are at 
the right place. The configure script supports both the directory 
structure of the FDF SDK distribution and the usual DIR/include / 
DIR/lib layout, so you can point it either directly to the unpacked 
distribution directory or put the header file and the appropriate 
library for your platform into e.g. /usr/local/include and 
/usr/local/lib and configure with --with-fdftk=/usr/local.
/manual

It *assumes* that you now that what_ever_file.h is an include and it 
goes into DIR/Include and what_ever_file.so is an object (module, 
library?) and it goes into DIR/lib and that DIR is /usr/local.

More questions/comments about this stuff:

If the manual says fdftk.h is a header file, why it should be in the 
includes directory as opposed to the headers directory?

If libfdftk.so goes into the lib directory, it should be called 
libfdftk.lib!  Whats the meaning of .so? Standard Object?

Where is the unpacked distribution directory?

Cesar





Jason Wong wrote:

On Saturday 09 August 2003 00:05, Cesar Cordovez wrote:


I moved fdftk.h to /usr/local/includes and libfdftk.so to
/usr/local/lib and everything worked!


Sigh, that's what happens when you RTFM :-)

Now could you please tell the neurotic posters (see recent thread) that RTFM 
really does work!



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


Re: [PHP] FDF support in RedHat

2003-08-14 Thread Cesar Cordovez
I guess my problem is:

manual source=php.net/fdf
Note:  If you run into problems configuring PHP with fdftk support, 
check whether the header file fdftk.h and the library libfdftk.so are at 
the right place. The configure script supports both the directory 
structure of the FDF SDK distribution and the usual DIR/include / 
DIR/lib layout, so you can point it either directly to the unpacked 
distribution directory or put the header file and the appropriate 
library for your platform into e.g. /usr/local/include and 
/usr/local/lib and configure with --with-fdftk=/usr/local.
/manual

They never say where is THE RIGHT PLACE FOR THE FILES...

...or I am miss understanding something... =)



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


Re: [PHP] FDF support in RedHat

2003-08-14 Thread Cesar Cordovez
I have 3 versions of it.  FDFTK.H, fdftk.h and FdfTk.h.  I will try 
Fdftk.h...

Jay Blanchard wrote:

Weird. Is the file Fdftk.h or fdftk.h?



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


Re: [PHP] FDF support in RedHat

2003-08-14 Thread Cesar Cordovez
Tried with --with-fdftk... same problem.

I deleted all the versions except for fdftk.h that I moved to 
/usr/local/include (found this bug: http://bugs.php.net/bug.php?id=8840)

Then issued the configuration command and got something like checking 
for FDFOpen in -lfdftk.. no  Then die with error fdftk module requires 
=fdftk 2.0.

I'm sure I have verion 5!

Any how, in directory /usr/local I have a copy of LIBFDFTK.SO

Jason Wong wrote:
And did you follow the installation instructions in the manual -- in 
particular the bit about copying the header file(s) and library file(s) into 
the correct places?

What instructions?  The ones by mirage at rateaprof dot com?

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


[PHP] FDF support in RedHat (make error)

2003-08-14 Thread Cesar Cordovez
Ja! I got it!

I moved fdftk.h to /usr/local/includes and libfdftk.so to 
/usr/local/lib and everything worked!

Then, I issued a make command and unfortunately I got a new error:

/usr/include/ucd-snmp/asn1.h:7:2 Please update your headers or 
configuer using --enable-ucd-snmp-compatibility

Then all hell break lose, got tons of errors (ver like this one) and 
exit the make with error 1.

Any Ideas?

Thanks,

Cesar

PD. what is ucd-snmp?

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


Re: [PHP] FDF support in RedHat (make error)

2003-08-14 Thread Cesar Cordovez
Exactly!  I agree with you 100%.  That's why, even if you RTFM, google 
your question and search the archives, you need to ask some (very basic) 
questions to the list.   Questions like: If the manual says fdftk.h is a 
header file, why it should be in the includes directory as opposed to 
the headers directory?

For me this is a very intelligent question (and advanced too) because I 
have no idea of linux or compilers. (or as a metter of fact, what is a 
.h file).

So I think, a list is the best place to ask questions: basic, stupid, 
off topic, advanced or what ever.  If you want to anwer them ok, if you 
don't, thats ok too.

Just MHO!



Jason Wong wrote:

The manual has to assume quite a bit of stuff, like it assumes that you know 
what a file is and what a directory is. It has to draw the line somewhere as 
to what should be prior knowledge. It would be a massive manual indeed if it 
had to cover everything from installing an OS to compiling php.

The php manual isn't meant to be a tutorial on how to use a 
computer/OS/compiler/whatever. For that there are better and more appropriate 
resources available.



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


Re: [PHP] FDF support in RedHat

2003-08-14 Thread Cesar Cordovez
Cool.

I managed to dowlonad php-4.2.2.tar.gz and uncompress it into 
/usr/local/php4.2.2. (I'm so proud of my self!) lol

Also, I downloaded fdftkv5 and installed it following the instructions 
at php.net/fdf (by mirage at rateaprof dot com)

Copy/pasted configuration commands from phpinfo() to bluefish, replace 
' for  (nothing), added --with-fdftk=/usr/local to them.

Copy again to terminal, and:

configure: error: Fdftk.h not found, please install it again.

Any ideas?

Thanks

Jay Blanchard wrote:

[snip]
Thanks for your help.  I have only one question for you... Where is the 
PHP directory (where the php library files are) ...
[/snip]

Well, unfortunately I cannot answer that for sure, but it is usually
something like 
/usr/local/php-4.x.x or something like that

Good luck and may all your compiles come true.



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


Re: [PHP] FDF support in RedHat (conclusion)

2003-08-14 Thread Cesar Cordovez
Hi List!

First off all, let me thank Jay for all his efforts!  Compiling PHP and 
then Apache is just to complicated for me.  I would love to learn all of 
this stuff, but, I don't have the time to do it.  (and that is a petty).

Any how, the problem is still there.  Apache and PHP are running well, 
but no FDF/PDF support what-so-ever.

Anybody knows someone in the Miami/Dade area that I can hire to manage 
this server?  And, by the way, I need 2 PHP programers for a huge 
project, starting next week! Email me at [EMAIL PROTECTED] for more 
info and/or questions.

Cesar

Jay Blanchard wrote:

[snip]
It is still giving me problems.  I deleted the --with-snmp options and 
then I receive a new problem related with apache (something like 
apache2module or so)

I managed to download the apache 2.0.48 source, compile it and install 
it, but the (*^%$#@ program installs in /usr/local/apache2 instead or 
replacing the old copy of apache 2.0.40 (which I don't know where it is 
in my hard drive *^%$#).

Bottom line:  I'm hiring someone to do it for me.  Any ideas?
[/snip]
Sorry man...we tried. It is very hard to do compiles from a remote
location since I cannot see all of the problems being generated. Then,
every distro of Linux, BSD, et al are different and act different ways
on things like this. But hopefully you learned something!


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


[PHP] Recompile PHP with FDF support.

2003-08-14 Thread Cesar Cordovez
Hi!

It's me again! =)

I have great news:  I finally hire somebody to recompile apache, php and 
fdf together.  My servers are running very smoothly now.  I'm so happy.

Anyhow, the technician (lunix/unix nerd+geek) used ApacheToolbox, a 
utility to compile Apache in any linux system with many options like 
pdf, fdf, databases, perl, python, etc, etc, etc.

So if any one have problems with the installation of apache or php go to 
apachetoolbox.com.  Great!

HTH somebody in the future!

Cesar

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


Re: [PHP] FDF support in RedHat

2003-08-14 Thread Cesar Cordovez
Jay:

You can find the configuration script at the end of this msg.  I went to 
adobe.com (following the instruction at php.net/fdf) and downloaded the 
stuff you ask for at /usr/local/.

I'm ready for step 2. =)

Mucho Thanks.

Cesar

'./configure' '--host=i686-pc-linux-gnu' '--build=i686-pc-linux-gnu' 
'--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' 
'--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' 
'--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' 
'--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' 
'--sharedstatedir=/usr/com' '--mandir=/usr/share/man' 
'--infodir=/usr/share/info' '--prefix=/usr' 
'--with-config-file-path=/etc' '--enable-force-cgi-redirect' 
'--disable-debug' '--enable-pic' '--disable-rpath' 
'--enable-inline-optimization' '--with-bz2' '--with-db3' '--with-curl' 
'--with-dom=/usr' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' 
'--with-png-dir=/usr' '--with-gd' '--enable-gd-native-ttf' '--with-ttf' 
'--with-gdbm' '--with-gettext' '--with-ncurses' '--with-gmp' 
'--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png' 
'--with-pspell' '--with-regex=system' '--with-xml' 
'--with-expat-dir=/usr' '--with-zlib' '--with-layout=GNU' 
'--enable-bcmath' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' 
'--enable-safe-mode' '--enable-sockets' '--enable-sysvsem' 
'--enable-sysvshm' '--enable-discard-path' '--enable-track-vars' 
'--enable-trans-sid' '--enable-yp' '--enable-wddx' '--without-oci8' 
'--with-pear=/usr/share/pear' '--with-imap=shared' '--with-imap-ssl' 
'--with-kerberos=/usr/kerberos' '--with-ldap=shared' 
'--with-mysql=shared,/usr' '--with-pgsql=shared' 
'--with-snmp=shared,/usr' '--with-snmp=shared' '--enable-ucd-snmp-hack' 
'--with-unixODBC=shared' '--enable-memory-limit' '--enable-bcmath' 
'--enable-shmop' '--enable-versioning' '--enable-calendar' 
'--enable-dbx' '--enable-dio' '--enable-mcal' '--with-apxs2=/usr/sbin/apxs'



Jay Blanchard wrote:
First, run phpinfo(); in a web page on your server and copy the
Configure Command (should be the third box down on the page) and post it
to the list.
Second, make sure that you have the header file (fdftk.h) and the
library (libfdftk.so) in a sub directory of /usr/local/ 



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


Re: [PHP] FDF support in RedHat (make error)

2003-08-14 Thread Cesar Cordovez
It is still giving me problems.  I deleted the --with-snmp options and 
then I receive a new problem related with apache (something like 
apache2module or so)

I managed to download the apache 2.0.48 source, compile it and install 
it, but the (*^%$#@ program installs in /usr/local/apache2 instead or 
replacing the old copy of apache 2.0.40 (which I don't know where it is 
in my hard drive *^%$#).

Bottom line:  I'm hiring someone to do it for me.  Any ideas?

Cesar

Jay Blanchard wrote:

[snip]
For me this is a very intelligent question (and advanced too) because I 
have no idea of linux or compilers. (or as a metter of fact, what is a 
.h file).
[/snip]

You'll note that the library file began with lib. The files are C or
C++ files witha .h being a header file for the compiler. It basically
boils down to long held naming conventions. Bottom line...did you get it
done or is it still throwing errors?
Incidentally you did do exactly what the manual told you to do with the
locations.


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


Re: [PHP] FDF support in RedHat

2003-08-09 Thread Cesar Cordovez
Jay:

Thanks for your help.  I have only one question for you... Where is the 
PHP directory (where the php library files are) ...

Cesar

PD. How can you know if I have the sources for php in my machine?  And 
where are they?

Jay Blanchard wrote:
2. In the PHP directory (where the php library files are) run the
configure line (you can paste it and then hit enter). Much stuff will
traverse your screen real estate.


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


Re: [PHP] FDF support in RedHat

2003-08-09 Thread Cesar Cordovez
manual
You must compile PHP with --with-fdftk[=DIR].
/manual
Maybe for you, Jay, this is crystal clear, but for me, is like greek. =)

I will ask again... how do you compile php with fdf support in red hat?



Jay Blanchard wrote:

[snip]
the manual is so far away
[/snip]
The manual is right here, http://us3.php.net/fdf. The third major
heading on the page is installation.
Good luck and have a pleasant day!





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


Re: [PHP] FDF support in RedHat

2003-08-08 Thread Cesar Cordovez
Did it.  Same error. =(

Jay Blanchard wrote:

[snip]
configure: error: Fdftk.h not found, please install it again.
[/snip]
I am proud of you! Now type locate fdftk.h When you locate it move it
to /usr/local and go again


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


[PHP] FDF support in RedHat

2003-08-07 Thread Cesar Cordovez
Hi List!

I know this is old history, but the archives has nothing, the manual is 
so far away and google is kind of slow this morning, so...

Can somebody teach me how to compile php with fdf support in red hat 
linux 8 as if I where a 5 year old? (which I am =)

Thanks.

PD. My mother will change my dippers, don't worry about that!



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


Re: [PHP] PHP should know my data!

2003-07-25 Thread Cesar Cordovez
And he signs IT Professional and he wants to go back to COBOL!

LOL

Cesar

John Manko wrote:
I just wrote a web app, but I'm completely disgusted with PHP.  The 
application works great, but PHP is not smart enough to know what data 
belongs in my database.  Really, I have to enter the stuff in myself.  I 
[MORE STUFF DELETED]

John Manko
IT Professional






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


Re: [PHP] arguments against moving site from Linux/Apache/PHP serverto Windows/IIS/PHP needed

2003-07-23 Thread Cesar Cordovez


[EMAIL PROTECTED] wrote:
Can you help me? I need some reasons like things that won't work under
windows version of PHP (or at least MySQL) and that are not easy to
fix. I've already found that IIS doesn't provide
$_SERVER[DOCUMENT_ROOT] but it's not too much work to fix that..


In windows, strtotime only works from 1/1/1970.  In linux can work with 
any date.

HTH

PS.  I use windows and apart from this is great.  Not cheap, but great.



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


Re: [PHP] explode and escape character for string separator

2003-07-18 Thread Cesar Cordovez
Among other things, this is why XML exists.  Use XML.  FLASH can handle 
it, PHP can handle it, everything out there can handle it.  Use XML. 
Delimiters will sooner or later break down.  Use XML.

Over and out.



Grant Rutherford wrote:
Chris Shiflett wrote:

--- Reuben D. Budiardja wrote:
 

I did strive for that. But whatever character I choose, the problem
remains that we can't guarantee that it's going ot be only used as
deliminater, since the deliminated string is an input from user. So
the problem remains.
  


Well, just to point out, your delimiter can be anything, including:

)[EMAIL PROTECTED]*(donotusethisstringofcharactersinanything(*[EMAIL PROTECTED])

Of course, at some point, that method of playing with probability becomes
unrealistic, and it is imperfect.
John's suggestion of URL encoding is likely your best bet. Given your 
string:

$foo:$bar:$blah

Make that instead:

urlencode($foo) . '' . urlencode($bar) . '' . urlencode($blah)

Then you can use  as your delimiter and be guaranteed that it does 
not exist
within each string. It is also easy to recover the original strings, 
and since
you are using PHP functions, there is less code to write (always a big 
plus).

Hope that helps.

Chris

=
Become a better Web developer with the HTTP Developer's Handbook
http://httphandbook.org/
 

I like the way you encode things like $ in php.

$ = delimiter
/$ = $
//$ = /delimiter
///$ = /$
$ = //delimiter
/$ = //$
etc.
 = //
/$/$ = $$
etc.
To encode the input, just change every / to a // and every $ to a /$.  
Decoding is the opposite.  I don't think that there are any weird 
situations that can screw this up.  You can use the same escape 
character / for any special character, ie /@ or /: if necessary.

Grant









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


Re: [PHP] Re: Form 2 PDF 2 Form

2003-07-01 Thread Cesar Cordovez
I had the exact same problem with a form some time ago.  Definetely the 
best way to do it is spanning the form. I don't think the temp table 
will do.  I did it with a session variable wich saves the info from the 
form and what part of the form you are.  So the user can flip between 
pages in the form.  Here is some code that will help you do it.  (From 
the top of my mind, code not tested, use it with care!)

?php

session_register(userform);

if (!isset($userform[step])) $userform[step]=1;
$step = $userform[step];
if (isset($_POST[confirm])) {
   switch ($step):
   case 1:
   $userform[whateverfieldname] = 
$_POST[whateverfieldname];
   // etc
   break;
   case 2:
   // more...
   break;
   case 3:
   // more...
   break;
   case 4:
   // more...
   if (This is the last step) {
   .. save $userform to the database
   }
   break;
  }
}

print(form);
printf(input type=hidden' name='step' value='%s', $userform[step]);
print(input type=hidden' name='confirm' value='1);
print(table);
switch($step) {
   case 1:
  // place here the fields for step 1
   break;
   case 2:
  // place here the fields for step 2
   break;
   case 3:
  // place here the fields for step 3
   break;
   case 4:
  // place here the fields for step 4
   break;
}
print(/table);
print(/form);
?

HTH

Sævar Öfjörð wrote:

You could use a temp table in the database which gets cleaned up both
when the last page is completed or if there is data in it when the user
starts from scratch. Of course you would have to use sessions to
identify each user to each line of temp data. I'm not sure if this will
work, there are some problems to overcome here.
-Original Message-
From: Petre Agenbag [mailto:[EMAIL PROTECTED] 
Sent: 1. júlí 2003 12:01
To: Shivanischal A
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] Re: Form 2 PDF 2 Form

Hi Shiva
Appreciate your input. Wrt the spanning of the form, I think, in my
situation, it would actually make things worse... You see, my suspicion
is that most of the users who are experiencing problems, have very bad
connections, many complain that they lose connectivity while they are
busy with the form ( it takes them maybe 30 min or so to fill out the
entire form ( they basically transfer the data off paper forms they have
filled out earlier while on-site, so it's not really alot of data, but
there are a lot of fields...)
So, my fear with this approach is that they will maybe get past the
first part of the form, submit that OK, then start getting trouble with
subsequent parts, leaving me with a whole lot of partial entries in the
DB., and how do I get them to resume at a a later stage?
You don't understand the mindset of these people, when something goes
wrong, they'll switch off their PC's and try to start from scratch, so
it's going to be difficult to try and get them to understand the concept
of multi-part forms... I shudder to even think what will happen, or
worse, how I will be able to allow them to make corrections on a certain
part of the form once they have submit it. And sometimes, to their
defense, it's not them that want to change the details on the form, but
the subject of the form who has decided to change their name etc...
I'm not ditching this idea, I will definitely give it some more thought,
it's just at this moment, my mind is running through my original idea of
PDF forms trying to evaluate it.
Each method will have it's pro's and cons, and I'll have to go and weigh
them. I must add, I don't see effort as a con for a particular
solution, as long as I know it will solve the problem without adding
other cons...
Thanks again, will take it up with you again ( need some more input on
this PDF thing to get some balanced views)
PS, if you have experience with using this method, I would appreciate it
if you could let me have your field notes and how successfull it's
working for you.
You see, the main thing here is that I need to KNOW when someone who
says they have submitted something actually have, and that they are not
trying their luck...
 
On Tue, 2003-07-01 at 13:43, Shivanischal A wrote:
 

hi,

seems u have complicated task on hand mate. cant u simply consider
   

span the
 

user input over multiple pages? i mean using 2 or more form on
   

different
 

pages instead of a single form on one single page. if this cant be
   

done,
 

we'll think of other measures. but this is by far the most simple
   

method
 

-shiva

Petre Agenbag [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
   

Hi List

OK, firstly, sorry if this has been on the list before...

What I'd like to do is something like this:

I currently have an app that takes user input via a normal html
 

form,
 

and then pops the content into mysql.

The problem is that lots of user complain that the submit times out
 

due

[PHP] Nothing to do with PHP

2003-06-30 Thread Cesar Cordovez
But, I'm sure someone in this list have the answer to my question: I 
have written a lot of statements using the LIMIT clause in MySQL, like 
for example: SELECT * FROM system_users WHERE lastname like C% LIMIT 
0,10 ...and I love it. specially when you are doing next page, 
previous page kind of stuff.  One of my clients wants to install my 
system in (*^%$# MSSQL server. How can I do a LIMIT in MSSQL (or other?)

Any comments welcome.

TIA.

Cesar



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


Re: [PHP] Re: client side cache

2003-06-24 Thread Cesar Cordovez
Hi!
(B
(BI used to have this problem until I started using in all of my scripts
(Bthe following:
(B
(B?php
(B$t = time("U");  // this is the time in seconds from 1/1/1970
(B$url = "whateveryouwant.php?t=$t";
(B
(B// place here something like:
(Bprintf("a href='%s'Click here to go to what ever/a", $url);
(B?
(B
(BWhith this, the cache of your client will 'think' it is a different page
(Band force it to load it.
(B
(BCesar
(B
(B
(BJean-Christian IMbeault wrote:
(B Aljosa Mohorovic wrote:
(B 
(Bi have problems with client side cache, how can i disable it?
(Bi use this, but it still caches pages.
(B 
(B 
(B What are your problems exactly and what is the client?
(B 
(B Remember that the client might not be honouring your caching headers and
(B if that is the case there is nothing you can do about it. i.e. it may be
(B an ill-behaving client which isn't following standards.
(B 
(B Jean-Christian Imbeault
(B 
(B 
(B
(B
(B
(B-- 
(BPHP General Mailing List (http://www.php.net/)
(BTo unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] My non-windows friends please help

2003-06-18 Thread Cesar Cordovez
Mike:

If it is possible, I would like to see the code you have to detect the
diferent browsers and platforms.  I'm doing the same here!  Maybe we can
share some code?

Cesar

-Original Message-
From: Mike Mannakee [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 1:56 PM
To: [EMAIL PROTECTED]
Subject: [PHP] My non-windows friends please help


Hi,

I'm testing an implementation of a browser / platform detection on my site.
I need a few page views from my non-windows friends, to see some of the
varieties of the user_agent_string I get.  Please take a moment and surf a
page or two on

www.basementideas.com/index.php

Thanks.

Mike



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

2001-12-12 Thread Cesar Cordovez

Hi guys!

For the last couple of hours I have been trying to solve this algorithm with
no avail.  If someone has an idea on how to solve it it will be greatly
apreciated.

The Problem:

I have stored in a MySQL table the following:

-
Databases:MySQL
Databases:MS SQL Server
Databases:Oracle
Databases:Informix
Databases:DB2
Databases:DBMS
Databases:4th Dimension
Software:Photoshop
Software:Illustrator
Software:DreamWeaver
Software:Utilities:QuickTime
Software:Utilities:Movie Converter
Software:Utilities:Norton Utilities
Software:Languages:C++
Software:Languages:Pascal
Software:Languages:Basic
Software:Languages:Real Basic
Software:Languages:FORTRAN

-- etc.

I need to convert this table into an hierarquical popupmenu for a HTML page
I'm working on.  Something like this:

optgroup label=Databases
option label=MySQL value=MySQL/option
option label=MS SQL Server value=MS SQL Server/option
option label=Oracle value=Oracle /option
option label=Informix value=Informix /option
option label=DB2 value=DB2 /option
option label=DBMS value=DBMS /option
option label=4th Dimension value=4th Dimension /option
/optgroup
optgroup label=Software
option label=Photoshop value=Photoshop/option
option label=Illustrator value=Illustrator/option
option label=DreamWeaver value=DreamWeaver/option
optgroup label=utilities
option label=QuickTime value=QuickTime/option
option label=Movie Converter value=Movie Converter/option
option label=Norton Utilities value=Norton Utilities/option
/optgroup

-- etc.

Any help will be apreciated. TIA.




Cesar Cordovez V.
[EMAIL PROTECTED]
(305) 461 0012 x202


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