Re: [PHP] Purging old files from directories

2003-08-01 Thread Marek Kilimajer


Verdon vaillancourt wrote:

Hi :)

I need to write a script that will scan/read a given directory's contents
and delete files older than a certain date. Ideally, this will be a script
that runs via cron once a week and deletes all files it finds in the
directory older than 2 weeks from the current date. I do currently have
scripts running via cron and that's no problem. I'm not sure where to begin
with the other components
Begin in the manual:
Directory functions
Filesystem functions - filemtime()
I'm not looking to be spoon-fed, but I was hoping that someone could point
me in the right direction to start researching.
Best regards,
Verdon



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


Re: [PHP] Trouble getting $HTTP_RAW_POST_DATA

2003-08-01 Thread skate

> Also, print_r() does not include any HTML formatting, so you will need to
> look at the source for the page in the browser to make it readable.

or your could use ...



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



Re: [PHP] [PHP-WIN] http://www.zend.com/manual/function.memory-get-usage.php(fwd)

2003-08-01 Thread Miha Nedok

The function doesn't exist but it should since 4.3.2, i'm using the
official win32 builds from PHP.

Yes, win32 :) Hmmm... we have to do what we have to do to pay the bills,
don't you agree ? :))

-Mike


On Wed, 30 Jul 2003, Evan Nemerson wrote:

> Date: Wed, 30 Jul 2003 19:32:11 -0700
> From: Evan Nemerson <[EMAIL PROTECTED]>
> To: Miha Nedok <[EMAIL PROTECTED]>, [EMAIL PROTECTED]
> Subject: Re: [PHP] [PHP-WIN]
> http://www.zend.com/manual/function.memory-get-usage.php (fwd)
>
> Was php configured with --enable-memory-limit?
> function_exists('memory_get_usage')??? function_exists('get_memory_usage')???
> Did the function even exist in 4.3.3 RC1?
>
> Why is your address @ unix-systems.net and you're asking about win32?
>
>
> On Wednesday 30 July 2003 04:36 pm, Miha Nedok wrote:
> > I asked this one on php-windoows, can someone here tell the answer.
> >
> > -Mike
> >
> > -- Forwarded message --
> > Date: Tue, 29 Jul 2003 15:56:25 +0200 (CEST)
> > From: Miha Nedok <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: [PHP-WIN] http://www.zend.com/manual/function.memory-get-usage.php
> >
> >
> > Any ideas with this one on Win32 ? I'm running 4.3.3RC1.
> >
> > -Mike
>

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



Re: [PHP] Undefined variable problem

2003-08-01 Thread Ryan A
IT WORKS!!!
Thanks for replying and the solution.
Cheers,
-Ryan


Hello,

This is a reply to an e-mail that you wrote on Fri, 1 Aug 2003 at
14:47, lines prefixed by '>' were originally written by you.

> Notice: Undefined variable: email1 in
> c:phpdevwwwbwhprojectcompare.php
> on line 117

> $$tmp.= $value;  /* This is the error line 117*** */

You are trying to append to the variable instead of create it, change
this line to:
$$tmp = $value;

David.

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

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

QuizSender.com - How well do your friends actually know you?
 http://www.quizsender.com/
(developed entirely in PHP)



We will slaughter you all! - The Iraqi (Dis)information ministers site
http://MrSahaf.com



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



Re: [PHP] Undefined variable problem

2003-08-01 Thread Joona Kulmala
Hello

This is the code:
   $m = 1;
   while ($line = mysql_fetch_assoc($rs)) { //dumping into an array
 foreach ($line as $field => $value) {
 $tmp = $field.$m;
$$tmp.= $value;  /* This is the error line 117*** */
 }
 $m++;
   }
This is basically so that i can use the array via variables like so:
if($tcl2==1){echo $tcl2;}
instead of: if($arrayname['tcl']['1']==1){echo $arrayname['tcl']['1'];} and
so onesp since i have 38 fields.
I can of course just shut off error reporting...but thats not the best
solution right? and i still wouldnt know whats causing these notices...
Simply define $$tmp -variable before adding stuff in it.

[code]
   $m = 1;
   while ($line = mysql_fetch_assoc($rs)) { //dumping into an array
 foreach ($line as $field => $value) {
$tmp = $field.$m;
$$tmp = "";
	 $$tmp .= $value; 
 }
 $m++;
   }
[/code]

No it should whine about undefined vars.

Cheers, Joona
--
Joona Kulmala <[EMAIL PROTECTED]>
PHP Finland
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Undefined variable problem

2003-08-01 Thread David Nicholson
Hello,

This is a reply to an e-mail that you wrote on Fri, 1 Aug 2003 at
14:47, lines prefixed by '>' were originally written by you.

> Notice: Undefined variable: email1 in
> c:phpdevwwwbwhprojectcompare.php
> on line 117

> $$tmp.= $value;  /* This is the error line 117*** */

You are trying to append to the variable instead of create it, change
this line to:
$$tmp = $value;

David.

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

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

QuizSender.com - How well do your friends actually know you?
 http://www.quizsender.com/
(developed entirely in PHP)

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



[PHP] Undefined variable problem

2003-08-01 Thread Ryan A
Hi,
This is the following code given to me by Jenniffer Goodie (thank you) which
is working great but is throwing this notice:

