[suspicious - maybe spam] php-general Digest 6 Sep 2005 08:07:30 -0000 Issue 3666

2005-09-06 Thread php-general-digest-help
php-general Digest 6 Sep 2005 08:07:30 - Issue 3666 Topics (messages 221873 through 221889): Re: FTP Chmod problem 221873 by: Raj Shekhar 221875 by: Matt Palermo Re: how to divide string 221874 by: Jordan Miller Re: PHP/MySQL offline 221876 by: viraj

[PHP] suggestions needed to use session

2005-09-06 Thread Nahalingam Kanakavel
Hi all, I am new to PHP. I know some thing about SESSIONS in PHP, I am in need of your suggestions. how to use sessions ? what is an efficient way to handle session_id ? like that. How efficiently we can use session concept in our web site development ? how it is helpful. thanks in advance. --

Re: [PHP] suggestions needed to use session

2005-09-06 Thread Robert Graham
Nahalingam Kanakavel wrote: Hi all, I am new to PHP. I know some thing about SESSIONS in PHP, I am in need of your suggestions. how to use sessions ? what is an efficient way to handle session_id ? like that. How efficiently we can use session concept in our web site development ? how it is

[PHP] Getting current page name without path

2005-09-06 Thread Bushra
Hi I want to get the name of current page. I use $PHP_SELF or SCRIPT_FILENAME, but it also provides the path name . I just want to retrieve the file name with extension. How can I do that? Regards Bushra -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Getting current page name without path

2005-09-06 Thread George Pitcher
I want to get the name of current page. I use $PHP_SELF or SCRIPT_FILENAME, but it also provides the path name . I just want to retrieve the file name with extension. How can I do that? $_SERVER['SCRIPT_NAME'] and $_SERVER['ORIG_SCRIPT_NAME'] will give you the current filename without the

Re: [PHP] preg_match and $ sign in PHP5

2005-09-06 Thread Robin Vickery
On 9/6/05, Cabbar Duzayak [EMAIL PROTECTED] wrote: Hi, I have a regular expression check as: preg_match(/$xyz/, $data, $matches); And, as you know $xyz means string starts with xyz. No it doesn't - string starts with xyz would be /^xyz/ which coincidentally avoids your problem of xyz

Re: [PHP] Getting current page name without path

2005-09-06 Thread Robin Vickery
On 9/6/05, Bushra [EMAIL PROTECTED] wrote: Hi I want to get the name of current page. I use $PHP_SELF or SCRIPT_FILENAME, but it also provides the path name . I just want to retrieve the file name with extension. How can I do that? http://www.php.net/manual/en/function.basename.php -robin

[PHP] 302 Responses (Was: session cookies)

