Re: [PHP] catching URL#target params

2004-03-15 Thread Seba
I think that the only way to catch it is to rewrite the URL.

1)Write pages with appropriates links. Somethink like
href='www.yoursite.com/anchor_target/index.php'

2)Create e rewrite rule in the htacces file.


3)Catch the target value from the php page parsing the rewritten URL
www.yoursite.com/index.phpanchor=target

I did it and it works.


Sebastiano

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



Re: [PHP] catching URL#target params

2004-03-15 Thread Seba
Il lun, 2004-03-15 alle 15:55, David T-G ha scritto:
 Sebastiano, et al --
 
 ...and then Seba said...
 % 
 % I think that the only way to catch it is to rewrite the URL.
 % 
 % 1)Write pages with appropriates links. Somethink like
 % href='www.yoursite.com/anchor_target/index.php'
 
 Hmmm...  Do you mean that I should write the calling page this way?  I
 can't do that; I'm planning for pages that I don't own that may not be
 updated (or even formed properly from the start).  Or do you mean I
 create a subdir and index.php file for every possible link target?  Ugh;
 there are way too many of those.
 
 Given a URL like
 
   http://web-folio.net/help.php#delcoll
 
 that should look like
 
   http://web-folio.net/help.php?req=delcoll
 
 for the new script, what do I put where in my site dir?
 
 

The first one. 
But if you do not own the pages I have not any idea to solve the
problem. 

 % 
 % 2)Create e rewrite rule in the htacces file.
 
 OK.
 
 
 % 
 % 
 % 3)Catch the target value from the php page parsing the rewritten URL
 % www.yoursite.com/index.phpanchor=target
 
 That sounds good, I think.
 
 
 % 
 % I did it and it works.
 
 Great!  Now tell me more :-)
 
 
 % 
 % 
 % Sebastiano
 
 
 Thanks  HAND
 
 :-D

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



Re: [PHP] failed to open stream: No such file or directory in

2004-03-15 Thread Seba
Il lun, 2004-03-15 alle 18:43, Mike Mapsnac ha scritto:
 Hello
 I know that problem is related how I include library file (lib_main.php).
 I just don't understand what I do wrong:
 lib_main.php is located at /var/www/html/lib/lib_main.php
 
 When I include in the index.phplocated at  /var/www/html/  I do the 
 following
 include ('lib/lib_main.php'); // this works fine
 
 But When I try to declare the library   in /var/ww/html/account/
Is the index.php file here?
 include('lib/account/lib_main.php');
/var/ww/html/account/ + include('lib/account/lib_main.php'); =
/var/ww/html/account/lib/account/lib_main.php. 
Is there the file lib_mail.php in this folder?
Use include('../lib/lib_main.php').
 It gives me the error message:
 Warning: main(lib/account/lib_main.php): failed to open stream: No such file 
 or directory in /var/www/html/account/index.php on line 6
 
 I have no idea what is wrong here
 
 _
 FREE pop-up blocking with the new MSN Toolbar – get it now! 
 http://clk.atdmt.com/AVE/go/onm00200415ave/direct/01/


Seba

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



Re: [PHP] seesions problem

2004-02-27 Thread Seba
Last month I had thew same problem, but I don't remeber how I solved it.
Note that it is only a Notice, and not an error message.
Set your php.ini to do not show notice messages.

Seba


Il ven, 2004-02-27 alle 13:16, Pance ha scritto:
 I've been using the same code to verify a persons login for more than a
 year - but I've been having some problems lately - I get past the login, but
 the session times-out after about 30 seconds or a minute. My new server is
 using PHP ver 4.3.3. I've also read the docs on sessions and I've taken
 their suggestion and have stopped using session_register(user_id). I now
 use $_SESSION[user_id]).
 
 But, like I said after about a short minute, I get the following error
 message:
 
 Notice: Undefined index: user_id in /home/pance/public_html/menu.php on line
 13
 
 Has anybody else come accross this problem - and how did you solve it?
 
 Pance Stojkovski

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



[PHP] Re: session expired - how to know if the session is newor old

2004-02-25 Thread Seba
It means that the session_start function has not changed (has restored
the old value) the session id value. Set your browser to do not accept
cookies, and it will work. 
Remember that the value of the session id can be passed by GET POST and
Cookies to.

Seba

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



Re: [PHP] Re: session expired - how to know if the session is new or old

2004-02-24 Thread Seba
in the first page of your website, or when you connect for the firs
time to it

$_SESSION['first_session_value'] = session_id(); 