Notice: Undefined variable: email1 in c:\phpdev\www\bwh\project\compare.php
on line 117
Notice: Undefined variable: address1 in
c:\phpdev\www\bwh\project\compare.php on line 117
Notice: Undefined variable: city1 in c:\phpdev\www\bwh\project\compare.php
on line 117
etc (30+ notices)

This is the code:
   $m = 1;
   while ($line = mysql_fetch_assoc($rs)) { //dumping into an array
 foreach ($line as $field => $value) {
 $tmp = $field.$m;
$$tmp.= $value;  /* This is the error line 117*** */
 }
 $m++;
   }

This is basically so that i can use the array via variables like so:
if($tcl2==1){echo $tcl2;}
instead of: if($arrayname['tcl']['1']==1){echo $arrayname['tcl']['1'];} and
so onesp since i have 38 fields.

I can of course just shut off error reporting...but thats not the best
solution right? and i still wouldnt know whats causing these notices...

Any ideas?

Cheers,
-Ryan



We will slaughter you all! - The Iraqi (Dis)information ministers site
http://MrSahaf.com



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



[PHP] Purging old files from directories

2003-08-01 Thread Verdon vaillancourt
Hi :)

I need to write a script that will scan/read a given directory's contents
and delete files older than a certain date. Ideally, this will be a script
that runs via cron once a week and deletes all files it finds in the
directory older than 2 weeks from the current date. I do currently have
scripts running via cron and that's no problem. I'm not sure where to begin
with the other components

I'm not looking to be spoon-fed, but I was hoping that someone could point
me in the right direction to start researching.

Best regards,
Verdon


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



RE: [PHP] Trouble getting $HTTP_RAW_POST_DATA

2003-08-01 Thread Donald Tyler
You should encase the $HTTP_RAW_POST_DATA in print_r() or you will just get
the word "Array" printed. But I doubt that will solver your problem because
it seems that $HTTP_RAW_POST_DATA is empty.

Also, print_r() does not include any HTML formatting, so you will need to
look at the source for the page in the browser to make it readable.