2005-09-06 Thread Chris Shiflett
Rasmus Lerdorf wrote: Also, just add a single line to your own test script and make it look like this: header('Location: http://www.php.net/'); $fp = fopen('/tmp/log.txt', 'w'); for ($i = 0; $i 30; $i++) { $str = Count $i\n; echo str_repeat($str, 1000); fputs($fp, $str);

Re: [PHP] suggestions needed to use session

2005-09-06 Thread viraj
another good one, but for intermediates http://www.zend.com/zend/tut/session.php ~viraj. On 9/6/05, Robert Graham [EMAIL PROTECTED] wrote: Nahalingam Kanakavel wrote: Hi all, I am new to PHP. I know some thing about SESSIONS in PHP, I am in need of your suggestions. how to use

Re: [PHP] suggestions needed to use session

2005-09-06 Thread Nahalingam Kanakavel
Hi all once again, Thanks for all, your suggestions made me to know about sessions and about the functions needed to handle sessions. but I have some doubts plz clarify those things what for the session Id is ?. what is SID ? I saw this in some example codings but it is not working in my

[PHP] Re: 302 Responses (Was: session cookies)

2005-09-06 Thread Rasmus Lerdorf
Chris Shiflett wrote: 3. Chris's modified test script: header('Location: http://www.php.net/'); $fp = fopen('/tmp/log.txt', 'w'); for ($i = 0; $i 30; $i++) { $str = Count $i\n; echo str_repeat($str, 1000); fputs($fp, $str); sleep(1); flush(); } This redirects

Re: [PHP] Re: 302 Responses (Was: session cookies)

2005-09-06 Thread Robin Vickery
On 9/6/05, Rasmus Lerdorf [EMAIL PROTECTED] wrote: Chris Shiflett wrote: 3. Chris's modified test script: header('Location: http://www.php.net/'); $fp = fopen('/tmp/log.txt', 'w'); for ($i = 0; $i 30; $i++) { $str = Count $i\n; echo str_repeat($str, 1000);

[PHP] owner of files created by fopen() become wrong?

2005-09-06 Thread Wong HoWang
Hi all, I am so sorry that I have a lot of questions... This time I got a special issue... I have set up a VirtualHost for the domain that have problem. Since I am using Apache/1.3.33 , I have set the User Group inside outside the VirtualHost ... ... /VirtualHost tags. As you know, the user

[PHP] php/mysql web question

2005-09-06 Thread bruce
hi... if an app has a webpage that has to interface/display data from a mysql db, does the app have to essentially do a new db_connection for each time that a user accesses the page during the session. as far as i can tell, it does. in other words, the page would need to look something like:

Re: [PHP] php/mysql web question

2005-09-06 Thread Mikey
bruce wrote: hi... if an app has a webpage that has to interface/display data from a mysql db, does the app have to essentially do a new db_connection for each time that a user accesses the page during the session. as far as i can tell, it does. in other words, the page would need to look

Re: [PHP] php/mysql web question

2005-09-06 Thread Mikey
Mikey wrote: bruce wrote: hi... if an app has a webpage that has to interface/display data from a mysql db, does the app have to essentially do a new db_connection for each time that a user accesses the page during the session. as far as i can tell, it does. in other words, the page

Re: [PHP] owner of files created by fopen() become wrong?

2005-09-06 Thread Robin Vickery
On 9/6/05, Wong HoWang [EMAIL PROTECTED] wrote: I have set up a VirtualHost for the domain that have problem. Since I am using Apache/1.3.33 , I have set the User Group inside outside the VirtualHost ... ... /VirtualHost tags. As you know, the user group set outside VirtualHost will be the

[PHP] Problem with Apache+Fedora Core 4 + PHP Installation

2005-09-06 Thread Feris Thia C.
Hi All, I'm using Fedora Core 4 (kernell 2.6.11-1.1369_FC4) and having problem when installing Apache + PHP... the configuration that I'm using : 1. Apache 2.0.54 ./configure --prefix=/usr/local/apache2 --enable-so make make install 2. PHP 4.3.1 ./configure

[PHP] Apache Linux question

2005-09-06 Thread Feris Thia C.
Hi All, If I already install my Apache on linux system, then is it possible to check what configuration settings I provided when compiling the source ?? Regards, Feris

Re: [PHP] Apache Linux question

2005-09-06 Thread John Nichel
Feris Thia C. wrote: Hi All, If I already install my Apache on linux system, then is it possible to check what configuration settings I provided when compiling the source ?? /path/to/httpd -V If that's not the info you're looking for, check the Apache docs. -- John C. Nichel ÜberGeek

Re: [PHP] Apache Linux question

2005-09-06 Thread Georgi Ivanov
It is no clear which option you are looking for. If it's PHP compile options use : ?php echo phpinfo(); ? This will give you information you need. On Tuesday 06 September 2005 16:39, Feris Thia C. wrote: Hi All, If I already install my Apache on linux system, then is it possible to check what

[PHP] Re: 302 Responses (Was: session cookies)

2005-09-06 Thread Chris Shiflett
Rasmus Lerdorf wrote: This redirects right away for me. Try it: http://lerdorf.com/cs.php Code at: http://lerdorf.com/cs.phps Thanks, that works. :-) For reference, here's mine (temporary URL, of course): http://shiflett.org/cs.php http://shiflett.org/cs.phps It's the same code, but it

[PHP] Confused about how to best execute php scripts in /cgi-bin/

2005-09-06 Thread KEVIN ZEMBOWER
I'm trying to allow php scripts to execute from the /cgi-bin/ directory, which is currently set up as a ScriptAlias in my Apache2 configuration. I've found lots of references to this, but there seems to be a couple of different ways to accomplish this, and I can't tell which one is recommended

[PHP] Object Scope

2005-09-06 Thread Chuck Brockman
What is the best practice for calling objects that are to be used throughout a users site visit. For example, I have a members class with two classes that extend this class. Is it best to instantiate the object in the $_Session scope or make individual calls to the class/object. For example:

[PHP] Sessions , expiry times and different time zones

2005-09-06 Thread Dan Rossi
hi there I have run into problems with sessions , cookies and expiryt times with different time zones. Ie our server is in the States however I am browsing from Koala land downunder. I have been trying to get the session to expire in a day, however for ppl in the states this is ok, but for me

Re: [PHP] Object Scope

2005-09-06 Thread Jason Davidson
I prefer to make the object on each page load, passing only the member id thru the session. Jason On 9/6/05, Chuck Brockman [EMAIL PROTECTED] wrote: What is the best practice for calling objects that are to be used throughout a users site visit. For example, I have a members class with

Re: [PHP] Apache Linux question

2005-09-06 Thread Jason Davidson
If you compiled it, you can goto the src directory, and log under config.log Jason On 9/6/05, Georgi Ivanov [EMAIL PROTECTED] wrote: It is no clear which option you are looking for. If it's PHP compile options use : ?php echo phpinfo(); ? This will give you information you need. On

Re: [PHP] Sessions , expiry times and different time zones

2005-09-06 Thread Jordan Miller
Hi Dan, Couldn't you store an expiration time directly in the $_SESSION variable, rather than relying on cookie expiration (if I understand your question correctly)? Each time a page is loaded, update the expiration time in this variable to +24hr from the current time (all times

[PHP] php equivalent for cut

2005-09-06 Thread Michelle Konzack
Hello, I am searching for the right equivalent for cut -d : -f5 but it must work with php4. Since the website http://www.php.net/manual/de/ has no seperated manuals for php4 and php5, it is not easy to find the right stuff. Greetings and good evening Michelle -- Linux-User #280138 with the

[PHP] Sessions, URL, --enable-trans-id

2005-09-06 Thread Dan Baker
I am using sessions, but every relative URL gets a ?PHPSESSID=... appended to it. I'm assuming this is happening because of some setting that has been set in PHP. I work on an ISP server, so I don't have much control over the PHP configuration. Is there any way I can turn this feature off,

Re: [PHP] php equivalent for cut

2005-09-06 Thread tg-php
The closest you get to 'cut' in PHP is probably the 'explode' command. It splits a string by a delimiter like 'cut' does, only it dumps the results into an array: $etcpasswd = username:passwd:123:345::/home/username:/bin/sh; $pwdarr = explode(:, $etcpasswd); echo $pwdarr[4]; That should

Re: [PHP] Re: 302 Responses (Was: session cookies)

2005-09-06 Thread Robin Vickery
On 9/6/05, Chris Shiflett [EMAIL PROTECTED] wrote: Rasmus Lerdorf wrote: This redirects right away for me. Try it: http://lerdorf.com/cs.php Code at: http://lerdorf.com/cs.phps Thanks, that works. :-) For reference, here's mine (temporary URL, of course):

[PHP] Re: FTP Chmod problem

2005-09-06 Thread Al
Matt Palermo wrote: Hello everyone. I have a script where I am using FTP functions to chmod files/folders. I'm running into a problem with the ftp_chmod() function when trying to change the permissions of a directory. Here is the code I'm using: ftp_chmod($connId, 0777, $folder); The

[PHP] Create a new $_COOKIE[PHPSESSID] in PHP4.3.1

2005-09-06 Thread zzapper
Hi, Php 4,3,2 has a regenerate session id function session_regenerate_id un4tunately I 'm stuck with 4.3.1 The following doesn't seem to work // Unset session data $_SESSION=array(); // Clear cookie unset($_COOKIE[session_name()]); // Destroy session data session_destroy(); Unless I close and

[PHP] regular expression for integer range

2005-09-06 Thread babu
Hi all, I want to write regular expression for checking the string format entered by user. the allowed formats are examples: 10 10, 10,12-10 12-10 that is the valid strings are: 1. only integer 2. an integer, range of integers example 3 and no other characters must be allowed.

[PHP] Re: php equivalent for cut

2005-09-06 Thread Matthew Weier O'Phinney
* Michelle Konzack [EMAIL PROTECTED]: I am searching for the right equivalent for cut -d : -f5 but it must work with php4. $fields = explode(':', $string, 5); Since the website http://www.php.net/manual/de/ has no seperated manuals for php4 and php5, it is not easy to find the right stuff.

Re: [PHP] regular expression for integer range

2005-09-06 Thread Philip Hallstrom
On Tue, 6 Sep 2005, babu wrote: Hi all, I want to write regular expression for checking the string format entered by user. the allowed formats are examples: 10 10, 10,12-10 12-10 that is the valid strings are: 1. only integer 2. an integer, range of integers example 3 and no other

Re: [PHP] regular expression for integer range

2005-09-06 Thread John Nichel
babu wrote: Hi all, I want to write regular expression for checking the string format entered by user. the allowed formats are examples: 10 10, 10,12-10 12-10 that is the valid strings are: 1. only integer 2. an integer, range of integers example 3 and no other characters must be

Re: [PHP] Re: php equivalent for cut

2005-09-06 Thread Philip Hallstrom
I am searching for the right equivalent for cut -d : -f5 but it must work with php4. $fields = explode(':', $string, 5); Hmmm.. that's going to create a 5 element array assigned to $fields. So, using /etc/passwd as an example... philip:*:1000:1000:Philip

Re: [PHP] php/mysql web question

2005-09-06 Thread Murray @ PlanetThoughtful
hi... if an app has a webpage that has to interface/display data from a mysql db, does the app have to essentially do a new db_connection for each time that a user accesses the page during the session. as far as i can tell, it does. in other words, the page would need to look

[PHP] php mailing list/email app

2005-09-06 Thread bruce
hey, can anyone tell me if there's a good/serious email/newsletter list manager app for php similar to 'python/mailman' thanks bruce [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Re: php equivalent for cut

2005-09-06 Thread Michelle Konzack
Hi Phil, Am 2005-09-06 11:22:11, schrieb Philip Hallstrom: Hmmm.. that's going to create a 5 element array assigned to $fields. So, using /etc/passwd as an example... :-) $fields = explode(':', $string); $fullname = $fields[4]; // Philip Hallstrom Thanks. Greetings Michelle --

[PHP] Sending different languages to GD

2005-09-06 Thread Graham Anderson
How can I get Polish , iso-8859-2, text, to output properly ? PHP is reading the accent characters as blocks I tried this, but it did not work... // Set up text for a 'Polish' button $text = rozwiązania; $text = mb_convert_encoding($text, iso-8859-2,Auto); // Composit the text over a button

Re: [PHP] php mailing list/email app

2005-09-06 Thread Rory Browne
try hotscripts.com On 9/6/05, bruce [EMAIL PROTECTED] wrote: hey, can anyone tell me if there's a good/serious email/newsletter list manager app for php similar to 'python/mailman' thanks bruce [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] Re: php equivalent for cut

2005-09-06 Thread Michelle Konzack
Hi, Am 2005-09-06 12:18:18, schrieb [EMAIL PROTECTED]: $etcpasswd = username:passwd:123:345::/home/username:/bin/sh; $pwdarr = explode(:, $etcpasswd); echo $pwdarr[4]; OK, this works now. But can I read a whome /etc/passwd into an 3d array ? This would avoid multiple reads... I know, that

[PHP] really basic question

2005-09-06 Thread Adi Zebic
Hi folks, It is permited to do something like this in the functions body ? function test() { print(tralala); do_some_stuff(); ? table id=conex width=167 border=0 cellspacing=0 cellpadding=0 ? print(test function continue here or not?); waiting_answer(); print(thanks a lot); } ?

Re: [PHP] Re: php equivalent for cut

2005-09-06 Thread Philip Hallstrom
Am 2005-09-06 12:18:18, schrieb [EMAIL PROTECTED]: $etcpasswd = username:passwd:123:345::/home/username:/bin/sh; $pwdarr = explode(:, $etcpasswd); echo $pwdarr[4]; OK, this works now. But can I read a whome /etc/passwd into an 3d array ? This would avoid multiple reads... I know, that I can

Re: [PHP] Session expires randomly

2005-09-06 Thread Mauricio Pellegrini
You were right! That was exactly the problem after reading your message, I 've verified the value for gc_maxlifetime and found that it was set to 1440 secs in other words 24 minutes. Thank you for that. But, now I need to come up with something to avoid this behaviour. The problem is that

[PHP] Re: Re: php equivalent for cut

2005-09-06 Thread Michelle Konzack
Hi Phil, Am 2005-09-06 15:14:59, schrieb Philip Hallstrom: Why not use posix_getpwuid()? Good question... :-) http://us2.php.net/manual/en/function.posix-getpwuid.php This was a great IDEA... -philip Thanks and good night Michelle -- Linux-User #280138 with the Linux Counter,

