Re: [PHP] PhpMailer vs Pear:Mail

2005-11-28 Thread Richard Heyes

Cabbar Duzayak wrote:

Could you please tell which one you recommend in terms of
stability/speed and share your experience in terms of these 2?


Ooo, that would have to be PEAR::Mail...

--
Richard Heyes
http://www.phpguru.org/

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



Re: [PHP] SQL Password() function

2005-11-28 Thread David Grant
Ahmed Saad wrote:
 On 11/26/05, Yaswanth Narvaneni [EMAIL PROTECTED] wrote:
 I 'dont' want to use something like select * from table where
 table.passwd=password($passwd);
 
 (IIRC. they broke backward compatibility in
 version 5).. 

4.1 :(

Cheers,

David Grant

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



[PHP] Two version of PHP in single server

2005-11-28 Thread J.F.Kishor
Hi,

I have  a query, can we run  two versions of PHP  in linux 7.2
server.

I want  to use PHP 4.x  for one application and  PHP 5.1.0 for
another application in the same server.

Do  I need to  do some  configuration changes  to set  the php
path. To  look up different  versions based on the  request of
the application.



Regards,
- JFK
kishor
Nilgiri Networks

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



Re: [PHP] Web based editor

2005-11-28 Thread Lester Caine

Greg Donald wrote:


I've tried lots of javascript wysiwyg editors.  Tiny MCE is my pick.
Fast and very customizable.  The cleanup functionality works great with
non-techies who like to draft stuff in MS Word first.


We have ended up with it as the html option for bitweaver and it seems 
to behave itself nicely.


--
Lester Caine
-
L.S.Caine Electronic Services
Treasurer - Firebird Foundation Inc.

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



[PHP] Advice Needed for Klorofil Open Source PHP Platform

2005-11-28 Thread Reza Iqbal
Hi,

I would like to give information about a new open source project
named as Klorofil Collaboration Project (http://www.klorofil.org).

As a new open source project, we will need many advice in order
to make it success.

Currently, in Klorofil Collaboration Project, we develop
Klorofil Platform. One of the component of Klorofil Platform
is gambArt (a GUI framework for developing PHP-based desktop application).

We have published initial release. In the initial release,
we provide Klorofil Platform installer + a desktop calculator as
sample.

This desktop calculator was made 100% with PHP (using gambArt).

For more information, you can visit http://www.klorofil.org/


In the next release, we will add more features such as:
- Distributed Computing
- MVC
- etc

We do hope this project will be useful for PHP community.
We hope many people will join the project.

Here are features available
in the initial release:

Initial Release version 0.1 (for Windows):

- Klorofil Platform Basic Structure
* Class Registration
* Application Launcher
* Collection Classes
* I/O Classes
* Network Classes
+ Socket
+ HTTP
+ Email
+ SMS
* Compression
* Byte Compiler
* XML

- gambArt (Klorofil GUI)
* Basic Structure
+ Application
+ Canvas
+ Component
+ Control
+ Form
* Component
+ Button
+ Flat Button
+ Label
+ Edit
+ Dialog
+ Radio Button
+ CheckBox
+ Panel
+ Image
+ ListBox
+ DropDownBox
+ PageControl
+ ToolBar
+ MainMenu
+ Timer


Thank you.

R. Iqbal

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



Re: [PHP] Advice Needed for Klorofil Open Source PHP Platform

2005-11-28 Thread Ahmed Saad
On 11/28/05, Reza Iqbal [EMAIL PROTECTED] wrote:
 As a new open source project, we will need many advice in order
 to make it success.


ah an open source project with encoded source code?! how come?

-ahmed


Re: [PHP] Can't execute external program

2005-11-28 Thread Ahmed Saad
On 11/21/05, Voip tech [EMAIL PROTECTED] wrote:
 ?php
 exec(/var/www/html/myprog -E 123456789098.dat sample1.txt
 sample1.new);
 ?

use ? system (/var/www/html/myprog -E 123456789098.dat sample1.txt
sample1.new, $return_val); ? and check $return_val?

-ahmed


[PHP] Language check

2005-11-28 Thread Khorosh Irani
Hello
I want to sure that all the character of a posted string is in my
language(persian for example).What should I do?
Thanks


Re: [PHP] Language check

2005-11-28 Thread Jochem Maas

Khorosh Irani wrote:

Hello
I want to sure that all the character of a posted string is in my
language(persian for example).What should I do?


a few alternatives:

1. read through each posted string manually.
2. hire a persian monkey to do that for you. (monkeys are cheaper ;-)
3. google around for a persian spellchecker and use that - if you
can find one then the chances are you'll have to use it via an exec() call or
something similar.
4. or use the pspell php extension ... I have no idea of persian
dictionaries are available:

http://php.net/manual/en/ref.pspell.php

you are in luck, aspell does support Persian (fa):

http://aspell.sourceforge.net/man-html/Supported.html



Thanks



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



Re: [PHP] Two version of PHP in single server

2005-11-28 Thread John Nichel

J.F.Kishor wrote:

Hi,

I have  a query, can we run  two versions of PHP  in linux 7.2
server.

I want  to use PHP 4.x  for one application and  PHP 5.1.0 for
another application in the same server.

Do  I need to  do some  configuration changes  to set  the php
path. To  look up different  versions based on the  request of
the application.


I don't think you can run them together under the same webserver 
(Apache) as the AddType is the same for both...


AddType application/x-httpd-php

You would need to find a way to distinguish between the two.

--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



RE: [PHP] Adding links to HTML for a CMS

2005-11-28 Thread Jay Blanchard
[snip]
I am trying to create my own CMS. To being with I want to let users edit 
anything within a p tag.

I want to have a menu to the left and display the webpage in the rest of the

page, and for each set of p tags I want the user to be able to click on 
the link to edit that paragraph.

My problem is how can I include a webpage in my CMS and for each p tag 
wrap an a href tag araound it?
[/snip]

Much applause for your initiative.

You can include a webpage in your CMS using frames or iframes
(http://www.w3.org). While there you can look for information on anchors,
which is what an a tag is.

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



[PHP] PHP6, UTF strlen

2005-11-28 Thread Jared Williams
Hi,
Just been looking over some code, and saw

if (strlen($data) !== file_put_contents($filename, $data))


where $data is UTF8, so wondering if this is going to break in PHP6, if 
so what should be the equivalent code?


Jared

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



RE: [PHP] PHP6, UTF strlen

2005-11-28 Thread Jay Blanchard
[snip]
Just been looking over some code, and saw

if (strlen($data) !== file_put_contents($filename, $data))


where $data is UTF8, so wondering if this is going to break in PHP6,
if so what should be the equivalent code?
[/snip]

PHP6?

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



Re: [PHP] PHP6, UTF strlen

2005-11-28 Thread Richard Davey
Hi Jared,

Monday, November 28, 2005, 4:04:29 PM, you wrote:

 Just been looking over some code, and saw
 if (strlen($data) !== file_put_contents($filename, $data))
 
 where $data is UTF8, so wondering if this is going to break
 in PHP6, if so what should be the equivalent code?

If $data is UTF8 already, shouldn't you really be using mb_strlen? In
which case, I'd expect it to function exactly the same in PHP6.

Cheers,

Rich
-- 
Zend Certified Engineer
PHP Development Services
http://www.corephp.co.uk

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



Re: [PHP] PHP6, UTF strlen

2005-11-28 Thread Jochem Maas

Jared Williams wrote:

Hi,
Just been looking over some code, and saw

if (strlen($data) !== file_put_contents($filename, $data))


where $data is UTF8, so wondering if this is going to break in PHP6, if 
so what should be the equivalent code?


that currently works with UTF8 strings? or does it only work because you happen 
to
only ever have singlebyte characters in your strings?

currently strlen() does not give the expected value on 'multibyte' strings (or strings that contain one or more 
multibyte chars) which is why the mb_*() functions exist [e.g. mb_strlen()].


In php6 all string functions should work with unicode (I believe its UTF16 
internally) transparently
and therefore tyhe code you showed should not break BUT rather it should start 
working ;-)

don't hold your breath for php6 - making php unicode native is a complex, 
difficult undertaking,
it will come when its ready - given the snafu's [IMO] surrounding php5.0.5 and 
php5.1 I hope
they take their time.

rgds,
Jochem





Jared



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



RE: [PHP] PhpMailer vs Pear:Mail

2005-11-28 Thread Mark Steudel
Would you mind elaborating on why?  

-Original Message-
From: Richard Heyes [mailto:[EMAIL PROTECTED] 
Sent: Monday, November 28, 2005 12:53 AM
To: Cabbar Duzayak
Cc: php-general@lists.php.net
Subject: Re: [PHP] PhpMailer vs Pear:Mail

Cabbar Duzayak wrote:
 Could you please tell which one you recommend in terms of 
 stability/speed and share your experience in terms of these 2?

Ooo, that would have to be PEAR::Mail...

--
Richard Heyes
http://www.phpguru.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



Re: [PHP] PhpMailer vs Pear:Mail

2005-11-28 Thread David Grant
*cough*

http://pear.php.net/package/Mail

*cough*

Mark Steudel wrote:
 Would you mind elaborating on why?  
 
 -Original Message-
 From: Richard Heyes [mailto:[EMAIL PROTECTED] 
 Sent: Monday, November 28, 2005 12:53 AM
 To: Cabbar Duzayak
 Cc: php-general@lists.php.net
 Subject: Re: [PHP] PhpMailer vs Pear:Mail
 
 Cabbar Duzayak wrote:
 Could you please tell which one you recommend in terms of 
 stability/speed and share your experience in terms of these 2?
 
 Ooo, that would have to be PEAR::Mail...
 
 --
 Richard Heyes
 http://www.phpguru.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



RE: [PHP] Adding links to HTML for a CMS

2005-11-28 Thread Mark Steudel
 Store each paragraph text in a database

Table 1 = tblPage
id  Name
1   Welcome Page
2   About Page
Table 2 = Content
id  pageid  content
1   1   This is some content in a paragraph
2   1   This is some more content
3   1   This is the last content on this page
4   2   Some about content

Then when you display your page you pass the page id through the URL like:

http://www.domain.com/page.php?pageid=1

// get the page id of course do some validating is_numeric etc
$id = $_GET['pageid'];

// using pear db package
$res = $db-query ( SELECT * FROM tblContent WHERE pageid = '.$id.' );

// loop through data and display it with an edit link
while( $res-fetchInto( $objData ) )
{
echo p.$objData-content.a
href=\edit.php?pageid=.$objData-od.\Edit/a/p;
}

Your edit page would then have some code that would load the content into a
text area or wywsiwig editor or something  You would then also have to
add functionality where a user could add a paragraph and what order you
would want those paragraphs to show up in, delete paragraphs.

Hope that helps.

Mark
-Original Message-
From: Shaun [mailto:[EMAIL PROTECTED] 
Sent: Saturday, November 26, 2005 4:24 AM
To: php-general@lists.php.net
Subject: [PHP] Adding links to HTML for a CMS

Hi,

I am trying to create my own CMS. To being with I want to let users edit
anything within a p tag.

I want to have a menu to the left and display the webpage in the rest of the
page, and for each set of p tags I want the user to be able to click on
the link to edit that paragraph.

My problem is how can I include a webpage in my CMS and for each p tag
wrap an a href tag araound it?

Thanks for your advice. 

--
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] PHP6, UTF strlen

2005-11-28 Thread Jared Williams
 
 Jared Williams wrote:
  Hi,
  Just been looking over some code, and saw
  
  if (strlen($data) !== file_put_contents($filename, $data))
  
  
  where $data is UTF8, so wondering if this is going to 
 break in PHP6, if so what should be the equivalent code?
 
 that currently works with UTF8 strings? or does it only work 
 because you happen to only ever have singlebyte characters in 
 your strings?

Works with UTF8 strings. Handled nl  fr translations of the PHP Manual fine.
Tried kr  ja, but the docbook srcs coming out of CVS aren't compliant.

 currently strlen() does not give the expected value on 
 'multibyte' strings (or strings that contain one or more 
 multibyte chars) which is why the mb_*() functions exist 
 [e.g. mb_strlen()].

strlen() returns the byte count, as does file_put_contents return the number of 
written bytes.

 
 In php6 all string functions should work with unicode (I 
 believe its UTF16 internally) transparently and therefore 
 tyhe code you showed should not break BUT rather it should 
 start working ;-)

It works now. It'll break of strlen() starts returning character counts, 
instead of byte counts.
 
 don't hold your breath for php6 - making php unicode native 
 is a complex, difficult undertaking, it will come when its 
 ready - given the snafu's [IMO] surrounding php5.0.5 and 
 php5.1 I hope they take their time. 

Not, just that this is one of the few bits of code that could be problematic, 
as the pages are almost competely generated by xslt
extension, therefore avoiding PHP character encoding issues.

Jared

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



Re: [PHP] Two version of PHP in single server

2005-11-28 Thread Curt Zirzow
On Mon, Nov 28, 2005 at 12:07:02PM +0530, J.F.Kishor wrote:
 Hi,
 
   I have  a query, can we run  two versions of PHP  in linux 7.2
   server.
 
   I want  to use PHP 4.x  for one application and  PHP 5.1.0 for
   another application in the same server.
 
   Do  I need to  do some  configuration changes  to set  the php
   path. To  look up different  versions based on the  request of
   the application.

1) just run the php4.x code with php5.1
2) configure one version as a module the other one to run as a cgi.
 
Curt.
-- 
cat .signature: No such file or directory

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



[PHP] Database problem?

2005-11-28 Thread William Stokes
Hello,

This page works on a operator hosted production server but not my own test 
server. I have no idea what's causing this and I REALLY need some help or 
ideas what to check.

This is the browsers address line:
http://localhost/index.php?team=F10a

I have this in my page and it doesn't work:
$sql = select jouk_nimi from x_jun_jouk where jouk_id='$team' ;
$kysely = mysql_query($sql);
$tulos = mysql_fetch_row($kysely);
$jouk_nimi = $tulos[0];

$jouk_nimi -variable will be empty.

This works (replaced the $team with static entry F10a)
$sql = select jouk_nimi from x_jun_jouk where jouk_id='F10a' ;
$kysely = mysql_query($sql);
$tulos = mysql_fetch_row($kysely);
$jouk_nimi = $tulos[0];

$jouk_nimi get's right value from database.

This sql clause works when ran from PhpMyAdmin. It returns the right value.
select jouk_nimi from x_jun_jouk where jouk_id='F10a'

So I think that somehow the $team variable is not passed from the address 
line. Is there something in PHP ar Apache that needs to be configured

differently? The test server is on a OpenSuse 10.0. Apache version is 
2.0.54-10. Apache2-Mod_PHP4 version is 4.4.0-6.2. MySQL version is 4.1.13-3.

PHP4-Mysql is installed. Everything ispretty much on their default 
confgiration.

All modules installed were supplied with the Suse 10.0

Thanks
-Will 

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



RE: [PHP] Database problem?

2005-11-28 Thread Jay Blanchard
[snip]
http://localhost/index.php?team=F10a

I have this in my page and it doesn't work:
$sql = select jouk_nimi from x_jun_jouk where jouk_id='$team' ;
$kysely = mysql_query($sql);
$tulos = mysql_fetch_row($kysely);
$jouk_nimi = $tulos[0];

$jouk_nimi -variable will be empty.

This works (replaced the $team with static entry F10a)
$sql = select jouk_nimi from x_jun_jouk where jouk_id='F10a' ;
$kysely = mysql_query($sql);
$tulos = mysql_fetch_row($kysely);
$jouk_nimi = $tulos[0];

$jouk_nimi get's right value from database.
[/snip]

register_globals is 'on' on the other server. Try

$sql = select jouk_nimi from x_jun_jouk where jouk_id=$_GET['team'] ;

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



Re: [PHP] Database problem?

2005-11-28 Thread Curt Zirzow
On Mon, Nov 28, 2005 at 08:37:36PM +0200, William Stokes wrote:
... 
 I have this in my page and it doesn't work:
 $sql = select jouk_nimi from x_jun_jouk where jouk_id='$team' ;
 $kysely = mysql_query($sql);
 $tulos = mysql_fetch_row($kysely);
 $jouk_nimi = $tulos[0];
 
 $jouk_nimi -variable will be empty.
...
 
 So I think that somehow the $team variable is not passed from the address 
 line. Is there something in PHP ar Apache that needs to be configured

You'll notice if you compare the output of phpinfo() from both
server, the other server has register_globals on.

You can fix this by explicitly defining where the variable $team is
comming from. 

$team = mysql_real_escape_string($_GET['team']);
$sql = select jouk_nimi from x_jun_jouk where jouk_id='$team' ;

Also note the escaping of the string; you should be sure to
properly escape the string to avoid sql injection.

Curt.
-- 
cat .signature: No such file or directory

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



Re: [PHP] Database problem?

2005-11-28 Thread William Stokes
OK. Where can I change the register_globals setting?

Thanks for the fast replies.

-Will

Jay Blanchard [EMAIL PROTECTED] kirjoitti 
viestissä:[EMAIL PROTECTED]
 [snip]
 http://localhost/index.php?team=F10a

 I have this in my page and it doesn't work:
 $sql = select jouk_nimi from x_jun_jouk where jouk_id='$team' ;
 $kysely = mysql_query($sql);
 $tulos = mysql_fetch_row($kysely);
 $jouk_nimi = $tulos[0];

 $jouk_nimi -variable will be empty.

 This works (replaced the $team with static entry F10a)
 $sql = select jouk_nimi from x_jun_jouk where jouk_id='F10a' ;
 $kysely = mysql_query($sql);
 $tulos = mysql_fetch_row($kysely);
 $jouk_nimi = $tulos[0];

 $jouk_nimi get's right value from database.
 [/snip]

 register_globals is 'on' on the other server. Try

 $sql = select jouk_nimi from x_jun_jouk where jouk_id=$_GET['team'] ; 

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



RE: [PHP] Database problem?

2005-11-28 Thread Jay Blanchard
[snip]
OK. Where can I change the register_globals setting?
[/snip]

In the php.ini

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



Re: [PHP] Database problem?

2005-11-28 Thread John Nichel

William Stokes wrote:

OK. Where can I change the register_globals setting?

snip

In the php.ini and/or in a .htaccess (if you're using Apache, and that 
Apache server is configured to allow such changes in a .htaccess). 
However, let me be the fist to suggest that you leave register_globals 
off, and write code to work with that (it will continue to work properly 
on a server with globals on).  Also, the standing rule: Never Trust User 
Input.


--
John C. Nichel IV
Programmer/System Admin (ÜberGeek)
Dot Com Holdings of Buffalo
716.856.9675
[EMAIL PROTECTED]

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



Re: [PHP] Database problem?

2005-11-28 Thread William Stokes
Damn! It Worked. Thanks :)