-Original Message-
From: Balazs Halasy [mailto:[EMAIL PROTECTED] 
Sent: Friday, August 01, 2003 7:28 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Trouble getting $HTTP_RAW_POST_DATA

I need to have the contents of $HTTP_RAW_POST_DATA because of
non-regular uploads (from browser to my home-made WevDAV server
implementation 
(done in PHP)). However, no matter what I
do, it is always NULL. I guess the following script should return
SOMETHING in $HTTP_RAW_POST DATA if "always_populate_raw_post_data = On" is
added to the php.ini file (and yes, I've restarted apache :-)... so, why
is it empty and how can I get the RAW post data? My PHP version is 4.3.2.

test.php: 

 
 
 
 
\n"); 
echo("Raw post data decoded:
".base64_decode($HTTP_RAW_POST_DATA)."\n"); 
echo(""); 
phpinfo(); 
?> 



Allman


-- 
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] Trouble getting $HTTP_RAW_POST_DATA

2003-08-01 Thread Baroiller Pierre-Emmanuel
Hi,
$HTTP_RAW_POST_DATA is an array...
with echo you'll only get "array"..

To get something into $HTTP_RAW_POST_DATA, you need to "submit" your form
before...

Your script will only display something if you post the form before.

Regards,
P.E. Baroiller


"John W. Holmes" <[EMAIL PROTECTED]> a écrit dans le message de
news:[EMAIL PROTECTED]
> Balazs Halasy wrote:
> > I need to have the contents of $HTTP_RAW_POST_DATA because of
> > non-regular uploads (from browser to my home-made WevDAV server
implementation
> > (done in PHP)). However, no matter what I
> > do, it is always NULL. I guess the following script should return
> > SOMETHING in $HTTP_RAW_POST DATA if "always_populate_raw_post_data = On"
is
> > added to the php.ini file (and yes, I've restarted apache :-)... so, why
> > is it empty and how can I get the RAW post data? My PHP version is
4.3.2.
>
> Is register globals ON or OFF? Either way, maybe try
> $_SERVER['HTTP_RAW_POST_DATA']...
>
> -- 
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> PHP|Architect: A magazine for PHP Professionals - www.phparch.com
>
>
>
>



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



RE: [PHP] Frames and variables

2003-08-01 Thread Jay Blanchard
[snip]
I have a site that uses frames. On one frame i  have buttons to select
the
language. When user hits the button to select the language it is
supposed to
change in both frames.

Any idea how to do this?
[/snip]

Please read http://www.w3.org/TR/html4/present/frames.html

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



Re: [PHP] Upload scripts timing out

2003-08-01 Thread Marek Kilimajer
check php.ini for max_input_time

Josh Abernathy wrote:

My current upload script times out too quickly when users are uploading
large files. How can I stop this from happening?
Thanks!




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


[PHP] Frames and variables

2003-08-01 Thread Kalle Saarinen
Hi,

I have a site that uses frames. On one frame i  have buttons to select the
language. When user hits the button to select the language it is supposed to
change in both frames.

Any idea how to do this?



Thanks

-Kalle


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



Re: [PHP] Trouble getting $HTTP_RAW_POST_DATA

2003-08-01 Thread John W. Holmes
Balazs Halasy wrote:
I need to have the contents of $HTTP_RAW_POST_DATA because of
non-regular uploads (from browser to my home-made WevDAV server implementation 
(done in PHP)). However, no matter what I
do, it is always NULL. I guess the following script should return
SOMETHING in $HTTP_RAW_POST DATA if "always_populate_raw_post_data = On" is
added to the php.ini file (and yes, I've restarted apache :-)... so, why
is it empty and how can I get the RAW post data? My PHP version is 4.3.2.
Is register globals ON or OFF? Either way, maybe try 
$_SERVER['HTTP_RAW_POST_DATA']...

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

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





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


[PHP] Trouble getting $HTTP_RAW_POST_DATA

2003-08-01 Thread Balazs Halasy
I need to have the contents of $HTTP_RAW_POST_DATA because of
non-regular uploads (from browser to my home-made WevDAV server implementation 
(done in PHP)). However, no matter what I
do, it is always NULL. I guess the following script should return
SOMETHING in $HTTP_RAW_POST DATA if "always_populate_raw_post_data = On" is
added to the php.ini file (and yes, I've restarted apache :-)... so, why
is it empty and how can I get the RAW post data? My PHP version is 4.3.2.

test.php: 

 
 
 
 
\n"); 
echo("Raw post data decoded:
".base64_decode($HTTP_RAW_POST_DATA)."\n"); 
echo(""); 
phpinfo(); 
?> 



Allman


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



FW: [PHP] Search Engine

2003-08-01 Thread Ryan Gibson
Hi,

http://www.conceptx.co.uk/rpgproducts/index.php?pid=1

I made this some time ago, it could do with some work (if I remember
rightly, it doesn't cut off after X amount of results, what can I say I'm
lazy) id does order by relevance but requires indexing after changes.


On 2/8/03 12:14 am, "imran" <[EMAIL PROTECTED]> wrote:

> Hi,
> 
> Does anyone know any free search engine for web application
> 
> 
> imee
> 
> 
> 
> 

Ryan Gibson
---
[EMAIL PROTECTED]


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



RE: [PHP] Search Engine

2003-08-01 Thread Jay Blanchard
[snip]
Does anyone know any free search engine for web application
[/snip]

Google for "web application"? It's free. Oh, I get it!

Google for "free search engine for web application".

HTH!

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



Re: [PHP] What is $$

2003-08-01 Thread Ryan A
Hi all,
thanks for replying.
I guess i have to read the manaul in a little more detail now and also
update the manualam using last years one, i didnt think there was a big
differience but i guess there is.
Thanks again.
Cheers,
-Ryan


We will slaughter you all! - The Iraqi (Dis)information ministers site
http://MrSahaf.com


- Original Message -
From: "Jason Wong" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, August 01, 2003 5:13 AM
Subject: Re: [PHP] What is $$


> On Friday 01 August 2003 10:59, Ryan A wrote:
>
> > I have just found this in my book: $$var = $value
> > what is the double dollar for? or is that a typo?
> > Thanks,
>
> Search manual for variable variables (and no, that is not a typo).
>
> --
> Jason Wong -> Gremlins Associates -> www.gremlins.biz
> Open Source Software Systems Integrators
> * Web Design & Hosting * Internet & Intranet Applications Development *
> --
> Search the list archives before you post
> http://marc.theaimsgroup.com/?l=php-general
> --
> /*
> If you can't be good, be careful.  If you can't be careful, give me a
call.
> */
>
>
> --
> 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] Multiple targets with fscanf

2003-08-01 Thread Dan Anderson
Is there any reason you couldn't do something like:

");
{
$li_tag_start_position = strpos($buffer,"");
$li_tag_end_position = strpos($buffer,"");
$data = substr($buffer,(4 + $li_tag_start_position),(4 +
$li_tag_end_position));
$buffer = substr($buffer, (4 + $li_tag_end_position));
}
?>

Note that you could significantly compact the code by putting the strpos
calls in substr.  This would, however, obfusicate it.

-Dan

On Fri, 2003-08-01 at 07:15, Denis 'Alpheus' Cahuk wrote:
> Hello!
> 
> I'll get strait to the point:
> I want to include a header from another site ($fp =
> fopen("www.something.info/news.html", "r")) using the fscanf command,
> The headers are in "..." tags and I'm usign $a = fscanf($fp,
> "%s"). the problem is, that if I use this, I get only the first
> word in the header, but I would like to get the whole line until the
> next .
> 
> Thanks in advance
> 
> Denis 'Alpheus' Cahuk
> 


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



Re: [PHP] Multiple targets with fscanf

2003-08-01 Thread Marek Kilimajer
Try (untested)
$a = fscanf($fp,"%s");
if that does not work use regular expresions

Denis 'Alpheus' Cahuk wrote:

Hello!

I'll get strait to the point:
I want to include a header from another site ($fp =
fopen("www.something.info/news.html", "r")) using the fscanf command,
The headers are in "..." tags and I'm usign $a = fscanf($fp,
"%s"). the problem is, that if I use this, I get only the first
word in the header, but I would like to get the whole line until the
next .
Thanks in advance

Denis 'Alpheus' Cahuk




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


[PHP] Multiple targets with fscanf

2003-08-01 Thread Denis 'Alpheus' Cahuk
Hello!

I'll get strait to the point:
I want to include a header from another site ($fp =
fopen("www.something.info/news.html", "r")) using the fscanf command,
The headers are in "..." tags and I'm usign $a = fscanf($fp,
"%s"). the problem is, that if I use this, I get only the first
word in the header, but I would like to get the whole line until the
next .
Thanks in advance

Denis 'Alpheus' Cahuk

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


[PHP] Search Engine

2003-08-01 Thread imran
Hi,

Does anyone know any free search engine for web application


imee





[PHP] force load of ldap.conf

2003-08-01 Thread Turbo Fredriksson
It seems like the OpenLDAP libs is forcing a load of
the ldap.conf file... In that there's the BASE option
(which tells the clients where/what the base is).

In my development systems, I use LDAP as database for
users etc (together with Kerberos).

The problem is that I also run development database(s) on
localhost, with different base(s), sometimes different
ports etc. When (trying) to get the namingContexts from
the database, I can't retreive them if BASE is set...

Is there a way to get ldap_read() to NOT use this value,
OR is my string wrong ($attrib here is 'namingcontexts')?

- s n i p -
$sr = @ldap_read($this->ldap_linkid, NULL, '(objectClass=*)', array($attrib));
if(! $sr) die("Can't find base dn - ".ldap_error($this->ldap_linkid));
$entry = ldap_get_entries($this->ldap_linkid, $sr);
print_r($entry); die();
- s n i p -

By having 'BASE dc=com' in ldap.conf (which is the only
base I have in my non-development system), I will get
this:

- s n i p -
   Array ( [count] => 1 [0] => Array ( [count] => 0 [dn] => dc=com ) )
- s n i p -

Uncommenting the BASE value from ldap.conf and restart
apache, I get the intended values:

- s n i p -
   Array ( [count] => 1 [0] => Array ( [namingcontexts] => Array ( [count] => 2 [0] => 
c=SE [1] => dc=com ) [0] =>
   namingcontexts [count] => 1 [dn] => ) )
- s n i p -

The intention is to copy the behaviour of the following
shell command:

ldapsearch -x -LLL -h localhost -s base -b '' objectclass=* namingContexts

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



[PHP] Re: reading variables in other script files

2003-08-01 Thread Craig Roberts
2 ways come to mind - one's messy one isnt!

Non-Messy:
You could put $var1 into an include file, and include it in both file1.php
and file2.php, eg:

//Inc.php
$var1 = "some value";

//file1.php
include('Inc.php');
$var1 == "some value";

//file2.php
include('inc.php');
$var1 == "some value";

$var1 will be avaliable in both files. inc.php could, of course have some
code in it to set the variable (for example a random number etc). $var1
would also be avaliable to any other scripts that may need it in the future,
just by including the inc.php file.

Messy:
Open file1.php from file2.php and read the variable out of it... ***MESSY,
SLOW AND DIRTY***

Craig Roberts


"Kalle Saarinen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello
>
> I was just wondering how can I get value of a variable in php code located
> in a different file?
>
> ie.
>
> I have file1.php wich stores $var1
> how can I read the value of $var1 in file2.php
>
> I have database and I can put it in there (I quess) but is that the only
> way?
>
> -Kalle
>



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



[PHP] reading variables in other script files

2003-08-01 Thread Kalle Saarinen
Hello

I was just wondering how can I get value of a variable in php code located
in a different file?

ie.

I have file1.php wich stores $var1
how can I read the value of $var1 in file2.php

I have database and I can put it in there (I quess) but is that the only
way?

-Kalle


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



Re: [PHP] Display question

2003-08-01 Thread messju mohr
On Fri, Aug 01, 2003 at 03:00:23AM -0500, John T. Beresford wrote:
> Hi All,
> 
> I'm having a hard time wrapping my head around this. I have a query 
> that returns the following (Sorted by col2):
> 
> col1  col2
> -
> house1Com1
> house2Com1
> house3Com2
> house4Com2
> house5Com3
> house6Com3
> 
> 
> I would like to display it as shown below:
> 
> Com 1
> house1 - Com1
> house2 - Com1
> 
> Com 2
> house3 - Com2
> house4 - Com2
> 
> Com 3
> house5 - Com3
> house6 - Com3
> 
> 
> I'm having a problem with the header for each 'com'
> 
> Thanks for any pointers,
> John

i think this is a common task. you can try something like:

$last = null;
while ( list($col1, $col2) = fetch_next_row() ) {
if ($last != $col2) {
echo "\n$col2\n";
$last = $col2;
}
echo "$col1 - $col2\n";
}



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



RE: [PHP] Re: Opinions on Micro$oft .NET

2003-08-01 Thread Adrian Teasdale
I'd just like to say that I've found this discussion to be very interesting
and enlightning.  It also makes a change to see people not "microsoft
bashing" but taking an objective view on everything.  We keep getting more
and more requests to develop products for .net because our clients want
software which runs under windows, online or (more recently) for handheld
devices. So far we've concentrated on PHP for web development and Delphi for
application development, but I think that .net cannot be ignored.

Even though I didn't start the thread, I found it very useful to follow

Best

Ade


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



[PHP] Re: eval

2003-08-01 Thread Bogdan Stancescu
You can put whatever you want in eval:


You could even do this:


HTH

Bogdan

Decapode Azur wrote:

Is it possible to put PHP code in eval ?
Or just vars ?


$string = 'The result of ';

eval ($string);

?>


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


Re: [PHP] Redirect to HTTPS

2003-08-01 Thread Nicholas Robinson
It might also be worth making sure that your web server is configured to force 
https on this page if this is what you want. Otherwise a user could type the 
URL in without the HTTPS and still get the page.


On Friday 01 Aug 2003 9:20 am, [EMAIL PROTECTED] wrote:
> I have a stupid question.
>
> I need if i be in a http make a redirect to https.
> Http is a 80 port and ssl is a 443 port
>
> if ($HTTP_SERVER_VARS['SERVER_PORT']==80)
> {
>
>  header("Location: https://mynet.com/pay.php";);
>  exit;
>  }
>
> Is the correct way to do this ??? Exist any function to make this ???
>
>
>
> Excuse my broken English, Regards from Spain
>
> Un saludo, Danny


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



RE: [PHP] Re: include help please

2003-08-01 Thread Ford, Mike [LSS]
> -Original Message-
> From: Jennifer Goodie [mailto:[EMAIL PROTECTED]
> Sent: 31 July 2003 22:42
> 
> > if (isset($page)) {
> > include $$_GET['page'];
> > } else {
> > $page = $home;
> > include $page;
> > }
> >
> > would that be right?
> > or should i use
> >
> > if (isset($page)) {
> > include $$_GET['page'];
> > } else {
> > include $home;
> > }
> >
> > hopefully that's right.  if so, pretty good for a n00b
> >
> 
> I don't think I'd let someone pass any page they wanted via a 
> get and just
> include that page.
> 
> If you have URL fopen wrappers on I can create a page on my server and
> include it to your page and pretty much execute any code I 
> want on your
> server.
> 
> example:
> 
> http://www.yourdomain.com?yourscript.php?page=http://mydomain.
com/myscript.p
hp

Take a closer look -- that's a double $$ in front of _GET['page'], not a single one -- 
that means he must have a variable defined with the name of whatever you put as the 
value of page=, and I think he's very unlikely to have a 
$http://mydomain.com/myscript.php...!!

But, you're right, there should be some error checking for invalid page values, just 
in case someone (or something!) should try this -- something like (not tested!):

   if (isset($_GET['page'])) {
  if (isset($$_GET['page']))
 include $$_GET['page'];
  else
 include('no_such_page.inc');
   } else {
  include $home;
   }

And, as a final BTW, I'd do this with an array:

   $pages = array('fred'=>'fred.php',
  'barney'=>'barney.php',
  'rubble'=>'quarry/mr_rubble.inc');

   --

   if (isset($_GET['page'])) {
  if (isset($pages[$_GET['page']]))
 include $pages[$_GET['page']];
  else
 include('no_such_page.inc');
   } else {
  include $home;
   }

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



RE: [PHP] Deleteing one session

2003-08-01 Thread Ford, Mike [LSS]
> -Original Message-
> From: Ryan A [mailto:[EMAIL PROTECTED]
> Sent: 31 July 2003 00:34
> 
> 
> have around 20 sessions setup and want to delete one of them...
> eg:
> I have the following sessions:

Can I just make a little correction to your terminology, as every time I
read your questions about "sessions" I experience a temporary disorientation
until I adjust myself to how you're using the word?

> one
> two
> three
> four
> five
> etc

These are "session variables", not "sessions".  A "session" is -- ummm,
well, roughly -- the period of time a user spends browsing the site between
the very first session_start() and the point where the session is destroyed
(explicitly by session_destroy() or by the session garbage collector
deleting an expired session).  The entire set of data stored in the
$_SESSION[] would typically be called "session data" or "the session array".

> 
> which is better? I am starting my sessions with this kind of 
> statement:
> $_SESSION['blah'] = $_GET['blah'];

That's registering a session variable.  Sessions are started with the
initial session_start() call.

> Also any idea how many sessions I can have "on" at one time? 
> or is there no
> limit? I couldnt find anything on that in the manual.

The number of session variables you can register in your session will be
determined by the storage capacity of the session mechanism you are using.
If it's the default "files" that will be the maximum size of a file on your
server's file system.  Given this overall restraint, you would (if you could
ever manage to register that many session variables!) be able to store far
more session variables containing simple values (such as integers) than ones
containing complex data (such as arrays or long strings).

Short answer -- you'll probably never have to worry about hitting that
limit!

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



Re: [PHP] COUNT(*)

2003-08-01 Thread Richard Baskett
Actually that does retrieve the number of rows..

// Query
$query = "SELECT COUNT(*) AS count FROM pet";

// Execute Query
$result = mysql_query($query);

// Get the result of query named count
$count = mysql_result($result,0);

echo $count." is the number of rows";

Cheers!

Rick

In order to seek truth it is necessary once in the course of our life
to doubt as far as possible all things. - Rene Descartes

> From: Yury B. <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> Date: Thu, 31 Jul 2003 19:46:40 +0200
> To: [EMAIL PROTECTED]
> Subject: [PHP] COUNT(*)
> 
> Hi
> 
> I used to use old fashioned mysql quieries but moderm mysql
> apparently became more flexible so. I want to understand how to use
> some of the new features like COUNT(*)
> 
> Let's say I have
> $result="SELECT COUNT(*) FROM pet";
> $sql=mysql_query($result);
> while ($row=mysql_fetch_array($sql)){
> $pet_name=$row['pet_name'];
> echo ..;
> }
> 
> the question is how do I actually retrieve the number of rows of sql
> query result?
> 
> Yury
> 
> -- 
> 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] Multiple targets with fscanf

2003-08-01 Thread Denis 'Alpheus' Cahuk
Hello!

I'll get strait to the point:
I want to include a header from another site ($fp = 
fopen("www.something.info/news.html", "r")) using the fscanf command,
The headers are in "..." tags and I'm usign $a = fscanf($fp, 
"%s"). the problem is, that if I use this, I get only the first
word in the header, but I would like to get the whole line until the 
next .

Thanks in advance

Denis 'Alpheus' Cahuk

P.S: I am not suscribed to the ML so reply to the mail directly please.

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


Re: [PHP] howto set variablevalue with link?

2003-08-01 Thread Kalle Saarinen
Jep, that did it Thanks!

-Kalle


- Original Message - 
From: "Richard Baskett" <[EMAIL PROTECTED]>
To: "PHP General" <[EMAIL PROTECTED]>
Sent: Friday, August 01, 2003 11:28 AM
Subject: Re: [PHP] howto set variablevalue with link?


> yeah you can set a variable this way:
>
> http://www.example.com/test.php?var=something
>
> This sets the variables $var equal to "something" and you can use them
> accordingly within your script.  If you have safe mode on then you'll need
> to access the $var variable by using the $_GET array like so:
>
> $_GET['var']
>
> Cheers!
>
> Rick
>
> "What lies behind us and what lies before us are tiny matters compared to
> what lies within us." - Oliver Wendell Holmes
>
> > From: "Kalle Saarinen" <[EMAIL PROTECTED]>
> > Reply-To: "Kalle Saarinen" <[EMAIL PROTECTED]>
> > Date: Fri, 1 Aug 2003 11:21:23 +0300
> > To: <[EMAIL PROTECTED]>
> > Subject: [PHP] howto set variablevalue with link?
> >
> > Hello,
> >
> > I was wondering is it possible to set a variable value with html link?
> >
> > I would like to have link button in my page that changes the language. I
> > thought to set $lang variable with the button and later use it to
detedmine
> > what to fetch from the database.
> >
> > What wound be the smartest solution?
> >
> > Thanks
> >
> > -Kalle
> >
> >
> >
> >
> > -- 
> > 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] Re: COUNT(*)