Re: [PHP] Session expires randomly

2005-09-06 Thread Philip Hallstrom
On Tue, 6 Sep 2005, Mauricio Pellegrini wrote: You were right! That was exactly the problem after reading your message, I 've verified the value for gc_maxlifetime and found that it was set to 1440 secs in other words 24 minutes. Thank you for that. But, now I need to come up with something

[PHP] Sending different languages to GD

2005-09-06 Thread Graham Anderson
How can I get Polish , iso-8859-2, text, to output properly ? PHP is reading the accent characters as blocks I tried this, but it did not work... // Set up text for a 'Polish' button $text = rozwiązania; $text = mb_convert_encoding($text, iso-8859-2,Auto); // Composit the text over a button

Re: [PHP] Sending different languages to GD [apologize for resend]

2005-09-06 Thread Graham Anderson
sorry about that -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sending different languages to GD

2005-09-06 Thread Chris
Note: I haven't actually ever tried to put non-latin character s in an image, but I think this is the proper thing to do. First of all, I believe imagettftext() accepts string in the UTF-8 encoding. SO, the first thing to try would be to convert to UTF-8l mb_convert_encoding($text,

Re: [PHP] really basic question

2005-09-06 Thread Miles Thompson
Adi, Every time I was about to ask a question along the lines of Can you do ...? or Is it possible to ..., and really embarrass myself, this thought popped up: Self, why don't you just try it, and see if it works. After you try it, and it breaks, that's the time to ask. After all, to the

