Re: [PHP] Error when using built in functions

2003-09-06 Thread Raditha Dissanayake
what's the error message?

Ben C. wrote:

I am having problems using the following functions; trim(), ucwords(), and
others.  Do I have a setting wrong?
Ben

 



--
http://www.radinks.com/upload
Drag and Drop File Uploader.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Problem with include();

2003-09-06 Thread Raditha Dissanayake
Hello,
It's often said that includes should have relative paths instead of 
absolute paths. This ensures that your script still works when you move 
it to a different server. So if an error has forced you to use rel paths 
consider it a blessing in disguise :-)

Ty Lamb wrote:

/index.php
has 
include("/code/includes/page_header.php");

/docs/aaryn/dmb/dave.php
has
include("/code/includes/page_header.php");
Both are identical lines of code.  Index.php works but dave.php returns the
following:
Warning: Failed opening '/code/includes/page_header.php' for inclusion
(include_path='.;c:\php4\pear') in C:\x\x\x\x\x\aaryn\dmb\dave.php on line 4
but if I change the code in dave.php to
include '../../../code/includes/page_header.php';
It works.

Why?

Is there any way around this?  Please tell me I'm doing something wrong and
it's not supposed to work like this!!!
Ty...

 



--
http://www.radinks.com/upload
Drag and Drop File Uploader.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Error when using built in functions

2003-09-06 Thread Ben C.
I am having problems using the following functions; trim(), ucwords(), and
others.  Do I have a setting wrong?

Ben

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



RE: [PHP] Re: PHP code generation

2003-09-06 Thread electroteque
what is the whole point of it again ?

and how do they do this ??

http://www.meta-language.net/screenshots.html

-Original Message-
From: Manuel Lemos [mailto:[EMAIL PROTECTED]
Sent: Sunday, September 07, 2003 12:48 PM
To: Chris Hubbard
Cc: [EMAIL PROTECTED] Php. Net
Subject: [PHP] Re: PHP code generation


Hello Chris,

On 09/05/2003 02:11 PM, Chris Hubbard wrote:
> I'm working on a code generation project.  Is there anyone on the list who
> has experience building these things, and, would like to discuss
> architecture/patterns/structure of code generation off-list?

You may want to take a look at Metastorage project which is based on
massive code generatiom based on meta-programming:

http://www.meta-language.net/metastorage.html

--

Regards,
Manuel Lemos

Free ready to use OOP components written in PHP
http://www.phpclasses.org/

--
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] Problem with include();

2003-09-06 Thread Ty Lamb
/index.php
has 
include("/code/includes/page_header.php");
 
/docs/aaryn/dmb/dave.php
has
include("/code/includes/page_header.php");
 
Both are identical lines of code.  Index.php works but dave.php returns the
following:
 
Warning: Failed opening '/code/includes/page_header.php' for inclusion
(include_path='.;c:\php4\pear') in C:\x\x\x\x\x\aaryn\dmb\dave.php on line 4
 
but if I change the code in dave.php to
include '../../../code/includes/page_header.php';

It works.
 
Why?
 
Is there any way around this?  Please tell me I'm doing something wrong and
it's not supposed to work like this!!!
 
Ty...


Re: [PHP] Encrypt/Serialize Source Code for Sale

2003-09-06 Thread Evan Nemerson
Take a look at Turck MMCache (free) and Zend Encoder (not).

http://www.turcksoft.com/en/e_mmc.htm
http://www.zend.com/store/products/zend-encoder.php



On Saturday 06 September 2003 01:59 pm, Charles Kline wrote:
> What methods are available (ups and downs) for encrypting and
> serializing php applications for sale?
>
> Thanks,
> Charles

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



Re: [PHP] [imagick] converting to variable instead of file

2003-09-06 Thread Evan Nemerson
maybe create a fifo and write to that, then read from php?


On Saturday 06 September 2003 04:17 pm, Decapode Azur wrote:
> I had thought too that it is possible to write a temp file for this image,
> but it would be much better i think if there was another way...
>
> Is it really impossible to prevent from this hard disk access ?

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



[PHP] Date class and Span.php

2003-09-06 Thread Nelson Goforth
I am trying to use the Date class and am having trouble with it.  Since 
I'm just starting to use PEAR modules I'm not sure if I'm missing 
something simple or just what.

Date.php calls for an include of a file called Span.php, but the file 
does not exist in the date subdirectory.  I've found some references to 
that file being missing, so I located a file by that name in the CVS 
directory and installed it.  However, it 'includes' Date.php, the very 
file that calls it, so I'm unsure that I've got the right thing.

However, I commented out those includes and I do not get an error, but 
I'm unable to get any return from Span.php.

I'm trying to use the method addSpan($span), but I have no idea how to 
'phrase' the $span variable.   If I want to add a span of 6 months, how 
do I do so?  Anyone out there with some experience with this module who 
can help me?

Thank you,
Nelson
 _
 Nelson GOFORTH Lighting for Moving Pictures
 +1.303.322.5042
http://www.earthnet.net/~ngoforth/film
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] Too Advanced? Re: Cookies & Hidden Image