2003-08-01 Thread Craig Roberts
use mysql_fetch_rows();

$result="SELECT COUNT(*) FROM pet";
$sql=mysql_query($result);
$number_of_rows = mysql_fetch_rows($sql);
while ($row=mysql_fetch_array($sql)){
$pet_name=$row['pet_name'];
echo ..;
}

Craig Roberts


"Yury B ." <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hi
>
> I used to use old fashioned mysql quieries but moderm mysql
> apparently became more flexible so. I want to understand how to use
> some of the new features like COUNT(*)
>
> Let's say I have
> $result="SELECT COUNT(*) FROM pet";
> $sql=mysql_query($result);
> while ($row=mysql_fetch_array($sql)){
> $pet_name=$row['pet_name'];
> echo ..;
> }
>
> the question is how do I actually retrieve the number of rows of sql
> query result?
>
> Yury



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



[PHP] COUNT(*)

2003-08-01 Thread Yury B .
Hi

I used to use old fashioned mysql quieries but moderm mysql 
apparently became more flexible so. I want to understand how to use 
some of the new features like COUNT(*)

Let's say I have
$result="SELECT COUNT(*) FROM pet";
$sql=mysql_query($result);
while ($row=mysql_fetch_array($sql)){
$pet_name=$row['pet_name'];
echo ..;
}