Re: [PHP] Sending different languages to GD

2005-09-06 Thread Graham Anderson
Now, I think it is a text editor problem.. My text editor, BBedit, is set to utf8 encoding . When I set encoding to utf-8, php outputs a blank screen... If I set BBedit to Unix with Mac-Roman encoding, the php script executes but screws up the Polish language Regardless, the php script

[PHP] Installing 4.3.0 and Apache 2.0.54 DSO

2005-09-06 Thread Rob Tanner
Hi, I'm trying to build PHP 4.3.0 as a DSO for Apache 2.0.54, and I get the following error running configure: checking for Apache 2.0 module support via DSO through APXS... Sorry, I cannot run apxs. Possible reasons follow: 1. Perl is not installed 2. apxs was not found. Try to pass the

[PHP] Uploading a file

2005-09-06 Thread Josh
Hi I have recently been working on a site which allows the user to upload a file to the site. Originally calling the $_FILES['file']['tmp_name'] worked fine, however the web host has now disabled all global variables and if I'm not mistaken $_FILES is global. Does anyone know of a work

Re: [PHP] Sessions , expiry times and different time zones

2005-09-06 Thread Dan Rossi
client cookie expires hence no more session ... On 07/09/2005, at 1:57 AM, Jordan Miller wrote: Hi Dan, Couldn't you store an expiration time directly in the $_SESSION variable, rather than relying on cookie expiration (if I understand your question correctly)? Each time a page is

Re: [PHP] Re: AND OR NOT

2005-09-06 Thread John Taylor-Johnston
Jasper Bryant-Greene wrote: John Taylor-Johnston wrote: I'm under pressure to permit AND, OR NOT. My research group insists that MySQL 4 syntax is not good enough. An idea of what one might enter is here (on the bottom): http://compcanlit.usherbrooke.ca/advanced.html I was hoping to get

[PHP] Re: 302 Responses (Was: session cookies)

2005-09-06 Thread Rasmus Lerdorf
Chris Shiflett wrote: Rasmus Lerdorf wrote: This redirects right away for me. Try it: http://lerdorf.com/cs.php Code at: http://lerdorf.com/cs.phps Thanks, that works. :-) For reference, here's mine (temporary URL, of course): http://shiflett.org/cs.php

Re: [PHP] Re: PHP/MySQL offline

2005-09-06 Thread Joe Wollard
... an automated script that creates a static site that will allow me to do that? If all you're really looking for is a static version of your site then you could simply use wget. This will crawl all of the links on your site and generate the static version you wanted. On Sep 5, 2005, at