RE: [PHP] Setting permissions such that file can be included but not open directly

2005-04-17 Thread Kim Madsen
> -Original Message-
> From: Mike [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 15, 2005 9:43 PM
> To: 'Dasmeet Singh'; php-general@lists.php.net
> Subject: RE: [PHP] Setting permissions such that file can be included
but
> not open directly
> 
> > directly to private/includefile.php can run the script
> > without authorising themselves...
> >
> > Is it possible to set folder permission such that files
> > inside it cant be open directly but could be included?
> 
> Can you just give read permissions -only- to the user that PHP runs as
and
> not these other users?

Just put these kinda directives outside webscope, I.E.:

/home/USER/public_html/
/home/USER/private/

--
Med venlig hilsen / best regards
ComX Networks A/S
Kim Madsen
Systemudvikler/Systemdeveloper

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



[PHP] How to ignore E_STRICT and E_NOTICE with error_handler callback

2005-04-17 Thread php
Hi there i have an error handler callback within an error class which is
also being used for pear errors. E_NOTICE and E_STRICT are still triggering
this callback method, so i have to make a check that the code is not one of
these. I have error_reporting to ignore both of these and still no luck,
any ideas ?

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



[PHP] ldappasswd equivalent on PHP

2005-04-17 Thread Ilia Chipitsine
Dear Sirs,
I installed smbk5pwd, that module catches password change request and 
synchronises both samba and kerberos passwords.

How can I do the same by php/ldap functions (not by calling external 
binary ldappasswd) ?

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


[PHP] SSH2, Reading Streams and Timing Out

2005-04-17 Thread Circumerro Reporting
I have a system that is using PHP to SSH(2) and administrate remote systems.
It is set up to both sftp and run commands. The trouble I am having is 
that it has been very
unreliable. While it always connects without trouble, it will often hang 
while reading
or writing to a stream. (When executing a command you are returned a 
stream that is then
read to retrieve your response).

When it hangs and times out I am not getting an error. I have placed 
flush commands all
over the place (output buffering is off), so I get a partial view but no 
ending error telling me
what went wrong (errors are on). To add to my confusion, this does not 
always happen.
Sometimes it responds quickly, fully and successfully. Sometimes it will 
hang for a long time
and fail with no error message. Sometimes it will respond quickly and 
fail with no message.

I have socket_set_blocking to false on streams coming off the remote 
server. I am reading
and writing in 5120 blocks. I have tried setting up time outs on the 
streams to have my system
error out before php does, but that does not seem to be fully working.

Sorry if this message is not so clear. I am actually hoping that 
somebody has worked with
php's ssh2 commands and has had good luck and can recommend a direction 
for me.

ssh2 is being loaded via extensions=ssh2.so
php used is 4.3.10
webserver apache2
the server software is fedora 3
To add to the mix, previously I was using PHP's standard FTP functions 
and then had php
execute local perl scripts that made the ssh2 connections for remote 
commands and it
worked very well and I never experienced an incomplete response like this.

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


Re: [PHP] Need help with file permissions for PHP files

2005-04-17 Thread Rory Browne
Because now it's out of order. 

On 4/18/05, Ryan A <[EMAIL PROTECTED]> wrote:
> PLEASE lets not start on the.

Only Joking.

> 
> > > 2. "Because it reads out of order."
> >

Why?

> > >"Why?"
> >
> > >"Top posting is bad."
> >
> > > III. Trimming is good, because it gets right to the point.
> 
> .top posting  / bottom posting thing again.
> 

You should have sent that message before Jay sent his to me.


> -Ryan
> 
> --
> No virus found in this outgoing message.
> Checked by AVG Anti-Virus.
> Version: 7.0.308 / Virus Database: 266.9.15 - Release Date: 4/16/2005
> 
>

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



[PHP] PHP and Sessions

2005-04-17 Thread Reynier Perez Mira
Hi list:

I have this code that Works perfectly:

File: index.php

Close session";

?>

File: logout.php



 

When user click link all works fine but when user close window withouth click 
link the session is not delete and all vars preserve they values. How can I fix 
that? I use PHP 5.0.0 RC2 and Windows XP SP1.

 

Regards

Reynier Pérez Mira

3ero. Ing. Informática

Entre más inteligente me siento, más me doy cuenta de lo ignorante que soy. 

 



[PHP] Re: [PHP-WIN] Localhost not working with cookies

2005-04-17 Thread trlists
On 18 Apr 2005 Proudly Pinoy wrote:

> I've read from php.net/setcookie and codecomments.com that using
> localhost won't work with cookies and neither are IP addresses. So
> how do I test cookies on local system? 

Hmmm, this works just fine for me -- I do it all the time.  I tend to 
do it with a domain mapped to 127.0.0.1 via the hosts file, rather than 
"localhost", but using that approach I can set cookies fine under Win98 
(as far as I remember, not using it now), Win 2000, and Win XP, in both 
Mozilla and IE.  I am running Apache 1.3.29 as the local server in all 
cases.

--
Tom

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



[PHP] Re: [PHP-WIN] Localhost not working with cookies

2005-04-17 Thread Tom Rawson
On 18 Apr 2005 Proudly Pinoy wrote:

> I've read from php.net/setcookie and codecomments.com that using
> localhost won't work with cookies and neither are IP addresses. So
> how do I test cookies on local system? 

Hmmm, this works just fine for me -- I do it all the time.  I tend to 
do it with a domain mapped to 127.0.0.1 via the hosts file, rather than 
"localhost", but using that approach I can set cookies fine under Win98 
(as far as I remember, not using it now), Win 2000, and Win XP, in both 
Mozilla and IE.  I am running Apache 1.3.29 as the local server in all 
cases.

--
Tom

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



Re: [PHP] Need help with file permissions for PHP files

2005-04-17 Thread Ryan A
PLEASE lets not start on the. 

> > 2. "Because it reads out of order."
> 
> >"Why?"
> 
> >"Top posting is bad."
> 
> > III. Trimming is good, because it gets right to the point.


.top posting  / bottom posting thing again.

-Ryan


-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.15 - Release Date: 4/16/2005

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



Re: [PHP] Need help with file permissions for PHP files

2005-04-17 Thread Rory Browne
> Two things Rory
> 
> a. You only replied to me, instead of the list. You have to probably
> click on "reply to all" in your mail client. I have included the lists
> address for this reply, so that it will appear there.

Yeah sorry about that mailing you only thing. All the other lists I'm
subscribed have the Reply-To field set so that replys are sent to the
list automaticly, so I keep forgetting when I reply to this one to
'reply to all'. I'll probably try proxying the php mailing list
through my unix server, and set the Reply-To field manually. Any idea
how to do that with GMail?

> 2. "Because it reads out of order."
>"Why?"
>"Top posting is bad."
> III. Trimming is good, because it gets right to the point.

Top-posting/Bottom-posting matters when the emphasis is on presention.
When you're simply trying to get a point across, then its level of
importance, drops significantly.

Finally I was concentrating on saying what I felt was to be said. I
think a free-form, discussion is much better than one where
top-posting / bottom-posting, is more important that the actual
content of the message.

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



Re: [PHP] Php + flash, need some help making a small .FLA

2005-04-17 Thread Rory Browne
I've only used flash, a couple of times( many years ago ), so I can't
be of very much help, but you might be able to do something with ming
- http://www.php.net/ming . If I remember correctly it would involve
referencing images by their URL - images which would on the backend be
served up with php.

On 4/17/05, Matt Babineau <[EMAIL PROTECTED]> wrote:
> Hi all -
> 
> Does anyone have any experience with integrating php + flash? Or know of any
> good tutorial sites? Basically what I want to do is have an animated loading
> screen, and then pull pictures from a database and display text from a
> database, text could be scrolling across the bottom like CNN or something.
> Anyone familiar with some techniques on doing this?
> 
> Any examples people may have of this would be great, just send me some
> sample .FLA scripts!!
> 
> If you've got some examples of exactly what I want to do, and you also have
> a paypal account, I can make it worth your time :-D
> 
> Thanks,
> 
> Matt Babineau
> Criticalcode
> w: http://www.criticalcode.com
> p: 858.733.0160
> e: [EMAIL PROTECTED]
> 
>

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



[PHP] Php + flash, need some help making a small .FLA

2005-04-17 Thread Matt Babineau
Hi all -

Does anyone have any experience with integrating php + flash? Or know of any
good tutorial sites? Basically what I want to do is have an animated loading
screen, and then pull pictures from a database and display text from a
database, text could be scrolling across the bottom like CNN or something.
Anyone familiar with some techniques on doing this?

Any examples people may have of this would be great, just send me some
sample .FLA scripts!!

If you've got some examples of exactly what I want to do, and you also have
a paypal account, I can make it worth your time :-D

Thanks,

Matt Babineau
Criticalcode
w: http://www.criticalcode.com
p: 858.733.0160
e: [EMAIL PROTECTED]



[PHP] Re: Localhost not working with cookies

2005-04-17 Thread M. Sokolewicz
Proudly Pinoy wrote:
I've read from php.net/setcookie and codecomments.com that using 
localhost won't work with cookies and neither are IP addresses. So how 
do I test cookies on local system?
set the hostname to an empty string;
and 2, don't CROSS-post. That's a *very* bad habit
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Localhost not working with cookies

2005-04-17 Thread Proudly Pinoy
I've read from php.net/setcookie and codecomments.com that using localhost 
won't work with cookies and neither are IP addresses. So how do I test 
cookies on local system?

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


[PHP] mysql insert function

2005-04-17 Thread Dasmeet Singh
Hi!
I regularly need to insert data into MySQL.. and instead of writing 
Insert query everytime i wrote this function... and it works well..

Please see and tell is it a good idea using this..or there might be 
problems with it?

function  db_query($sql) {
global $dbh;
$result = mysql_query($sql,$dbh) or die(mysql_error());
return $result;
}
function insertArray($table, $array)
{
//var_dump($array);
$sql1="INSERT INTO `".$table."`(";
$sql2=") VALUES(";
while (list($key,$value) = each($array)) {
//echo ("$key, $value ");
$sql1=$sql1."`".$key."`,";
$sql2=$sql2."\"".$value."\",";
}
$sql1=rtrim($sql1,",");
$sql2=rtrim($sql2,",");
$sql=$sql1.$sql2.")";
//echo $sql;
db_query($sql);
}
And when i need to insert any data I create it as an array like below 
and call function:

$fields=array(
"Title" => $Title,
"OwnerMemberId" => $memberid,
"Address" => $Address,
"City" => $City,
"State" => $State,
"Pin" => $Pin
);
insertArray("Property", $fields);
where Property is the table name
-
Free Website Promotion - A Complete Guide
http://hostwindow.info/web-hosting/9/free-website-promotion/1/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Replacing spaces with commas

2005-04-17 Thread W Luke
On 4/17/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

> > I have about 200 records in a table, and I need to update 2 of the
> > fields.  The first is easy, but the second contains a list of keywords
> > all separated by spaces; I need to replace the spaces with commas.  Is
> > this something I can do with some clever SQL, or shall I just do it in
> > PHP?
> 
> Well I have not used this function, but it looks like it would do what
> you want (this is from MySQL):
> 
> REPLACE(str,from_str,to_str)

Now why didn't I think of that?  Easy as pie - thanks Tom, working
like a charm...
-- 
Will   The Corridor of Uncertainty   http://www.cricket.mailliw.com/
 - Sanity is a madness put to good use -

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



Re: [PHP] Replacing spaces with commas

2005-04-17 Thread trlists
On 17 Apr 2005 W Luke wrote:

> I have about 200 records in a table, and I need to update 2 of the
> fields.  The first is easy, but the second contains a list of keywords
> all separated by spaces; I need to replace the spaces with commas.  Is
> this something I can do with some clever SQL, or shall I just do it in
> PHP?

Well I have not used this function, but it looks like it would do what 
you want (this is from MySQL):

REPLACE(str,from_str,to_str) 

Returns the string str with all all occurrences of the string
from_str replaced by the string to_str

So for example:

REPLACE(field, ' ', ',');

In other words, how about a query like this:

UPDATE table SET field=REPLACE(field, ' ', ',');

I have not tried using a function in an UPDATE statement like this but 
you can test it and see, I would expect it to work.

In PHP you can do the same thing -- load the data with the mysql_ 
functions, then:

$newval = str_replace(' ', ',', $oldval);

then use UPDATE to put $newval back into the database.

--
Tom

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



[PHP] Replacing spaces with commas

2005-04-17 Thread W Luke
Hi,

I have about 200 records in a table, and I need to update 2 of the
fields.  The first is easy, but the second contains a list of keywords
all separated by spaces; I need to replace the spaces with commas.  Is
this something I can do with some clever SQL, or shall I just do it in
PHP?

Any ideas appreciated

Cheers,
-- 
Will   The Corridor of Uncertainty   http://www.cricket.mailliw.com/
 - Sanity is a madness put to good use -

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



[PHP] CFP: DLS05: ACM Dynamic Languages Symposium

2005-04-17 Thread Roel Wuyts
   CALL FOR PAPERS FOR THE
   ACM Dynamic Languages Symposium 2005
October 18, 2005
San Diego, California
  (co-located with OOPSLA'05)
   URL: http://decomp.ulb.ac.be:8082/events/dls05/
---
Abstract
---
In industry, static languages (such as Java, C++ and C#) are much more 
widely used than their dynamic counterparts (like CLOS, Python, Self, 
Perl, php or Smalltalk). So it appears as though dynamic language 
concepts were forgotten and lost the race.

But this is not the case.
Java and C#, the latest mainstream static languages, popularized to a 
certain extent dynamic language features such as garbage collection, 
portability and (limited forms of) reflection. In the near future, we 
expect this dynamicity to increase even further. E.g., it is getting 
clearer year after year that pervasive computing is becoming the rule 
and that concepts such as meta programming, reflection, mobility, 
dynamic reconfigurability and distribution are becoming increasingly 
popular. All of these features are the domain of dynamic languages, and 
hence it is only logical that more dynamic language concepts have to be 
taken up by static languages, or that dynamic languages can make a 
breakthrough.

Currently, the dynamic language community is fragmented, split over a 
multitude of paradigms (from functional over logic to object-oriented), 
languages and syntaxes. This fragmentation severely hinders research as 
well as acceptance, and results in either language wars or, even worse, 
language ignorance. The goal of this symposium is to provide a highly 
visible, international forum for researchers working on dynamic 
features and languages. We explicitly invite submissions from all kinds 
of paradigms (object-oriented, functional, logic, ...), as can be seen 
from the structure of the program committee.

Areas of interests include, but are not limited to:
- closures
- delegation
- actors, active objects
- constraint systems
- mixins and traits
- reflection and meta-programming
- language symbiosis and multi-paradigm languages
- experience reports on successful application of dynamic languages
Accepted Papers will be published in the ACM Digital Library.
---
Submission Guidelines
---
Papers will need to be submitted using an online tracking system, of 
which the URL will be given later.

All papers must be submitted electronically in PDF format (or 
PostScript, if you do not have access to PDF-producing programs, but 
this is not recommended). Submissions, as well as final versions, must 
be formatted to conform to ACM Proceedings requirements: Nine point 
font on ten point baseline, two columns per page, each column 3.33 
inches wide by 9 inches tall, with a column gutter of 0.33 inches, etc. 
See the ACM Proceedings Guidelines. You can save preparation time by 
using one of the templates from that page. Note that MS Word documents 
must be converted to PDF before being submitted.

--
 Important Dates
--
- Deadline for receipt of submissions: June 24th 2005
- Notification of acceptance or rejection: August 5th 2005
- Final version for the proceedings: To be announced later
---
Program Committee
---
- Gilad Bracha
- Wolfgang De Meuter
- Stephane Ducasse
- Gopal Gupta
- Robert Hirschfeld
- Dan Ingalls
- Yukihiro Matsumoto
- Mark Miller
- Eliot Miranda
- Philippe Mougin
- Oscar Nierstrasz
- Dave Thomas
- David Ungar
- Guido Van Rossum
- Peter Van Roy
- Jon L White (G)
- Roel Wuyts (Chair)
--
Roel Wuyts  
  DeComp
[EMAIL PROTECTED]   Université Libre de 
Bruxelles
http://homepages.ulb.ac.be/~rowuyts/
Belgique
Vice-President of the European Smalltalk Users Group: www.esug.org
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: chat script

2005-04-17 Thread Michelle Konzack
Am 2005-04-17 13:53:21, schrieb Dasmeet Singh:
> Sukalyan Banga wrote:
> 
> >  Sir,
> > I am hosted a chat script at www.bioraj.net/raj/chat/ but it shows 
> > some error what should I do.
> >
> > sukalyan
> >
> >   
> >
> I got a virus warning while trying to open your site..

For me it was working fine...


Greetings
Michelle

-- 
Linux-User #280138 with the Linux Counter, http://counter.li.org/
Michelle Konzack   Apt. 917  ICQ #328449886
   50, rue de Soultz MSM LinuxMichi
0033/3/8845235667100 Strasbourg/France   IRC #Debian (irc.icq.com)


signature.pgp
Description: Digital signature


[PHP] Re: chat script

2005-04-17 Thread Dasmeet Singh
Sukalyan Banga wrote:
  Sir,
 I am hosted a chat script at www.bioraj.net/raj/chat/ but it shows some 
error what should I do.
 sukalyan
   

I got a virus warning while trying to open your site..
Free cPanel Web Hosting
http://hostwindow.info/web-hosting/2/free-cpanel-web-hosting/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Re: query error

2005-04-17 Thread Dasmeet Singh
pete M wrote:
I've got a database table with a whole list of "windows" file paths.
eg
Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Binder.lnk
Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Excel.lnk
Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Office Setup.lnk
Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Outlook.lnk
Advent Tower PC\C\Program Files\Microsoft Office\Microsoft PowerPoint.lnk
Advent Tower PC\C\Program Files\Microsoft Office\Microsoft Word.lnk
Advent Tower PC\C\Program Files\Microsoft Office\MS Access Workgroup 
Administrator.lnk
Advent Tower PC\C\Program Files\Microsoft Office\MSCREATE.DIR
Advent Tower PC\C\Program Files\Microsoft Office\OF97SPEC.INI
Advent Tower PC\C\Program Files\Microsoft Office\Office
Advent Tower PC\C\Program Files\Microsoft Office\Office\1033

Now I want my DB query to search for directories .. here's a sample query
select * from ff_files
where full_path
like 'Advent Tower PC\C\freeserve\help\images\%'
doesnt work as the % is taken as a literal '%'
I've aslso tried
like 'Advent Tower PC\\C\\freeserve\\help\\images\%'
I'm completely lost ..
all I want is to return all rows that start with
'Advent Tower PC\C\freeserve\help\images\'
tia
Pete
Try
like 'Advent Tower PC\\C\\freeserve\\help\\images\\%'
Free cPanel Web Hosting
http://hostwindow.info/web-hosting/2/free-cpanel-web-hosting/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


RE: [PHP] chat script

2005-04-17 Thread YaronKh
This error message is because you are trying to send header information after 
you already printed some text.
The header information have to come before any other information sent to the 
browser meaning :

http://www.example.com/');
?>
WON'T WORK!!!

But 
http://www.example.com/');
print ("hello");
?>
Will work

And another ting the 
Line 2=>   header('Location: http://www.example.com/');
.
.
.
WON'T WORK!!


And you can use headers_sent() to check if you can send the header information

if (!headers_sent()) {
header('Location: http://www.example.com/');
 exit;
}



Have a nice day
Yaron Khazai
-Original Message-
From: sukalyan banga [mailto:[EMAIL PROTECTED] 
Sent: Sunday, April 17, 2005 8:46 AM
To: php-general@lists.php.net
Subject: [PHP] chat script

  Sir,
 I am hosted a chat script at www.bioraj.net/raj/chat/ but it shows some 
error what should I do.

 sukalyan

   

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