[PHP] test

2003-01-12 Thread Karl James
test



RE: [PHP] php5 cvs

2003-01-12 Thread Sean Malloy
try

private function()
{
}

-Original Message-
From: electroteque [mailto:[EMAIL PROTECTED]]
Sent: Sunday, 12 January 2003 6:43 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] php5 cvs


hmm has the public and private function accessor changed ? i have been
building my classes with test() and _test() to differentiate from public and
private and have been waiting to try it out but i can still access both ! ??

"Electroteque" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> lol no , i am gonna try and upgrade my workfrom dinasour php3 to php 4.3,
i
> have a development box here @ home i just upgraded to the 4.3 release from
> rc3 and am gonna try out version 5 then it doesnt matter how stable it is
at
> home really :D
>
> "Danny Shepherd" <[EMAIL PROTECTED]> wrote in message
> 000b01c2b9d2$ae5e46c0$6400a8c0@DANNYS">news:000b01c2b9d2$ae5e46c0$6400a8c0@DANNYS...
> > It includes the latest CVS build of ZendEngine 2.0 - AFAIK it hasn't
even
> > reached beta status yet, so don't even think about using it for
production
> > work. That said, I didn't have any problems building it and it seems
> pretty
> > stable.
> >
> > A list of changes and features can be found at
> > http://www.php.net/ZEND_CHANGES.txt.
> >
> > HTH
> >
> > Danny.
> >
> > - Original Message -
> > From: "electroteque" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Saturday, January 11, 2003 6:50 PM
> > Subject: [PHP] php5 cvs
> >
> >
> > > hi guys just noticed php5 cvs in the snaps page , does this have the
> zend
> > > 2.0 engine ? more specific question has it got the proper OO built in
> yet
> > ?
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
>
>



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


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




Re: [PHP] test

2003-01-12 Thread Philip J. Newman
this was a functional email

- Original Message - 
From: "Karl James" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 13, 2003 12:24 AM
Subject: [PHP] test


> test
> 


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




Re: [PHP] Changing permissions with mkdir?

2003-01-12 Thread Jason Wong
On Sunday 12 January 2003 12:56, Ben Cheng wrote:
> When I run mkdir("path to new dir", 0777); I get a directory that has
> owner and group set to "nobody" and drwxr-xr-x permission.  How do I
> get the permission to be set to drwxrwxrwx?

umask()

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
In America, any boy may become president and I suppose that's just one
of the risks he takes.
-- Adlai Stevenson
*/


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




Re: [PHP] Uploading images to a particular folder in the server

2003-01-12 Thread Jason Wong
On Sunday 12 January 2003 12:55, Rick Emery wrote:
> in your HTML file:
> 
> 
>
> in PHP script:
> copy($HTTP_POST_FILES['picfile']['tmp_name'], "../images/newfilename.gif");

Better still check out the example in the manual.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
I don't remember it, but I have it written down.
*/


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




Re: [PHP] Permission Denied

2003-01-12 Thread Jason Wong
On Sunday 12 January 2003 10:10, Stephen wrote:
> There's already a folder named packs but my problem was not having the /
> before it. One more question. How can I dynamically get the path to the
> current folder? Like your at http://www.bob.com/joe/index.php and you want
> to get the http://www.bob.com/joe/ bit and do it dynamically?

print_r($_SERVER) will show you which bits you can use.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
I'll show you MY telex number if you show me YOURS ...
*/


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




[PHP] highlight keywords issue

2003-01-12 Thread Hatem Ben
Heya all,

I'm trying to highlight search keywords in a string, everything work expect
when this keyword is inside a tag like this :

keyword (php) :

php



will be highlighted to :

php">php

php.gif"
border=0 alt="php.net">

I have tryed to separate text from html, then highlight it then join
html/text again, but this will be very long and not really usefull !

I'm using preg_replace :

preg_replace('|\b('.quotemeta($keyword).')\b|iU', '\\1', $content);

Any help to fix that ?

Thanks;
Hatem


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




RE: [PHP] php5 cvs

2003-01-12 Thread Dan Rossi
Fatal error caught: Call to private method class_test::echo_test() from
context '' in /www/servers/electroteque/web/galleries/classtest.php on line
18

class Class_Test {
function Class_Test() {

}

private function echo_test() {
echo "test";
}

function echo_test2() {
$this->echo_test();
}
}

$class = new Class_Test();

$class->echo_test();

so are you saying the referencing has all been changed now ? i read the
structure before and to prepare for zend 2 reference the functions like
_test() and test(), means i'll have to rewrite my functions again :|




-Original Message-
From: Sean Malloy [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 12, 2003 7:52 PM
To: electroteque; [EMAIL PROTECTED]
Subject: RE: [PHP] php5 cvs


try

private function()
{
}

-Original Message-
From: electroteque [mailto:[EMAIL PROTECTED]]
Sent: Sunday, 12 January 2003 6:43 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] php5 cvs


hmm has the public and private function accessor changed ? i have been
building my classes with test() and _test() to differentiate from public and
private and have been waiting to try it out but i can still access both ! ??

"Electroteque" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> lol no , i am gonna try and upgrade my workfrom dinasour php3 to php 4.3,
i
> have a development box here @ home i just upgraded to the 4.3 release from
> rc3 and am gonna try out version 5 then it doesnt matter how stable it is
at
> home really :D
>
> "Danny Shepherd" <[EMAIL PROTECTED]> wrote in message
> 000b01c2b9d2$ae5e46c0$6400a8c0@DANNYS">news:000b01c2b9d2$ae5e46c0$6400a8c0@DANNYS...
> > It includes the latest CVS build of ZendEngine 2.0 - AFAIK it hasn't
even
> > reached beta status yet, so don't even think about using it for
production
> > work. That said, I didn't have any problems building it and it seems
> pretty
> > stable.
> >
> > A list of changes and features can be found at
> > http://www.php.net/ZEND_CHANGES.txt.
> >
> > HTH
> >
> > Danny.
> >
> > - Original Message -
> > From: "electroteque" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Saturday, January 11, 2003 6:50 PM
> > Subject: [PHP] php5 cvs
> >
> >
> > > hi guys just noticed php5 cvs in the snaps page , does this have the
> zend
> > > 2.0 engine ? more specific question has it got the proper OO built in
> yet
> > ?
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
>
>



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


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




Re: [PHP] fopen with nasty pathnames

2003-01-12 Thread Mat Harris
Gerald Timothy Quimpo wrote:

On Sunday 12 January 2003 07:08 am, Mat Harris wrote:


Patti\ Smith/Horses\ \[1975\]/01-Gloria.mp3

but fopen will still refuse saying file not found. I have tried escaped
and unescaped amnd yes, I am very sure the file is there.

How can I get fopen to accept a path like this?



$in=fopen("a filename with spaces in it.mp3","r");