the question is how do I actually retrieve the number of rows of sql 
query result?

Yury

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



Re: [PHP] howto set variablevalue with link?

2003-08-01 Thread Richard Baskett
yeah you can set a variable this way:

http://www.example.com/test.php?var=something

This sets the variables $var equal to "something" and you can use them
accordingly within your script.  If you have safe mode on then you'll need
to access the $var variable by using the $_GET array like so:

$_GET['var']

Cheers!

Rick

"What lies behind us and what lies before us are tiny matters compared to
what lies within us." - Oliver Wendell Holmes

> From: "Kalle Saarinen" <[EMAIL PROTECTED]>
> Reply-To: "Kalle Saarinen" <[EMAIL PROTECTED]>
> Date: Fri, 1 Aug 2003 11:21:23 +0300
> To: <[EMAIL PROTECTED]>
> Subject: [PHP] howto set variablevalue with link?
> 
> Hello,
> 
> I was wondering is it possible to set a variable value with html link?
> 
> I would like to have link button in my page that changes the language. I
> thought to set $lang variable with the button and later use it to detedmine
> what to fetch from the database.
> 
> What wound be the smartest solution?
> 
> Thanks
> 
> -Kalle
> 
> 
> 
> 
> -- 
> 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: howto set variablevalue with link?