2003-09-06 Thread Chris Shiflett
--- Mark Charette <[EMAIL PROTECTED]> wrote:
> It's not a "PHP" thing, it's an HTML protocol thing ...

I think you mean HTTP. :-) HTML is a markup language.

Chris

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

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



Re: [PHP] Too Advanced? Re: Cookies & Hidden Image

2003-09-06 Thread Chris Shiflett
--- Nicole <[EMAIL PROTECTED]> wrote:
> The problem is accessing the cookie when the script is called via
> the image tag. If the script is called directly, the cookie is
> accessible.
> 
> http://trackerurl/blahblah/script.php --- called directly can see
> the Cookie
> 
> http://trackerurl/blahblah/script.php height=1 width=1>
> --- does not see the Cookie

Is this with Internet Explorer by chance? If so, see if your results differ
when using a different browser. If you can call the resource
(http://trackerurl/blahblah/script.php) directly and get different results than
when the resource is referenced as an img tag, then something is definitely
abnormal.

You might be running into a P3P problem, which I can explain further if my
suspicions are correct. Something that would *really* help us is the HTTP
request and HTTP response from these two transactions:

1. http://trackerurl/blahblah/script.php is accessed directly by the browser.
2. The browser accesses a page that references
http://trackerurl/blahblah/script.php in an img tag.

If you are running Windows (my assumption, no offense intended), you can use
ethereal to get this information.

Chris

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

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



Re: [PHP] Linux Issues

2003-09-06 Thread andu
On Sat, 6 Sep 2003 22:41:29 -0500
"Stephen Craton" <[EMAIL PROTECTED]> wrote:

> Thanks for the replies.
> 
> I've tried both 8.1 and 9.1 versions of Mandrake Linux with no luck (I
> bought the 8.1 CDs a while back)
> 
> I've also tried making a floppy disk but still no luck with 8.1. In 9.1, I
> can't get the autorun screen to make the floppy disk.

Try another distro, I recommend Slackware or Debian. Another option is to get one
of the distros which run from the cd with the option to copy it to hard drive like
Knoppix, they have more advanced auto-configuration software.

> 
> Thanks,
> Stephen Craton
> 
> - Original Message - 
> From: "Dan Anderson" <[EMAIL PROTECTED]>
> To: "Stephen Craton" <[EMAIL PROTECTED]>
> Cc: "PHP List" <[EMAIL PROTECTED]>
> Sent: Saturday, September 06, 2003 10:09 PM
> Subject: Re: [PHP] Linux Issues
> 
> 
> > Oh also make sure you are using /9.1/ and NOT /9.2 RC1/!
> >
> > -Dan
> >
> > On Sat, 2003-09-06 at 22:51, Stephen Craton wrote:
> > > Hello,
> > >
> > > This isn't really a PHP issue but I have no where else to go to get help
> really. Hopefully someone here can still help me.
> > >
> > > I am running Windows XP and have decided to install Mandrake Linux on
> top of it just for the heck of it. So, Friday I downloaded the latest ISO
> files from an FTP server and today I put in the burnt CDs and it takes me to
> the boot screen for it. I push enter (as it says to enter the setup) and it
> takes me to a blank screen and just sits there, doing nothing except
> flashing the Caps Lock and Scroll Lock lights on my keyboard.
> > >
> > > I went to the online manual for Mandrake and it said to add the text
> "noauto" which I did for the boot sequence. Same error. Any ideas what's
> going on and how to fix it?
> > >
> > > Thanks,
> > > Stephen Craton
> >
> > -- 
> > 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
> 
> 
> 



Regards, Andu Novac

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



Re: [PHP] Linux Issues

2003-09-06 Thread Stephen Craton
Thanks for the replies.

I've tried both 8.1 and 9.1 versions of Mandrake Linux with no luck (I
bought the 8.1 CDs a while back)

I've also tried making a floppy disk but still no luck with 8.1. In 9.1, I
can't get the autorun screen to make the floppy disk.

Thanks,
Stephen Craton

- Original Message - 
From: "Dan Anderson" <[EMAIL PROTECTED]>
To: "Stephen Craton" <[EMAIL PROTECTED]>
Cc: "PHP List" <[EMAIL PROTECTED]>
Sent: Saturday, September 06, 2003 10:09 PM
Subject: Re: [PHP] Linux Issues


> Oh also make sure you are using /9.1/ and NOT /9.2 RC1/!
>
> -Dan
>
> On Sat, 2003-09-06 at 22:51, Stephen Craton wrote:
> > Hello,
> >
> > This isn't really a PHP issue but I have no where else to go to get help
really. Hopefully someone here can still help me.
> >
> > I am running Windows XP and have decided to install Mandrake Linux on
top of it just for the heck of it. So, Friday I downloaded the latest ISO
files from an FTP server and today I put in the burnt CDs and it takes me to
the boot screen for it. I push enter (as it says to enter the setup) and it
takes me to a blank screen and just sits there, doing nothing except
flashing the Caps Lock and Scroll Lock lights on my keyboard.
> >
> > I went to the online manual for Mandrake and it said to add the text
"noauto" which I did for the boot sequence. Same error. Any ideas what's
going on and how to fix it?
> >
> > Thanks,
> > Stephen Craton
>
> -- 
> 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] Linux Issues

