php-general Digest 27 Nov 2004 16:17:31 -0000 Issue 3137

Topics (messages 202928 through 202953):

Re: Go Back Problem
        202928 by: StDog

just for test
        202929 by: StDog

Re: Running PHP as CGI
        202930 by: Tim Traver

Re: How does one get into programming?
        202931 by: Rory Browne
        202932 by: Jad Madi

Re: mysql_connect vs mysql_pconnect
        202933 by: Jad Madi
        202936 by: fabien champel

Re: Reg Jpgraph...
        202934 by: Marek Kilimajer

Lazy anwsers (WAS: mysql_connect vs mysql_pconnect)
        202935 by: Bruno B B Magalhães

Re: automatic responder
        202937 by: partners.symbulos.com
        202939 by: Alessandro Rosa
        202941 by: Marek Kilimajer
        202943 by: Octavian Rasnita

identifying the country of the people who connect to web site / portal
        202938 by: partners.symbulos.com
        202940 by: Adrian Portsmouth
        202949 by: Bruno B B Magalhães

How to detect the prefered languages of Web-Clients?
        202942 by: Michelle Konzack
        202944 by: Marek Kilimajer
        202945 by: Adrian Portsmouth
        202946 by: Michelle Konzack
        202947 by: Michelle Konzack
        202948 by: Marek Kilimajer
        202950 by: Michelle Konzack
        202951 by: Marek Kilimajer
        202952 by: Gerhard Meier

Comment Speed
        202953 by: Bruno B B Magalhães

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [EMAIL PROTECTED]


----------------------------------------------------------------------
--- Begin Message ---
В сообщении от Суббота 27 Ноябрь 2004 04:59 Cyrus написал(a):
> Dear All,
>
> I have a problem of back to the previous page in php.....
> I need to create a form let people to fill in .It can let user to preview
> the form, if information is not correct , user can back to previous page
> and correct it, I have used the javascript  :  OnClick='history.go(-1)'  
> and  OnClick='history.back()'  in php , but it can not works....pls help
> me.
>
> Thanks and Regards,
>
> Cyrus Chan


you must store return point samewhere.
f.e. in hidden area in your form, or in $_SESSION array

--- End Message ---
--- Begin Message ---
testing

--- End Message ---
--- Begin Message --- I guess what I'm really asking is do the php_admin environment variables that can get set in Apache get passed to the CGI version of php when called as a CGI ?

Tim.


Curt Zirzow wrote:

* Thus wrote Tim Traver:


Hi all,

In the quest to secure php script running, I am starting to think about running php as a cgi instead of through the module.

I generally set the open_basedir directory within the apache configuration file for individual hosts. If I ran php as a CGI, would that directive still be in effect ? or do I have to set that in a php.ini file that is specific for that virtual host ?



The directive will be effectve for which ever apache's <Directory> direcve applies, other wise the setting to the default directory will be used.

php in general, has  no clue about virtual hosts. This is rather a
appache issue.


Curt




--- End Message ---
--- Begin Message ---
Since this is a PHP list I'm assuming that  you want to learn php
programming. That being the case, I'd suggest that you first of all go
to the PHP website and download the manual. You don't get better docs
than the PHP docs, and they are an excellent learning resource for
PHP.

PHP is a good language to start off with, because (a) it's relitively
easy, (b), it borrows syntax from C, and Perl, both of which you
should consider as well if you are serious about programming. Both PHP
and Java borrow syntax from C, and since php5 borrows its object
model, from Java, PHP5 will be a great help for you if/when you decide
to learn java.

Having that said, I'd suggest you consider Python as well, it's a
simple powerful Object Oriented language, that's easy to learn. Due to
its emphasis on whitespace, as part of its syntax, it is also easy to
read, something that can't really be said in general for C/Java/PHP,
and certainly can't be said for Perl(note that it is possible to write
readable code in Perl, but not very common).

For a beginer to programming I'd read up on C, Java, Perl, and PHP,
decide which one you want to start with, and jump in.




On Thu, 25 Nov 2004 15:18:16 +0200, Ewald <[EMAIL PROTECTED]> wrote:
> I've been in IT for about 12 years and is looking to change my direction to
> programming. Can anyone direct me in the right direction as to what to study
> or where to start???
> 
> Thx
> 
> Ewald
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
>