2003-08-01 Thread Craig Roberts
Yeah -



then access the variable in page.php -
$_GET['lang'] == "en";

You could then store the language variable in a cookie, session or just pass
it from page to page by calling each page with "page.php?lang=xx".

Craig Roberts

"Kalle Saarinen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Hello,
>
> I was wondering is it possible to set a variable value with html link?
>
> I would like to have link button in my page that changes the language. I
> thought to set $lang variable with the button and later use it to
detedmine
> what to fetch from the database.
>
> What wound be the smartest solution?
>
> Thanks
>
> -Kalle
>
>
>
>



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



Re: [PHP] Redirect to HTTPS

2003-08-01 Thread Richard Baskett
This is how I do it:

if ($_SERVER['HTTPS']!='on') {
  header("Location: https://mynet.com/pay.php";);
  exit;
}


"It is my ambition to say in ten sentences; what others say in a whole
book." - Friedrich Nietzsche

> From: [EMAIL PROTECTED]
> Date: Fri, 1 Aug 2003 10:20:58 +0200
> To: [EMAIL PROTECTED]
> Subject: [PHP] Redirect to HTTPS
> 
> I have a stupid question.
> 
> I need if i be in a http make a redirect to https.
> Http is a 80 port and ssl is a 443 port
> 
> if ($HTTP_SERVER_VARS['SERVER_PORT']==80)
> {
> 
>header("Location: https://mynet.com/pay.php";);
>exit;
> }
> 
> Is the correct way to do this ??? Exist any function to make this ???
> 
> 
> 
> Excuse my broken English, Regards from Spain
> 
> Un saludo, Danny
> 
> 
> 
> -- 
> 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] howto set variablevalue with link?