2003-09-06 Thread Dan Anderson
Oh also make sure you are using /9.1/ and NOT /9.2 RC1/!  

-Dan

On Sat, 2003-09-06 at 22:51, Stephen Craton wrote:
> Hello,
> 
> This isn't really a PHP issue but I have no where else to go to get help really. 
> Hopefully someone here can still help me.
> 
> I am running Windows XP and have decided to install Mandrake Linux on top of it just 
> for the heck of it. So, Friday I downloaded the latest ISO files from an FTP server 
> and today I put in the burnt CDs and it takes me to the boot screen for it. I push 
> enter (as it says to enter the setup) and it takes me to a blank screen and just 
> sits there, doing nothing except flashing the Caps Lock and Scroll Lock lights on my 
> keyboard.
> 
> I went to the online manual for Mandrake and it said to add the text "noauto" which 
> I did for the boot sequence. Same error. Any ideas what's going on and how to fix it?
> 
> Thanks,
> Stephen Craton

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



Re: [PHP] Linux Issues

2003-09-06 Thread Dan Anderson
> I went to the online manual for Mandrake and it said to add the text "noauto" which 
> I did for the boot sequence. Same error. Any ideas what's going on and how to fix it?

Did you run an md5 sum of your burnt isos?  What about double checking
the burnt CD against the iso?  Try redownloading and reburning. Chances
are you didn't get a complete iso or had a bad burn.

-Dan

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



[PHP] Linux Issues

2003-09-06 Thread Stephen Craton
Hello,

This isn't really a PHP issue but I have no where else to go to get help really. 
Hopefully someone here can still help me.

I am running Windows XP and have decided to install Mandrake Linux on top of it just 
for the heck of it. So, Friday I downloaded the latest ISO files from an FTP server 
and today I put in the burnt CDs and it takes me to the boot screen for it. I push 
enter (as it says to enter the setup) and it takes me to a blank screen and just sits 
there, doing nothing except flashing the Caps Lock and Scroll Lock lights on my 
keyboard.

I went to the online manual for Mandrake and it said to add the text "noauto" which I 
did for the boot sequence. Same error. Any ideas what's going on and how to fix it?

Thanks,
Stephen Craton

php-general Digest 7 Sep 2003 02:48:39 -0000 Issue 2282

2003-09-06 Thread php-general-digest-help

php-general Digest 7 Sep 2003 02:48:39 - Issue 2282

Topics (messages 161858 through 161880):

Re: simple Apache question I'm sure [solved]
161858 by: Paul O'Neil

[imagick] converting to variable instead of file
161859 by: Decapde Azur
161875 by: Decapde Azur

Function calling from url
161860 by: Robin Kopetzky
161861 by: Larry E. Ullman
161862 by: John W. Holmes
161868 by: Dan Anderson

Unregistering several variables at once -- how?
161863 by: James Johnson
161864 by: John W. Holmes

$HTTP_REFERER / Hijacking
161865 by: John Taylor-Johnston
161869 by: Curt Zirzow

Cpanel or Plesk
161866 by: Dasmeet
161870 by: Curt Zirzow
161872 by: andu
161877 by: Oscar F

Re: Remove vars from memory?
161867 by: Dan Anderson

Encrypt/Serialize Source Code for Sale
161871 by: Charles Kline

String formatting function - First char Upper, rest lower
161873 by: James Johnson
161874 by: Thomas Hebinck

Memory used by script
161876 by: \[cz\]Emo
161878 by: Curt Zirzow

Running PHP scripts in PHP Nuke
161879 by: Dan Anderson

Re: PHP code generation
161880 by: Manuel Lemos

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 ---
Thanks for that answer. that was it. Theres alot going on in apache!

-Original Message-
From: David Otton [mailto:[EMAIL PROTECTED]
Sent: Saturday, September 06, 2003 4:40 AM
To: Paul O'Neil
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] simple Apache question I'm sure


On Fri, 5 Sep 2003 20:30:22 -0700, you wrote:

>This is more Apache related but I have a php/apache config'd box at home I
>want to test stuff out on before uploading to a public server. Every
>directory except wwwroot dir I must place a '/' after the dir name to get a
>listing such as http:://192.168.1.1/mydirectory will not load the index.php
>file until I type in the '/' like so http://192.168.1.1/mydirectory/ what
>gives?

[Assuming that "::" is a typo]

"http://192.168.1.1/mydirectory"; is an invalid URL - that resource doesn't
exist on that server.

When a server receives a request for "http://example.com/some/dir";, instead
of throwing a 404 error it politely issues a 301 (Moved Permanently),
telling the browser to go to "http://example.com/some/dir/"; instead.

The "example.com" bit is taken from httpd.conf. Look for the line:

ServerName example.com

to modify.

Your request for "http://192.168.1.1/mydirectory"; is being 301'd into
"http://example.com/mydirectory/";