Jay Blanchard [EMAIL PROTECTED] kirjoitti 
viestissä:[EMAIL PROTECTED]
 [snip]
 OK. Where can I change the register_globals setting?
 [/snip]

 In the php.ini 

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



RE: [PHP] Database problem?

2005-11-28 Thread Jim Moseby
 
 This page works on a operator hosted production server but 
 not my own test 
 server. I have no idea what's causing this and I REALLY need 
 some help or 
 ideas what to check.
 
 This is the browsers address line:
 http://localhost/index.php?team=F10a
 
 I have this in my page and it doesn't work:
 $sql = select jouk_nimi from x_jun_jouk where jouk_id='$team' ;
 $kysely = mysql_query($sql);
 $tulos = mysql_fetch_row($kysely);
 $jouk_nimi = $tulos[0];
 
 $jouk_nimi -variable will be empty.
 
 This works (replaced the $team with static entry F10a)
 $sql = select jouk_nimi from x_jun_jouk where jouk_id='F10a' ;
 $kysely = mysql_query($sql);
 $tulos = mysql_fetch_row($kysely);
 $jouk_nimi = $tulos[0];
 
 $jouk_nimi get's right value from database.
 
 This sql clause works when ran from PhpMyAdmin. It returns 
 the right value.
 select jouk_nimi from x_jun_jouk where jouk_id='F10a'
 
 So I think that somehow the $team variable is not passed from 
 the address 
 line. Is there something in PHP ar Apache that needs to be configured
 
 differently? The test server is on a OpenSuse 10.0. Apache version is 
 2.0.54-10. Apache2-Mod_PHP4 version is 4.4.0-6.2. MySQL 
 version is 4.1.13-3.
 
 PHP4-Mysql is installed. Everything ispretty much on their default 
 confgiration.
 
 All modules installed were supplied with the Suse 10.0