2003-08-01 Thread Kalle Saarinen
Hello,

I was wondering is it possible to set a variable value with html link?

I would like to have link button in my page that changes the language. I
thought to set $lang variable with the button and later use it to detedmine
what to fetch from the database.

What wound be the smartest solution?

Thanks

-Kalle




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



[PHP] Redirect to HTTPS

2003-08-01 Thread desa15
I have a stupid question.

I need if i be in a http make a redirect to https.
Http is a 80 port and ssl is a 443 port

if ($HTTP_SERVER_VARS['SERVER_PORT']==80)
{

 header("Location: https://mynet.com/pay.php";);
 exit;
 }

Is the correct way to do this ??? Exist any function to make this ???



Excuse my broken English, Regards from Spain

Un saludo, Danny



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



[PHP] Display question

2003-08-01 Thread John T. Beresford
Hi All,

I'm having a hard time wrapping my head around this. I have a query 
that returns the following (Sorted by col2):

col1col2
-
house1  Com1
house2  Com1
house3  Com2
house4  Com2
house5  Com3
house6  Com3
I would like to display it as shown below:

Com 1
house1 - Com1
house2 - Com1
Com 2
house3 - Com2
house4 - Com2
Com 3
house5 - Com3
house6 - Com3
I'm having a problem with the header for each 'com'

Thanks for any pointers,
John
--
===
John T. Beresford, Owner
Digital Studio Design
Edmond, OK
http://www.digitalstudiodesign.com/
405.760.0794
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] learning php - problem already

2003-08-01 Thread Ford, Mike [LSS]
> -Original Message-
> From: CPT John W. Holmes [mailto:[EMAIL PROTECTED]
> Sent: 31 July 2003 15:54
 
> you basically
> have this:
> 
> list($k,$v,$key,$value) = array(1=>'abc', 'value'=>'abc', 0=>'a',
> 'key'=>'a');
> 
> So, how this works is that list starts with $value. $value is 
> at position
> number four, so since arrays start at zero, it's going to 
> look in the array
> that was passed for an element at [3]. Since there is no [3] 
> in the passed
> array, you get a NOTICE about undefined offset.
> 
> Next it moves on to $key and looks for element [2]. Again you 
> get a warning
> since there is no element [2] in the passed array.
> 
> Next is $v and list is looking for [1]. Since [1] does exist 
> and has a value
> of 'abc', now $v = 'abc'
> 
> Last is $k and [0] and you get $k = 'a'.
> 
> That's how it works. :)
> 
> That's why this code:
> 
> list($a, $b, $c, $d) = array(4=>'four', 3=>'three', 2=>'two', 
> 1=>'one',
> 0=>'zero');
> echo "$a, $b, $c, $d";
> 
> gives:
> 
> zero, one, two, three

Ho, thanks for that -- I must admit I hardly ever use each() or list(), and
taking a quick look at the current manual page for list() does seem to have
changed quite a bit since I originally read it -- so I guess my
understanding of it was faulty.  I still think it's quite confusing -- your
explanation here is much better -- so I might see if I can't put together
something even better for incorporation in the manual!

Cheers!

Mike

-
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730  Fax:  +44 113 283 3211 

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



Re: [PHP] load the PHP script last on the page

2003-08-01 Thread Sek-Mun Wong
I agree with Chris' method, but if you don't have cron, then what I do is a
page-based cache.

Since weather does not change with every page hit, you could store the
parsed page inside a database, or even write it to a flat file, so if the
page is hit 100 times an hour, and you do an hourly refresh on the cached
version, you only get 1 "slow" page per hour, instead of 100. if the page
gets hit 1000 times... you get the idea.

You could check timestamps of the file (using file based caching) or add a
timestamp field in your sql table.

This sort of caching mechanism is used quite extensively on large sites, but
it's easy enough to implement for smaller sites too.

Of course, what you're doing is totally illegal, unless you have an
agreement with msn to scrape their site  I know we don't like microsoft,
but the law's the law ;-)

"Chris W. Parker" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
DougD 
on Thursday, July 31, 2003 11:18 AM said:

> If it were possible I want the include to occur after the rest of the
> page is loaded.

Maybe instead of including the file that does the processing and waiting
forever for it to finish, you might consider setting up that same  page
as a cron job and have it create another page on your sever that you can
quickly read/parse into your web page.

You could have the cron job run every 1/2/3/4/5/10/15 minutes depending
on how accurate it needs to be. Each time the page is loaded by the
browser the server will grab the latest version and display it.


hth,
Chris.


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



Re: [PHP] Re: include help please

2003-08-01 Thread LoonySalmon
nope, it doesn't work.  it'll only call up the variables that were specified
in my files.inc.php...well so far at least



"Curt Zirzow" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> * Thus wrote LoonySalmon ([EMAIL PROTECTED]):
> >
> > i want to call up my contact page, but how do i do it?
> >
> > http://localhost/index.php?page=$contact
>
> I hope you cant use something like:
>   http://localhost/index.php?page=%2Fetc%2Fpasswd
>
>
> 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] Mysql query and PHP loops

