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
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.
--
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
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:
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
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
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
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);
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
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
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
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);
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
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:
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
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
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
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
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
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
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
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
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
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:
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
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
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
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
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
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,
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
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):
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
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
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.
* 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.
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
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
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
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
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
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
--
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
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,
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
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);
}
?
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
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
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,
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
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
sorry about that
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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,
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
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
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
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
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
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
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
... 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
61 matches
Mail list logo