--- End Message ---
--- Begin Message ---
Well said Rory Browne
after that I recommend downloading some php scripts and start reading
their codes and understanding the programming design
style.. 

On Thu, 25 Nov 2004 15:18:16 +0200, Ewald <[EMAIL PROTECTED]> wrote:
> I've been in IT for about 12 years and is looking to change my direction to
> programming. Can anyone direct me in the right direction as to what to study
> or where to start???
> 
> Thx
> 
> Ewald
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
Web standards Planet 
http://www.w3planet.info/
Personal Blogger
http://www.EasyHTTP.com/jad/

--- End Message ---
--- Begin Message ---
http://www.google.com/search?lr=&ie=UTF-8&oe=UTF-8&q=mysql_connect%20vs%20mysql_pconnect


On Fri, 26 Nov 2004 19:55:29 +0100, fabien champel
<[EMAIL PROTECTED]> wrote:
> hello,
> I do not know when I must use mysql_pconnect instead of the mysql_connect :(
> 
> what are the real advantages of persistent connections, please ?
> 
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 
> 


-- 
Web standards Planet 
http://www.w3planet.info/
Personal Blogger
http://www.EasyHTTP.com/jad/

--- End Message ---
--- Begin Message ---
ok, i'm sorry, i was probably too tired.


i've search the doc, but didn't found this page :
http://www.php.net/manual/en/features.persistent-connections.php

will me excuse me ?

--- End Message ---
--- Begin Message --- Sagar C Nannapaneni wrote:
Hi all,

I think I shouldnt post this here...but i didnt find proper support at the 
jpgraph
forums.

I'm using PHP 4.3.9 with GDK precompiled on apache2 using win2k.

When i open any of the jpgraph example files its giving me an error saying
"IE cannot find the site your are requesting". But when i remove some code
in the example file and refresh the page its working and when i put the deleted
code again back in that file and refresh its displaying the graph. When i close
and open a fresh browser the same problem persisting. Couldnt find what might
be the problem.

Again ...i'm sorry for posting this topic here...

/sagar


More details. What did you remove, request method, are you using sessions..... ?
--- End Message ---
--- Begin Message ---
Hey Guys,

I don´t know if anyone agrees with me, but I really dismiss this kind of comment: http://www.google.com/search?q=mysql&ie=UTF-8&oe=UTF-8

In fact, before I ask anything in this forum, I do search others sources (including google, phpbuilder, phpfreaks, sf.net, ,php.net,...) and I believe that others do too. So I think that this is the worst kind of comment or suggestion someone can receive.

Sorry everybody.

Regards,
Bruno B B Magalhães

--- End Message ---
--- Begin Message ---
Alessandro Rosa wrote:

> How about coding an automatic responder via PHP ?

Anybody ever done that using qmail?

--- End Message ---
--- Begin Message ---
Thank you for all responses about this topic.

I would also solve a more practical doubt finally: if I use
for example the PHP code 'POP3class', as suggested by
Manuel Lemos, it's implicitly meant that it should run periodically
on a web-server (for example, under a timer of a given number
of seconds), don't you?

Example: check pop3 mailbox every 5 secs by php code and
then perform all the required actions.

Alessandro Rosa

--- End Message ---
--- Begin Message --- Alessandro Rosa wrote:
Thank you for all responses about this topic.

I would also solve a more practical doubt finally: if I use
for example the PHP code 'POP3class', as suggested by
Manuel Lemos, it's implicitly meant that it should run periodically
on a web-server (for example, under a timer of a given number
of seconds), don't you?

Example: check pop3 mailbox every 5 secs by php code and
then perform all the required actions.

Yes, but perhaps every 5 minutes. You have to solve this too, either cron job if you have it available or it can be trigered by user http requests (not very reliable).
--- End Message ---
--- Begin Message ---
You just need to get the HTTP_ACCEPT_LANGUAGE environment variable and see
the order of the prefered languages.

After that, you see if you have a translation for the first language, if the
site doesn't have it, try for the next language, and so on.

Teddy

----- Original Message ----- 
From: "Alessandro Rosa" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, November 27, 2004 3:14 PM
Subject: [PHP] automatic responder


Thank you for all responses about this topic.

I would also solve a more practical doubt finally: if I use
for example the PHP code 'POP3class', as suggested by
Manuel Lemos, it's implicitly meant that it should run periodically
on a web-server (for example, under a timer of a given number
of seconds), don't you?

Example: check pop3 mailbox every 5 secs by php code and
then perform all the required actions.

Alessandro Rosa

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

--- End Message ---
--- Begin Message ---
We would like to identify the country of the people who connect to our
website / portal using php. The idea is to provide them directly with the
homepage in their language.

Is that possible? Has anybody ever doen anything like that using php?

We are using php 4.3.x on a Debian server (stable, with some tweaking).

--- End Message ---
--- Begin Message ---
Hi,

I believe you can detect via the browser settings which language the user is
using and then display the correct page depending on this. The PHP.net web
site itself does this in some form whether or not by my suggested method I
do not know, but it uses some form of detection to direct the user to the
appropriate mirror web site.

HTH

============================================
Adrian Portsmouth
.htaccess Manager - SilkPHP
[e] [EMAIL PROTECTED]
[w] www.htaccessmanager.com
============================================

This email, its contents and attachments are confidential and may be covered
by legal privilege.  This email contains information intended only for the
person(s) and/or entity named above. The views and opinions expressed are
those of the sender and not necessarily those of SilkPHP or its affiliates.
Any other distribution, copying, review, use or disclosure is strictly
prohibited. If you are not the intended recipient, please delete this
message and any attachments without making a copy and advise the sender by
return email - thank you.

This mail and any attachments have been scanned for viruses prior to leaving
the SilkPHP network. SilkPHP will not be liable for direct, special,
indirect or consequential damages arising from alteration of the contents of
this message by a third party or as a result of any virus being passed on.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: 27 November 2004 12:36
To: [EMAIL PROTECTED]
Subject: [PHP] identifying the country of the people who connect to web site
/ portal

We would like to identify the country of the people who connect to our
website / portal using php. The idea is to provide them directly with the
homepage in their language.

Is that possible? Has anybody ever doen anything like that using php?

We are using php 4.3.x on a Debian server (stable, with some tweaking).

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

--- End Message ---
--- Begin Message ---
Hi,

course you can, you should search harder for it, but I will facilitate for you! :o)