This is why leaving training a '/' off a URL is a bad idea, even though it
appears to work - it causes a second HTTP roundtrip before you get your
file.

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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/2003

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/2003
--- End Message ---
--- Begin Message ---
hi all,

With imagick_writeimage() function, is it possible to send the image to a 
variable instead of dumping it to a file or to the client browser?


Thanks
PS (if I try this, it is to convert an image to xpm in a variable and use it 
in php-gtk)
--- End Message ---
--- Begin Message ---

I had thought too that it is possible to write a temp file for this image,
but it would be much better i think if there was another way...

Is it really impossible to prevent from this hard disk access ?

-- 
> Write it to a tem file then use file_get_contents() on the file name.
>
[...]
> >With imagick_writeimage() function, is it possible to send the image to
> > a variable instead of dumping it to a file or to the client browser?
> >
> >Thanks
> >PS (if I try this, it is to convert an image to xpm in a variable and
> > use it in php-gtk)
--- End Message ---
--- Begin Message ---
Good morning!

I would like to call a function from a 's ACTION attribute. This is
what I'm trying to do:



I can include the PHP_FILENAME but passing parameters to the function I
can't figure out how to do. Any help would be appreciated.

Robin 'Sparky' Kopetzky
Black Mesa Computers/Internet Service
Grants, NM 87020
--- End Message ---
--- Begin Message ---
I would like to call a function from a 's ACTION attribute. This  
is
what I'm trying to do:


ACTION="www.example.com/PHP_FILENAME/function_name? 
parameter1=x¶meter2=y
" etc...>
Well, you're not going to call a function that way, but you will submit  
the form to the PHP page (PHP_FILENAME) and that

[PHP] Re: PHP code generation

2003-09-06 Thread Manuel Lemos
Hello Chris,

On 09/05/2003 02:11 PM, Chris Hubbard wrote:
I'm working on a code generation project.  Is there anyone on the list who
has experience building these things, and, would like to discuss
architecture/patterns/structure of code generation off-list?
You may want to take a look at Metastorage project which is based on 
massive code generatiom based on meta-programming:

http://www.meta-language.net/metastorage.html

--

Regards,
Manuel Lemos
Free ready to use OOP components written in PHP
http://www.phpclasses.org/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Running PHP scripts in PHP Nuke

2003-09-06 Thread Dan Anderson
I have a client who wants me to install a script on their web site. 
Only problem is they use PHP nuke and when I edit a pages content and
type in :



Or do something like:

http://www.site.com/script.php";>

It doesn't work.  Can anybody tell me how to run a script from within a
PHP nuke page?

Thanks,

Dan Anderson

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



Re: [PHP] Memory used by script

2003-09-06 Thread Curt Zirzow
* Thus wrote [cz]Emo ([EMAIL PROTECTED]):
> Hi all.
> 
> I would like to ask you if exist some way to get size of memory used by
> current script.
> I searched for sth, but didn't found any suitable result :o(

yes for php >= 4.3.2

http://php.net/memory_get_usage


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

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



Re: [PHP] Cpanel or Plesk

2003-09-06 Thread Oscar F
I've used both and personally, I like CPanel a whole lot more, it has in 
my opinion a better and easier to understand interface for users. I 
don't know if account that use CPanel can be moved to Plesk but I would 
suppose you could, I don't know for sure tho.

Oscar.

Dasmeet wrote:
Hi!
I guess many of you must have used both CPanel and Plesk. Can you tell 
me which one is better and what are the basic differences between them? 
Also can accounts hosted on WHM/CPanel moved to Plesk?
Any information would be of great help.
Thanks in advance!
Dasmeet

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


[PHP] Memory used by script

2003-09-06 Thread \[cz\]Emo
Hi all.

I would like to ask you if exist some way to get size of memory used by
current script.
I searched for sth, but didn't found any suitable result :o(

Thanx
Emo

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



Re: [PHP] [imagick] converting to variable instead of file

2003-09-06 Thread Decapode Azur

I had thought too that it is possible to write a temp file for this image,
but it would be much better i think if there was another way...

Is it really impossible to prevent from this hard disk access ?

-- 
> Write it to a tem file then use file_get_contents() on the file name.
>
[...]
> >With imagick_writeimage() function, is it possible to send the image to
> > a variable instead of dumping it to a file or to the client browser?
> >
> >Thanks
> >PS (if I try this, it is to convert an image to xpm in a variable and
> > use it in php-gtk)

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



[PHP] Re: String formatting function - First char Upper, rest lower

2003-09-06 Thread Thomas Hebinck
Hi,

>Does anyone know of a function or script that will capitalize the first
char
>and lowercase the remaining chars of each word in a string?

from the documentation:

$bar = ucwords(strtolower($bar));

http://de.php.net/manual/en/function.ucwords.php

Bye,
Thomas.

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



[PHP] String formatting function - First char Upper, rest lower

2003-09-06 Thread James Johnson
Hi,

Newbie question.

Does anyone know of a function or script that will capitalize the first char
and lowercase the remaining chars of each word in a string?