others pages
if($_SESSION['first_session_value'] != session_id()){
echo The session has a new value;
}



Seba


Il mar, 2004-02-24 alle 15:16, Jakes ha scritto:
 What do you need this for.? You session is only suppose to last for one
 browser session
 
 Catalin Trifu [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  Hi,
 
  Here is the problem:
 
  The session gc runs and deletes the session data. This is good,
  but calling session_start in PHP obviously creates a new session.
 
  How can I know if the session was created after an old one was
  deleted because gc has invalidated it or it is a completely fresh session,
  from let's say a fresh browser window.
 
  I googled for it and looked in the docs but I found nothing on this
  matter.
 
  Thanks in advance,
  Catalin

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



Re: [PHP] Re: session expired - how to know if the session is newor old

2004-02-24 Thread Seba
It means that the session_start function has not changed (has restored
the old value) the session id value. Set your browser to do not accept
cookies, and it will work. 
Remember that the value of the session id can be passed by GET POST and
Cookies to.

Seba 

Il mar, 2004-02-24 alle 17:31, Catalin Trifu ha scritto:
 Hi,
 
 Thanks for the reply.
 The method you suggest does not work. Have you tested it somewhere ?
 
 Catalin
 
 
 Seba [EMAIL PROTECTED] wrote in message
 news:[EMAIL PROTECTED]
  in the first page of your website, or when you connect for the firs
  time to it
 
  $_SESSION['first_session_value'] = session_id();
 
  others pages
  if($_SESSION['first_session_value'] != session_id()){
  echo The session has a new value;
  }
 
 
 
  Seba
 
 
  Il mar, 2004-02-24 alle 15:16, Jakes ha scritto:
   What do you need this for.? You session is only suppose to last for one
   browser session
  
   Catalin Trifu [EMAIL PROTECTED] wrote in message
   news:[EMAIL PROTECTED]
Hi,
   
Here is the problem:
   
The session gc runs and deletes the session data. This is good,
but calling session_start in PHP obviously creates a new session.
   
How can I know if the session was created after an old one was
deleted because gc has invalidated it or it is a completely fresh
 session,
from let's say a fresh browser window.
   
I googled for it and looked in the docs but I found nothing on
 this
matter.
   
Thanks in advance,
Catalin

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



Re: [PHP] Re: Delayed mail()... ?

2004-02-20 Thread Seba
The solution to use cron is good, in this way you can run the script
manually to if you want, you have to:

1)Insert data into a databse or a text file,  create a php page with the
comparison of the dates (from the databe or the txt file) and the mail()
command.
2) create a shell script that does a GET
http://abcabc.com/yourscript.php
3) a cron for the shell script every day.


Seba