2003-08-01 Thread Nicholas Robinson
On further reflection, my first attempt works for the specific example but may 
not in the general case. Try using a combination of max( ...id ) and min( 
...val2 ) and add t1.val2 to the group by clause. This might work, but I've 
deleted my test files now!

On Friday 01 Aug 2003 7:04 am, Nicholas Robinson wrote:
> I think this does what you want. You can probably extend it to do the final
> check for val3 vs. val2 
>
> select distinct t1.val1, max( t1.id ), t1.val2 from table as t1, table as
> t2 where t1.val2 <= t2.val2 group by t1.val1;
>
> HTH
>
> On Thursday 31 Jul 2003 3:22 pm, Petre Agenbag wrote:
> > Hi List
> >
> > I've been trying to do something with one MySQL query, but I don't think
> > it is possible, so, I would need to probably do multiple queries, and
> > possibly have queries inside loops, but I am rather weary of that so,
> > I'd like your views/possible solutions to doing the following:
> >
> >
> > Consider this:
> >
> > id  val1val2val3
> > 1   a   1   1
> > 2   b   2   3
> > 3   a   1   2
> > 4   b   2   1
> > 5   c   3   3
> > 6   c   2   1
> >
> > I need to query this table to return this:
> >
> > id  val1val2val3
> > 3   a   1   2
> > 4   b   2   1
> > 6   c   2   1
> >
> > Thus, I need to firstly only return ONE row for each val1, and that row
> > MUST be that last row (ie, the row with the highest id, OR, should val3
> > for instance be a date, then with the highest date).
> >
> >
> > if I do a
> >
> > select distinct val1, MAX(id) from table order by val1, then it returns
> >
> > id  val1
> > 3   a
> > 4   b
> > 6   c
> >
> > which is correct, BUT
> > select distinct val1, MAX(id), val2 from table order by val1
> >
> > it returns
> >
> > id  val1val2
> > 3   a   1
> > 4   b   2
> > 6   c   3   <--- incorrect
> >
> > it then returns the FIRST "hit" for val2 in the db, and NOT the one in
> > the row with the max id...
> >
> > Can I do this with one query? ( PS, I cannot use MAX on val2 or val3,
> > they are text)
> >
> >
> > Thanks


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



Re: [PHP] PHP or CGI in C/C++

2003-08-01 Thread desa15

You can install Zend Optimizer from www.zend.com is free but with comercial
license.

Perform some optimizations in your code to not compile the same code in
each request.


Un saludo, Danny


   

  John Manko   

  <[EMAIL PROTECTED]  Para: Decapode Azur <[EMAIL 
PROTECTED]>  
  >cc: [EMAIL PROTECTED]   

   Asunto:   Re: [PHP] PHP or CGI in C/C++ 

  01/08/2003 08:45 

   

   





i did a quick google, and found the following.  hope it helps

http://phpcomplete.com/articles.php?sec=readArticle&id=306
http://www.php-accelerator.co.uk

plus, there is something called PHP bcompiler (byte compiler).

I dont know the details of any of these, but should help.  maybe others
can expand on the details.

- John Manko


Decapode Azur wrote:

>>I would expect compiled C/C++ to be faster as there is no need for
>>the code to be interperated and compiled on each request.
>>
>>
>
>
>Is it possible to compile PHP to improve the speed execution ?
>
>
>
>
>



--
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] jabber - chmod on files

2003-08-01 Thread desa15

To change the rights from a php script put the following lines


define('CHMOD_FILES', 0666);
//define('CHMOD_DIRS', 0777);

@chmod(Your file name, CHMOD_FILES);



Un saludo, Danny


   

  Carlos Castillo  

  <[EMAIL PROTECTED]  Para: "'[EMAIL PROTECTED]'" <[EMAIL 
PROTECTED]> 
  com.co>  cc: 

   Asunto:   [PHP] jabber - chmod on files 

  31/07/2003 23:51 

   

   





HI,





I'm using jabber but I have one problem, I did an administrator webpage for
it, so I create the users for jabber in that page, when I create the user,
it creates a xml file with permission of 644 and the owner is apache, but
when I connect on the jabber or that user connects the xml file changes to
600 and the owner to root.





The problem is that I have to read that file after he connects but when I
try I don't have access, because the perm is on 600,





How can I change the perm from the php page, so I change with chmod 644
.xml before I open itor how can I modify jabber so it doesn't
change the perm of the files?





Thanks!





Carlos A. Castillo.
Ingeniero de desarrollo
[EMAIL PROTECTED]




Su Aliado Efectivo en Internet
www.imagine.com.co
(57 1)2182064 - (57 1)6163218
Bogotá - Colombia

- Soluciones web para Internet e Intranet


- Soluciones para redes
- Licenciamiento de Software
- Asesoría y Soporte Técnico













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



<    1   2