Thanks,
James

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



Re: [PHP] Cpanel or Plesk

2003-09-06 Thread andu
On Sat, 06 Sep 2003 23:58:39 +0530
Dasmeet <[EMAIL PROTECTED]> wrote:

> Hi!
> I guess many of you must have used both CPanel and Plesk. Can you tell 
> me which one is better and what are the basic differences between them? 
> Also can accounts hosted on WHM/CPanel moved to Plesk?
> Any information would be of great help.
> Thanks in advance!
> Dasmeet

Didn't use Plesk but i found CPanel to be pretty good for what it's supposed to
do. Has nothing to do with how accounts are set up though, that depends on
the distro/administrator and CPanel is configured accordingly.

> 
> -- 
> --
> Domainwala.com
> Domain Names from Rs. $7.99 at http://www.domainwala.com
> http://www.domainwala.com/headlines/index.php
> http://www.domainwala.com/links
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 
> 


-- 
Andu

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



[PHP] Encrypt/Serialize Source Code for Sale

2003-09-06 Thread Charles Kline
What methods are available (ups and downs) for encrypting and 
serializing php applications for sale?

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


Re: [PHP] Cpanel or Plesk

2003-09-06 Thread Curt Zirzow
* Thus wrote Dasmeet ([EMAIL PROTECTED]):
> Hi!
> I guess many of you must have used both CPanel and Plesk. Can you tell 

nope never have.

> me which one is better and what are the basic differences between them? 

I would suggest that maybe you research the products.

> Also can accounts hosted on WHM/CPanel moved to Plesk?

Contact plesk about this.


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

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



Re: [PHP] $HTTP_REFERER / Hijacking

2003-09-06 Thread Curt Zirzow
* Thus wrote John Taylor-Johnston ([EMAIL PROTECTED]):
> 
> The problem is I noticed a friend was getting the hijacking message.
> I had him clean his cache and reload, but no luck.
> 
> I wondered why he got that message, so I echoed $HTTP_REFERER to see what his IE6.x 
> was spewing out. The result was:
> 
> $HTTP_REFERER =""
> 
> Anyone suggest a work around? Another variable maybe? I don't need it, but want that 
> functionality in this counter:
> if(stristr($HTTP_REFERER,"district"))


> 
> I do need this fucntionality, however, on another site, where two URLS share the 
> same index.html on the same Apache server. One displays info one way for one URL, 
> the other another way for a different URL.

The referer isn't gaurenteed to be there, and there really isn't a
way around the problem.  

Ideally, if it's possible, have the user use a server side include instead
of javascript.  that will gaurentee no hijacking and also the
counter still will get displayed even if the end-user has javascript
off.

Either way keep the referrer checking in there, most people have
that setting on so only a select few wouldn't get counted.


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

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



Re: [PHP] Function calling from url

2003-09-06 Thread Dan Anderson
I know what you're trying to do you just don't quite know how to say
it...

I use something like:

if ($_GET['somevar'] AND $_GET['something_else'])
{
  do_something($_GET['somevar'], $_GET['something_else']);
}
else
{
  output_error_message();
}

-Dan
On Sat, 2003-09-06 at 13:19, Robin Kopetzky wrote:
> Good morning!
> 
> I would like to call a function from a 's ACTION attribute. This is
> what I'm trying to do:
> 
>  ACTION="www.example.com/PHP_FILENAME/function_name?parameter1=x¶meter2=y
> " etc...>
> 
> I can include the PHP_FILENAME but passing parameters to the function I
> can't figure out how to do. Any help would be appreciated.
> 
> Robin 'Sparky' Kopetzky
> Black Mesa Computers/Internet Service
> Grants, NM 87020

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



Re: [PHP] Remove vars from memory?

2003-09-06 Thread Dan Anderson
> yes, you must use unset() to remove a variable, otherwise it will stay
> for the duration of the script.

Don't worry about memory management if you're going to use PHP.  The
point of using a high level language like PHP is you can just ignore
it.  Let's say you decided to:

if ($temp)
{ /*  something  */ }
unset $temp; // save a couple bytes of memory

And you decided to reuse $temp a few weeks later:

if ($temp) // never will execute because you forgot you unset($temp);
{ /*  something  */ }

So unless you're dealing with an extreme scenario (i.e. a number of very
large mySQL queries), you probably don't need to worry.

-Dan

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



[PHP] Cpanel or Plesk

2003-09-06 Thread Dasmeet
Hi!
I guess many of you must have used both CPanel and Plesk. Can you tell 
me which one is better and what are the basic differences between them? 
Also can accounts hosted on WHM/CPanel moved to Plesk?
Any information would be of great help.
Thanks in advance!
Dasmeet

--
--
Domainwala.com
Domain Names from Rs. $7.99 at http://www.domainwala.com
http://www.domainwala.com/headlines/index.php
http://www.domainwala.com/links
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] $HTTP_REFERER / Hijacking

2003-09-06 Thread John Taylor-Johnston
This is kind of old-fashioned, but I created a counter that prevents hijacking.
"district" is a partial of the word in the URL. If it does not exist, echoes hijacking 
...