Hi Will.

Looks to me that you don't have register_globals turned on in your home
server.  Add this to the top:

$team=$_GET['team'];

...and see if it works.

I'll leave the SQL injection dangers of your code to other posters. ;-)

JM

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



RE: [PHP] Database problem?

2005-11-28 Thread Jim Moseby
 
 Damn! It Worked. Thanks :)
 


Even so, John's excellent advice should still be taken.  You should not
generally code with a dependence on register_globals, for reasons you have
just seen.

JM

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



[PHP] Re: PhpMailer vs Pear:Mail

2005-11-28 Thread Petr Smith

Cabbar Duzayak wrote:

Could you please tell which one you recommend in terms of
stability/speed and share your experience in terms of these 2?

Thanks...



I tried all and ended with http://www.phpguru.org/static/htmlMimeMail5.html

fast, stable, usable.

Petr

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



[PHP] help avoid multiple login

2005-11-28 Thread mail.pmpa
Greetings

I'm having some trouble on a members online script.
I use a php script to track member login to avoid multiple logins on
different ips etc.
When a logged member closes the browser window I can't delete the table
entry because I will not have access to some sort of Session_OnEnd action
on hosting.
Is there a workaround for this?

I'm using PHP 5.0.4 and IIS on win XP.

Thanks in advance.
Pedro.

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



