Re: [PHP] Max script size

2003-08-09 Thread Jeff Held
Transfering data between mysql servers.  I create a mysql insert file via
file system, ftp the file to another server, then exe it...all on a
schedule.

I know there is a better way, but this way is very fast, well until the file
got to big.  My solution now is to break it over two files (easy).  I just
wanted to see what someone would say.

Jeff

"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
I am sorry Jeff, we have begun to wonder very seriously what you would
be doing with that many SQL statements in a single script. Sounds rather
convoluted. Would you enlighten us? Thanks!



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



Re: [PHP] setting function variables

2003-08-09 Thread CPT John W. Holmes
From: "Mark" <[EMAIL PROTECTED]>
> I seem to learn something new every time you or Jennifer post (many
> others as well). I never knew about variable functions. Cool!

You're welcome. I wouldn't recommend that solution exactly (an abstraction
class would be better), but the functions do come in handy.

For example, I use variable function in one of my validation classes. I have
a main method called check() that is passed a "type" and a "value". The
"type" must match a method in the class. The check() method does some
default checking and then passes the $value to the $type() method for
further checking...

class Validate
{
  function check($type,$value)
  {
if($empty($value))
{ return FALSE; }
if(method_exists($this,$type))
{ $retval = $this->$type($value); }
return $retval;
  }

  function number($value)
  {
if(preg_match('/[^0-9]/',$value))
{ return FALSE; }
else
{ return $value; }
  }
}

Where "number" is one of the types that'll be validated.

$val = new Validate;

$val->check('number',$_POST['somevalue']);
$val->check('date',$_POST['somedate']);
$val->check('phone',$_POST['phone_number']);
etc...

Where you'd have a phone() and date() method in the Validate class... I
think that's the only place I've used variable-functions... or
variable-methods, rather. :)

---John Holmes...


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



[PHP] Max script size

2003-08-09 Thread Jeff Held
I have a 6MB PHP script that just won't exe on the live server. It works on
the local one.  Any ideas on a setting that may limit the script.  It is not
timing out, it only takes about 3 sec to exe.

Jeff



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



Re: [PHP] where are my errors?

2003-08-09 Thread David T-G
Hi, all --

...and then John W. Holmes said...
% 
% David T-G wrote:
% 
% >My partner and I have done something that gets rid of our error messages,
...
% 
% is display_errors ON for one machine and OFF for the other?

Now that I've confirmed that display_errors is on (1), are there any
other ideas?


TIA & HAND

:-D
-- 
David T-G  * There is too much animal courage in 
(play) [EMAIL PROTECTED] * society and not sufficient moral courage.
(work) [EMAIL PROTECTED]  -- Mary Baker Eddy, "Science and Health"
http://justpickone.org/davidtg/  Shpx gur Pbzzhavpngvbaf Qrprapl Npg!



pgp0.pgp
Description: PGP signature


Re: [PHP] for the love of god, remove me

2003-08-09 Thread David Robley
In article <[EMAIL PROTECTED]>, 
[EMAIL PROTECTED] says...
> > It's not usless if you read the page. 
> > [EMAIL PROTECTED]
> 
> As I said, the page is useless. This doesn't work either.
> 
> J.
> 

You may be trying to unsubscribe from a different email address that the 
one used originally to subscribe. The original subscribe confirmation, if 
you kept it, should have the address in it. Failing that, have a look at 
the headers of any message from the list for a clue as to the subscribed 
address. I'd be more specific, but I read from the newsgroup so don't have 
an appropriate set of headers available to refer to.

-- 
Quod subigo farinam

A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?

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



Re: [PHP] Old version of PHP

2003-08-09 Thread Dan Phiffer
Thanks for all the feedback, guys. Is there an errata page somewhere that
lists known bugs in the PHP interpretter?

Thanks,
-Dan

"Jason Wong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Friday 08 August 2003 09:43, Justin French wrote:
>
> > i think the best reason to keep up-to-date on the versions is that each
> > new release is "better, more stable, etc etc"... i haven't ever heard
> > anyone on this list say "i prefer 4.2.3 over 4.2.4" :)
>
> But each new release brings new problems and a whole raft of new bugs.
>
> > as a programmer, i hate it how some hosts refuse to keep on top of the
> > upgrades... really useful functions in newer versions aren't available.
>
> Sometimes it is prudent to 'wait' for a stable version to emerge. AFAICR
4.06
> was relatively stable (bug free), it was followed by a couple of buggies
> 4.10, 4.11 and then another relatively stable release 4.12 etc.
>
> And as for the latest and greatest, 4.3.2, it has a nasty bug with
> imagecopyresampled() when using the built-in gd library which makes it
> useless if you need that function.
>
> So, if the host is being sensible and not just plain lazy then you should
> commend them for keeping your site running and not reprimand them for not
> upgrading willy-nilly.
>
> -- 
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> --
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> --
> /*
> A national debt, if it is not excessive, will be to us a national
blessing.
> -- Alexander Hamilton
> */
>



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



Re: [PHP] magical file writing truncation

2003-08-09 Thread skate

>
> obviously there's no simple solution here... can anyone point me in the
way
> of an alternative way of doing this? i could try the file write in 3
stages,
> first part of content, text, end of content, as they seem to write fine
> seperatly.
>

this is magical, evening seperating the file open, and file write into 3
stages, it still looses half my $text, but again, if i write $text to it's
own file, then it's perfectly fine, and all contents go inside...

i have this...


  print "start: ".strlen($newStartContent)."";
  print "text: ".strlen($text)."";
  print "end: ".strlen($newEndContent)."";
  touch($newFile);
  $fp = fopen($newFile, "ab");
  $bytes = fwrite( $fp, $newStartContent );
  $totalBytes += $bytes;
  print " - ".$bytes." written";
  fclose( $fp );
  unset( $fp );
  $fp = fopen($newFile.".txt", "at");
  $bytes = fwrite( $fp, $text );
  $totalBytes += $bytes;
  print " - ".$bytes." written";
  fclose( $fp );
  unset( $fp );
  $fp = fopen($newFile, "ab");
  $bytes = fwrite( $fp, $newEndContent );
  $totalBytes += $bytes;
  print " - ".$bytes." written";
  fclose( $fp );
  unset( $fp );
  print "Total size written ".$totalBytes;

i figured i would totally kill $fp each time with an unset just incase. in
the above example the $text is being saved to a different file, and the
write is fine. take the ".txt" off so it saves to the same file, and it cuts
off half the $text again.

truly magical... i'm gonna have to rethink this whole thing aren't i? ah
well...

thanks again for the help...



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



RE: [PHP] magical file writing truncation

2003-08-09 Thread Jay Blanchard
[snip]
i really can't get my head around this one at all. could it possibly be
a
windows issue??? i know windows can be an arse in dealing with files,
but i
can't see how it could pick up on a variable inside PHP and truncate it?
[/snip]

I just have one more thought because you brought up Windows. Change the
name of the variable "$text" . text might just be one of those
reserved or key words

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



[PHP] Re: funcky parse error message due to { } or not sure what else mightcause

2003-08-09 Thread Shena Delian O'Brien
Can you post the entire error?

Is that a " or a '' ? if a ", you need a closing " to go with it.

Jim M Gronquist wrote:
I added one term to a listing
-
if ( $follow_up == ") {
$error=true;
}