snip---
if(stristr($HTTP_REFERER,"district"))
{
#...
#echo "document.write(\"$num_rows visitors since August 23, 2003\");";
echo "document.write(\"$num_rows visitors since August 23, 2003 referred 
from: $HTTP_REFERER\");";
}else{
echo "document.write(\"No hijacking from ".$_ENV["HOSTNAME"].", merci. \");";
}
snip---

The problem is I noticed a friend was getting the hijacking message.
I had him clean his cache and reload, but no luck.

I wondered why he got that message, so I echoed $HTTP_REFERER to see what his IE6.x 
was spewing out. The result was:

$HTTP_REFERER =""

Anyone suggest a work around? Another variable maybe? I don't need it, but want that 
functionality in this counter:
if(stristr($HTTP_REFERER,"district"))

I do need this fucntionality, however, on another site, where two URLS share the same 
index.html on the same Apache server. One displays info one way for one URL, the other 
another way for a different URL.

P.S., I'm using the Javascript document.write because this site is not on a PHP 
server, so I used this code to help the non-PHP site out:


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



Re: [PHP] Unregistering several variables at once -- how?

2003-09-06 Thread John W. Holmes
James Johnson wrote:

Hi,

I have 15 - 20 $_SESSION vars that I want to clear when a user logs out.
I've been doing it with the following code:
if(session_is_registered($_SESSION['svUserID'])){
session_unregister($_SESSION['svUserID']);
}
But, this is tedious. Is there a better way, like session_unregister(all)?
$_SESSION = array();

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

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

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


[PHP] Unregistering several variables at once -- how?

2003-09-06 Thread James Johnson
Hi,

I have 15 - 20 $_SESSION vars that I want to clear when a user logs out.
I've been doing it with the following code:

if(session_is_registered($_SESSION['svUserID'])){
session_unregister($_SESSION['svUserID']);
}

But, this is tedious. Is there a better way, like session_unregister(all)?

Thanks,
James

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



Re: [PHP] Function calling from url

2003-09-06 Thread John W. Holmes
Robin Kopetzky wrote:

I would like to call a function from a 's ACTION attribute. This is
what I'm trying to do:

I can include the PHP_FILENAME but passing parameters to the function I
can't figure out how to do. Any help would be appreciated.
Ummm... no. You call a PAGE from the action attribute of a form. There 
is no getting around that. You can call a PHP PAGE that passes variables 
in the query string, though...

action="www.example.com/phpfile.php?function=foo¶m1=bar¶m2=baar

This would give you $_GET['function'], $_GET['param1'], and 
$_GET['param2'] in your "phpfile.php" page. You then call your function 
using those variables. If you are smart, you'll put in some validation, 
also.

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

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

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


Re: [PHP] Function calling from url

2003-09-06 Thread Larry E . Ullman
I would like to call a function from a 's ACTION attribute. This  
is
what I'm trying to do:


ACTION="www.example.com/PHP_FILENAME/function_name? 
parameter1=x¶meter2=y
" etc...>
Well, you're not going to call a function that way, but you will submit  
the form to the PHP page (PHP_FILENAME) and that page can call the  
function. If the action attribute was script.php?p1=x&p2=y

Then script.php would have
function_name ($_GET['x'], $_GET['y']);
You'll probably want to do some validity checking on the GET data, just  
in case.

Hope that helps,
Larry
PS Just to be clear: you can't call a PHP function using a form since a  
form is on the client and PHP is on the server.

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


[PHP] Function calling from url

2003-09-06 Thread Robin Kopetzky
Good morning!

I would like to call a function from a 's ACTION attribute. This is
what I'm trying to do:



I can include the PHP_FILENAME but passing parameters to the function I
can't figure out how to do. Any help would be appreciated.

Robin 'Sparky' Kopetzky
Black Mesa Computers/Internet Service
Grants, NM 87020

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



[PHP] [imagick] converting to variable instead of file

2003-09-06 Thread Decapde Azur
hi all,

With imagick_writeimage() function, is it possible to send the image to a 
variable instead of dumping it to a file or to the client browser?


Thanks
PS (if I try this, it is to convert an image to xpm in a variable and use it 
in php-gtk)

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



RE: [PHP] simple Apache question I'm sure [solved]

2003-09-06 Thread Paul O'Neil
Thanks for that answer. that was it. Theres alot going on in apache!