[PHP] Re: help avoid multiple login

2005-11-28 Thread Matt Monaco
Create an object with the functionality of your choosing, in the destructor 
perform your cleanup operations.


mail.pmpa [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Greetings

 I'm having some trouble on a members online script.
 I use a php script to track member login to avoid multiple logins on
 different ips etc.
 When a logged member closes the browser window I can't delete the table
 entry because I will not have access to some sort of Session_OnEnd 
 action
 on hosting.
 Is there a workaround for this?

 I'm using PHP 5.0.4 and IIS on win XP.

 Thanks in advance.
 Pedro. 

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



[PHP] Problem with Frames and Sessions

2005-11-28 Thread Shaun
Hi,

I have a frameset with a left column and a main column. I have a login 
script with a form in the left column. When I log in I get a menu in the 
left column which targets to the main column. My problem is that when I 
click on links in the left column nothing appears in the main frame, however 
if I refresh the browser then the links work. I am sure this must be a PHP 
session problem but I don't have any experience using frames, does anyone 
have suggestions as to what the problem might be?

Thanks for your advice.

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



RE: [PHP] help avoid multiple login

2005-11-28 Thread mail.pmpa


-Mensagem original-
De: Matt Monaco [mailto:[EMAIL PROTECTED] 
Enviada: terça-feira, 29 de Novembro de 2005 0:02
Para: php-general@lists.php.net
Assunto: [PHP] help avoid multiple login

Create an object with the functionality of your choosing, in the destructor 
perform your cleanup operations.


mail.pmpa [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Greetings

 I'm having some trouble on a members online script.
 I use a php script to track member login to avoid multiple logins on
 different ips etc.
 When a logged member closes the browser window I can't delete the table
 entry because I will not have access to some sort of Session_OnEnd 
 action
 on hosting.
 Is there a workaround for this?

 I'm using PHP 5.0.4 and IIS on win XP.

 Thanks in advance.
 Pedro. 

-- 
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] help avoid multiple login

2005-11-28 Thread mail.pmpa
De: Matt Monaco [mailto:[EMAIL PROTECTED] 
Create an object with the functionality of your choosing, in the destructor

perform your cleanup operations.

The problem is I don't know when a member closes the browser window.
If I knew that i would automatically logout that member.

Thanks.

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



Re: [PHP] help avoid multiple login

2005-11-28 Thread Matt Monaco
If you store your login object in a session, when the browser window is 
closed the object will automatically be destroyed, thus calling the 
destructor.

In response to the message you send directly to me, you would create a file 
called Login.class.php and at the top of each page include the file using 
require_once(Login.class.php);

Matt


mail.pmpa [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
De: Matt Monaco [mailto:[EMAIL PROTECTED]
Create an object with the functionality of your choosing, in the destructor

perform your cleanup operations.

The problem is I don't know when a member closes the browser window.
If I knew that i would automatically logout that member.

Thanks. 

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



[PHP] Re: Can't use secure file wrappers - Windows

2005-11-28 Thread Chuck Anderson

James Benson wrote:


Could use the xampp package or just the openssl  php from it,


http://www.apachefriends.org/en/xampp.html


Chuck Anderson wrote:
 

[I've had this posted in the php.windows group for a few days, but I got 
no replies there.]


I have been plugging away at this for some time now and I can not figure 
out how to get https and ftps as registered streams in my Windows 
installation of Php (4.4.0).  My direct need is to use fopen on secure 
URLs - https.


(I've installed openssl - enabled the Php openssl extension - and 
verified that my copy of Php was compiled with the openssl module.)


The latest thing I have read says that I need a special copy of 
php4ts.dll in order to enable secure streams (https, ftps) in Php on 
Windows (XP, in my case).


The posts I read point to copies of php4ts.dll for Php 4.3.4.

I am running Php 4.4.0.  Where can I find a copy of php4ts.dll for 
Php4.4.0 that enables secure streams?


(And is that really the solution in Php 4.4.0?)

Thanks in Advance
   

A followup: This is from a while back (two weeks ago), but I finally 
tried installing xampp. I installed it into c:\xampp and when I managed 
to get it working (independent of my other apache service) it did what I 
needed. I had https and ftps as registered streams. S ... I 
copied the php in xampp into c:\php and the apache dll files into my 
existing apache folder and ultimately made a real mess of things. Since 
I had backed everything up, I put it all back the way it was, 
uninstalled xampp, and to my surprise, I now have https and ftps streams 
registered in my previous installation. I'm glad I can finally access 
secure sites from my Php scripts, but I have no idea what is that I 
managed to change to allow it.


(I have a guess. With things mixed up a bit I started getting an error 
message I'd never seen before when starting Apache (with Php as a 
module). A search on Google for the error message ... Function 
registration failed - duplicate name  I got the advice to NOT 
register openssl in php.ini, if it was already statically linked in the 
binary. H. This may have been my problem earlier, but for 
some reason I was not seeing any error messages.)


Oh well. At least it's Apache 2.0.55 OpenSSL/0.9.8a and Php 4.4.1, so I 
shouldn't need to upgrade any time soon (other than to eventually try 
out Php 5).


--
*
Chuck Anderson • Boulder, CO
http://www.CycleTourist.com
Integrity is obvious.
The lack of it is common.
*

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



[PHP] php link question

2005-11-28 Thread Ron Zimmerman
I need a function that links immediately to a different page - without 
waiting for the user to click on anything.  I'm not sure if link() does 
that or some other function.


Thanks,
Ron Z

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



Re: [PHP] php link question

2005-11-28 Thread Robert Cummings
On Tue, 2005-11-29 at 00:28, Ron Zimmerman wrote:
 I need a function that links immediately to a different page - without 
 waiting for the user to click on anything.  I'm not sure if link() does 
 that or some other function.

header() in PHP:

header( 'Location: http://www.domain.ext/absolute/url' );

Cheers,
Rob.
-- 
..
| InterJinn Application Framework - http://www.interjinn.com |
::
| An application and templating framework for PHP. Boasting  |
| a powerful, scalable system for accessing system services  |
| such as forms, properties, sessions, and caches. InterJinn |
| also provides an extremely flexible architecture for   |
| creating re-usable components quickly and easily.  |
`'

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



Re: [PHP] php link question

2005-11-28 Thread jonathan
not totally sure what you're asking but look at header 
(location:  )



On Nov 28, 2005, at 9:28 PM, Ron Zimmerman wrote:

I need a function that links immediately to a different page -  
without waiting for the user to click on anything.  I'm not sure if  
link() does that or some other function.


Thanks,
Ron Z

--
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] Two version of PHP in single server

2005-11-28 Thread J.F.Kishor
Hi,

Thanks...!

Even the second is server-parsed not cgi

Some   more  suggestions   are  welcomed,   so  we   can   succeed  in
experimentation of Two version of PHP in same server.



 i haven't tried this since php3/4, but it used to be that you could
 install them both (as server parsed, not one as a cgi) and then use
 different file extensions (and appropriate apache entries) to direct
 which php version parsed the page. e.g., we used .php3 to use the
 php3 install and .php for php4.
 
 i have a sense that this may be harder (or potentially impossible)
 now, but you may want to look at the apache install documentation to
 see if it gives hints. there used to be information in, i believe,
 the apache source install documentation explaining how to do this.
 
 as someone else has indicated, you can (or at least should be able
 to) install one version as server-parsed and the second as cgi,
 though that may not meet your needs.
 
 
  Original Message 
  Date: Monday, November 28, 2005 12:07:02 PM +0530
  From: J.F.Kishor [EMAIL PROTECTED]
  To: php-general@lists.php.net
  Subject: [PHP] Two version of PHP in single server
  
  Hi,
  
  I have  a query, can we run  two versions of PHP  in linux 7.2
  server.
  
  I want  to use PHP 4.x  for one application and  PHP 5.1.0 for
  another application in the same server.
  
  Do  I need to  do some  configuration changes  to set  the php
  path. To  look up different  versions based on the  request of
  the application.
  
  
  
  Regards,
  - JFK
  kishor
  Nilgiri Networks
  
  -- 
  PHP General Mailing List (http://www.php.net/)
  To unsubscribe, visit: http://www.php.net/unsub.php
 
 -- End Original Message --
 

-- 
Regards,
- JFK
kishor
Nilgiri Networks

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



[PHP] R: [PHP] Problem with Frames and Sessions

2005-11-28 Thread Sebastian \En3pY\ Zdrojewski
Change the logon script. The cookies of each frame are loaded separately, so
if you want the session to be active in all the frames, at least once you
got to reload them. The easiest way, I think, is to change the logon script:
put it on a main page and once the user is logged in, create the frameset.
The session will be available in all the frames.

Cheers,

En3pY 


Sebastian Konstanty Zdrojewski 



URL: http://www.en3py.net/
E-Mail: [EMAIL PROTECTED]



Le informazioni contenute in questo messaggio sono riservate e
confidenziali. Il loro utilizzo è consentito esclusivamente al destinatario
del messaggio, per le finalità indicate nel messaggio stesso. Qualora Lei
non fosse la persona a cui il presente messaggio è destinato, La invito ad
eliminarlo dal Suo Sistema ed a distruggere le varie copie o stampe, dandone
gentilmente comunicazione. Ogni utilizzo improprio è contrario ai principi
del D.lgs 196/03 e alla legislazione Europea (Direttiva 2002/58/CE). 

-Messaggio originale-
Da: Shaun [mailto:[EMAIL PROTECTED] 
Inviato: martedì 29 novembre 2005 0.53
A: php-general@lists.php.net
Oggetto: [PHP] Problem with Frames and Sessions

Hi,

I have a frameset with a left column and a main column. I have a login
script with a form in the left column. When I log in I get a menu in the
left column which targets to the main column. My problem is that when I
click on links in the left column nothing appears in the main frame, however
if I refresh the browser then the links work. I am sure this must be a PHP
session problem but I don't have any experience using frames, does anyone
have suggestions as to what the problem might be?

Thanks for your advice.

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

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.8/184 - Release Date: 27/11/2005
 


smime.p7s
Description: S/MIME cryptographic signature


Re: [PHP] Database problem?

2005-11-28 Thread William Stokes
You should not generally code with a dependence on register_globals

OK. I have to consider that. Apparently the, ISP's  production server has 
this setting on. Don't know why...

-Will


Jim Moseby [EMAIL PROTECTED] kirjoitti 
viestissä:[EMAIL PROTECTED]

 Damn! It Worked. Thanks :)



 Even so, John's excellent advice should still be taken.  You should not
 generally code with a dependence on register_globals, for reasons you have
 just seen.

 JM 

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