http://www.phpclasses.org/browse/package/1477.html

Best Regards,
Bruno B B Magalhães

--- End Message ---
--- Begin Message ---
Hello, 

I was reading the book "Programming PHP" (O'Reilly) and
searching the PHP docs but have not found the answer,
how to get the Web-Clients prefered Languages.

I was thinking it is in the $_SERVER Variable but nothing.

Thanks
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/88452356    67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature


--- End Message ---
--- Begin Message --- Michelle Konzack wrote:
Hello,

I was reading the book "Programming PHP" (O'Reilly) and
searching the PHP docs but have not found the answer,
how to get the Web-Clients prefered Languages.

I was thinking it is in the $_SERVER Variable but nothing.

Thanks
Michelle


You were not looking well, or your browser did not send it.

$_SERVER['HTTP_ACCEPT_LANGUAGE']
--- End Message ---
--- Begin Message ---
Hi Michelle,

I believe you can detect it from the $_SERVER['HTTP_ACCEPT_LANGUAGE']
superglobal.

There is a good thread on this topic at:
http://forums.postnuke.com/index.php?name=PNphpBB2&file=viewtopic&t=32841

Which might be of assistance to you.

============================================
Adrian Portsmouth
.htaccess Manager - SilkPHP
[e] [EMAIL PROTECTED]
[w] www.htaccessmanager.com
============================================

This email, its contents and attachments are confidential and may be covered
by legal privilege.  This email contains information intended only for the
person(s) and/or entity named above. The views and opinions expressed are
those of the sender and not necessarily those of SilkPHP or its affiliates.
Any other distribution, copying, review, use or disclosure is strictly
prohibited. If you are not the intended recipient, please delete this
message and any attachments without making a copy and advise the sender by
return email - thank you.

This mail and any attachments have been scanned for viruses prior to leaving
the SilkPHP network. SilkPHP will not be liable for direct, special,
indirect or consequential damages arising from alteration of the contents of
this message by a third party or as a result of any virus being passed on.

-----Original Message-----
From: Michelle Konzack [mailto:[EMAIL PROTECTED] 
Sent: 27 November 2004 13:30
To: [EMAIL PROTECTED]
Subject: [PHP] How to detect the prefered languages of Web-Clients?

Hello, 

I was reading the book "Programming PHP" (O'Reilly) and searching the PHP
docs but have not found the answer, how to get the Web-Clients prefered
Languages.

I was thinking it is in the $_SERVER Variable but nothing.

Thanks
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/88452356    67100 Strasbourg/France   IRC #Debian (irc.icq.com)

--- End Message ---
--- Begin Message ---
Hello Marek, 

Am 2004-11-27 14:46:20, schrieb Marek Kilimajer:
> Michelle Konzack wrote:
> >Hello, 
> >
> >I was reading the book "Programming PHP" (O'Reilly) and
> >searching the PHP docs but have not found the answer,
> >how to get the Web-Clients prefered Languages.
> >
> >I was thinking it is in the $_SERVER Variable but nothing.
> >
> >Thanks
> >Michelle
> >
> 
> You were not looking well, or your browser did not send it.

Not right, because curently I have only Mailaccess to the Internet
and browsing <http://www.php.net/> with Lynx is a horror. 

The book "Programming PHP" (O'Reilly) is from Marchg 2002 and
between the Pages 160-162 (Server Informations) there is no
description of it.

> $_SERVER['HTTP_ACCEPT_LANGUAGE']

Thanks and now it works...

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/88452356    67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature


--- End Message ---
--- Begin Message ---
Hello Adrian, 

Am 2004-11-27 13:52:30, schrieb Adrian Portsmouth:
> Hi Michelle,
> 
> I believe you can detect it from the $_SERVER['HTTP_ACCEPT_LANGUAGE']
> superglobal.
> 
> There is a good thread on this topic at:
> http://forums.postnuke.com/index.php?name=PNphpBB2&file=viewtopic&t=32841

Curenly I can only access the web with 'lynx' and
do you have already tried it with ?  -  It is a nightmare...

> Which might be of assistance to you.

Maybe with Windows but not on a Linux console
which is my second home for many years.

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/88452356    67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature


--- End Message ---
--- Begin Message --- Michelle Konzack wrote:
Hello Marek,

Am 2004-11-27 14:46:20, schrieb Marek Kilimajer:

Michelle Konzack wrote:

Hello,

I was reading the book "Programming PHP" (O'Reilly) and
searching the PHP docs but have not found the answer,
how to get the Web-Clients prefered Languages.

I was thinking it is in the $_SERVER Variable but nothing.

Thanks
Michelle


You were not looking well, or your browser did not send it.


Not right, because curently I have only Mailaccess to the Internet
and browsing <http://www.php.net/> with Lynx is a horror.

Yes, I was using lynx as my main browser for about 2 years at my school :-) (windows machines were always taken).

Have you tried links?
--- End Message ---
--- Begin Message ---
Am 2004-11-27 15:27:29, schrieb Marek Kilimajer:

> Yes, I was using lynx as my main browser for about 2 years at my school 
> :-) (windows machines were always taken).

This makes you an Hard-Core Console $USER :-)
I use lynx since DOS...

> Have you tried links?

Yes, but not found the right answer...

And then some links in the php.net site are broken...
Have tried to download the php_manual_en.html.gz from
a French mirror and gotten a Server Parse Error. 

fr.php.net is working...

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/88452356    67100 Strasbourg/France   IRC #Debian (irc.icq.com)

Attachment: signature.pgp
Description: Digital signature


--- End Message ---
--- Begin Message --- Michelle Konzack wrote:
Have you tried links?


Yes, but not found the right answer...

And then some links in the php.net site are broken...
Have tried to download the php_manual_en.html.gz from
a French mirror and gotten a Server Parse Error.

fr.php.net is working...

I meant links browser :-)

http://links.sourceforge.net/
--- End Message ---
--- Begin Message ---
On Sat, Nov 27, 2004 at 03:20:45PM +0100, Michelle Konzack wrote:
> Curenly I can only access the web with 'lynx' and
> do you have already tried it with ?  -  It is a nightmare...

There is a lynx friendly version of the documentation at

        http://www.php.net/manual/en/print/index.php

/GM

--- End Message ---
--- Begin Message --- Does anyone has a solid benchmark about comments speed.. I mean, too many comments will decrease speed of the PHP scripts...

I've tried without success using a class, and also a simple micro-time operation... Well, cause the file is evaluated before it is executed, I didn't had success.

Any idea?

Regards,
Bruno B B Magalhaes
--- End Message ---

Reply via email to