and now I'm getting a parse error
Ugh

I can't see anything that is causing this.

The script worked before.

Any idea where I might start to debug?

When I had this problem before it was because I had
Added a } which messed up the {  }  agreement but I only added
These 3 lines which shouldn't mess up the { } I don't think...



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


RE: [PHP] Best PHP CMS

2003-08-09 Thread Matt Schroebel

> -Original Message-
> From: Anthony [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, August 05, 2003 9:52 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Best PHP CMS
> 
> 
> I'm just looking for some opinions.  I've been going though 
> sourceforge
> looking at different CMS systems.  There are a lot of really good CMS
> projects out there.  I'm looking for some opinions on the 
> best ones out
> there.  I'm obviously looking at something PHP based and using mySQL
> backend.  Some of the features that I'd like are an easy template
> implementation, blog features, media gallery and something 
> that's easy to
> build custom modules to add features.  So far I'm looking at 
> about 6 CMS
> systems, I like certain things in each of them. so what's 
> your opinion.
I've looked at these:

http://www.midgard-project.org/
Midgard looked good but I couldn't get the admin to work right, and it
requires php-4.2.2 or lower (which drove me a little nuts at first).
It's optimized for php as it's functions are written in C and become
built in php functions with --with-midgard, plus it has a mod_midgard to
link into apache.  Midgard allows lots of customization and you could
place php code just about anywhere.  Runs on *nix only and requires
access to add modules to php and apache.

http://www.tikiwiki.org/
TikiWiki had lots of cool features.  It looked to me to be more suitable
for a community CMS (baseball team etc) rather than a general CMS. All
php.

http://www.geeklog.net/
There's also GeekLog, with a similar community slant as TikiWiki, and it
was reviewed in last months php-architect magazine. All php.

http://www.typo3.org
I agree with what Nick Tabbet said.  Of these 4 CMSs, this one has the
most refined user interface, and most general purpose features.  It's
written in all object oriented php and will easily install on an ISP
hosted system.  Quick setup 1-2-3, and your ready to go.  It does have a
long learning curve, but anything complex does.  Since it's all OO, has
it's own TypoScript code to design content and big, it will really
benefit if run with a php accelerator to cache the intermediate code.
Has good tutorial for getting started, and another good intro to it's
templates.  It's more for small to mid-sized sites, as anything larger
should be written in native C, C++, etc.

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



[PHP] Question on class syntax

2003-08-09 Thread Luis Lebron
I am currently using a php class that uses the following syntax:

$value= htmlcleaner::cleanup($value);


What exactly is the :: used for? Is there a different syntax for :: ?

thanks,

Luis R. Lebron
Project Manager
Sigmatech, Inc


Re: [PHP] easier than switch

2003-08-09 Thread Nicholas Robinson
As, in this case, only one of the variables is non-null, then you could use 
the string concatenation operator and this would return what you want.

i.e. type = $_POST['news'] . $_POST['dreams'] . $_POST['storys']...

I think I've used the same variable name in different forms on the same page, 
as only one form submission occurs at any one time there can't be a conflict 
and PHP doesn't care where the POST'ed variable came from.. So, you could 
rename news, dreams, etc. to be type and extract the result directly without 
having to fiddle around.

HTH

Nick

On Monday 04 Aug 2003 11:19 pm, skate wrote:
> okay, so i know there's an easy way to do this, and i've seen it done, sure
> of it. so please forgive the stupidity of my question, i don't even know
> where to begin to look in the archives either...
>
> i have several forms on one page, they all submit a different variable, i
> then want to set one variable depending on that... okay, now i'm confusing
> myself, lets try explain it with some code...
>
> 
> if(isset($_POST))
> {
>  $type = $_POST['news'] || $_POST['dreams'] || $_POST['storys'] ||
> $_POST['words'] || $_POST['chat']; }
>
> ?>
>
> obviously this doesn't work. but i wanna set $type depending on which
> $_POST variable was sent. only one of these will ever be sent. rather than
> doing a big ass switch statement, is there no way i can get this into one
> line?
>
> i hope this isn't too confusing...


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



Re: [PHP] Mail

2003-08-09 Thread Sean
Thanks for the quick response. 1 and 2 work 3 does not giving "unable to
relay for"
I had slight doubts about what to use for [EMAIL PROTECTED] I used my
normal email address.

  1.. Type helo me and press ENTER. The output resembles the following:
250 OK
2.. Type mail from:[EMAIL PROTECTED] and press 
ENTER. The output
resembles the following:
250 OK - mail from <[EMAIL PROTECTED]>
3.. Type rcpt to:[EMAIL PROTECTED] and press 
ENTER. The output
resembles the following:
250 OK - Recipient <[EMAIL PROTECTED]>
Hope you can help
Thanks
Sean

"John W. Holmes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Sean wrote:
>
> > I cannot get mail() to work any idea's
> > I get a server error.
> > Windows 2000 the SMTP port is 25.
> > No default values have being changed from the original PHP installation.
> >
> > In it's simplest form
> > mail("[EMAIL PROTECTED]", "My Subject", "Test");
> > Gives the error as do more complicated scripts that I copied.
> > Thanks
> > Sean
>
> Follow the guidelines at the following URL to see where the error lies.
>
> http://support.microsoft.com/?kbid=286421
>
> -- 
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> PHP|Architect: A magazine for PHP Professionals – www.phparch.com
>
>
>
>



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



Re: [PHP] Command line php....

2003-08-09 Thread Ray Hunter
Technically, yes it should however, I think this is a bug...are you running
php 5b?

--
BigDog


- Original Message - 
From: "John Nichel" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 05, 2003 9:07 PM
Subject: [PHP] Command line php


> Can someone tell me why php waits for me to input something before it
> prints out the first line of the code below?  Shouldn't it echo out the
> first line then wait for my input?
>
> #!/usr/local/bin/php
> 
> echo ( "Enter MySQL admin username : [root] " );
> $username = rtrim ( fgets ( STDIN ) );
> echo ( "\n\n\nThe username is" . $username . "\n\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] setting function variables

2003-08-09 Thread Micah Montoy
Tried this and it returns errors of type:

Warning: Wrong parameter count for mssql_result() in
c:\inetpub\wwwroot\webpage10\example\utilities\dsp_del_images.php on line 78

Warning: mssql_result(): supplied argument is not a valid MS SQL-result
resource in
c:\inetpub\wwwroot\webpage10\example\utilities\dsp_del_images.php on line 79

Warning: Wrong parameter count for mssql_result() in
c:\inetpub\wwwroot\webpage10\example\utilities\dsp_del_images.php on line 78

Warning: mssql_result(): supplied argument is not a valid MS SQL-result
resource in
c:\inetpub\wwwroot\webpage10\example\utilities\dsp_del_images.php on line 79

Lines 78 and 79 read like this:

$img_numbers = $qryResults("SELECT COUNT(img_id) AS TotalImages FROM images
WHERE category_id = '$row[0]'");
$img_count = $qryResults($img_numbers,0,"TotalImages")

The variables are specified as

$runQuery = 'mssql_query';
$qryResults = 'mssql_result';

Any ideas of why it would be doing this?  Everything works fine when I don't
try to use the variables.

thanks

"Cpt John W. Holmes" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> From: "Mark" <[EMAIL PROTECTED]>
> > --- Micah Montoy <[EMAIL PROTECTED]> wrote:
> > > I am trying to specify a single php file to contain all the
> > > variables and I
> > > just call this file where necessary.  What I am running into is
> > > that I want
> > > to do this for all the built in functions (i.e. mssql_query) as
> > > well.  I've
> > > tried numerous attempts but can't get it to operate without wanting
> > > to run
> > > the functions or return an error.  Something like this:
> > >
> > > $runQuery = @mssql_query;
> > > $qryResults = @mssql_result;
> > > $getRow = @mssql_fetch_row;
> > > $getRowNums = @mssql_num_rows;
> >
> > Use a database abstraction class (ADODB, Pear, or something from
> > phpclasses.org). You're trying to assign a variable to a function's
> > actions, when you can only assign the variable to teh ooutput of the
> > function.
>
> A good suggestion, since this is what your creating, basically.
>
> Anyhow, if you really want to do it your way, it'd be like this:
>
> $runQuery = 'mssql_query';
> $getRow = 'mssql_fetch_row';
>
> Then you'd use them like this:
>
> $result = $runQuery("select ... ");
> while($row = $getRow($result))
> {
>   ...
> }
>
> ---John Holmes...
>



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



Re: [PHP] where did my errors go?

2003-08-09 Thread Curt Zirzow
* Thus wrote David T-G ([EMAIL PROTECTED]):
> 
> What kind of call would suppress error messages from a require()d file?
> I don't know his codebase, and he's never seen anything like this before,

@require "$ENGINE_PATH/file-to-include.php" ;

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



Re: [PHP] Question on class syntax

2003-08-09 Thread Robert Cummings
The :: operator is used to access a static class method. In other words
you can use the class method without creating an instance of the class.

Alternatively you could have used the following less effcient syntax:

$cleaner = new htmlcleaner();
$value = $cleaner->cleanup( $value );

Cheers,
Rob.


On Thu, 2003-08-07 at 14:25, Luis Lebron wrote:
> I am currently using a php class that uses the following syntax:
> 
> $value= htmlcleaner::cleanup($value);
> 
> 
> What exactly is the :: used for? Is there a different syntax for :: ?
> 
> thanks,
> 
> Luis R. Lebron
> Project Manager
> Sigmatech, Inc

-- 
.-.
| Worlds of Carnage - http://www.wocmud.org   |
:-:
| Come visit a world of myth and legend where |
| fantastical creatures come to life and the  |
| stuff of nightmares grasp for your soul.|
`-'

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



[PHP] RE: funcky parse error message due to { } or not sure what else might cause

2003-08-09 Thread Gronquist, Jim M


I added one term to a listing
-

if ( $follow_up == ") {
$error=true;
}

and now I'm getting a parse error

Ugh

I can't see anything that is causing this.

The script worked before.

Any idea where I might start to debug?

When I had this problem before it was because I had
Added a } which messed up the {  }  agreement but I only added
These 3 lines which shouldn't mess up the { } I don't think...



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



Re: [PHP] Is PHP cable of handling ASCII characters???

2003-08-09 Thread Curt Zirzow
* Thus wrote Scott Fletcher ([EMAIL PROTECTED]):
> Yea, receiving the data in a serial stream through cURL from someplace into
> an array() by using exec() function.

PHP is in general can handle binary strings, now if cURL can
handle it is a different story.  Of course I'm stabbing in the dark
at to what your problem is. Can you give an example of 'tripped up'
is?


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



[PHP] Page URL from a inc?

2003-08-09 Thread Jed R. Brubaker
I am having a bit of a problem with pathinfo. I am looking for a way to
generate a URL from within an included class that would return the URL for
the script that called the class. Pathinfo returns the class file. Is there
a way to get what I need?

Thanks in advanced,
Jed R. Brubaker



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



Re: [PHP] Is PHP cable of handling ASCII characters???

2003-08-09 Thread Scott Fletcher
I don't see how.  The data when recevied is already in pieces through the
exec() to PHP which convert the PHP variable into an array.  Can not store
the data into a file on the machine because it is illegal to do so.

>"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
>news:[EMAIL PROTECTED]
>[snip]
>Yea, receiving the data in a serial stream through cURL from someplace
>into
>an array() by using exec() function.
>[/snip]
>
>I would suggest receiving the data intact, explode into an array, and
>then go from there. That eliminates any serialization issue.



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



Re: [PHP] array method attributes (OO)

2003-08-09 Thread David Nicholson
Hello,

This is a reply to an e-mail that you wrote on Fri, 8 Aug 2003 at
15:54, lines prefixed by '>' were originally written by you.
> array $SESSION; near the beginning gives the error
> Parse error: parse error, unexpected T_ARRAY, expecting
T_OLD_FUNCTION
> or
> T_FUNCTION or T_VAR or '}' in
> d:wwwrootstwerburghs.orgobjcontacts.obj.php on line 6
> Fatal error: Cannot instantiate non-existent class: contacts in
> d:wwwrootstwerburghs.orgcmslist_contacts.php on line 9
> At 14:44 08/08/2003 +0100, David Nicholson wrote:

Ah, didn't spot that, just use var instead of array, if you want it
to start off as a blank array, use:
var $SESSION = array();

David.

--
phpmachine :: The quick and easy to use service providing you with
professionally developed PHP scripts :: http://www.phpmachine.com/
Free PHP error handling script: www.phpmachine.com/error-handler/

  Professional Web Development by David Nicholson
http://www.djnicholson.com/

QuizSender.com - How well do your friends actually know you?
 http://www.quizsender.com/

--
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 Jay Blanchard
[snip]
I'm ready for step 2. =)
[/snip]

'./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' --with-fdftk=/usr/local

1. Remove all of the single quotes from the configure line above where I
have appended --with-fdftk=/usr/local
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.
3. When the user prompt becomes available type "make" and hit enter.
Watch more stuff.
4. When the user prompt becomes available type "make install" and hit
enter. Watch more stuff.
5. When the user prompt becomes available restart Apache.

Support for FDF should be in place now (I will warn you that it may not
go as easily as I have listed it here). Run the phpinfo() page again and
check the line.

Let us know...

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



RE: [PHP] Mail

2003-08-09 Thread Mike Brum
Do you have an SMTP server installed on your machine? If not, add one to IIS
(probably the simplest way to do it in Win2k).

-M

-Original Message-
From: Sean [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 08, 2003 11:11 PM
To: [EMAIL PROTECTED]
Subject: [PHP] Mail


I cannot get mail() to work any idea's
I get a server error.
Windows 2000 the SMTP port is 25.
No default values have being changed from the original PHP installation.

In it's simplest form
mail("[EMAIL PROTECTED]", "My Subject", "Test");
Gives the error as do more complicated scripts that I copied. Thanks Sean



-- 
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] Passing Values between Pages : $_SESSION / $_GET

2003-08-09 Thread Pushpinder Singh Garcha
Hello again,

I would appreciate if someone could help me out with this one.

Thanks again

--Pushpinder



On Friday, August 8, 2003, at 11:46 AM, Pushpinder Singh Garcha wrote:

Hello All,

 I am using php and mysql in my application which allows users to  
search/query a database. The database is cast and has about 32 rows  
per record. When the user fires the query, the result is in the form  
of a table that contains only the 6 important rows of the entire  
record. Also there is a provision to allow the user to see the full  
record set by clicking on the link under the 'complete profile'  
contained in the table. (as shown below). The name of this script is  
lookup_results.php

Here is the result for a companies in city = 'Charlotte' / Primary key  
of the table is the name of the company.
--- 
--- 
-
Company Name Main ContactCity Website   
   E-Mail  Complete  
Profile
--- 
--- 
-
PSG   Pushpy  Charlotte  
http://www.psg.com[EMAIL PROTECTED]--Link--
TFNA Napier   Charlotte  
http://www.psg.com[EMAIL PROTECTED]--Link--
Micro Bates Charlotte   
http://www.psg.com   [EMAIL PROTECTED]--Link--
CNN  Garcha PSCharlotte   
http://www.psg.com   [EMAIL PROTECTED]--Link--
--- 
--- 
-

To see the complete profile of the company I use  
href=\"full_profile_1.php?name=".$row['company'].
So once we are on the full_profile_1.php, we can see all the contents  
of the record. Also we display a form where we can edit the results in  
place. The logic works like this.

// full_profile_1.php LOGIC



session_start();

if (isset($_SESSION['validuser']))
  {
if($submit)
  {
   update the changes that the user has made to the form
  My question here is  " How do I get the name of the company  
that was passed to this script as a $_GET Parameter. I cannot use the
  $company because it is out of scope. The only other option  
would be to use $_SESSION['link']  i.e. Store the names of the
  companies in a  session array. So now the array as per the  
example above would be {'PSG','TFNA', 'Micro', 'CNN' } . The way this
  will work is how do I get the index of the 'link' array that  
is applicable in this example.

   Here the name of the company would be $company  =  
$_SESSION['link'][0];
   If we had clicked the second row of the results table the  
name of the compnay would have been 'TFNA' i.e. $_SESSION['link'][1]
   and so on. How do I pass the index. ???



  }

   else
  {
  $company = $_GET['name'];
  USE  
 ANDdisplay all the rows of the record where company_name  
='company'

 }

  }

else {
 redirect the user to the ERROR Page
}
// end of pseudo- code

Thanks in advance guys. I know this may sound a lil' vague , but I  
have tried to present the logic and the problem.



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


Re: [PHP] Passing Values between Pages : $_SESSION / $_GET

2003-08-09 Thread Pushpinder Singh Garcha
Hello Jay ,

I am attaching snippet of the Form Code that displays the results of 
the first query

meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

";  ?>


  

   
  
 Complete
Candidate Profile



  

Logout
  



  
  
Company
  Name

   >
  
  
   

// END OF SNIPPET

However when I try to access it in the if($submit) part as 
$_POST['temp'] I get nothing !!!

Thanks in advance,

--Pushpinder



On Friday, August 8, 2003, at 04:57 PM, Jay Blanchard wrote:

[snip]
Let me clarify  again. The $_GET Parameter was used to to transfer the
name from the results page (with the tables etc) to a
full-profile_1.php page.  On the full_profile_1.php page the user is
displayed a form with all the details about the company. On the same
page there is a form where changes can be made to values of the fields.
I am trying to pass the company name in this form as a POST Parameter.
However the Update part of the full_profile.php page is not able to get
this value.
[/snip]
Clearer now.

Place the value in a hidden form field that can be passed along with 
the
POST



Re: [PHP] Is PHP cable of handling ASCII characters???

2003-08-09 Thread Scott Fletcher
Yea, receiving the data in a serial stream through cURL from someplace into
an array() by using exec() function.

"Jay Blanchard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
[snip]
Is PHP cable of handling the ASCII characters?  Back then, I had no
problem with it when there are 'a', 'b', 'c' characters as well as 'LF',
'CR', etc.  But when there is a 'NUL' character, it tripped up PHP so I
am
wondering if ASCII characters is fully supported.
[/snip]

How is the NUL tripping up PHP? Are you streaming something?



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



[PHP] Formatting an ascii characters in php?

2003-08-09 Thread Scott Fletcher
Hi!

I use the cURL to send and receive data regardless of what data format
is the data in.  There are certian ascii characters in the data, like 'LF'
for line feed, 'CR' for carriage return, etc.  This time I came upon a
problem where one of those ascii character caused PHP to get tripped up.
So, is there any PHP function or script that can translate the ascii
character into a text format where I can read each of those character to see
which one is causing the problem so I can be able to fix the problem.  Any
know of any of such PHP feature that can do those conversion?

Thanks,
 Scott



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



[PHP] Possible bug w/ open_basedir?

2003-08-09 Thread Dan Brown
 
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

I'm running a Mitel SME Server v5.6, which is based on RedHat 7.3,
on which I've upgraded PHP to version 4.3.2 (stock PHP version is
4.1.2).  Since I upgraded to 4.3.2, I've encountered a recurring, but
intermittent, problem with any of my PHP apps--IMP, phpBB, phpmychat,
ISMail, etc.  Frequently, these apps will come up with blank pages. 
When this happens, the following error is logged in the system log:

Aug  8 10:10:27 e-smith httpd: PHP Warning:  Unknown(): open_basedir
restriction in effect. File(/opt/ISMail/maillist.php) is not within
the
allowed path(s): (/home/e-smith/files/ibays/howtos) in Unknown on
line 0

The "File", of course, varies with the app in use, but the allowed
path is always the same.  Reloading the page will usually load it
correctly.

There is no open_basedir restriction in my php.ini.  The only place
this restriction is set (with this path) in httpd.conf is in this
block:


AddType application/x-httpd-php .php .php3 .phtml
AddType application/x-httpd-php-source .phps
php_admin_value open_basedir /home/e-smith/files/ibays/howtos


I never encountered this problem with PHP 4.1.2, but it's been
happening pretty frequently since I installed 4.3.2.  I haven't been
able to figure out any pattern to when it's going to happen, but I've
heard from some other SME users that they're running into the same
thing.

It seems to me that this may be a bug with PHP, but I'm not sure
what to do to confirm or disconfirm that.  Any suggestions would be
appreciated.  Thanks!

- -- 
Dan Brown, KE6MKS, [EMAIL PROTECTED]
"Since all the world is but a story, it were well for thee to buy the
more enduring story rather than the story that is less enduring."
 -- The Judgment of St. Colum Cille
 

-BEGIN PGP SIGNATURE-
Version: PGP 7.0.4

iQA/AwUBPzUpGn6CI7gsQbX8EQJpVQCg7YMjDHUxOBMX+aaARGwIt8OtAlYAoJim
l65OQP72fbq2VWg7p1js+aYN
=PzZk
-END PGP SIGNATURE-



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



[PHP] hanmir!!

2003-08-09 Thread Chris W. Parker
hanmir!!

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



[PHP] Can't change include_path in php.ini

2003-08-09 Thread Machiste' N. Quintana

Hi.
 I want to change the include_path of the php.ini. I tried uncommenting it,
and changing the path, but everytime I use phpinfo() to check if it changed,
it displays this as the include_path:

.;c:\php4\pear

And when it loads, it loads then reloads and reloads and etc. to give the
effect of it blinking. What is going on?

I have PHP 4.3.2, Apache 2.0.47, and MySQL 4.0.14 running on Windows XP Professional.

--
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] Old version of PHP

2003-08-09 Thread Justin French
On Friday, August 8, 2003, at 09:21  AM, Dan Phiffer wrote:

I'm working on an ongoing project that depends on a shared webserver 
running
an old version of PHP (4.1.2 I believe). Is there any good reason to 
stick
with an older version of PHP, or might it be a valid suggestion to 
have it
upgraded to something a bit more recent? I have a notion that upgrade
attempts may have been snubbed out by the way things like 
register_globals
are now handled by default, the perception being that newer versions 
of PHP
are incompatible with older code.
the register globals "event" happened on 4.1 (from memory), so any 
install over that should be straight forward.  in any case, it's just 
one simple directive that needs to be changed in the php.ini file... 
can't see how this should be an issue.

i think the best reason to keep up-to-date on the versions is that each 
new release is "better, more stable, etc etc"... i haven't ever heard 
anyone on this list say "i prefer 4.2.3 over 4.2.4" :)

as a programmer, i hate it how some hosts refuse to keep on top of the 
upgrades... really useful functions in newer versions aren't available.


Mainly I'm concerned that code I test on our in-house server running
version-current PHP will depend on function calls and language 
constructs
that the production server's vintage PHP interpreter lacks.
exactly... there isn't a HUGE number of differences between the current 
release and what they've got on the live server, but there are 
exceptions... i was making good use of file_get_contents() on my LAN, 
but had to write a user-function to replicate it when running on the 
live server which is stuck at 4.2.3 for the moment.

it's almost a case of "don't upgrade your LAN until the production 
server upgrades", but I prefer "convince you host to upgrade, or move 
host" :)

Justin

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


RE: [PHP] com obj from php

2003-08-09 Thread Jay Blanchard
[snip]
Does anyone know if ti is possible or not to create a com object from
php??
[/snip]

Please refer to the manual at http://www.php.net/manual/en/faq.com.php
for a start.

Have a pleasant and magical day!

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



[PHP] gzip to max 9

2003-08-09 Thread Decapode Azur
Dear All,




In this exemple with output beffering it is possible to select the maximum 
compression level,

is it possible to select the maximum compression level too
when writing in a file like below ??

$gzp = fopen($output_file, 'w');
gzwrite($gzp, $content);
gzclose($gzp);


I think that the default compression level here is 6,
and I would like to bring it to the maximum value 9.

-- 
cheers


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



Re: [PHP] Problem occurs when included file includes anther file.

2003-08-09 Thread Nicholas Robinson
You can set the path(s) in php.ini

Edit the file and search on 'include'

HTH

Nick

On Friday 08 Aug 2003 6:38 am, CaiYongzhou wrote:
> The directory structure is as follows:
> /
>
> |-- demo.php
> |-- inc/
> |
> |-- inc1.php
> |-- inc2.php
>
> === file demo.php ==
>  require 'inc/inc1.php';
> ?>
>
> === file inc/inc1.php ==
>  require 'inc2.php';
> ?>
>
> == file inc/inc2.php ==
> this is a test
>
> The above inc/inc1.php is ok for testing.And this would be ok too:
>  //file inc/inc1.php
> require 'inc/inc2.php';
> ?>
>
> Problem occurs when the code is like this
>  //file inc/inc1.php
> require './inc2.php';
> ?>
> Fatal error: main(): Failed opening required './inc2.php'
> (include_path='.:/usr/local/lib/php')
>
> It seems that there's no explanation about this in php manual.Could
> someone give some?
>
> Btw,I am using redhat 7.2 / Apache 2.0.47 / PHP 4.3.3RC1 as my testing
> server.
> Thank you for reading my post:)


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



RE: [PHP] Best PHP CMS

2003-08-09 Thread Chris W. Parker
Matt Schroebel 
on Tuesday, August 05, 2003 12:14 PM said:

>> -Original Message-
>> From: Anthony [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, August 05, 2003 9:52 AM
>> To: [EMAIL PROTECTED]
>> Subject: [PHP] Best PHP CMS
>> 
>> 
[snip]

Do us a favor and install Outlook QuoteFix[1]. ;)


chris.

[1] 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



[PHP] www.php.net

2003-08-09 Thread Tom Miller
Clear Daywww.php.net has an error on the main page.
Tom
-- 
==



-- 
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-09 Thread Jason Wong
On Saturday 09 August 2003 02:49, Cesar Cordovez wrote:
> 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).

Yes, an intelligent question indeed, but ultimately these type of questions 
(like how to use compilers, and why header files goes inside the include 
directory) are off topic for this list ...

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

... having said that it is a refreshing change from the boring "register 
globals", "what is a good editor to use with php" type questions.

-- 
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
--
/*
There's always free cheese in a mousetrap.
*/


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



RE: [PHP] magical file writing truncation

2003-08-09 Thread Jay Blanchard
[snip]
okay, the first few lines of raw text are as follows... it's a chat log
btw...

Session Start (Yahoo! - fatcubanskate:the_lady_in_waiting1982): Thu Jul
10
21:23:42 2003 [21:23] the_lady_in_waiting1982: hey sexy!!! [21:24]
fatcubanskate: hey sugar [21:24] fatcubanskate: how\'s thing? [21:25]
the_lady_in_waiting1982: you know we could do a whole roll playing
thing,
that would be a big as turn on [21:25] fatcubanskate: oh really? like...
i
pretend to be a pirate? [21:25] fatcubanskate: raaar!!!

and then the first few lines of the echo'd output...

Session+Start+%28Yahoo%21+-+fatcubanskate%3Athe_lady_in_waiting1982%29%3
A+Th
u+Jul+10+21%3A23%3A42+2003+%3Cbr+%2F%3E%0D%0A%5B21%3A23%5D+the_lady_in_w
aiti
ng1982%3A+hey+sexy%21%21%21+%3Cbr+%2F%3E%0D%0A%5B21%3A24%5D+fatcubanskat
e%3A
+hey+sugar+%3Cbr+%2F%3E%0D%0A%5B21%3A24%5D+fatcubanskate%3A+how%5C%27s+t
hing
%3F+%3Cbr+%2F%3E%0D%0A%5B21%3A25%5D+the_lady_in_waiting1982%3A+you+know+
we+c
ould+do+a+whole+roll+playing+thing%2C+that+would+be+a+big+as+turn+on+%3C
br+%
2F%3E%0D%0A%5B21%3A25%5D+fatcubanskate%3A+oh+really%3F+like...+i+pretend
+to+
be+a+pirate%3F+%3Cbr+%2F%3E%0D%0A%5B21%3A25%5D+fatcubanskate%3A+raaar%21
%21%
21
[/snip]

OK, put stripslashes back in and show the echo'd out put again.




-- 
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] Is PHP cable of handling ASCII characters???

2003-08-09 Thread Jay Blanchard
[snip]
Yea, receiving the data in a serial stream through cURL from someplace
into
an array() by using exec() function.
[/snip]

I would suggest receiving the data intact, explode into an array, and
then go from there. That eliminates any serialization issue.

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



[PHP] Problem in configuring freetds

2003-08-09 Thread Dipesh khacharia
Hi,

I am Dipesh from BG Broadband, India. I am working on linux-php. I am
trying to configure freetds with php, but it does not allow me to connect to
mssql server 2000.

The problem is not related  to login. I can ping the server.Using command
'tsql' i can connect to the database. So the problem must be with the
configuration of freetds with php. It doesn't work with perl too.

tsql -H "host" -p 1433 -U dips

worked

I have tried various version of freetds like 0.53 and also 0.61.

I have to use version 0.53 only but I just tried 0.61 so please give
solution regarding this version only.

With 0.53 I am getting error as

connect: Connection refused
DB-Library: Login incorrect
With 0.61 I am getting error as
src/tds/login.c: tds_connect: 172.16.3.36:4000: Connection refused
I have configured freetds with the following options

./configure --prefix=/usr/local/freetds0.53 --with-tdsver=7 --enable-msdblib
make
make install
Also I have configred PHP with the following options
'./configure' '--with-apxs=/usr/local/apache/bin/apxs'
'--with-sybase=/usr/local/freetds0.53/' '--with-odbc' '--with-mysql'
'--with-ldap' '--with-pgsql'
'--with-oci8=/home/oracle/m01/app/oracle/product/8.1.7/' '--with-gbdm'
'--enable-dbase' '--enable-calendar' '--enable-bcmath' '--enable-filepro'
'--enable-track-vars' '--enable-force-cgi-redirect'
make
make install
Then I copied the php.ini-dist file to /usr/local/lib/php.ini and then
restarted apache.
But I can't connect to it and the above error was shown.
So please help me and thanx in advance.
Suggestions are appreciated...
Regards,
Dipesh
BG Broadband, India






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



Re: [PHP] php source code//php-imap/ php-devel ..etc

2003-08-09 Thread Jason Wong
On Saturday 09 August 2003 04:31, Nabil wrote:

Please fix your clock, its too fast.

> When I dowload the source code of php and i compiled it in linux ...
> Does the full source code has everything i need , 

Depends on what your needs are! If you read the beginning of each (mostly 
each) chapter you'll see what the requirements are for using the functions 
covered in that chapter. The requirements are broadly:

1) Builtin, ie there's nothing special you need to do to get that 
functionality.

2) Provided by a library bundled with php (ie included with the php tarball). 
To use these, you usually need to configure with something like 
"--enable-XXX". 

3) Provided by an external library. This requires that you install the 
required library from other sources -- it is not provided with php. To use 
these you usually need to configure with something like 
"--with-XXX=/some/directory".

> because when i serach the
> rmps i found many packeges like php-imap / php-mssql /php-devel / php-mysql
> / php-ldap /php-odbc...

If you're compiling your own php then you need not worry about those.

> and if i want php to be compiled with gd ,, why should i get zlib (by
> example)???

Because if you don't compile with zlib then the files that you create will not 
be compressed (which is a bad idea).

> is there any documentation with a clear straight exapmle how do i compile
> it with all what i need (like apache - mysql - mssql - gd - and more ??)

There must be loads of tutorials that covers installation. Try "LAMP".

> what exactly the php source code has packeges ???

Probably more than you need. Just decide what functionality you need, look it 
up in the manual and see what the requirements are.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
If it's stupid but it works, it isn't stupid
-- Murphy's Military Laws n36
*/


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



Re: [PHP] Flash Actionscript List or Forum

2003-08-09 Thread Peter James
Not sure about a list, but this site has a boatload of tutorials and
answered lots of questions that I had.

http://actionscript.org/tutorials.shtml

--
Peter James
[EMAIL PROTECTED]

php|architect
The Magazine for PHP Professionals
http://www.phparch.com


- Original Message - 
From: "Joe Harman" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 08, 2003 1:08 AM
Subject: [PHP] Flash Actionscript List or Forum


> Hello all,
>
> I've been doing PHP for a little while now... I am starting learn Action
> Script now... and having trouble with global variables and functions...
> does anyone know where I find a good list or forum for action script?
>
> Joe Harman
>
> http://www.HarmanMedia.com
>
> I used to think I was indecisive, but now I'm not so sure. - Joe Harman,
> 2003
>
>


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



[PHP] Table listing of months

2003-08-09 Thread Ashley M. Kirchner
   I have the following snippet of code:


 // contents of $monthlyarchivereverse is generated by a different
 // piece within a content managent system.  The data, or format
 // can not be changed.
 $monthlyarchivereverse = array("/08/index.html August 2003",
"/07/index.html July 2003",
"/06/index.html June 2003",
"/05/index.html May 2003"
   );
 $monthlyarchive = array_reverse($monthlyarchivereverse);
 function lightdark($rest) {
   if ($rest%2) {
 $color = "#eee";
   } else {
 $color = "#fff";
   }
   return $color;
 }
 foreach ($monthlyarchive as $string) {
   list($link, $month, $year) = split(" ",$string);
   $shortmonth = substr($month,0,3);
   $a[$year][] = "$shortmonth";
 }
 reset($a);
 $array_first_key = key($a);
 while (count($a[$array_first_key]) < 12) {
   array_unshift($a[$array_first_key], " ");
 }
 foreach ($a as $year=>$list_of_strings) {
   echo "\n";
   echo " $year\n 
\n";
   foreach ($list_of_strings as $key=>$date_string) {
 if($key%4 || $key==0) {
   } else {
 echo " \n \n";
   }
   echo "  ".rtrim($date_string)."\n";
 }
 echo " \n\n";
 }
?>

   Which when run, will generate a table that looks like this, with 
each month hyperlinked to its respective link from the array:

   +---+
   | | | | |
   +---+
   | | | | |
   +---+
   | May | Jun | Jul | Aug |
   +---+
   I now want to change this, to something like this:

   +---+
   | Jan | Feb | Mar | Apr |
   +---+
   | May | Jun | Jul | Aug |
   +---+
   | Sep | Oct | Nov | Dec |
   +---+
   ...where only those months that have an associated hyperlink will be 
linked, and the others will just be displayed without a link.  How can I 
achieve this?



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


RE: [PHP] Max script size

2003-08-09 Thread Jay Blanchard
[snip]
I have a 6MB PHP script that just won't exe on the live server. It works
on
the local one.  Any ideas on a setting that may limit the script.  It is
not
timing out, it only takes about 3 sec to exe.
[/snip]

I'll take a SWAG at itare the PHP versions the same? Do the ini
files have the same settings? Does it throw any errors? 

Have a pleasant and productive day! [rant withheld]


--
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 Jason Wong
On Friday 08 August 2003 23:12, Cesar Cordovez wrote:
> Now I have 4 versions: FDFTK.H, fdftk.h, FdfTk.h, Fdftk.h.  Same problem.

Where on earth did you get all those versions from? 

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?

-- 
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
--
/*
Mike:   "The Fourth Dimension is a shambles?"
Bernie: "Nobody ever empties the ashtrays.  People are SO inconsiderate."
-- Gary Trudeau, "Doonesbury"
*/


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



[PHP] Imagick

2003-08-09 Thread Jacob Marble
Hello all-
Does anyone here use Imagick in PHP?  I've tried the example .php files
using a miriad of version combinations and I always get this error:

Fatal error: Call to undefined function: imagick_readimage() in
/usr/local/lib/php/docs/imagick/examples/border.php on line 5



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



RE: [PHP] dev style guide

2003-08-09 Thread Miles Thompson
At 11:27 AM 8/6/2003 -0500, Jay Blanchard wrote:
[snip]
Just a remark but isn't it pointless to use Hungariannotation in a
language that is by default typeless???
[/snip]
We use it becuase we have a group of programmers, so the notation makes
it easier for one in the group to understand the intention of another in
the group. The notation also helps to clear up any casting issues that
may arise. http://us2.php.net/language.types.type-juggling
And it helps when you get back up to speed when you revisit a project after 
a few months.
Use of Hungarian notation has been a bit of a religious issue; use what 
works and use it consistently.

Of course, if you come from the Flash world, it's likely a postfix (ugly 
word!) rather than prefix.

Cheers - Miles 

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


RE: [PHP] trying to match the front and end...

2003-08-09 Thread Dan Joseph
Hi,

> Question:
> Where is this number coming from? Couldn't you just use a substr() based
> upon it's length and not deal with a regular expression?

Its a bank account number coming from a database.  We're reformatting it
for ACH processing.  The number could be:

23408234980423

with a rule of remove 12453 from beginning, and remove 0423 from the end,
that would leave us with 2340823498.  The rule could also read to remove 234
from the beginning, and 43985 from the end, leaving us 08234980423.

The length of the number is also dynamic.

I guess I just found it easier to go over it with a couple regular
expressions, then got to thinking maybe I could combine it into one.  What
suggestion would you have?

-Dan Joseph


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



[PHP] php source code//php-imap/ php-devel ..etc

2003-08-09 Thread Nabil
Hi all;

When I dowload the source code of php and i compiled it in linux ...
Does the full source code has everything i need , because when i serach the
rmps i found many packeges like php-imap / php-mssql /php-devel / php-mysql
/ php-ldap /php-odbc...

and if i want php to be compiled with gd ,, why should i get zlib (by
example)???
is there any documentation with a clear straight exapmle how do i compile it
with all what i need (like apache - mysql - mssql - gd - and more ??)

what exactly the php source code has packeges ???

Nabil



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



Re: [PHP] where are my errors?

2003-08-09 Thread Curt Zirzow
* Thus wrote David T-G ([EMAIL PROTECTED]):
> John --
> 
> ...and then John W. Holmes said...
> % 
> % David T-G wrote:
> % 
> % >My partner and I have done something that gets rid of our error messages,
> % >and we're not quite sure what.  The identical code base (I copied it over
> % >myself; I'm sure) worked "fine" on another supposedly-identical RH Linux
> % >machine.
> % 
> % is display_errors ON for one machine and OFF for the other?
> 
> Not sure how to tell; remember that I get errors when I don't include his
> config.
> 
> Does that show up in phpinfo() output?

yeah you can get it from phpinfo() or use ini_get('display_errors')


HTH,

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



RE: [PHP] Question on class syntax

2003-08-09 Thread Luis Lebron
Thanks for the information. I checked the manual but wasn't able to find it.


Luis

-Original Message-
From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
Sent: Thursday, August 07, 2003 1:35 PM
To: Luis Lebron; Php-General (E-mail)
Subject: Re: [PHP] Question on class syntax


From: "Luis Lebron" <[EMAIL PROTECTED]>
> I am currently using a php class that uses the following syntax:
>
> $value= htmlcleaner::cleanup($value);
>
>
> What exactly is the :: used for? Is there a different syntax for :: ?

You're calling the cleanup() method of the "htmlcleaner" class.

You could also have:

$ob = new htmlcleaner;
$value = $ob->cleanup($value);

You can use the first method without having to actually make a new object.
Whether that's better or not depends upon your application. It basically
turns your "object" into a function repository.

---John Holmes...


Re: [PHP] Simple cookie question

2003-08-09 Thread Jim Lucas
Assuming that you have a process page that stores the submitted choice, have
the process page make the cookie setting and then redirect back to the first
page.

Or better yet, I like it when my original page never leaves and a popup
window is openned to save my choice and then show me the results for that
given vote.

Jim Lucas
- Original Message -
From: "Matthew Koh" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, August 09, 2003 4:22 PM
Subject: [PHP] Simple cookie question


> This may be a stupid question, but I'm trying to set up a system where I
can
> take a poll from visitors to my website and then set a cookie so that they
> can't vote more than once (until they clear their cookies at least).
> Problem is, I don't want to put it at the top of my page, because what if
> somebody opens up a poll but decides not to vote, then later changes his
> mind.  The cookie will prevent him from voting.  I want the cookie to be
set
> right after the user clicks the vote button, but every time I do that, I
get
> an error about headers already being sent.  Is there any way around this?
>
> 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] Stop neurotic posting

2003-08-09 Thread Jay Blanchard
[snip]
I love that I can shoot off a question while at work and get an answer
quick.  It's too bad that my novice questions annoy people, but I'm just
learning, and that's WHY I joined this list.  It's a resource, just like
the manual.
[/snip]

Generally you present a well thought out question due to your previous
research though. It is those questions, generally, that get asked over
and over (usually within days of each other) that end up with the terse
replies...

"How can I upload pictures with PHP?"
"How can I include attements with mail()"
[In the subject line] "HELP ME!"
"How come my form will not pass variables?"
"Register_Globals ?!? "
"Is there a function to ... [insert thought here]?"

If anyone says "I have RTFM and STFW, but I don't understand [now append
one of the above]...", they generally receive the help that they are
looking for.


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



Re: [PHP] Simple cookie question

2003-08-09 Thread Mike Migurski
>There are two ways round your problem...
>
>1. Set your cookie right at the top of the script, so as your first line
>have something like: if(isset($_POST['vote'])){ setcookie(); }
>
>2. Use output buffering, this will make PHP buffer all of your content
>and not send it till you tell it to (or until it reaches the end of the
>file). Read more at: http://uk.php.net/ref.outcontrol

3. Use PHP's session features. Start your session at the top of the page,
like usual, and then set a flag in $_SESSION when the poll is is
completed. This will allow you to set other arbitrary flasg as well.
See: http://php.net/session

-
michal migurski- contact info and pgp key:
sf/cahttp://mike.teczno.com/contact.html


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



[PHP] Repopulating forms

2003-08-09 Thread Gerard L Petersen
Hi

My code looks like this.

";
echo '';
?>


 
 




When i run it the bit after the quotes are truncated. Where it truncates
depends on what type of quote i am using.

Any ideas?

Thanks

Gerard



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



Re: [PHP] session bug or feature

2003-08-09 Thread Curt Zirzow
* Thus wrote Christian Calloway ([EMAIL PROTECTED]):
> register_global is currently on. The problem is, I am hacking into someone
> else's (awful awful) code, and if I turned off register_globals, the whole
> application would go kaput. I am not even using the old session_x functions,
> just the new associative session array $_SESSION.

What I would do would turn off register_globals and then use
import_request_variables on all the pages. 

You could set up a auto_prepend_file to be include for all the
files.  This would make things transparent and protect your
$_SESSION vars.


 http://php.net/import-request-variables


Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

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



[PHP] Re: [ERR] DEAD MAILBOX

2003-08-09 Thread John Manko
arrg.

[EMAIL PROTECTED] wrote:

Transmit Report:

To: [EMAIL PROTECTED], 402 Local User Inbox Full ([EMAIL PROTECTED])
 



Subject:
Re: [PHP] Still can't pass variable through url
From:
John Manko <[EMAIL PROTECTED]>
Date:
Fri, 08 Aug 2003 02:47:01 -0400
To:
Martin Towell <[EMAIL PROTECTED]>
actually, you might want to urlencode it.
ok, so i doubt that you would need url encoding for $year and $month, 
but I'm sure you will playing with more of this in the future, so you 
should properly prepare to do so.  Note: browsers will do formatting 
for you, but don't rely on it.

"page.php?year=" . urlencode($year) . "&month=" . urlencode($month)

Martin Towell wrote:

See if changing it to
page.php?year=$year&month=$month
works
The separator between the page and the query string is "?"
The separator between each key/value pair is just "&"
-Original Message-
From: Jack [mailto:[EMAIL PROTECTED]
Sent: Friday, 8 August 2003 4:30 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP] Still can't pass variable through url
Dear all
I had set the "register_global=on" and "magic_quotes_runtime=off" 
already,
but when i click my hyperlink "page.php?year=$year&?month=$month", it
doesn't pass the variable for
?year and ?month to the destination page "page.php"
I'm using php 5.0 above , if the same case apply to php4.04, then 
there is
no problem at all!
Can anyone please give me more help on this?

Thx alot
Jack


 






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

You must compile PHP with --with-fdftk[=DIR].

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


[PHP] [Fwd: [ERR] Re: [PHP] Configuring PHP to use aspell]

2003-08-09 Thread daniel
how do we get this guy off the list

 Original Message 
Subject: [ERR] Re: [PHP] Configuring PHP to use aspell
From: [EMAIL PROTECTED]
Date: Sun, August 10, 2003 11:17 am
To: [EMAIL PROTECTED]

Transmit Report:

 To: [EMAIL PROTECTED], 402 Local User Inbox Full ([EMAIL PROTECTED])


talking of aspell how could i intergrate this into a search engine, so i
could correct typos in a search ?
> I have the following set up...
>
> RH Linux version 7.3
>
> PHP 4.3.2
>
> Aspell installed on the server
>
> I have NEVER configured PHP and am looking for some assistance in
> configuring PHP to use Aspell so I can take advantage of this great
> feature that (as I can see from my searches) is not as well documented.
>
> I'm not sure of the path to my Aspell either...
>
> Jeff




-- 
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] PHP5 class constants

2003-08-09 Thread Cristiano Duarte
This code:


results in this error:

PHP Fatal error:  Unsupported operand types in /test.php on line 13

Shouldn't class constants support simple expressions ?


Cristiano Duarte



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



[PHP] How to point at a spot and get relevant information?

2003-08-09 Thread Yao, Minghua

> Dear all,
> 
> Anybody knows how to write a graphic plotting code such that when users
> point
> at that spot, they can get the information relevant to that spot? Thanks
> in advance.
> 
> -MY

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



RE: [PHP] Passing Values between Pages : $_SESSION / $_GET

2003-08-09 Thread Jay Blanchard
[snip]
My question here is  " How do I get the name of the company  that was
passed to this script as a $_GET Parameter. I cannot use the $company
because it is out of scope.
[/snip]

How about $_GET['company'] ? Or am I missing something?

Have a pleasant day.

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



[PHP] Re: Pls Help-Looking for PHP Product for Articles

2003-08-09 Thread Alexandru COSTIN
Hello,
You could take a look at Komplete Lite - allows you to publish articles
and associate forums on them.

Even if the user roles are not very powerful in the open version -
basically you will have what you want.

http://www.interakt.ro/products/KompleteLite/

Alexandru

-- 
Alexandru COSTIN
Chief Operating Officer
http://www.interakt.ro/
+4021 312 5312
"Stephen Toutonghi" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi,
>
> I'm looking for a product that will help me create a documentation
> system. I'd like to be able to post individual articles on an intranet,
> and have user's create comments on the articles that become part of the
> article. And editor could then review the comments and add to the
> article where appropriate, remove comments where appropriate. A good
> example of what I'm looking for is the kind of format used on this page:
>
> http://www.php.net/manual/en/ref.dbx.php
>
> where there's an article, and comments below it.
>
> Any ideas?
>
> Thanks,
>
> Steve
>



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



Re: [PHP] htmlspecialchars() and HTML code

2003-08-09 Thread John W. Holmes
Thaddeus J. Quintin wrote:

CPT John W. Holmes wrote:

 > Try this:
 >
 > This is  text
 >
 > If you submit that "text" and then print $_REQUEST['text'], you'll 
see that
 > you have
 >
 > This is  text

Ok, but that only makes me realize the further extent of the problem.

If the HTML file that they upload has '<' or '>' entities, then 
these characters will be displayed in the text area as '<' and '>' 
symbols.  So when  the text is submitted from the textarea, all of the 
user's HTML entities will have been destroyed.

Any thoughts on this problem?
Yep, of course. :)

If there is a < in the file, when you apply htmlentities(), it'll 
come out in the HTML source as < and appear as < in the 
rendered . So... it's not an issue.

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

PHP|Architect: A magazine for PHP Professionals – www.phparch.com





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


[PHP] hanmir.com

2003-08-09 Thread daniel
http://www.hanmir.com/ anyone know korean , we need to speak to the
administrator of the server to turn this bloody annoying message off , i've
never seen anything like this before how rude to send auto messages back



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



Re: [PHP] checking the return value of member function with empty

2003-08-09 Thread andu
On Sat, 09 Aug 2003 20:00:57 -0500
"Edward Rudd" <[EMAIL PROTECTED]> wrote:

> I am having this rather annoying syntax problem.
> 
> I have this..
> if (!empty($this->GetParam('someparameter')) {
>   // OK do something since the parameter is set.
> }

 if (!empty($this->GetParam('someparameter'))) {
   // OK do something since the parameter is set.
 }

> However that fails with this parse error
> 
> parse error, expecting `')''
> 
> Why???
> 
> If I do this
> $var = $this->GetParam('someparameter'));
> if (!empty($var)) {
>   // same thing as before
> }
> it works fine with no error..
> 
> This *SHOULD* be syntactically correct, but php doesn't think so.
> Should I file a bug on this one?
> Oh yeah, normal information about running environment.
> PHP version 4.3.2
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 


-- 
Andu

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



RE: [PHP] Problem sortiing dyn query

2003-08-09 Thread Mark

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

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

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

Is the result the same?

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

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

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



[PHP] static method and $this

2003-08-09 Thread messju mohr
hello php-general,

i found this thread in the mailing-list archive:
http://marc.theaimsgroup.com/?l=php-general&m=104182777004472&w=2

to summarize: if you call a static method FooClass::foo() from within
an object-method (for example:

class BarClass {

  function bar() {
Foo::foo();
  }
  
}
$obj = new BarClass;
$obj->bar();

)


FooClass::foo() will have a reference "$this" defined that is a
reference to $obj.


i noticed recently that this still works in the beta1 of php5.

my question: does anybody have a clue if this is a well-known and
supported feature? or is it just a side-effect and using it can be a
bad design-decision in the long run?

greetings
messju


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



Re: [PHP] Page URL from a inc?

2003-08-09 Thread Jason Wong
On Saturday 09 August 2003 05:44, Jed R. Brubaker wrote:
> I am having a bit of a problem with pathinfo. I am looking for a way to
> generate a URL from within an included class that would return the URL for
> the script that called the class. Pathinfo returns the class file. Is there
> a way to get what I need?

See what you can find in $_SERVER.

-- 
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
--
/*
Your own mileage may vary.
*/


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