works for me.  how are you getting filenames?  it might be that it's
the directory reading functions that are giving you bad filenames.
(although, i just tried (not copy-pasted, so close but not exactly
what i tested):

   $dir=opendir(".");
   while(($dd=readdir($dir))!=false)
  print("$dd\n");
   closedir($dir);

and that works for a directory that has files with spaces in them.
all filenames are printed, including the names that have spaces.

another possibility, are those backslashes just for displaying?  or
are they actually there in the filename on disk?  if the backslashes
are actual parts of the filename (they shouldn't be, but the world
is weird) then you'll need to escape them.  "\\".

tiger



not escaping the filename worked. weird. i spend a good hour writing a 
function to make sure they were properly escaped. i thought i tried it 
this way before, but never mind.

thanks

--
Mat Harrison			Network Systems Administrator
[EMAIL PROTECTED]	www.genestate.com


msg92657/pgp0.pgp
Description: PGP signature


Re: [PHP] php5 cvs

2003-01-12 Thread Zeev Suraski
Not sure what you mean by 'changed', but the way to denote private 
functions is by adding 'private' to the method declaration, and not by 
prefixing them with _.

You can do it using:

class bar {
private function foo()
{
...
}
...
};

Zeev

At 09:43 12/01/2003, electroteque wrote:
hmm has the public and private function accessor changed ? i have been
building my classes with test() and _test() to differentiate from public and
private and have been waiting to try it out but i can still access both ! ??

"Electroteque" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> lol no , i am gonna try and upgrade my workfrom dinasour php3 to php 4.3,
i
> have a development box here @ home i just upgraded to the 4.3 release from
> rc3 and am gonna try out version 5 then it doesnt matter how stable it is
at
> home really :D
>
> "Danny Shepherd" <[EMAIL PROTECTED]> wrote in message
> 000b01c2b9d2$ae5e46c0$6400a8c0@DANNYS">news:000b01c2b9d2$ae5e46c0$6400a8c0@DANNYS...
> > It includes the latest CVS build of ZendEngine 2.0 - AFAIK it hasn't
even
> > reached beta status yet, so don't even think about using it for
production
> > work. That said, I didn't have any problems building it and it seems
> pretty
> > stable.
> >
> > A list of changes and features can be found at
> > http://www.php.net/ZEND_CHANGES.txt.
> >
> > HTH
> >
> > Danny.
> >
> > - Original Message -
> > From: "electroteque" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Saturday, January 11, 2003 6:50 PM
> > Subject: [PHP] php5 cvs
> >
> >
> > > hi guys just noticed php5 cvs in the snaps page , does this have the
> zend
> > > 2.0 engine ? more specific question has it got the proper OO built in
> yet
> > ?
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, visit: http://www.php.net/unsub.php
> > >
> >
>
>



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



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




[PHP] strip php tags from code ?

2003-01-12 Thread David D
I only want to keep html code of a page.
I want to remove php tags.
Some tell that strip_tags is not adapted.

sample of what i want to do:

na


->

na


php tags can be :
or 
or   /i

Merci.



.



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




RE: [PHP] php5 cvs

2003-01-12 Thread Dan Rossi
its cool , i cant remember where i saw the reference , but it was claiming
to prefix the functions with underscores to denote private functions in php
4  for the rollover of php5, it was a pretty legit resource i cant remember
where though have too many bookmarks, oh well at least i know now , i think
it meant to underscore them , to make the private functions recognisable so
then the rewrite for the proper OO in php5 can be easy as adding private
where the underscores are ??, i gave  5 a test, compiled with no problems
except my ming extension didnt seem to load properly so will stick with for
4.3 for now.
aparantly its still not true OO as you have to add the constructor of the
base class inside the sub class constructor where other languages dont need
to do this, i was told from my c++ flatmate of mine but correct me if i'm
wrong but sadly i dont know much c++ apart from modding source code now and
then :D

-Original Message-
From: Zeev Suraski [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 12, 2003 11:13 PM
To: electroteque
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] php5 cvs


Not sure what you mean by 'changed', but the way to denote private
functions is by adding 'private' to the method declaration, and not by
prefixing them with _.

You can do it using:

class bar {
 private function foo()
 {
 ...
 }
 ...
};

Zeev

At 09:43 12/01/2003, electroteque wrote:
>hmm has the public and private function accessor changed ? i have been
>building my classes with test() and _test() to differentiate from public
and
>private and have been waiting to try it out but i can still access both !
??
>
>"Electroteque" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > lol no , i am gonna try and upgrade my workfrom dinasour php3 to php
4.3,
>i
> > have a development box here @ home i just upgraded to the 4.3 release
from
> > rc3 and am gonna try out version 5 then it doesnt matter how stable it
is
>at
> > home really :D
> >
> > "Danny Shepherd" <[EMAIL PROTECTED]> wrote in message
> > 000b01c2b9d2$ae5e46c0$6400a8c0@DANNYS">news:000b01c2b9d2$ae5e46c0$6400a8c0@DANNYS...
> > > It includes the latest CVS build of ZendEngine 2.0 - AFAIK it hasn't
>even
> > > reached beta status yet, so don't even think about using it for
>production
> > > work. That said, I didn't have any problems building it and it seems
> > pretty
> > > stable.
> > >
> > > A list of changes and features can be found at
> > > http://www.php.net/ZEND_CHANGES.txt.
> > >
> > > HTH
> > >
> > > Danny.
> > >
> > > - Original Message -
> > > From: "electroteque" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Saturday, January 11, 2003 6:50 PM
> > > Subject: [PHP] php5 cvs
> > >
> > >
> > > > hi guys just noticed php5 cvs in the snaps page , does this have the
> > zend
> > > > 2.0 engine ? more specific question has it got the proper OO built
in
> > yet
> > > ?
> > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > >
> >
> >
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


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




Re: [PHP] Simple Form Processing

2003-01-12 Thread Kyle Babich
This is what I tried:

if (is_uploaded_file($HTTP_POST_FILES['image1']['image1']) {
move_uploaded_file($HTTP_POST_FILES['image1']['image1'], 
"$DOCUMENT_ROOT/images/$file");
}

and also this:

if (is_uploaded_file($_FILES['image1']['image1']) {
move_uploaded_file($_FILES['image1']['image1'], "$DOCUMENT_ROOT/images/$file");
}

and this:

if (is_uploaded_file($_FILES['image1']['image1'])) {
copy($_FILES['image1']['image1'], "$DOCUMENT_ROOT/images");
}

,the image (which was within the size range) was never uploaded.  I have
a feeling that I am makeing 1 or 2 of the same mistakes in all three but
through my experimenting and reading I am having no luck.  I also bought
Programming PHP but I trust it less and less as I even find simple
mistakes like missing quotes in example code.  So what's going wrong?

Thank you again,
Kyle

On Sun, 12 Jan 2003 15:17:42 +1100, "Justin French"
<[EMAIL PROTECTED]> said:
> Hi,
> 
> the files themselves are available in the $_FILES array, but it's not as
> simple as that.
> 
> may i recommend you start by copying the Examples 18-1 and 18-2 from this
> page:
> http://www.php.net/manual/en/features.file-upload.php
> 
> Once you've got THAT code working smoothly and understand what's
> happening,
> THEN start modifying it to a 3-file form.
> 
> I'd personally push forms through using POST method rather than get
> whenever
> possible -- especially when dealing with files... the manual does it this
> way too :)
> 
> 
> Justin
> 
> 
> 
> on 12/01/03 12:18 PM, Kyle Babich ([EMAIL PROTECTED]) wrote:
> 
> > I just broke skin with php and I'm learning forms, which I'm not good
> > with at all.  These are snippets from post.html:
> > 
> > 
> > and
> > 
> > 
> > 
> > 
> > but how would I pass the actual image on because when I do something like
> > this:
> >  > ?>
> > as you could probably guess only the filename prints.
> > 
> > So how do I take the image instead of just the filename?
> > 
> > Thank you,
> > --
> > Kyle
> 
> 

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




php-general Digest 12 Jan 2003 12:39:48 -0000 Issue 1818

2003-01-12 Thread php-general-digest-help

php-general Digest 12 Jan 2003 12:39:48 - Issue 1818

Topics (messages 131287 through 131328):

Simple Form Processing
131287 by: Kyle Babich
131299 by: Justin French
131328 by: Kyle Babich

Some help on PHP & HTML please
131288 by: Denis L. Menezes
131289 by: Daniel Kushner

Sorry, PHP & HTML
131290 by: Denis L. Menezes
131294 by: Timothy Hitchens \(HiTCHO\)
131298 by: Larry Brown

Permission Denied
131291 by: Stephen
131295 by: Stephen
131300 by: jacob.keystreams.com
131321 by: Jason Wong

Re: php5 cvs
131292 by: electroteque
131315 by: electroteque
131317 by: Sean Malloy
131323 by: electroteque
131325 by: Zeev Suraski
131327 by: electroteque

Re: global to superglobal
131293 by: Greg Beaver

Re: fopen with nasty pathnames
131296 by: Gerald Timothy Quimpo
131324 by: Mat Harris

displaying in the table problem
131297 by: Denis L. Menezes

Re: rintones using php
131301 by: Justin French

Uploading images to a particular folder in the server
131302 by: Denis L. Menezes
131303 by: Rick Emery
131320 by: Jason Wong

Changing permissions with mkdir?
131304 by: Ben Cheng
131310 by: Timothy Hitchens \(HiTCHO\)
131319 by: Jason Wong

Format tables!!
131305 by: Karl James
131309 by: Justin French

Amount of data in the database
131306 by: Denis L. Menezes
131307 by: Timothy Hitchens \(HiTCHO\)
131311 by: Denis L. Menezes
131312 by: Timothy Hitchens \(HiTCHO\)

OOP for Web Programming Paradigm
131308 by: Victor

Re: version confusion - please help
131313 by: Jesse Cablek

Re: php-general Digest 27 Mar 2002 13:15:24 - Issue 1251
131314 by: DCnFamily.aol.com

test
131316 by: Karl James
131318 by: Philip J. Newman

highlight keywords issue
131322 by: Hatem Ben

strip php tags from code ?
131326 by: David D

Administrivia:

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

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

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


--

--- Begin Message ---
I just broke skin with php and I'm learning forms, which I'm not good
with at all.  These are snippets from post.html:


and




but how would I pass the actual image on because when I do something like
this:

as you could probably guess only the filename prints.

So how do I take the image instead of just the filename?

Thank you,
--
Kyle

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

the files themselves are available in the $_FILES array, but it's not as
simple as that.

may i recommend you start by copying the Examples 18-1 and 18-2 from this
page:
http://www.php.net/manual/en/features.file-upload.php

Once you've got THAT code working smoothly and understand what's happening,
THEN start modifying it to a 3-file form.

I'd personally push forms through using POST method rather than get whenever
possible -- especially when dealing with files... the manual does it this
way too :)


Justin



on 12/01/03 12:18 PM, Kyle Babich ([EMAIL PROTECTED]) wrote:

> I just broke skin with php and I'm learning forms, which I'm not good
> with at all.  These are snippets from post.html:
> 
> 
> and
> 
> 
> 
> 
> but how would I pass the actual image on because when I do something like
> this:
>  ?>
> as you could probably guess only the filename prints.
> 
> So how do I take the image instead of just the filename?
> 
> Thank you,
> --
> Kyle


--- End Message ---
--- Begin Message ---
This is what I tried:

if (is_uploaded_file($HTTP_POST_FILES['image1']['image1']) {
move_uploaded_file($HTTP_POST_FILES['image1']['image1'], 
"$DOCUMENT_ROOT/images/$file");
}

and also this:

if (is_uploaded_file($_FILES['image1']['image1']) {
move_uploaded_file($_FILES['image1']['image1'], "$DOCUMENT_ROOT/images/$file");
}

and this:

if (is_uploaded_file($_FILES['image1']['image1'])) {
copy($_FILES['image1']['image1'], "$DOCUMENT_ROOT/images");
}

,the image (which was within the size range) was never uploaded.  I have
a feeling that I am makeing 1 or 2 of the same mistakes in all three but
through my experimenting and reading I am having no luck.  I also bought
Programming PHP but I trust it less and less as I even find simple
mistakes like missing quotes in example code.  So what's going wrong?

Thank you again,
Kyle

On Sun, 12 Jan 2003 15:17:42 +1100, "Justin French"
<[EMAIL PROTECTED]> said:
> Hi,
> 
> the files themselves are available in the $_FILES array, but it's not as
> simple as that.
> 
> may i recommend you start by copying the Examples 18-1 and 18-2 from this
> page:
> http://www.php.net/manual/en/features.file-upload.php
> 
> Once you've got THAT code working smoothly and unders

Re: [PHP] strip php tags from code ?

2003-01-12 Thread Matt
>- Original Message -
>From: "David D" <[EMAIL PROTECTED]>
>Sent: Monday, January 06, 2003 7:47 AM
>Subject: [PHP] strip php tags from code ?


> I only want to keep html code of a page.
> I want to remove php tags.

It sound like you want the parser output of the page.  You can use PHPs
output control to buffer the page output, and capture it into a variable to
do whatever you want with it.

http://www.php.net/manual/en/ref.outcontrol.php

Alternately, you can find a template class that does it.



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




RE: [PHP] strip php tags from code ?

2003-01-12 Thread Timothy Hitchens \(HiTCHO\)
So you want to remove only the unparsed/raw php script blocks.

Why... are you displaying PHP without parsing??

If this is the case you can write a couple of very simple preg_replace
with a call
back and all is done.



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

> -Original Message-
> From: David D [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, 6 January 2003 10:48 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] strip php tags from code ?
> 
> 
> I only want to keep html code of a page.
> I want to remove php tags.
> Some tell that strip_tags is not adapted.
> 
> sample of what i want to do:
> 
> na
> 
> 
> ->
> 
> na
> 
> 
> php tags can be :
> or 
> or   /i
> 
> Merci.
> 
> 
> 
> ..
> 
> 
> 
> -- 
> 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] highlight keywords issue

2003-01-12 Thread Timothy Hitchens \(HiTCHO\)
You will need to break apart the entire document then process each area
inside of the
tags and to be very careful for nested tags.

The simplest way around I have found to do with is to add to tags that
have been processed
with attributes that are ignored by the browser renderer eg... PHP
as you can see the  -Original Message-
> From: Hatem Ben [mailto:[EMAIL PROTECTED]] 
> Sent: Sunday, 12 January 2003 7:24 PM
> To: PHP List
> Subject: [PHP] highlight keywords issue
> 
> 
> Heya all,
> 
> I'm trying to highlight search keywords in a string, 
> everything work expect when this keyword is inside a tag like this :
> 
> keyword (php) :
> 
> php
> 
> 
> 
> will be highlighted to :
> 
>  #66">php"> style="color: black; background-color: #66">php
> 
>  #66">php.gif" border=0 alt="php.net">
> 
> I have tryed to separate text from html, then highlight it 
> then join html/text again, but this will be very long and not 
> really usefull !
> 
> I'm using preg_replace :
> 
> preg_replace('|\b('.quotemeta($keyword).')\b|iU', ' style="color: black;
> background-color: #66">\\1', $content);
> 
> Any help to fix that ?
> 
> Thanks;
> Hatem
> 
> 
> -- 
> 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] Simple Form Processing

2003-01-12 Thread Justin French
Did you read that link at all?

adapting the manual's code to suit your form names and directory
preferences:

if (is_uploaded_file($_FILES['image1']['tmp_name'])) {
copy($_FILES['image1']['tmp_name'],
"$DOCUMENT_ROOT/images/$_FILES['image1']['name']");
} else {
echo "Couldn't do it!";
}

So, to summarise what i *think* is wrong with your code:

1. $_FILES['image1']['image1'] should have been
$_FILES['image1']['tmp_name']

2. $DOCUMENT_ROOT/images/$file :: what is $file where is that defined???
I *think* you wish to save the file with same name as the user had it
named??? if so "$DOCUMENT_ROOT/images/$_FILES['image1']['name']" is what you
want, or better still, for clarity,
"{$DOCUMENT_ROOT}/images/{$_FILES['image1']['name']}"


If all else fails do a print_r($_FILES) and make sure that the file is at
least being uploaded.


Like I said before, there is a perfect working example in the manual... get
it working THEN try to adapt it to suit your needs :)


Cheers,

Justin



on 12/01/03 11:39 PM, Kyle Babich ([EMAIL PROTECTED]) wrote:

> This is what I tried:
> 
> if (is_uploaded_file($HTTP_POST_FILES['image1']['image1']) {
> move_uploaded_file($HTTP_POST_FILES['image1']['image1'],
> "$DOCUMENT_ROOT/images/$file");
> }
> 
> and also this:
> 
> if (is_uploaded_file($_FILES['image1']['image1']) {
> move_uploaded_file($_FILES['image1']['image1'],
> "$DOCUMENT_ROOT/images/$file");
> }
> 
> and this:
> 
> if (is_uploaded_file($_FILES['image1']['image1'])) {
> copy($_FILES['image1']['image1'], "$DOCUMENT_ROOT/images");
> }
> 
> ,the image (which was within the size range) was never uploaded.  I have
> a feeling that I am makeing 1 or 2 of the same mistakes in all three but
> through my experimenting and reading I am having no luck.  I also bought
> Programming PHP but I trust it less and less as I even find simple
> mistakes like missing quotes in example code.  So what's going wrong?
> 
> Thank you again,
> Kyle
> 
> On Sun, 12 Jan 2003 15:17:42 +1100, "Justin French"
> <[EMAIL PROTECTED]> said:
>> Hi,
>> 
>> the files themselves are available in the $_FILES array, but it's not as
>> simple as that.
>> 
>> may i recommend you start by copying the Examples 18-1 and 18-2 from this
>> page:
>> http://www.php.net/manual/en/features.file-upload.php
>> 
>> Once you've got THAT code working smoothly and understand what's
>> happening,
>> THEN start modifying it to a 3-file form.
>> 
>> I'd personally push forms through using POST method rather than get
>> whenever
>> possible -- especially when dealing with files... the manual does it this
>> way too :)
>> 
>> 
>> Justin
>> 
>> 
>> 
>> on 12/01/03 12:18 PM, Kyle Babich ([EMAIL PROTECTED]) wrote:
>> 
>>> I just broke skin with php and I'm learning forms, which I'm not good
>>> with at all.  These are snippets from post.html:
>>> 
>>> 
>>> and
>>> 
>>> 
>>> 
>>> 
>>> but how would I pass the actual image on because when I do something like
>>> this:
>>> >> ?>
>>> as you could probably guess only the filename prints.
>>> 
>>> So how do I take the image instead of just the filename?
>>> 
>>> Thank you,
>>> --
>>> Kyle
>> 
>> 


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




[PHP] php editor

2003-01-12 Thread Hannes Smit
is there a php editor which supports the tree-view for the code itself. I
believe tools like visual basic uses this option. You can easily collapse
pieces of code, for example a function or a class. Is there any place where
i can download a tool like this?

And if there's not, what is your favourite editor? i use ultraedit /
dreamweaver mx..




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




Re: [PHP] Simple Form Processing

2003-01-12 Thread Jason Wong
On Sunday 12 January 2003 20:39, Kyle Babich wrote:
> This is what I tried:
>
> if (is_uploaded_file($HTTP_POST_FILES['image1']['image1']) {
>   move_uploaded_file($HTTP_POST_FILES['image1']['image1'],
> "$DOCUMENT_ROOT/images/$file"); }
>
> and also this:
>
> if (is_uploaded_file($_FILES['image1']['image1']) {
>   move_uploaded_file($_FILES['image1']['image1'],
> "$DOCUMENT_ROOT/images/$file"); }
>
> and this:
>
> if (is_uploaded_file($_FILES['image1']['image1'])) {
> copy($_FILES['image1']['image1'], "$DOCUMENT_ROOT/images");
> }
>
> ,the image (which was within the size range) was never uploaded.  I have
> a feeling that I am makeing 1 or 2 of the same mistakes in all three but
> through my experimenting and reading I am having no luck.  I also bought
> Programming PHP but I trust it less and less as I even find simple
> mistakes like missing quotes in example code.  So what's going wrong?

So what *does* $_FILE contain? 

Hint: if your code doesn't behave as expected always print_r() your variables 
so you can whether they contain what you expected them to contain.

And if $_FILE doesn't contain anything then check php.ini to ensure that you 
have enables file uploads.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Wilcox's Law:
A pat on the back is only a few centimeters from a kick in the pants.
*/


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




Re: [PHP] php editor

2003-01-12 Thread Jason Wong
On Sunday 12 January 2003 21:51, Hannes Smit wrote:
> is there a php editor which supports the tree-view for the code itself. I
> believe tools like visual basic uses this option. You can easily collapse
> pieces of code, for example a function or a class. Is there any place where
> i can download a tool like this?

I believe maguma studio has this feature (before you ask, google for it). Also 
the old 'favourites' like vim (at least in one incarnation) has it as well .

> And if there's not, what is your favourite editor? i use ultraedit /
> dreamweaver mx..

Search the archives, this gets asked at least once a week if not more.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
You should make a point of trying every experience once -- except
incest and folk-dancing.
-- A. Bax, "Farewell My Youth"
*/


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




[PHP] Re: php editor

2003-01-12 Thread rush
I think Scite (http://www.scintilla.org/SciTE.html) can do it.

rush
--
http://www.templatetamer.org/




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




[PHP] SESSION variable to pass login ID

2003-01-12 Thread Willie G
Hi,

I have been trying to solve the problem of using session variables, but I
have not had any luck.  What I want to do is simple, I want to set my userid
and password in a login screen and use it later (in another php form) to log
into the database.

In my login PHP file I have the following:

if(isset($_POST['userid']) && isset($_POST['pword'])){
$_SESSION['user'] = $_POST['userid'];
$_SESSION['password'] = $_POST['pword'];
}

In my connect to database PHP file I have:

if(isset($_SESSION['user'])){
$user=$_SESSION['user'];
echo "Print $user";
}else{
echo "Print Missing User";
}


The message I always get is "Print Missing User", so I must assume the
global variable is not working.  Can anyone help me out here?

Thanks,
Larry



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




[PHP] File information JPEG Files

2003-01-12 Thread harald.mohring
How can i get the file information of a uploaded jpeg-file.
i need the heigt and width in pixel and the resolution.
Thanks Harry



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




RE: [PHP] File information JPEG Files

2003-01-12 Thread Warren Vail
I you are into bit crunching, check out

http://www.dcs.ed.ac.uk/home/mxr/gfx/2d/JPEG.txt

if not, somehow view the jpeg in ie, right click on the picture, and select
properties, look under dimensions.

Warren Vail
[EMAIL PROTECTED]


-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 12, 2003 8:11 AM
To: [EMAIL PROTECTED]
Subject: [PHP] File information JPEG Files


How can i get the file information of a uploaded jpeg-file.
i need the heigt and width in pixel and the resolution.
Thanks Harry



--
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] SESSION variable to pass login ID

2003-01-12 Thread Tom Rogers
Hi,

Monday, January 13, 2003, 1:04:49 AM, you wrote:
WG> Hi,

WG> I have been trying to solve the problem of using session variables, but I
WG> have not had any luck.  What I want to do is simple, I want to set my userid
WG> and password in a login screen and use it later (in another php form) to log
WG> into the database.

WG> In my login PHP file I have the following:

WG> if(isset($_POST['userid']) && isset($_POST['pword'])){
WG> $_SESSION['user'] = $_POST['userid'];
WG> $_SESSION['password'] = $_POST['pword'];
WG> }

WG> In my connect to database PHP file I have:

WG> if(isset($_SESSION['user'])){
WG> $user=$_SESSION['user'];
WG> echo "Print $user";
WG> }else{
WG> echo "Print Missing User";
WG> }


WG> The message I always get is "Print Missing User", so I must assume the
WG> global variable is not working.  Can anyone help me out here?

WG> Thanks,
WG> Larry

Make sure you have session_start() at the begining of the second file.

-- 
regards,
Tom


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




Re: [PHP] File information JPEG Files

2003-01-12 Thread Tom Rogers
Hi,

Monday, January 13, 2003, 2:10:57 AM, you wrote:
hmgd> How can i get the file information of a uploaded jpeg-file.
hmgd> i need the heigt and width in pixel and the resolution.
hmgd> Thanks Harry

Use getimagesize()

$info = getimagesize('image.jpg');
echo 'Width = '.$info[0].' Hieght = '.$info[1]."';

Resolution is meaningless until you need to print it I think.
-- 
regards,
Tom


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




[PHP] Phorum 3.4 Released!

2003-01-12 Thread Brian Moon
Phorum 3.4 has been released.  This is a biggest update in over a year.  For
those not familiar with Phorum, it was the first PHP/MySQL based message
board ever made.  It focuses on simplicity for those that want to add a
message board to their existing site without having to comprimise their
sites design.

You can download it now at http://phorum.org/download.php

Thanks,

Brian Moon
Phorum Dev Team




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




[PHP] count characters

2003-01-12 Thread harald.mohring
I want to count characters without space "character".
$char="hello world"
so the result should be 10.
Can anybody help me?



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




Re: [PHP] count characters

2003-01-12 Thread Reuben D. Budiardja
On Sun, 12 Jan 2003 [EMAIL PROTECTED] wrote:

> I want to count characters without space "character".
> $char="hello world"
> so the result should be 10.
> Can anybody help me?

$char="hello world";
$temp=str_replace(" ", "", $char);
echo strlen($temp);
 
should give you 10.
  
RDB


 
> 
> 
> 

-- 


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




Re: [PHP] count characters

2003-01-12 Thread Jason Sheets
Try the following code, please note you may want to trim() the string as
well if it is coming from a user.



Jason


On Sun, 2003-01-12 at 10:32, [EMAIL PROTECTED] wrote:
> I want to count characters without space "character".
> $char="hello world"
> so the result should be 10.
> Can anybody help me?
> 
> 
> 
> -- 
> 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] Pre-built CMS - Anyone recommend one?

2003-01-12 Thread Nick Wilson
Hi all, 

I'm looking for a *free*, pre-built CMS with PHP/MySQL.

I've looked at ezpublish but I'm having trouble installing.

Criteria: 

*   Must have SE friendly urls (example.com/4/34/)
*   Must allow different 'sections' for articles
*   Must be easy to fix templates for the html/css

Anyone make a recommendation?

Many thanks...

-- 
Nick Wilson //  www.tioka.com




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




RE: [PHP] SESSION variable to pass login ID

2003-01-12 Thread Willie G
Tom,

I do have a session_start() in both files, but it does not seem to help.

- Larry

-Original Message-
From: Tom Rogers [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 12, 2003 11:36 AM
To: Willie G
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] SESSION variable to pass login ID


Hi,

Monday, January 13, 2003, 1:04:49 AM, you wrote:
WG> Hi,

WG> I have been trying to solve the problem of using session variables, but
I
WG> have not had any luck.  What I want to do is simple, I want to set my
userid
WG> and password in a login screen and use it later (in another php form) to
log
WG> into the database.

WG> In my login PHP file I have the following:

WG> if(isset($_POST['userid']) && isset($_POST['pword'])){
WG> $_SESSION['user'] = $_POST['userid'];
WG> $_SESSION['password'] = $_POST['pword'];
WG> }

WG> In my connect to database PHP file I have:

WG> if(isset($_SESSION['user'])){
WG> $user=$_SESSION['user'];
WG> echo "Print $user";
WG> }else{
WG> echo "Print Missing User";
WG> }


WG> The message I always get is "Print Missing User", so I must assume the
WG> global variable is not working.  Can anyone help me out here?

WG> Thanks,
WG> Larry

Make sure you have session_start() at the begining of the second file.

--
regards,
Tom


--
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] SESSION variable to pass login ID

2003-01-12 Thread Nova
This statement doesnt look right to me.

if(isset($_POST['userid']) && isset($_POST['pword'])){
$_SESSION['user'] = $_POST['userid'];
$_SESSION['password'] = $_POST['pword'];
}

the if should be:

if ((statement)&&(statement))
{

}

so:

if ((isset($_POST['userid'])) && (isset($_POST['pword'])))
{
$_SESSION['user'] = $_POST['userid'];
$_SESSION['password'] = $_POST['pword'];
}

That should work.

"Willie G" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Tom,
>
> I do have a session_start() in both files, but it does not seem to help.
>
> - Larry
>
> -Original Message-
> From: Tom Rogers [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, January 12, 2003 11:36 AM
> To: Willie G
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] SESSION variable to pass login ID
>
>
> Hi,
>
> Monday, January 13, 2003, 1:04:49 AM, you wrote:
> WG> Hi,
>
> WG> I have been trying to solve the problem of using session variables,
but
> I
> WG> have not had any luck.  What I want to do is simple, I want to set my
> userid
> WG> and password in a login screen and use it later (in another php form)
to
> log
> WG> into the database.
>
> WG> In my login PHP file I have the following:
>
> WG> if(isset($_POST['userid']) && isset($_POST['pword'])){
> WG> $_SESSION['user'] = $_POST['userid'];
> WG> $_SESSION['password'] = $_POST['pword'];
> WG> }
>
> WG> In my connect to database PHP file I have:
>
> WG> if(isset($_SESSION['user'])){
> WG> $user=$_SESSION['user'];
> WG> echo "Print $user";
> WG> }else{
> WG> echo "Print Missing User";
> WG> }
>
>
> WG> The message I always get is "Print Missing User", so I must assume the
> WG> global variable is not working.  Can anyone help me out here?
>
> WG> Thanks,
> WG> Larry
>
> Make sure you have session_start() at the begining of the second file.
>
> --
> regards,
> Tom
>
>
> --
> 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] SESSION variable to pass login ID

2003-01-12 Thread Willie G
Hi,

I just found my mistake.  I added some debug logic, and found that the
$_POST logic was in the calling form, not the called form.  As soon as I
moved the "if(isset($_POST['userid']) && isset($_POST['pword'])){" to the
second form, everything started to work.  Thanks to everyone who responded.

- Larry

-Original Message-
From: Nova [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 12, 2003 3:04 PM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] SESSION variable to pass login ID


This statement doesnt look right to me.

if(isset($_POST['userid']) && isset($_POST['pword'])){
$_SESSION['user'] = $_POST['userid'];
$_SESSION['password'] = $_POST['pword'];
}

the if should be:

if ((statement)&&(statement))
{

}

so:

if ((isset($_POST['userid'])) && (isset($_POST['pword'])))
{
$_SESSION['user'] = $_POST['userid'];
$_SESSION['password'] = $_POST['pword'];
}

That should work.

"Willie G" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Tom,
>
> I do have a session_start() in both files, but it does not seem to help.
>
> - Larry
>
> -Original Message-
> From: Tom Rogers [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, January 12, 2003 11:36 AM
> To: Willie G
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] SESSION variable to pass login ID
>
>
> Hi,
>
> Monday, January 13, 2003, 1:04:49 AM, you wrote:
> WG> Hi,
>
> WG> I have been trying to solve the problem of using session variables,
but
> I
> WG> have not had any luck.  What I want to do is simple, I want to set my
> userid
> WG> and password in a login screen and use it later (in another php form)
to
> log
> WG> into the database.
>
> WG> In my login PHP file I have the following:
>
> WG> if(isset($_POST['userid']) && isset($_POST['pword'])){
> WG> $_SESSION['user'] = $_POST['userid'];
> WG> $_SESSION['password'] = $_POST['pword'];
> WG> }
>
> WG> In my connect to database PHP file I have:
>
> WG> if(isset($_SESSION['user'])){
> WG> $user=$_SESSION['user'];
> WG> echo "Print $user";
> WG> }else{
> WG> echo "Print Missing User";
> WG> }
>
>
> WG> The message I always get is "Print Missing User", so I must assume the
> WG> global variable is not working.  Can anyone help me out here?
>
> WG> Thanks,
> WG> Larry
>
> Make sure you have session_start() at the begining of the second file.
>
> --
> regards,
> Tom
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>



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




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




RE: [PHP] SESSION variable to pass login ID

2003-01-12 Thread John W. Holmes
Well, start debugging your code then. Do a print_r() of $_POST and
$_SESSION at different points in your files. Maybe you're losing your
session on a certain page or it's getting reset. 

---John W. Holmes...

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

> -Original Message-
> From: Willie G [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, January 12, 2003 2:53 PM
> To: Tom Rogers; Willie G
> Cc: [EMAIL PROTECTED]
> Subject: RE: [PHP] SESSION variable to pass login ID
> 
> Tom,
> 
> I do have a session_start() in both files, but it does not seem to
help.
> 
> - Larry
> 
> -Original Message-
> From: Tom Rogers [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, January 12, 2003 11:36 AM
> To: Willie G
> Cc: [EMAIL PROTECTED]
> Subject: Re: [PHP] SESSION variable to pass login ID
> 
> 
> Hi,
> 
> Monday, January 13, 2003, 1:04:49 AM, you wrote:
> WG> Hi,
> 
> WG> I have been trying to solve the problem of using session
variables,
> but
> I
> WG> have not had any luck.  What I want to do is simple, I want to set
my
> userid
> WG> and password in a login screen and use it later (in another php
form)
> to
> log
> WG> into the database.
> 
> WG> In my login PHP file I have the following:
> 
> WG> if(isset($_POST['userid']) && isset($_POST['pword'])){
> WG> $_SESSION['user'] = $_POST['userid'];
> WG> $_SESSION['password'] = $_POST['pword'];
> WG> }
> 
> WG> In my connect to database PHP file I have:
> 
> WG> if(isset($_SESSION['user'])){
> WG> $user=$_SESSION['user'];
> WG> echo "Print $user";
> WG> }else{
> WG> echo "Print Missing User";
> WG> }
> 
> 
> WG> The message I always get is "Print Missing User", so I must assume
the
> WG> global variable is not working.  Can anyone help me out here?
> 
> WG> Thanks,
> WG> Larry
> 
> Make sure you have session_start() at the begining of the second file.
> 
> --
> regards,
> Tom
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php




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




[PHP] test

2003-01-12 Thread Karl James











test


















  IncrediMail - Email has finally evolved - Click Here

[PHP] test

2003-01-12 Thread Karl James











test


















  IncrediMail - Email has finally evolved - Click Here

Re: [PHP] Pre-built CMS - Anyone recommend one?

2003-01-12 Thread Chris Hayes


I'm looking for a *free*, pre-built CMS with PHP/MySQL.

I've looked at ezpublish but I'm having trouble installing.

Criteria:

*   Must have SE friendly urls (example.com/4/34/)
*   Must allow different 'sections' for articles
*   Must be easy to fix templates for the html/css


I happen to know a bit of the history of PHPNuke and the several forks it 
has lead to.
The basic idea of PHPNuke and its first generation forks is this:

-
  HEADER OF THE PAGE
-
LEFT|   | RIGHT
| CENTER|
BLOCKS  |   | BLOCKS
|   |
-
  FOOTER OF THE PAGE
-

Somehow limiting the creativity of the designer of a 'theme'.
The left and right blocks can be form the core team or from  third parties 
and their queality varies wildly. They can contain a menu, weather, links 
to center modules, search engines, polls etc. In the center would show the 
current "module" which can also be taken from anywhere, and can be a news 
system, a forum, and many other things.

Xaraya and Envolution attempt to really change this strict setup.

In historical order, not claiming to be exact or complete:

PHPNuke
* has built in news articles in sections by default.
  Optional planning of articles and optional feature to let visitors 
discuss articles (also in most other CMSses here)
* I'm not sure about the search engine friendly urls.
* AFAIK it has a separate directory file for the skins, called 'theme', 
where you can design the various CSS styles and the HTML code for basic 
features such as the side blocks.
But i cannot recommend it because the single project leader is hard to 
reach and tends to ignore security warnings.
www.phpnuke.org (often slow)

MyPHPNuke is a fork of PHPNuke, and seems to limit itself in layout and 
seems to have a limited functionality (no modules, i THINK).
www.myphpnuke.org (or .com)

xOOps
is also a fork of PHPNuke and tries to put it all in classes. I have no 
details, check their site. i think xoops.org

PostNuke
is also a PHPNuke fork, a very strong CMS with very strict rules for the 
modules. They are still working towards the 1.0 version but many people 
already used the 0.64 version on production sites.
Very strong system, uses Adodb to allow the use of different databases 
(MySQL now with people working hard on ?Postgress and ?Oracle), many 
modules were made for it but it is not always claear whether it will work 
in the version of Postnuke you are working on.
* There is a way to create search engine friendly URL's, i think it is a 
setting you can choose, you may need Apache to do it. If in doubt ask on 
one of the support areas
* I find the third party module 'ContentExpress' 
(http://pn.arising.net/ce/) the best way to edit articles.
I made a menu module for it (http://www.hieris.info/about/DynMenu).
* Like PHPNuke Postnuke has 'themes' of which you can download several.
http://www.postnuke.com

Xaraya
after a conflict in which some people kept on harrassing the developers, 
the central developers of Postnuke decided to fork to Xaraya, leaving 
Postnuke with just a handful of developers. I must say that Postnuke now is 
up and running again.
Anyway, Xaraya has some real high quality developers but they ain't 
finished yet and after the hectic at Postnuke they decided not to offer in 
between versions but to work steady on the 1.0 version.
When ready it will really kick ass.
The entire system will use templates, allowing you to build pages with all 
content bits just however you like best. Ready for the future: if you do 
not want to use HTMl but rather XML, it's entirely possible already. It 
will allow SE friendly URLs for sure and a rocking article system.
The one i hope to join.
www.Xaraya.org

Envolution
another fork of Postnuke,  uses a templating system, to the joy of some and 
the horror of many. I did not check it as their template system will never 
allow the flexibility i need.
http://www.envolution.com/




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



[PHP] test

2003-01-12 Thread Karl James











test


















  IncrediMail - Email has finally evolved - Click Here

[PHP] TEST

2003-01-12 Thread Karl James











TEST


















  IncrediMail - Email has finally evolved - Click Here

[PHP] Sorry about that guys,

2003-01-12 Thread Karl James






To mail listing;
 
sorry about that, i didnt think about all the variables involved
thanks for your warning and understanding.
 
wont happen again!!!
thanks
 
Karl







  IncrediMail - Email has finally evolved - Click Here

RE: [PHP] Pre-built CMS - Anyone recommend one?

2003-01-12 Thread Chris Mason
eZPublish is probably your best bet.

-Original Message-
From: Nick Wilson [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, January 12, 2003 3:31 PM
To: php-general
Subject: [PHP] Pre-built CMS - Anyone recommend one?


Hi all, 

I'm looking for a *free*, pre-built CMS with PHP/MySQL.

I've looked at ezpublish but I'm having trouble installing.

Criteria: 

*   Must have SE friendly urls (example.com/4/34/)
*   Must allow different 'sections' for articles
*   Must be easy to fix templates for the html/css

Anyone make a recommendation?

Many thanks...

-- 
Nick Wilson //  www.tioka.com




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


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




[PHP] What means "ioctl"

2003-01-12 Thread harald.mohring
I got the error-message:
Warning: fopen("", "r") - Inappropriate ioctl for device
what means ioctl?
Harry



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




Fw: [PHP] What means "ioctl"

2003-01-12 Thread Rick Emery
"ioctl" is an IO controls structure.

Just look at the fopen("","r").  Do you notice anything missing?

- Original Message - 
From: <[EMAIL PROTECTED]>
To: <>
Sent: Sunday, January 12, 2003 3:59 PM
Subject: [PHP] What means "ioctl"


I got the error-message:
Warning: fopen("", "r") - Inappropriate ioctl for device
what means ioctl?
Harry



-- 
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] PHP/MySQL help?

2003-01-12 Thread Steven M
What am i doing wrong with the script below? What i am trying to do is check
whether the "newtest" field has a 0 or a  1 value then redirect the user to
a different page based on the answer.

I am then trying to add 2 to the value in the "points" field of my database
and then  to set the "newtest" field value to 1 so the user is directed to
the second of the two pages if they click the link again

My database is MySQL and the connection details are correct and stored in an
external script.  I have missed out the PHP tags on the code below in case
that interferes with how it appears on the list.  I really would appreciate
any help with this as i am a newbie to MySQL and PHP and am finding it a
really steep learning curve.  Thanks.

Steven M
---
include 'db.php';

$result = mysql_query("SELECT newtest FROM users WHERE 14 = '$0'");
list($number) = mysql_fetch_row($result);
mysql_close();

if($number==0)
{mysql_query("UPDATE users SET points = '$+2' WHERE 14 = '$0'");
mysql_query("UPDATE users SET newtest = '$1' WHERE newtest = '$0'");
header("Location: redirect1.php");
}
elseif($number==1)
{
header("Location: redirect2.php");
}
else
{
header("Location: error.php");
}
---




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




Re: [PHP] PHP/MySQL help?

2003-01-12 Thread Johannes Schlueter
Hi Steven,

On Sunday 12 January 2003 23:58, Steven M wrote:
> include 'db.php';
>
> $result = mysql_query("SELECT newtest FROM users WHERE 14 = '$0'");
> list($number) = mysql_fetch_row($result);

Here you are closing your conenction to the MySQL-Server:
> mysql_close();

> if($number==0)

But here you need it again:
> {mysql_query("UPDATE users SET points = '$+2' WHERE 14 = '$0'");
> mysql_query("UPDATE users SET newtest = '$1' WHERE newtest = '$0'");

So remove the mysql_close() if it don't work: Post the error message!

johannes

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




RE: [PHP] php editor

2003-01-12 Thread Steven Balthazor
I am a fan of eclipse (www.eclipse.org) I use the java editor for editing
php files (its close enough for my needs); for those who want php specific
functionality then this plugin looks quite nice:
http://phpeclipse.sourceforge.net/ .  The CVS functionality included in
eclipse is what makes the package tremendously valuable to me (it keeps
track of local changes as well as provides for looking back at previous cvs
revisions and performing diffs against your current code, all within the
IDE).  

HTH,
Steven Balthazor

-Original Message-
From: Hannes Smit [mailto:[EMAIL PROTECTED]] 
Sent: Sunday, January 12, 2003 6:51 AM
To: [EMAIL PROTECTED]
Subject: [PHP] php editor


is there a php editor which supports the tree-view for the code itself. I
believe tools like visual basic uses this option. You can easily collapse
pieces of code, for example a function or a class. Is there any place where
i can download a tool like this?

And if there's not, what is your favourite editor? i use ultraedit /
dreamweaver mx..




-- 
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] Re: What means "ioctl"

2003-01-12 Thread V.Y.JR
You have not specified a file name to open with fopen().

//will not work
$fp = fopen("", "r");

//will work
$fp = fopen("file.txt", "r");

"Harald Mohring" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I got the error-message:
> Warning: fopen("", "r") - Inappropriate ioctl for device
> what means ioctl?
> Harry
>
>



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




Re: [PHP] Permission Denied

2003-01-12 Thread Stephen
Ok, I got it to make a directory as a absolute path but I'm getting a
"Permission Denied" error again. I'm running IIS so I can't CHMOD and all
the permission options are checked in the options box.


- Original Message -
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, January 12, 2003 4:03 AM
Subject: Re: [PHP] Permission Denied


: On Sunday 12 January 2003 10:10, Stephen wrote:
: > There's already a folder named packs but my problem was not having the /
: > before it. One more question. How can I dynamically get the path to the
: > current folder? Like your at http://www.bob.com/joe/index.php and you
want
: > to get the http://www.bob.com/joe/ bit and do it dynamically?
:
: print_r($_SERVER) will show you which bits you can use.
:
: --
: Jason Wong -> Gremlins Associates -> www.gremlins.biz
: Open Source Software Systems Integrators
: * Web Design & Hosting * Internet & Intranet Applications Development *
:
: /*
: I'll show you MY telex number if you show me YOURS ...
: */
:
:
: --
: PHP General Mailing List (http://www.php.net/)
: To unsubscribe, visit: http://www.php.net/unsub.php
:
:
:



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




Re: [PHP] PHP/MySQL help?

2003-01-12 Thread Steven M
Hi Johannes

Thanks for the help.  I have taken out the mysql_close() and it looks like
it is submitting ok (ie no error messages) but it is not updating the
database when i check it.  Any ideas?

Thanks.

Steven
"Johannes Schlueter" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Hi Steven,

On Sunday 12 January 2003 23:58, Steven M wrote:
> include 'db.php';
>
> $result = mysql_query("SELECT newtest FROM users WHERE 14 = '$0'");
> list($number) = mysql_fetch_row($result);

Here you are closing your conenction to the MySQL-Server:
> mysql_close();

> if($number==0)

But here you need it again:
> {mysql_query("UPDATE users SET points = '$+2' WHERE 14 = '$0'");
> mysql_query("UPDATE users SET newtest = '$1' WHERE newtest = '$0'");

So remove the mysql_close() if it don't work: Post the error message!

johannes



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




RE: [PHP] Permission Denied

2003-01-12 Thread Timothy Hitchens \(HiTCHO\)
Did you use the umask(0) prior to the mkdir() in your script??


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

> -Original Message-
> From: Stephen [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, 13 January 2003 9:09 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] Permission Denied
> 
> 
> Ok, I got it to make a directory as a absolute path but I'm 
> getting a "Permission Denied" error again. I'm running IIS so 
> I can't CHMOD and all the permission options are checked in 
> the options box.
> 
> 
> - Original Message -
> From: "Jason Wong" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Sunday, January 12, 2003 4:03 AM
> Subject: Re: [PHP] Permission Denied
> 
> 
> : On Sunday 12 January 2003 10:10, Stephen wrote:
> : > There's already a folder named packs but my problem was 
> not having the /
> : > before it. One more question. How can I dynamically get 
> the path to the
> : > current folder? Like your at 
> http://www.bob.com/joe/index.php and you want
> : > to get the 
> http://www.bob.com/joe/ bit and do it dynamically?
> :
> : print_r($_SERVER) will show you which bits you can use.
> :
> : --
> : Jason Wong -> Gremlins Associates -> www.gremlins.biz
> : Open Source Software Systems Integrators
> : * Web Design & Hosting * Internet & Intranet Applications 
> Development *
> :
> : /*
> : I'll show you MY telex number if you show me YOURS ...
> : */
> :
> :
> : --
> : PHP General Mailing List (http://www.php.net/)
> : To unsubscribe, visit: http://www.php.net/unsub.php
> :
> :
> :
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


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




RE: [PHP] PHP/MySQL help?

2003-01-12 Thread Timothy Hitchens \(HiTCHO\)
Hmm from your code below:

FROM users WHERE 14 = '$0'"

What is "14" it isn't a field I would hope!!


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

> -Original Message-
> From: Steven M [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, 13 January 2003 9:28 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] PHP/MySQL help?
> 
> 
> Hi Johannes
> 
> Thanks for the help.  I have taken out the mysql_close() and 
> it looks like it is submitting ok (ie no error messages) but 
> it is not updating the database when i check it.  Any ideas?
> 
> Thanks.
> 
> Steven
> "Johannes Schlueter" <[EMAIL PROTECTED]> wrote in message 
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hi Steven,
> 
> On 
> Sunday 12 January 2003 23:58, Steven M wrote:
> > include 'db.php';
> >
> > $result = mysql_query("SELECT newtest FROM users WHERE 14 = '$0'");
> > list($number) = mysql_fetch_row($result);
> 
> Here you are closing your conenction to the MySQL-Server:
> > mysql_close();
> 
> > if($number==0)
> 
> But here you need it again:
> > {mysql_query("UPDATE users SET points = '$+2' WHERE 14 = '$0'"); 
> > mysql_query("UPDATE users SET newtest = '$1' WHERE newtest = '$0'");
> 
> So remove the mysql_close() if it don't work: Post the error message!
> 
> johannes
> 
> 
> 
> -- 
> 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] OOP for Web Programming Paradigm

2003-01-12 Thread olinux
I'm no OOP programmer but maybe extend your class to
include methods for each situation.

something like this:

function countSingle($cid)

function countMulti($cidArray)

function countAll() 


HTH,
olinux


--- Victor <[EMAIL PROTECTED]> wrote:
> Hello. I have this question. When I program, I try
> to create a class for 
> each table. Example below.
> 
> Now what some complain about, and logically so, is
> that this might 
> impose an overhead (I load all data even if I just
> need a counter and 
> NOT description).
> 
> So I say we can make a STATIC version of each
> Accessor with $cid as 
> argument; But then they say what if i want to load
> an array of all 2000 
> counters, for example. I say first get all the
> $cid's, then in an array, 
> load a class for each one, etc.. That however makes
> lots of SQL calls 
> instead of one big one. I suppose I can get all data
> and then load it 
> into classes, but that seems like a bad approach,
> especially for 
> calculated values.
> 
> What I am curious about is what paradigms do you
> guys use to address 
> these issues? Is my paradigm good and it's worth to
> just provide static 
> methods for frequently necessary fields to reduce
> overhead, or is there 
> a better way of dealing with this stuff?
> 
> class Counter
> {
> var $db;
> 
> var $cid;
> var $counter;
> var $descr;
> 
> /**
>  * Default Constructor
>  * @param int $cid - Counter ID
>  */
> function Counter($cid=false)
> {
>global $db;
>$this->db = &$db;
>if (isset($cid) && $cid) $this->load($cid);
> }
> 
> /**
>  * Description
>  * @param int $cid - Counter ID
>  * @return bool
>  */
> function load($cid=0)
> {
>if (!$cid) return false;
> 
>$q = "SELECT * FROM counter WHERE cid =
> $cid";
>$r = $this->db->getRow($q); // Using PEAR
> here.
> 
>if (!DB::isError($r)) {
>   $this->cid = $r["cid"];
>   $this->counter = $r["counter"];
>   $this->descr   = $r["descr"];
>   return true;
>}
>return false;
> }
> 
>
>
#
> # Accessor Methods
>
>
#
> function getCid() { return $this->cid; }
> function getCounter() { return $this->counter; }
> function getDescr()   { return $this->descr; }
> 
>
>
#
> # Mutator Methods
>
>
#
> function setCid($v) { $this->iaid= $v; }
> function setCounter($v) { $this->counter = $v; }
> function setDescr($v)   { $this->descr   = $v; }
> 
> // Many other methods, etc Static methods,
> etc...
> }
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


__
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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




Re: [PHP] highlight keywords issue

2003-01-12 Thread Hatem Ben
I have find this code very helpfull :

- Original Message -
From: "Timothy Hitchens (HiTCHO)" <[EMAIL PROTECTED]>
To: "'Hatem Ben'" <[EMAIL PROTECTED]>; "'PHP List'"
<[EMAIL PROTECTED]>
Sent: Sunday, January 12, 2003 2:28 PM
Subject: RE: [PHP] highlight keywords issue


> You will need to break apart the entire document then process each area
> inside of the
> tags and to be very careful for nested tags.
>
> The simplest way around I have found to do with is to add to tags that
> have been processed
> with attributes that are ignored by the browser renderer eg...  href="/page.html" done="yes">PHP
> as you can see the  extra attribute then continue
> to process the entire page from my preg matches.
>
> Nested tags are going to be your biggest issue.
>
>
>
> Timothy Hitchens (HiTCHO)
> Open Platform Consulting
> e-mail: [EMAIL PROTECTED]
>
> > -Original Message-
> > From: Hatem Ben [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, 12 January 2003 7:24 PM
> > To: PHP List
> > Subject: [PHP] highlight keywords issue
> >
> >
> > Heya all,
> >
> > I'm trying to highlight search keywords in a string,
> > everything work expect when this keyword is inside a tag like this :
> >
> > keyword (php) :
> >
> > php
> >
> > 
> >
> > will be highlighted to :
> >
> >  > #66">php"> > style="color: black; background-color: #66">php
> >
> >  > #66">php.gif" border=0 alt="php.net">
> >
> > I have tryed to separate text from html, then highlight it
> > then join html/text again, but this will be very long and not
> > really usefull !
> >
> > I'm using preg_replace :
> >
> > preg_replace('|\b('.quotemeta($keyword).')\b|iU', ' > style="color: black;
> > background-color: #66">\\1', $content);
> >
> > Any help to fix that ?
> >
> > Thanks;
> > Hatem
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >


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




Re: [PHP] PHP/MySQL help?

2003-01-12 Thread Steven M
I thought i read somewhere that you could refer to the field by number.  Was
i wrong? It doesn't seem to make a difference anyway.  It still doesn't
work.  Here's the code with words instead of numbers.  I'd be grateful if
you could let me know if there are any obvious errors.

Best wishes.

Steven M

include 'db.php';

$result = mysql_query("SELECT newtest FROM users WHERE newtest = '$0'");
list($number) = mysql_fetch_row($result);

if($number==0)
{mysql_query("UPDATE users SET points = '$+2' WHERE newtest = '$0'");
mysql_query("UPDATE users SET newtest = '$1' WHERE newtest = '$0'");
header("Location: redirect1.php");
}
elseif($number==1)
{
header("Location: redirect2.php");
}
else
{
header("Location: error.php");
}



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




[PHP] using "getimagesize" to read out image informations form local harddrive

2003-01-12 Thread harald.mohring
isn't it possible to get image informations from the local harddrive?

$fotoinfo=getimagesize("C:\\Eigene Dateien\\Temp\\Foto.jpg");

if i use that code, the errormessage is always "getimagesize: unable to open
file for reading"

got anybody a solution?



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




[PHP] object in session & security

2003-01-12 Thread Hannes Smit
Hello,

Im building a object oriented webapplication with PHP. I know PHP doesnt
fully support OOP.
I made a class called Database. This class contains several variables. One
of these vars is the username and the password for the database. When i
create a Database object I want to register it in the applications session,
so it available through the whole app. Is this secure? is it possible to
view this variable from the outside? To make it more secure i tried
'crypt()'. But this doesnt work in this way:

class Database{
 var $server="db.provider.com";
 var $username="myusername";
 var $password=crypt("8d3j22d");
 var $database="webshop";
}

it results in:

Parse error: parse error, unexpected T_VARIABLE, expecting T_OLD_FUNCTION or
T_FUNCTION or T_VAR or '}'



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




Re: [PHP] highlight keywords issue

2003-01-12 Thread Hatem Ben
I have find this very helpfull :

preg_match_all("|<[^>]+>(.*)]+>|", $haystack, $out, PREG_SET_ORDER);

It's almost done, only if i can restrict the regexp to  and  tags
only ... :(

I need to look for "Mastering Regular Expressions" book tomorrow :D it's
really boring without good docs

- Original Message -
From: "Timothy Hitchens (HiTCHO)" <[EMAIL PROTECTED]>
To: "'Hatem Ben'" <[EMAIL PROTECTED]>; "'PHP List'"
<[EMAIL PROTECTED]>
Sent: Sunday, January 12, 2003 2:28 PM
Subject: RE: [PHP] highlight keywords issue


> You will need to break apart the entire document then process each area
> inside of the
> tags and to be very careful for nested tags.
>
> The simplest way around I have found to do with is to add to tags that
> have been processed
> with attributes that are ignored by the browser renderer eg...  href="/page.html" done="yes">PHP
> as you can see the  extra attribute then continue
> to process the entire page from my preg matches.
>
> Nested tags are going to be your biggest issue.
>
>
>
> Timothy Hitchens (HiTCHO)
> Open Platform Consulting
> e-mail: [EMAIL PROTECTED]
>
> > -Original Message-
> > From: Hatem Ben [mailto:[EMAIL PROTECTED]]
> > Sent: Sunday, 12 January 2003 7:24 PM
> > To: PHP List
> > Subject: [PHP] highlight keywords issue
> >
> >
> > Heya all,
> >
> > I'm trying to highlight search keywords in a string,
> > everything work expect when this keyword is inside a tag like this :
> >
> > keyword (php) :
> >
> > php
> >
> > 
> >
> > will be highlighted to :
> >
> >  > #66">php"> > style="color: black; background-color: #66">php
> >
> >  > #66">php.gif" border=0 alt="php.net">
> >
> > I have tryed to separate text from html, then highlight it
> > then join html/text again, but this will be very long and not
> > really usefull !
> >
> > I'm using preg_replace :
> >
> > preg_replace('|\b('.quotemeta($keyword).')\b|iU', ' > style="color: black;
> > background-color: #66">\\1', $content);
> >
> > Any help to fix that ?
> >
> > Thanks;
> > Hatem
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >


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




RE: [PHP] PHP/MySQL help?

2003-01-12 Thread Timothy Hitchens \(HiTCHO\)
You can't use numbers as vars:

$1 etc are illegal syntax for PHP



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

> -Original Message-
> From: Steven M [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, 13 January 2003 10:04 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [PHP] PHP/MySQL help?
> 
> 
> I thought i read somewhere that you could refer to the field 
> by number.  Was i wrong? It doesn't seem to make a difference 
> anyway.  It still doesn't work.  Here's the code with words 
> instead of numbers.  I'd be grateful if you could let me know 
> if there are any obvious errors.
> 
> Best wishes.
> 
> Steven M
> 
> include 'db.php';
> 
> $result = mysql_query("SELECT newtest FROM users WHERE 
> newtest = '$0'");
> list($number) = mysql_fetch_row($result);
> 
> if($number==0)
> {mysql_query("UPDATE users SET points = '$+2' WHERE newtest = 
> '$0'"); mysql_query("UPDATE users SET newtest = '$1' WHERE 
> newtest = '$0'");
> header("Location: redirect1.php");
> }
> elseif($number==1)
> {
> header("Location: redirect2.php");
> }
> else
> {
> header("Location: error.php");
> }
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


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




[PHP] Re: What means "ioctl"

2003-01-12 Thread nicos
"ioctl performs a variety of control functions on devices and STREAMS."
It stands for I/O Control.

--
Regards.
M.CHAILLAN Nicolas
[EMAIL PROTECTED]
www.WorldAKT.com Hébergement de sites internets.

"Harald Mohring" <[EMAIL PROTECTED]> a écrit dans le message de news:
[EMAIL PROTECTED]
> I got the error-message:
> Warning: fopen("", "r") - Inappropriate ioctl for device
> what means ioctl?
> Harry
>
>



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




RE: [PHP] object in session & security

2003-01-12 Thread Timothy Hitchens \(HiTCHO\)
It is viewable from the script only not the outside world eg the visitor
to the website
unless you output it.

Also you are better offer having your vars set by methods from a
constructor then you can
do what you just showed below.



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

> -Original Message-
> From: Hannes Smit [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, 13 January 2003 9:48 AM
> To: [EMAIL PROTECTED]
> Subject: [PHP] object in session & security
> 
> 
> Hello,
> 
> Im building a object oriented webapplication with PHP. I know 
> PHP doesnt fully support OOP. I made a class called Database. 
> This class contains several variables. One of these vars is 
> the username and the password for the database. When i create 
> a Database object I want to register it in the applications 
> session, so it available through the whole app. Is this 
> secure? is it possible to view this variable from the 
> outside? To make it more secure i tried 'crypt()'. But this 
> doesnt work in this way:
> 
> class Database{
>  var $server="db.provider.com";
>  var $username="myusername";
>  var $password=crypt("8d3j22d");
>  var $database="webshop";
> }
> 
> it results in:
> 
> Parse error: parse error, unexpected T_VARIABLE, expecting 
> T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}'
> 
> 
> 
> -- 
> 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] Re: using "getimagesize" to read out image informations form local harddrive

2003-01-12 Thread V.Y.JR
Why \\ between directories? Isnt it just a single?

"Harald Mohring" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> isn't it possible to get image informations from the local harddrive?
>
> $fotoinfo=getimagesize("C:\\Eigene Dateien\\Temp\\Foto.jpg");
>
> if i use that code, the errormessage is always "getimagesize: unable to
open
> file for reading"
>
> got anybody a solution?
>
>



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




RE: [PHP] php5 cvs

2003-01-12 Thread Sean Malloy
No the documentaton you are talking about, was that prior to ZE2 people were
using underscores to denote private functions/variables. With ZE2, they
wouldn't have to.

-Original Message-
From: Dan Rossi [mailto:[EMAIL PROTECTED]]
Sent: Sunday, 12 January 2003 11:23 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP] php5 cvs


its cool , i cant remember where i saw the reference , but it was claiming
to prefix the functions with underscores to denote private functions in php
4  for the rollover of php5, it was a pretty legit resource i cant remember
where though have too many bookmarks, oh well at least i know now , i think
it meant to underscore them , to make the private functions recognisable so
then the rewrite for the proper OO in php5 can be easy as adding private
where the underscores are ??, i gave  5 a test, compiled with no problems
except my ming extension didnt seem to load properly so will stick with for
4.3 for now.
aparantly its still not true OO as you have to add the constructor of the
base class inside the sub class constructor where other languages dont need
to do this, i was told from my c++ flatmate of mine but correct me if i'm
wrong but sadly i dont know much c++ apart from modding source code now and
then :D

-Original Message-
From: Zeev Suraski [mailto:[EMAIL PROTECTED]]
Sent: Sunday, January 12, 2003 11:13 PM
To: electroteque
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] php5 cvs


Not sure what you mean by 'changed', but the way to denote private
functions is by adding 'private' to the method declaration, and not by
prefixing them with _.

You can do it using:

class bar {
 private function foo()
 {
 ...
 }
 ...
};

Zeev

At 09:43 12/01/2003, electroteque wrote:
>hmm has the public and private function accessor changed ? i have been
>building my classes with test() and _test() to differentiate from public
and
>private and have been waiting to try it out but i can still access both !
??
>
>"Electroteque" <[EMAIL PROTECTED]> wrote in message
>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > lol no , i am gonna try and upgrade my workfrom dinasour php3 to php
4.3,
>i
> > have a development box here @ home i just upgraded to the 4.3 release
from
> > rc3 and am gonna try out version 5 then it doesnt matter how stable it
is
>at
> > home really :D
> >
> > "Danny Shepherd" <[EMAIL PROTECTED]> wrote in message
> > 000b01c2b9d2$ae5e46c0$6400a8c0@DANNYS">news:000b01c2b9d2$ae5e46c0$6400a8c0@DANNYS...
> > > It includes the latest CVS build of ZendEngine 2.0 - AFAIK it hasn't
>even
> > > reached beta status yet, so don't even think about using it for
>production
> > > work. That said, I didn't have any problems building it and it seems
> > pretty
> > > stable.
> > >
> > > A list of changes and features can be found at
> > > http://www.php.net/ZEND_CHANGES.txt.
> > >
> > > HTH
> > >
> > > Danny.
> > >
> > > - Original Message -
> > > From: "electroteque" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Saturday, January 11, 2003 6:50 PM
> > > Subject: [PHP] php5 cvs
> > >
> > >
> > > > hi guys just noticed php5 cvs in the snaps page , does this have the
> > zend
> > > > 2.0 engine ? more specific question has it got the proper OO built
in
> > yet
> > > ?
> > > >
> > > >
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, visit: http://www.php.net/unsub.php
> > > >
> > >
> >
> >
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php


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


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




Re: [PHP] PHP/MySQL help?

2003-01-12 Thread Steven M
Oops...many thanks for that.  Sorry, i am extremely new to this.

Best wishes.

Steven M



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




Re: [PHP] OOP for Web Programming Paradigm

2003-01-12 Thread Victor
olinux wrote:

I'm no OOP programmer but maybe extend your class to
include methods for each situation.

something like this:

function countSingle($cid)

function countMulti($cidArray)

function countAll() 


HTH,
olinux

Hmm, yes, that's an interesting idea. Except perhaps include the first 
arg as a by-refrence return variable, so that func can return true 
false. Yeah, I think that's not bad. Still, would have to have static 
accessors, but oh well...


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



php-general Digest 13 Jan 2003 01:21:46 -0000 Issue 1819

2003-01-12 Thread php-general-digest-help

php-general Digest 13 Jan 2003 01:21:46 - Issue 1819

Topics (messages 131329 through 131381):

Re: strip php tags from code ?
131329 by: Matt
131330 by: Timothy Hitchens \(HiTCHO\)

Re: highlight keywords issue
131331 by: Timothy Hitchens \(HiTCHO\)
131370 by: Hatem Ben
131374 by: Hatem Ben

Re: Simple Form Processing
131332 by: Justin French
131334 by: Jason Wong

php editor
131333 by: Hannes Smit
131335 by: Jason Wong
131336 by: rush
131363 by: Steven Balthazor

return last update for a whole website?
131337 by: arnaud gonzales

SESSION variable to pass login ID
131338 by: Willie G
131341 by: Tom Rogers
131348 by: Willie G
131349 by: Nova
131350 by: Willie G
131351 by: John W. Holmes

File information JPEG Files
131339 by: harald.mohring.gmx.de
131340 by: Warren Vail
131342 by: Tom Rogers

Phorum 3.4 Released!
131343 by: Brian Moon

count characters
131344 by: harald.mohring.gmx.de
131345 by: Reuben D. Budiardja
131346 by: Jason Sheets

Pre-built CMS - Anyone recommend one?
131347 by: Nick Wilson
131354 by: Chris Hayes
131358 by: Chris Mason

test
131352 by: Karl James
131353 by: Karl James
131355 by: Karl James
131356 by: Karl James

Sorry about that guys,
131357 by: Karl James

What means  "ioctl"
131359 by: harald.mohring.gmx.de
131360 by: Rick Emery
131364 by: Nova
131376 by: nicos.php.net

PHP/MySQL help?
131361 by: Steven M
131362 by: Johannes Schlueter
131366 by: Steven M
131368 by: Timothy Hitchens \(HiTCHO\)
131371 by: Steven M
131375 by: Timothy Hitchens \(HiTCHO\)
131380 by: Steven M

Re: Permission Denied
131365 by: Stephen
131367 by: Timothy Hitchens \(HiTCHO\)

Re: OOP for Web Programming Paradigm
131369 by: olinux
131381 by: Victor

using "getimagesize" to read out image informations form local harddrive
131372 by: harald.mohring.gmx.de
131378 by: Nova

object in session & security
131373 by: Hannes Smit
131377 by: Timothy Hitchens \(HiTCHO\)

Re: php5 cvs
131379 by: Sean Malloy

Administrivia:

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

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

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


--

--- Begin Message ---
>- Original Message -
>From: "David D" <[EMAIL PROTECTED]>
>Sent: Monday, January 06, 2003 7:47 AM
>Subject: [PHP] strip php tags from code ?


> I only want to keep html code of a page.
> I want to remove php tags.

It sound like you want the parser output of the page.  You can use PHPs
output control to buffer the page output, and capture it into a variable to
do whatever you want with it.

http://www.php.net/manual/en/ref.outcontrol.php

Alternately, you can find a template class that does it.



--- End Message ---
--- Begin Message ---
So you want to remove only the unparsed/raw php script blocks.

Why... are you displaying PHP without parsing??

If this is the case you can write a couple of very simple preg_replace
with a call
back and all is done.



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

> -Original Message-
> From: David D [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, 6 January 2003 10:48 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] strip php tags from code ?
> 
> 
> I only want to keep html code of a page.
> I want to remove php tags.
> Some tell that strip_tags is not adapted.
> 
> sample of what i want to do:
> 
> na
> 
> 
> ->
> 
> na
> 
> 
> php tags can be :
> or 
> or   /i
> 
> Merci.
> 
> 
> 
> ..
> 
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


--- End Message ---
--- Begin Message ---
You will need to break apart the entire document then process each area
inside of the
tags and to be very careful for nested tags.

The simplest way around I have found to do with is to add to tags that
have been processed
with attributes that are ignored by the browser renderer eg... PHP
as you can see the  -Original Message-
> From: Hatem Ben [mailto:[EMAIL PROTECTED]] 
> Sent: Sunday, 12 January 2003 7:24 PM
> To: PHP List
> Subject: [PHP] highlight keywords issue
> 
> 
> Heya all,
> 
> I'm trying to highlight search keywords in a string, 
> everything work expect when this keyword is inside a tag like this :
> 
> keyword (php) :
> 
> php
> 
> 
> 
> will be highlighted to :
> 
>  #66">php"> style="color: black; background-color: #66">php
> 
>  #66">php.gif" border=0 alt="php.net">
> 
> I have tryed to separate text from html, then highlight it 
> then join

[PHP] Free web-hosting

2003-01-12 Thread Rambler
Hello everybody!
Can anybody advice me the best free web-hosting with PHP?
Thank you.


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




[PHP] Does PHP's imap_utf7_en/decode compatible with Microsoft Outlook Express?

2003-01-12 Thread Hunte Swee
Hi all,

It seems true that php's imap_utf7_en/decode does not compatible with
microsoft outlook express.
We create imap folder(include chinese chars) using IMP, all it ok in IMP
problem, but when use OE
to connect to imap server, the folder can't be shown correctly. And vice
versa.

So my problem is what is wrong? PHP or Outlook Express?

Hunte
Thanks





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




[PHP] php_network_getaddresses()

2003-01-12 Thread Stanislav Skrypnik
Hi all,
I have the problem with this peace of code.
This code has to include file containing some Javascript functions.
http://mysite/";);
$javascript=PATH."inc/javascript_functions.js";
include ($javascript);
?>

When I run this I got message:

"Warning: php_network_getaddresses: getaddrinfo failed: Temporary failure in
name resolution in /physical/location/inc/my_file.php on line 5
Warning: Failed opening 'http://mysite/inc/javascript_functions.js' for
inclusion (include_path='.:/php/includes:/usr/share/php') in
/physical/location/inc/my_file.php on line 5"

I was trying to find info about php_network_getaddresses() but no luck.
Any help would be very appreciated.
Stas.



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




Re: [PHP] php_network_getaddresses()

2003-01-12 Thread Jason Sheets
Include will evaluate the file as PHP code, that most likely is not what
you want it to do.  Take a look at file_get_contents(), manual page
available at http://www.php.net/manual/en/function.file-get-contents.

Jason

phpSun, 2003-01-12 at 19:36, Stanislav Skrypnik wrote:
> Hi all,
> I have the problem with this peace of code.
> This code has to include file containing some Javascript functions.
>  //my_file.php
> define ("PATH", "http://mysite/";);
> $javascript=PATH."inc/javascript_functions.js";
> include ($javascript);
> ?>
> 
> When I run this I got message:
> 
> "Warning: php_network_getaddresses: getaddrinfo failed: Temporary failure in
> name resolution in /physical/location/inc/my_file.php on line 5
> Warning: Failed opening 'http://mysite/inc/javascript_functions.js' for
> inclusion (include_path='.:/php/includes:/usr/share/php') in
> /physical/location/inc/my_file.php on line 5"
> 
> I was trying to find info about php_network_getaddresses() but no luck.
> Any help would be very appreciated.
> Stas.
> 
> 
> 
> -- 
> 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] Permission Denied

2003-01-12 Thread Stephen
Yes, I just added it but same error:

Warning: mkdir(c:\inetpub\wwwroot\phpiw\packs\bob) [function.mkdir]:
Permission denied in c:\inetpub\wwwroot\phpiw\classes\class.cp.php on line
28

Here's the part where I try and make the folder:

function do_dir($package) {
 umask(0);
 if(mkdir($this->currentfolder().'packs\\bob', 0777)) {
return true;
 } else {
  echo 'There is already a package by the name of '.$package.'! Delete
it and try again.';
  return false;
 }
   }

Any ideas?
- Original Message -
From: "Timothy Hitchens (HiTCHO)" <[EMAIL PROTECTED]>
To: "'Stephen'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, January 12, 2003 6:33 PM
Subject: RE: [PHP] Permission Denied


: Did you use the umask(0) prior to the mkdir() in your script??
:
:
: Timothy Hitchens (HiTCHO)
: Open Platform Consulting
: e-mail: [EMAIL PROTECTED]
:
: > -Original Message-
: > From: Stephen [mailto:[EMAIL PROTECTED]]
: > Sent: Monday, 13 January 2003 9:09 AM
: > To: [EMAIL PROTECTED]
: > Subject: Re: [PHP] Permission Denied
: >
: >
: > Ok, I got it to make a directory as a absolute path but I'm
: > getting a "Permission Denied" error again. I'm running IIS so
: > I can't CHMOD and all the permission options are checked in
: > the options box.
: >
: >
: > - Original Message -
: > From: "Jason Wong" <[EMAIL PROTECTED]>
: > To: <[EMAIL PROTECTED]>
: > Sent: Sunday, January 12, 2003 4:03 AM
: > Subject: Re: [PHP] Permission Denied
: >
: >
: > : On Sunday 12 January 2003 10:10, Stephen wrote:
: > : > There's already a folder named packs but my problem was
: > not having the /
: > : > before it. One more question. How can I dynamically get
: > the path to the
: > : > current folder? Like your at
: > http://www.bob.com/joe/index.php and you want
: > : > to get the
: > http://www.bob.com/joe/ bit and do it dynamically?
: > :
: > : print_r($_SERVER) will show you which bits you can use.
: > :
: > : --
: > : Jason Wong -> Gremlins Associates -> www.gremlins.biz
: > : Open Source Software Systems Integrators
: > : * Web Design & Hosting * Internet & Intranet Applications
: > Development *
: > :
: > : /*
: > : I'll show you MY telex number if you show me YOURS ...
: > : */
: > :
: > :
: > : --
: > : PHP General Mailing List (http://www.php.net/)
: > : To unsubscribe, visit: http://www.php.net/unsub.php
: > :
: > :
: > :
: >
: >
: >
: > --
: > PHP General Mailing List (http://www.php.net/)
: > To unsubscribe, visit: http://www.php.net/unsub.php
: >
:
:
:



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




RE: [PHP] Permission Denied

2003-01-12 Thread Sean Malloy
I'm assuming you are using IIS.

If your harddrive is formatted using NTFS, you are going to have to add a
new entry to the ACL list for the directory to let the IUSR_
account access the directory.

There are plenty of readmes/articles on managing NTFS permissions. I don't
have time to go into the details of how to do it, only to tell you that that
is what you have to do.

BTW; By default Windows XP (If thats what you are using) enables Simple
Sharing/File Permisisons. To turn that off

in Windows Explorer;

Tools | Folder Options | View | (Scroll Right Down to bottom) Use simple
sharing <-- untick


-Original Message-
From: Stephen [mailto:[EMAIL PROTECTED]]
Sent: Monday, 13 January 2003 2:36 PM
To: [EMAIL PROTECTED]
Cc: PHP List
Subject: Re: [PHP] Permission Denied


Yes, I just added it but same error:

Warning: mkdir(c:\inetpub\wwwroot\phpiw\packs\bob) [function.mkdir]:
Permission denied in c:\inetpub\wwwroot\phpiw\classes\class.cp.php on line
28

Here's the part where I try and make the folder:

function do_dir($package) {
 umask(0);
 if(mkdir($this->currentfolder().'packs\\bob', 0777)) {
return true;
 } else {
  echo 'There is already a package by the name of '.$package.'! Delete
it and try again.';
  return false;
 }
   }

Any ideas?
- Original Message -
From: "Timothy Hitchens (HiTCHO)" <[EMAIL PROTECTED]>
To: "'Stephen'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Sunday, January 12, 2003 6:33 PM
Subject: RE: [PHP] Permission Denied


: Did you use the umask(0) prior to the mkdir() in your script??
:
:
: Timothy Hitchens (HiTCHO)
: Open Platform Consulting
: e-mail: [EMAIL PROTECTED]
:
: > -Original Message-
: > From: Stephen [mailto:[EMAIL PROTECTED]]
: > Sent: Monday, 13 January 2003 9:09 AM
: > To: [EMAIL PROTECTED]
: > Subject: Re: [PHP] Permission Denied
: >
: >
: > Ok, I got it to make a directory as a absolute path but I'm
: > getting a "Permission Denied" error again. I'm running IIS so
: > I can't CHMOD and all the permission options are checked in
: > the options box.
: >
: >
: > - Original Message -
: > From: "Jason Wong" <[EMAIL PROTECTED]>
: > To: <[EMAIL PROTECTED]>
: > Sent: Sunday, January 12, 2003 4:03 AM
: > Subject: Re: [PHP] Permission Denied
: >
: >
: > : On Sunday 12 January 2003 10:10, Stephen wrote:
: > : > There's already a folder named packs but my problem was
: > not having the /
: > : > before it. One more question. How can I dynamically get
: > the path to the
: > : > current folder? Like your at
: > http://www.bob.com/joe/index.php and you want
: > : > to get the
: > http://www.bob.com/joe/ bit and do it dynamically?
: > :
: > : print_r($_SERVER) will show you which bits you can use.
: > :
: > : --
: > : Jason Wong -> Gremlins Associates -> www.gremlins.biz
: > : Open Source Software Systems Integrators
: > : * Web Design & Hosting * Internet & Intranet Applications
: > Development *
: > :
: > : /*
: > : I'll show you MY telex number if you show me YOURS ...
: > : */
: > :
: > :
: > : --
: > : PHP General Mailing List (http://www.php.net/)
: > : To unsubscribe, visit: http://www.php.net/unsub.php
: > :
: > :
: > :
: >
: >
: >
: > --
: > PHP General Mailing List (http://www.php.net/)
: > To unsubscribe, visit: http://www.php.net/unsub.php
: >
:
:
:



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


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




RE: [PHP] php5 cvs

2003-01-12 Thread daniel
right ok , but obviously it wouldnt have an effect anyway prior to php5 thanks 
anyway.
>= Original Message From "Sean Malloy" <[EMAIL PROTECTED]> =
>No the documentaton you are talking about, was that prior to ZE2 people were
>using underscores to denote private functions/variables. With ZE2, they
>wouldn't have to.
>
>-Original Message-
>From: Dan Rossi [mailto:[EMAIL PROTECTED]]
>Sent: Sunday, 12 January 2003 11:23 PM
>To: [EMAIL PROTECTED]
>Cc: [EMAIL PROTECTED]
>Subject: RE: [PHP] php5 cvs
>
>
>its cool , i cant remember where i saw the reference , but it was claiming
>to prefix the functions with underscores to denote private functions in php
>4  for the rollover of php5, it was a pretty legit resource i cant remember
>where though have too many bookmarks, oh well at least i know now , i think
>it meant to underscore them , to make the private functions recognisable so
>then the rewrite for the proper OO in php5 can be easy as adding private
>where the underscores are ??, i gave  5 a test, compiled with no problems
>except my ming extension didnt seem to load properly so will stick with for
>4.3 for now.
>aparantly its still not true OO as you have to add the constructor of the
>base class inside the sub class constructor where other languages dont need
>to do this, i was told from my c++ flatmate of mine but correct me if i'm
>wrong but sadly i dont know much c++ apart from modding source code now and
>then :D
>
>-Original Message-
>From: Zeev Suraski [mailto:[EMAIL PROTECTED]]
>Sent: Sunday, January 12, 2003 11:13 PM
>To: electroteque
>Cc: [EMAIL PROTECTED]
>Subject: Re: [PHP] php5 cvs
>
>
>Not sure what you mean by 'changed', but the way to denote private
>functions is by adding 'private' to the method declaration, and not by
>prefixing them with _.
>
>You can do it using:
>
>class bar {
> private function foo()
> {
> ...
> }
> ...
>};
>
>Zeev
>
>At 09:43 12/01/2003, electroteque wrote:
>>hmm has the public and private function accessor changed ? i have been
>>building my classes with test() and _test() to differentiate from public
>and
>>private and have been waiting to try it out but i can still access both !
>??
>>
>>"Electroteque" <[EMAIL PROTECTED]> wrote in message
>>[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>> > lol no , i am gonna try and upgrade my workfrom dinasour php3 to php
>4.3,
>>i
>> > have a development box here @ home i just upgraded to the 4.3 release
>from
>> > rc3 and am gonna try out version 5 then it doesnt matter how stable it
>is
>>at
>> > home really :D
>> >
>> > "Danny Shepherd" <[EMAIL PROTECTED]> wrote in message
>> > 000b01c2b9d2$ae5e46c0$6400a8c0@DANNYS">news:000b01c2b9d2$ae5e46c0$6400a8c0@DANNYS...
>> > > It includes the latest CVS build of ZendEngine 2.0 - AFAIK it hasn't
>>even
>> > > reached beta status yet, so don't even think about using it for
>>production
>> > > work. That said, I didn't have any problems building it and it seems
>> > pretty
>> > > stable.
>> > >
>> > > A list of changes and features can be found at
>> > > http://www.php.net/ZEND_CHANGES.txt.
>> > >
>> > > HTH
>> > >
>> > > Danny.
>> > >
>> > > - Original Message -
>> > > From: "electroteque" <[EMAIL PROTECTED]>
>> > > To: <[EMAIL PROTECTED]>
>> > > Sent: Saturday, January 11, 2003 6:50 PM
>> > > Subject: [PHP] php5 cvs
>> > >
>> > >
>> > > > hi guys just noticed php5 cvs in the snaps page , does this have the
>> > zend
>> > > > 2.0 engine ? more specific question has it got the proper OO built
>in
>> > yet
>> > > ?
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > > PHP General Mailing List (http://www.php.net/)
>> > > > To unsubscribe, visit: http://www.php.net/unsub.php
>> > > >
>> > >
>> >
>> >
>>
>>
>>
>>--
>>PHP General Mailing List (http://www.php.net/)
>>To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php



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




RE: [PHP] Permission Denied

2003-01-12 Thread Timothy Hitchens \(HiTCHO\)
Who owns the htdocs root (I know it is Windows) when you right click you
should should see sharing/security.

Do you if not what OS Ver are you using?



Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

> -Original Message-
> From: Stephen [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, 13 January 2003 1:36 PM
> To: [EMAIL PROTECTED]
> Cc: PHP List
> Subject: Re: [PHP] Permission Denied
> 
> 
> Yes, I just added it but same error:
> 
> Warning: mkdir(c:\inetpub\wwwroot\phpiw\packs\bob) 
> [function.mkdir]: Permission denied in 
> c:\inetpub\wwwroot\phpiw\classes\class.cp.php on line 28
> 
> Here's the part where I try and make the folder:
> 
> function do_dir($package) {
>  umask(0);
>  if(mkdir($this->currentfolder().'packs\\bob', 0777)) {
> return true;
>  } else {
>   echo 'There is already a package by the name of 
> '.$package.'! Delete it and try again.';
>   return false;
>  }
>}
> 
> Any ideas?
> - Original Message -
> From: "Timothy Hitchens (HiTCHO)" <[EMAIL PROTECTED]>
> To: "'Stephen'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Sunday, January 12, 2003 6:33 PM
> Subject: RE: [PHP] Permission Denied
> 
> 
> : Did you use the umask(0) prior to the mkdir() in your script??
> :
> :
> : Timothy Hitchens (HiTCHO)
> : Open Platform Consulting
> : e-mail: [EMAIL PROTECTED]
> :
> : > -Original Message-
> : > From: Stephen [mailto:[EMAIL PROTECTED]]
> : > Sent: Monday, 13 January 2003 9:09 AM
> : > To: [EMAIL PROTECTED]
> : > Subject: Re: [PHP] Permission Denied
> : >
> : >
> : > Ok, I got it to make a directory as a absolute path but I'm
> : > getting a "Permission Denied" error again. I'm running IIS so
> : > I can't CHMOD and all the permission options are checked in
> : > the options box.
> : >
> : >
> : > - Original Message -
> : > From: "Jason Wong" <[EMAIL PROTECTED]>
> : > To: <[EMAIL PROTECTED]>
> : > Sent: Sunday, January 12, 2003 4:03 AM
> : > Subject: Re: [PHP] Permission Denied
> : >
> : >
> : > : On Sunday 12 January 2003 10:10, Stephen wrote:
> : > : > There's already a folder named packs but my problem was
> : > not having the /
> : > : > before it. One more question. How can I dynamically get
> : > the path to the
> : > : > current folder? Like your at
> : > http://www.bob.com/joe/index.php and you want
> : > : > to get the
> : > http://www.bob.com/joe/ bit and do it dynamically?
> : > :
> : > : print_r($_SERVER) will show you which bits you can use.
> : > :
> : > : --
> : > : Jason Wong -> Gremlins Associates -> www.gremlins.biz
> : > : Open Source Software Systems Integrators
> : > : * Web Design & Hosting * Internet & Intranet Applications
> : > Development *
> : > :
> : > : /*
> : > : I'll show you MY telex number if you show me YOURS ...
> : > : */
> : > :
> : > :
> : > : --
> : > : PHP General Mailing List (http://www.php.net/)
> : > : To unsubscribe, visit: http://www.php.net/unsub.php
> : > :
> : > :
> : > :
> : >
> : >
> : >
> : > --
> : > PHP General Mailing List (http://www.php.net/)
> : > To unsubscribe, visit: http://www.php.net/unsub.php
> : >
> :
> :
> :
> 
> 


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




[PHP] Favorite Email validation routine?

2003-01-12 Thread Peter Janett
I'm looking for everyone's favorite email syntax validation routine.  Code
that takes an email address and does regex on it to determine if it's
formatted correctly.

I know there are some on phpclasses.org that actually check the mx record
and server of the domain, but I'm just looking for a good, clean and fast
email address syntax check.

So, what is your favorite bit of code to do that?

Thanks,

Peter Janett




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




[PHP] Re: Favorite Email validation routine?

2003-01-12 Thread Manuel Lemos
Hello,

On 01/13/2003 03:21 AM, Peter Janett wrote:

I'm looking for everyone's favorite email syntax validation routine.  Code
that takes an email address and does regex on it to determine if it's
formatted correctly.

I know there are some on phpclasses.org that actually check the mx record
and server of the domain, but I'm just looking for a good, clean and fast
email address syntax check.

So, what is your favorite bit of code to do that?


This class that I don't know if you seen also comes with complex regex 
for simple e-mail address validation:

http://www.phpclasses.org/emailvalidation

--

Regards,
Manuel Lemos


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



Re: [PHP] Favorite Email validation routine?

2003-01-12 Thread Justin French
I use, and love the simplicity of, validEmailFormat()... it's a
near-as-possible port of someone's Perl script which has become close to the
definitive script/function for Perl developers.

http://www.killersoft.com/downloads/pafiledb.php?action=category&id=1

Cheers,

Justin



on 13/01/03 4:21 PM, Peter Janett ([EMAIL PROTECTED]) wrote:

> I'm looking for everyone's favorite email syntax validation routine.  Code
> that takes an email address and does regex on it to determine if it's
> formatted correctly.
> 
> I know there are some on phpclasses.org that actually check the mx record
> and server of the domain, but I'm just looking for a good, clean and fast
> email address syntax check.
> 
> So, what is your favorite bit of code to do that?
> 
> Thanks,
> 
> Peter Janett
> 
> 
> 


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




Re: [PHP] Favorite Email validation routine?

2003-01-12 Thread Justin French
Just checked the URL -- there are now 2 versions... I'm using 1.0

Justin


on 13/01/03 4:38 PM, Justin French ([EMAIL PROTECTED]) wrote:

> I use, and love the simplicity of, validEmailFormat()... it's a
> near-as-possible port of someone's Perl script which has become close to the
> definitive script/function for Perl developers.
> 
> http://www.killersoft.com/downloads/pafiledb.php?action=category&id=1
> 
> Cheers,
> 
> Justin
> 
> 
> 
> on 13/01/03 4:21 PM, Peter Janett ([EMAIL PROTECTED]) wrote:
> 
>> I'm looking for everyone's favorite email syntax validation routine.  Code
>> that takes an email address and does regex on it to determine if it's
>> formatted correctly.
>> 
>> I know there are some on phpclasses.org that actually check the mx record
>> and server of the domain, but I'm just looking for a good, clean and fast
>> email address syntax check.
>> 
>> So, what is your favorite bit of code to do that?
>> 
>> Thanks,
>> 
>> Peter Janett
>> 
>> 
>> 
> 


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




Re: [PHP] Pre-built CMS - Anyone recommend one?

2003-01-12 Thread Jason Wong
On Monday 13 January 2003 05:07, Chris Mason wrote:
> eZPublish is probably your best bet.

Have a look at Typo3. More difficult than average to install and use but 
extremely powerful and flexible.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
The sixth sheik's sixth sheep's sick.
[so say said sentence sextuply...]
*/


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




[PHP] class inside class

2003-01-12 Thread Michael Hall
-- 

G'day:

I am using a 'wrapper' class to create all the boilerplate HTML on a website, 
plus do stuff like authentication and print menus etc according to properties 
set dynamically within the class.

The actual content of each page is generated by seperate 'content' classes. 
These classes are 'embedded' within and instantiated within the wrapper class, 
but are otherwise independent of it.

This system allows for something approaching a PHP "object publishing" 
application, which is where I'm heading.

My problem is that now I need to get at the values of some wrapper class 
properties from within a content class: in other words, I need to access the 
dynamically assigned values of the properties of one class, from inside another 
class (which is embedded within the first, though I'm not sure that really 
matters).

I can't use the $this-> mechanism because the value is inside a different 
class.
I can't use the first class's handle (eg $page , from $page = new WebPage()) 
because the embedded class doesn't know about it.
I have been playing around with declaring globals, and with PHP's class/object 
functions, but have got nowhere yet. 


Is this possible, and if so, does anyone have any pointers? Hope my description 
of the problem makes sense.

TIA
Mick


MICHAEL HALL Web Development Officer
Batchelor Institute of Indigenous Tertiary Education
W: [EMAIL PROTECTED](08) 8951 8352
H: [EMAIL PROTECTED](08) 8953 1442


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




[PHP] Png Could not find/open font

2003-01-12 Thread Breno Cardoso Perucchi
How I can resolve this ?
This is my configuration of php (phpinfo)
Somebody can help me ? This is very important
GD
  GD Support  enabled
  GD Version  bundled (2.0 compatible)
  FreeType Support  enabled
  FreeType Linkage  with freetype
  GIF Read Support  enabled
  PNG Support  enabled
  WBMP Support  enabled

Warning: Could not find/open font in
/usr/home/hosting/b4u/public_html/congressos/fenasoft/ProgramacaoListar.php
on line 5
?PNG  IHDRj+¹¦ËPLTEÎÁ´Ï¿­ÊÈÈTÌÁ_%Y)IDATxocP"0(" ~"
"I×e¨Ä@º&cãQ]£ºFuê¢".*Y"â@uPIEND®B`,


Breno
[EMAIL PROTECTED]




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




RE: [PHP] Png Could not find/open font

2003-01-12 Thread Timothy Hitchens \(HiTCHO\)
I would suggest that in your script it is using a font for a GD
operation
and you need to make sure that PHP know's how to find that font.


Timothy Hitchens (HiTCHO)
Open Platform Consulting
e-mail: [EMAIL PROTECTED]

> -Original Message-
> From: Breno Cardoso Perucchi [mailto:[EMAIL PROTECTED]] 
> Sent: Monday, 13 January 2003 4:37 PM
> To: [EMAIL PROTECTED]
> Subject: [PHP] Png Could not find/open font 
> 
> 
> How I can resolve this ?
> This is my configuration of php (phpinfo)
> Somebody can help me ? This is very important
> GD
>   GD Support  enabled
>   GD Version  bundled (2.0 compatible)
>   FreeType Support  enabled
>   FreeType Linkage  with freetype
>   GIF Read Support  enabled
>   PNG Support  enabled
>   WBMP Support  enabled
> 
> Warning: Could not find/open font in 
> /usr/home/hosting/b4u/public_html/congressos/fenasoft/Programa
> caoListar.php
> on line 5
> ?PNG  IHDRj+¹¦ËPLTEÎÁ´Ï¿­ÊÈÈTÌÁ_%Y)IDATxocP" 0(" ~" 
> "I×e¨Ä@º&cãQ]£ºFuê¢".*Y"â@uPIEND®B`,
> 
> 
> Breno
> [EMAIL PROTECTED]
> 
> 
> 
> 
> -- 
> 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] Png Could not find/open font

2003-01-12 Thread Jason k Larson
One of the parameters you specified for (and I'm guessing here) 
imagettftext was a path to a font file.  PHP needs to know the full path 
to this file.  I'm betting it doesn't exist, as it didn't on mine until 
I copied it there.  I realized from others that you can use windows font 
files if you want.  So just copy, for instance, arial.ttf where you need it.

HTH,
Jason k Larson


Breno Cardoso Perucchi wrote:

How I can resolve this ?
This is my configuration of php (phpinfo)
Somebody can help me ? This is very important
GD
  GD Support  enabled
  GD Version  bundled (2.0 compatible)
  FreeType Support  enabled
  FreeType Linkage  with freetype
  GIF Read Support  enabled
  PNG Support  enabled
  WBMP Support  enabled

Warning: Could not find/open font in
/usr/home/hosting/b4u/public_html/congressos/fenasoft/ProgramacaoListar.php
on line 5
?PNG  IHDRj+¹¦ËPLTEÎÁ´Ï¿­ÊÈÈTÌÁ_%Y)IDATxocP"0(" ~"
"I×e¨Ä@º&cãQ]£ºFuê¢".*Y"â@uPIEND®B`,


Breno
[EMAIL PROTECTED]



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




[PHP] Sessions 'funny' and Zone Alarm Pro 3

2003-01-12 Thread Neil Stirton
Hi,

I've started developing a shopping cart and was just testing and found
that I get strange results when Zone Alarm's Cookie Control is set to
anything other than "Off".

If anything, I would expect the shopping cart to forget its contents
between pages but instead I am getting weird results.


(I have many other files/classes being called from this test.php file)

test.php










 add_item( $f_id, $f_qty, $f_desc, $f_price, '' );
} elseif ( $f_act == 'remove' ) {
$_SESSION[ 'cart' ] -> remove_item( $f_id );
} elseif ( $f_act == 'update' ) {
$_SESSION[ 'cart' ] -> update_item( $f_id, $f_qty, $f_price, false );
} else {
echo '';
print_r ($_SESSION);
echo '';
}

?>




Product = CD


Qty:






';
print_r ($_SESSION);
echo '';

?>



--

This script obviously calls itself (not sure if that is part of the
problem?)


Scenario (with ZA cookie control set to Medium)
---

Leave the quantity set to 1 and click add, the session then shows that there
is one item in the cart.

Click add again and there are 3 items in the cart.
Click again and there are 5 items.

If I now change the quantity to say 10, there will be 16 items (the 5 that
were
there a minute ago plus the 10 plus what appears to be the value that
quantity
was previously set to i.e. 1.

Thus if I then go and set the quantity to 5, it will take the previous value
(10)
plus the new value (5) and add it to the cart (16), giving 31.


Turning ZA OFF and all works as expected.

Since my cart is a serious of objects/arrays, I changed the following to try
and track
down the problem.

Changed:

session_start();
if ( !isset( $_SESSION[ 'cart' ] ) ) {
$_SESSION[ 'cart' ] = new Cart();
}

?>


To:
---
session_start();
if ( !isset( $_SESSION[ 'cart' ] ) ) {
$_SESSION[ 'cart' ] = new Cart();
$_SESSION[ 'count' ] = 0;
}

$_SESSION[ 'count' ]++;
echo $_SESSION[ 'count' ];
?>


The count variable was also going up in the same fashion as the cart items
which makes me think that the page itself is being called several times
before
being displayed.


I'm tearing my hair out here and I can't leave it as is and the cart has to
go into production and I can't have people buying 31 items when they wanted
3 :)

Anyone any suggestions at all.


Regards,

Neil Stiron


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