-Original Message-
From: David Otton [mailto:[EMAIL PROTECTED]
Sent: Saturday, September 06, 2003 4:40 AM
To: Paul O'Neil
Cc: [EMAIL PROTECTED]
Subject: Re: [PHP] simple Apache question I'm sure


On Fri, 5 Sep 2003 20:30:22 -0700, you wrote:

>This is more Apache related but I have a php/apache config'd box at home I
>want to test stuff out on before uploading to a public server. Every
>directory except wwwroot dir I must place a '/' after the dir name to get a
>listing such as http:://192.168.1.1/mydirectory will not load the index.php
>file until I type in the '/' like so http://192.168.1.1/mydirectory/ what
>gives?

[Assuming that "::" is a typo]

"http://192.168.1.1/mydirectory"; is an invalid URL - that resource doesn't
exist on that server.

When a server receives a request for "http://example.com/some/dir";, instead
of throwing a 404 error it politely issues a 301 (Moved Permanently),
telling the browser to go to "http://example.com/some/dir/"; instead.

The "example.com" bit is taken from httpd.conf. Look for the line:

ServerName example.com

to modify.

Your request for "http://192.168.1.1/mydirectory"; is being 301'd into
"http://example.com/mydirectory/";

This is why leaving training a '/' off a URL is a bad idea, even though it
appears to work - it causes a second HTTP roundtrip before you get your
file.

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

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/2003

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/2003

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



php-general Digest 6 Sep 2003 14:36:28 -0000 Issue 2281

2003-09-06 Thread php-general-digest-help

php-general Digest 6 Sep 2003 14:36:28 - Issue 2281

Topics (messages 161839 through 161857):

Re: Notices - Variable not defined
161839 by: John W. Holmes
161841 by: Leonie

Planning a project with PHP.
161840 by: Info.Best-IT
161845 by: Raditha Dissanayake
161852 by: Leonie

Re: Too Advanced? Re: Cookies & Hidden Image
161842 by: Nicole
161843 by: John W. Holmes
161844 by: Mark Charette

simple Apache question I'm sure
161846 by: Paul O'Neil
161855 by: David Otton

Re: Opening Zip Files in Linux
161847 by: Raditha Dissanayake

Database updation
161848 by: Uma Shankari T.
161849 by: Raditha Dissanayake

client certs (how to)
161850 by: Scott

[Newbie Guide] For the benefit of new members
161851 by: tech.leatherlink.net

module.so and php-directory!!!
161853 by: m n

Get particular section structure of message
161854 by: myhan

Re: Maximum amount of variables in a session?
161856 by: David Otton

Re: PHP code generation
161857 by: Marek Kilimajer

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 ---
Leonie wrote:

I have this code:

 if (!$path) {
  $path = getPath();
 }
Sometimes $path is set (there are forms on the page that can change it).
When the page is first displayed:
Notice: Undefined variable: path in e:\program/  etc...
It then gives a reference to the line:   if (!$path) {
Is there a way to get rid of this annoying notice?
if(!isset($path))
{ $path = getPath(); }
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/

php|architect: The Magazine for PHP Professionals – www.phparch.com
--- End Message ---
--- Begin Message ---
Wow!  That's service!  Thank you.

Leonie
--- End Message ---
--- Begin Message ---
I am building a project where I plan to build a site with PHP.  Right now I
have organized it with the following:

Page objects ­ format and layout of the pages
Functional Objects ­ Database querys
Data objects ­ objects that hold data specific to the object type.
Scripts ­ scripts called to instantiate objects, and run the site.

That is my high level plan.  Is this a decent approach?  Or should I
structure it differently at this level.  I need to make sure this site is
secure, so certain pages cannot be directly accessed (not sure how to do
that).  I am looking to make the structure simple to manage the complexity
of the data flow.  

Any ideas how to best manage projects in PHP?  I¹ve seen object oriented PHP
sites and totally scripted (procedural) sites.  But I am confused which
would be better.

/T

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

Just a personal opinion only: If you are a die hard OO fan. you are 
better of with J2EE. If you were brought up on C, think linux is the 
best thing that ever happened to computers, welcome to the world of PHP.

best regards
raditha
[EMAIL PROTECTED] wrote:

I am building a project where I plan to build a site with PHP.  Right now I
have organized it with the following:
Page objects ­ format and layout of the pages
Functional Objects ­ Database querys
Data objects ­ objects that hold data specific to the object type.
Scripts ­ scripts called to instantiate objects, and run the site.
That is my high level plan.  Is this a decent approach?  Or should I
structure it differently at this level.  I need to make sure this site is
secure, so certain pages cannot be directly accessed (not sure how to do
that).  I am looking to make the structure simple to manage the complexity
of the data flow.  

Any ideas how to best manage projects in PHP?  I¹ve seen object oriented PHP
sites and totally scripted (procedural) sites.  But I am confused which
would be better.
/T

 



--
http://www.radinks.com/upload
Drag and Drop File Uploader.
--- End Message ---
--- Begin Message ---
Have you checked out the code libraries at PEAR?

It is all OO and includes templates for separating code from presentation.
I think its pretty cool.

http://www.pear.php.net/

You might also like to check this out with the folks at another forum on
news.php.net:
php.pear.general

I think you will find what you are looking for there.

Regards
Leonie
--- End Message ---
--- Begin Message ---
Thanks. The cookie sets fine using the redirect. The problem is accessing
the cookie when the script is called via the image tag. If the script is
called directly, the cookie is accessible.

http://trackerurl/blahblah/script.php--- called directly can see the
Cookie

http://trackerurl/blahblah/script.php height=1 width=1>--- does
not see the Cookie

Not sure what else to do other than try something different. Using Cookie
seems to be the only way to store the value on

Re: [PHP] Re: PHP code generation

2003-09-06 Thread Marek Kilimajer
I think http://www.meta-language.net/ might be something similar.

Chris Hubbard wrote:

No, not random character generation.

Currently the application I'm working does the following:
1.  from an array that defines HTML components (like a table row, input
field, file upload, etc), and,
2.  from an array that defines PHP components (like sql queries, file
upload, assigning values to variables, etc), and,
3.  a library of HTML components (like the HTML to display; a table row, a
search box, a text area, etc),
4.  take all three of the above and do a (fairly) complex suite of
str_replaces and then file writes, output .php and .tpl files, resulting in
a (hopefully) functional application.
Primary advantage:
as the application developer (as distinct from the code generation
developer), you only have to build arrays.  The arrays can be built from
HTML forms, or XML, or ...?
Secondary advantage:
if you need to build multiple instances of the application with minor
changes, it's trivial to build and maintain.
Tertiary advantage:
you have a common "framework" (though not technically a framework) for all
deployed applications.  It's relatively easy to "upgrade" the applications,
or swap out sections of the code with improved code.
chris



-Original Message-
From: Scott Fletcher [mailto:[EMAIL PROTECTED]
Sent: Friday, September 05, 2003 9:30 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Re: PHP code generation
What are the example of code generation project?  Are you referring to the
generation of the random characters?
"Chris Hubbard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
I'm working on a code generation project.  Is there anyone on the list who
has experience building these things, and, would like to discuss
architecture/patterns/structure of code generation off-list?
Chris Hubbard
[EMAIL PROTECTED]
www.wildcharacters.com
425 481 2020
php based web application development

Y! [EMAIL PROTECTED]
MSN [EMAIL PROTECTED]
AIM ganeshacph


--
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] Maximum amount of variables in a session?

2003-09-06 Thread David Otton
On Fri, 5 Sep 2003 14:40:39 -0700, you wrote:

> I am creating a project for a web hosting control panel and just wondering
>if there is a limit to the amount of variables I can store in a session?  If
>I have too many variables will it create an uneccassary strain on my server?
>What is an average amount of variables that a session should have.
>
>I have a good knowledge of basic PHP but have never worked with sessions
>before.  This project is a learning project and a project because I have yet
>to find what I'm looking for in hosting control panels.

AFAIK, PHP places no constraint on the amount of data stored in a session.

However as with any program, if you use lots of system resources you will
run into OS constraints, or reduce overall system performance.

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



Re: [PHP] simple Apache question I'm sure

2003-09-06 Thread David Otton
On Fri, 5 Sep 2003 20:30:22 -0700, you wrote:

>This is more Apache related but I have a php/apache config'd box at home I
>want to test stuff out on before uploading to a public server. Every
>directory except wwwroot dir I must place a '/' after the dir name to get a
>listing such as http:://192.168.1.1/mydirectory will not load the index.php
>file until I type in the '/' like so http://192.168.1.1/mydirectory/ what
>gives?

[Assuming that "::" is a typo]

"http://192.168.1.1/mydirectory"; is an invalid URL - that resource doesn't
exist on that server.

When a server receives a request for "http://example.com/some/dir";, instead
of throwing a 404 error it politely issues a 301 (Moved Permanently),
telling the browser to go to "http://example.com/some/dir/"; instead.

The "example.com" bit is taken from httpd.conf. Look for the line:

ServerName example.com

to modify.

Your request for "http://192.168.1.1/mydirectory"; is being 301'd into
"http://example.com/mydirectory/";

This is why leaving training a '/' off a URL is a bad idea, even though it
appears to work - it causes a second HTTP roundtrip before you get your
file.

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



[PHP] Get particular section structure of message

2003-09-06 Thread myhan
I make a function to fetch the structure of a particulat section of a
message,
and I test it with some special mails and it works well.
But for I am not so familiar with mime-types, I need more suggest and help.

function getCurrentStruct($pi_msgid, $ps_part=1)
{
//$o_struct = $this->getStructure($pi_msgid);
$o_struct = imap_fetchstructure($mbox, $pi_msgid);
//$ps_part is a string like "4.3.3"
if (!array_key_exists("parts", get_object_vars($o_struct))) {
//$this->pushError("No such part");
//call imap_errors() and return the last error
return new PEAR_Error($this->getError());
}
foreach (explode(".", $ps_part) as $i) {
if (!array_key_exists("parts", get_object_vars($o_struct)) ||
!is_array($o_struct->parts)) {
return new PEAR_Error("No such part");
}
$a_tmp = $o_struct->parts;
if ($a_tmp[0]->type == 1) { // &&
(strtoupper($a_tmp[0]->subtype)=="MIXED") {
$a_tmp = $a_tmp[0]->parts;
}
$o_struct = $a_tmp[$i-1];
}
return $o_struct;
}

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



[PHP] module.so and php-directory!!!

2003-09-06 Thread m n
Hi!!
 
I have writen a php_module.so but i havent access right to move my
module to the php-directory!!
Is the any other way to load php_module!!!
 
BR