Il ven, 2004-02-20 alle 14:36, Ben Ramsey ha scritto:
 Probably the best way to do this is the use cron to schedule a script to 
 run at a specified time.
 
 The way I'd do it is to create a PHP script that compares the current 
 date with the date they registered (you'd save that date to the 
 database, of course).  If the current date is greater than 3 days and 
 less than 4 days older than the date they registered, then you'd use 
 mail() to send them another message.
 
 Use cron to schedule the script to run the script once every day.
 
 For the PHP script that cron will be running, you'll need to put this 
 line in above the first ?php tag:
 
 #!/usr/bin/php -q
 
 That way, it'll execute on the system.  And you may have the chmod the 
 file 755, though I can't remember if that's necessary.
 
 Finally, your system must be Linux (or other unix-type system) for this 
 to work correctly.  If it's Windows, you can use the task scheduler, but 
 I don't think it'll execute the PHP script.
 
 
 
 Tristan Pretty wrote:
  I've been asked to add a small amount of functionality to a site I've 
  built
  (It's a techer at home web site)
  
  Basically, prospective teachers/students, can sign up for more info etc.
  Currently, that info is captured, and the site admin people are 
  E-mailed...
  all good so far..
  
  What they've asked for, is that when they reply to the enquiry, they are 
  reminded to chase up the enqiry a few days later...
  Now I could give them a message on screen, if they happen to be in the 
  admin area, but what i'd like to do , is simply mail the admin users, 
  after say, 3 days.
  regardless if they even visit the admin area at all...
  
  is this possible at all?
  
  I use 12All E-mail software at work, and that has a delayed sending 
  option, but [EMAIL PROTECTED] NO idea how it works...
  
  Any suggetions?
  
  
  
  *
  The information contained in this e-mail message is intended only for 
  the personal and confidential use of the recipient(s) named above.  
  If the reader of this message is not the intended recipient or an agent
  responsible for delivering it to the intended recipient, you are hereby 
  notified that you have received this document in error and that any
  review, dissemination, distribution, or copying of this message is 
  strictly prohibited. If you have received this communication in error, 
  please notify us immediately by e-mail, and delete the original message.
  ***

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



[PHP] PHPSESSID and URL rewriting

2004-02-19 Thread Seba
Hi everyone,
I have this situation:
I use some regular expressions to rewrite  the URL of a web site,
in particular:
http://www.mysite.com/lingua-ita/colore-rosso/pagina.html
that becames
http://www.mysite.com/pagina.php?lingua=itacolore=rosso.

Is all ok until I use some session variables.
It happens that the string  ?PHPSESSID=[valore] is merge to the link and
this will cause a damage in the URL rewriting.

Note that the string comes merged by the browser (Explorer, opera) to
the link I wrote before.
(http://www.mysite.com/lingua-ita/colore-rosso/pagina.html?PHPSESSID=f4s6f5d4fs65df4s65fd4).

Since the links first come in this format, then are rewroted by the rule
in the file htaccess and finally parsed by the webserver (apache , IIS),
How can I avoid it?

I tried with: 
RewriteRule (.*)?PHPSESSID=(.*) /PHPSESSID-$2/$1
as last rule, but it didn't work.

Can you help me?

thanks in advance
Seba

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



[PHP] PHPSESSID and URL rewriting

2004-02-19 Thread Seba
Hi everyone,
I have this situation:
I use some regular expressions to rewrite  the URL of a web site,
in particular:
http://www.mysite.com/lingua-ita/colore-rosso/pagina.html
that becames
http://www.mysite.com/pagina.php?lingua=itacolore=rosso.

Is all ok until I use some session variables.
It happens that the string  ?PHPSESSID=[valore] is merge to the link and
this will cause a damage in the URL rewriting.

Note that the string comes merged by the browser (Explorer, opera) to
the link I wrote before.
(http://www.mysite.com/lingua-ita/colore-rosso/pagina.html?PHPSESSID=f4s6f5d4fs65df4s65fd4).

Since the links first come in this format, then are rewroted by the rule
in the file htaccess and finally parsed by the webserver (apache , IIS),
How can I avoid it?

I tried with: 
RewriteRule (.*)?PHPSESSID=(.*) /PHPSESSID-$2/$1
as last rule, but it didn't work.

Can you help me?

thanks in advance
Seba

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



Re: [PHP] Re: PHPSESSID and URL rewriting

2004-02-19 Thread seba
Unfortunately I do can not oblige users which will use those pages to accept
cookies .
The pages are for an e-commerce web site.
If I use the directive
session.use_trans_sid  = 0
is not possible to MANTAIN THE SAME phpsessid value among differents pages,
isn t it?

Cheers,

Seba



- Original Message - 
From: [EMAIL PROTECTED]
To: PHP General list [EMAIL PROTECTED]
Sent: Thursday, February 19, 2004 2:45 PM
Subject: [PHP] Re: PHPSESSID and URL rewriting


 Hello Seba,

 Check your php.ini file: you'll probably find that session.use_trans_sid
is set to 1,
 which is actually a security hazard. If you set session.use_trans_sid to
0, session IDs
 will no longer be automatically sent as GET variables.

 Cheers,

 Erik


 On 19 Feb 2004 at 13:15, Seba wrote:

  Hi everyone,
  I have this situation:
  I use some regular expressions to rewrite  the URL of a web site,
  in particular:
  http://www.mysite.com/lingua-ita/colore-rosso/pagina.html
  that becames
  http://www.mysite.com/pagina.php?lingua=itacolore=rosso.
 
  Is all ok until I use some session variables.
  It happens that the string  ?PHPSESSID=[valore] is merge to the link and
  this will cause a damage in the URL rewriting.
 
  Note that the string comes merged by the browser (Explorer, opera) to
  the link I wrote before.
 
(http://www.mysite.com/lingua-ita/colore-rosso/pagina.html?PHPSESSID=f4s6f5d
4fs65df4s65fd4).
 
  Since the links first come in this format, then are rewroted by the rule
  in the file htaccess and finally parsed by the webserver (apache , IIS),
  How can I avoid it?
 
  I tried with:
  RewriteRule (.*)?PHPSESSID=(.*) /PHPSESSID-$2/$1
  as last rule, but it didn't work.
 
  Can you help me?
 
  thanks in advance
  Seba

 -- 
 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