Re: [PHP] auto refresh once

2005-03-02 Thread Bret Hughes
On Wed, 2005-03-02 at 01:55, William Stokes wrote: Hello, Is it possible to force one automatic refresh browser when user enters to a webpage? If so, how? javascript timer and a reload in a function called vi body onLoad wouldd do it I guess. if you are only going to do it once you need

Re: [PHP] auto refresh once

2005-03-02 Thread Devraj Mukherjee
Hi Will, Automatic refresh can be achieved by the use of a META tag. The meta tag looks like the following, where the 5 is the number of seconds, the URL is obviously the page. meta http-equiv=REFRESH CONTENT=5; URL=http://www.url.com/; To refresh all you do is send the META tag out as part of

RE: [PHP] auto refresh once

2005-03-02 Thread yangshiqi
I can't guess your purpose, but may be you can do it like this. function refreshByOnce() { $isVisit = isset($_SESSION['isVisit'])?$_SESSION['isVisit']:false; If (!$isVisit) { $_SESSION['isVisit'] = true;

Re: [PHP] auto refresh once

2005-03-02 Thread Burhan Khalid
William Stokes wrote: Hello, Is it possible to force one automatic refresh browser when user enters to a webpage? If so, how? Use the header() function. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Setting cookie on first visit

2005-03-02 Thread Tom Whitbread
I am using a cookie to detect what skin a user wants to display. The problem is if a user visits the site for the first time the cookie is not being set. I am detecting if its being set or not with if(!isset($_COOKIE['skin'])){ ... } It's not setting the cookie untill a user refreshes the page

Re: [PHP] _POST not working (using mini_httpd) - 2 attachments

2005-03-02 Thread overbored
[EMAIL PROTECTED] (Richard Lynch) wrote in news:[EMAIL PROTECTED]: overbored wrote: Hi all, I'm learning PHP and I'd need to create a simple Web-based ifconfig tool for a Soekris box (running Pebble). However, I've been unsuccessful at getting PHP working with mini_httpd. In particular,

RE: [PHP] Setting cookie on first visit

2005-03-02 Thread yangshiqi
When the user first visits your site, there is no skin in your cookie. Then you can give a default value. And after the user modifies his/her profile, you can set it to the cookie. So I don't think it is a problem of setting cookie. Best regards, Yang Shiqi -Original Message-

Re: [PHP] PHP slowness

2005-03-02 Thread Markus Mayer
I'm a little bit late in on this one, and asking questions after the problem is solved is a bit academic, but I am curious about one thing - Does the debian package do reverse lookups to try to get a name for the visiting IP address? Every page request taking 5 seconds sounds like a name

[PHP] Re: Authentication fails

2005-03-02 Thread John Swartzentruber
On 3/1/2005 3:52 PM John Swartzentruber wrote: On 3/1/2005 2:12 PM Jason Barnett wrote: John Swartzentruber wrote: Somehow my PHP 5.0.3 or something is configured incorrectly. When I try to get past an authentication input, nothing happens. For example, I have phpMyAdmin configured now to use

[PHP] Re: Authentication fails

2005-03-02 Thread Jason Barnett
I've got some more information and I hope someone can help me figure out the problem. I changed my original PHP program so that the form action script is a different script. In that file, I just do a var_dump on $_POST and $_SERVER. When I do that, it looks like all of the data comes

[PHP] Re: patch to php 4.3.10 to disabling URL wrappers in include like statements

2005-03-02 Thread Jason Barnett
Tom Z. Meinlschmidt wrote: Hi, I've experienced a lot of attacks in my hosting server due to silly users and their scripts with holes. So I prepared this little patch to 4.3.10, which disables using url wrappers in include/include_once/require/require_once statemens (switchable in php.ini).

[PHP] Delete last 15 chars from a file

2005-03-02 Thread Shaun
Hi, I am trying to create an XML file, it will be done in stages so if the file isn't present I will add the line: ?xml version=1.0 ? root_element Then for each line I add I add the following child_elementdatachild_element But for various reasons the application won't know when

Re: [PHP] Spam and this list

2005-03-02 Thread AdamT
On Tue, 01 Mar 2005 11:11:47 -0500, bob [EMAIL PROTECTED] wrote: Well, this time it took just 11 days to get my first bit of spam from this mailing list. Do you mean the spam was from php-general@lists.php.net ? Or do you mean that you know for sure that your address was harvested from this

Re: [PHP] [NEWBIE] How to allow for a href tags but no others? [SOLVED]

2005-03-02 Thread Dave
Alberto, Thank you for your explanation and your example code. I think this is how I am going to go forward in allowing my users to input links. Your time in replying is much appreciated. Dave -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] PHP5 DOM - DomDocumentFragments empty

2005-03-02 Thread Tobias Tom
Hi, I've a Problem with the DOM Extension in PHP5. I simply want to create a DocumentFragment which can be used in ImportNode for Example. I now that the code beyond may look a little bit strange, but I've simplyfied it as much as it was possible. The Code should print the Contents of the the

[PHP] Re: sql query

2005-03-02 Thread M. Sokolewicz
! is a logical NOT operator. It simply turns true = false, and false = true. So, what you have is: $a = true; if($a) { echo 'true'; } else { echo 'false'; } if(!$a) { echo 'false!'; } else { echo 'true!'; } In these 2 cases, it will echo true and true! More info

Re: [PHP] patch to php 4.3.10 to disabling URL wrappers in include like statements

2005-03-02 Thread Markus Mayer
Correct me if I'm wrong, but isn't this already available in the standard PHP? In the php.ini file, you can refuse the inclusion of url's : allow_url_fopen = Off I think also Hardened PHP offers additional similar protections. Markus On Wednesday 02 March 2005 08:57, Tom Z.

[PHP] Re: Delete last 15 chars from a file

2005-03-02 Thread M. Sokolewicz
Shaun wrote: Hi, I am trying to create an XML file, it will be done in stages so if the file isn't present I will add the line: ?xml version=1.0 ? root_element Then for each line I add I add the following child_elementdatachild_element But for various reasons the application won't

Re: [PHP] How can I secure database passwords used by PHP

2005-03-02 Thread Jason Barnett
Who are these other webpage maintainers and why do they have access to your PHP source code? This isn't a PHP issue. The MySQL password has to be in a file as plain text; there's no getting around that (as recently discussed on here). Your issue is controlling access to the machine and the files,

[PHP] sql query

2005-03-02 Thread William Stokes
Hello Can someone explain this to me. I don't know how to read this. if (!$variable = mysql_query(select id,sessid from users where ... What is this if(! I mean the ! sign. Thanks -Will -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] combining values

2005-03-02 Thread Ford, Mike
-Original Message- From: Bret Hughes Sent: 01/03/05 18:43 On Tue, 2005-03-01 at 11:44, Sascha Kaufmann wrote: $birthday = $day.'.'.$month.'.'.$year; why wouldn't $birthday = $day.$month.$year; work as well. --- It would -- which to use is a matter of

[PHP] Mistaken Identity - Was: Anti-password trading/sharing solutions

2005-03-02 Thread Dan Tappin
Please note that my name is DAN TAPPIN not DAN TRAINOR [EMAIL PROTECTED]. Although our last names start with the same letter you will note that the following characters and our email addresses are different. Please double check your facts before you open your big fat ranting mouths. Dan

Re: [PHP] How can I secure database passwords used by PHP webpages

2005-03-02 Thread Dan Tappin
The best way is to not store the password at all. Store a hash of the password like this: INSERT INTO users SET pass = MD5('password'); Now not knowing how you authenticate those passwords this might not work. If it's an internal web page via PHP all you do is MD5 the users supplied password

Re: [PHP] Re: patch to php 4.3.10 to disabling URL wrappers in include like statements

2005-03-02 Thread Jason Wong
On Wednesday 02 March 2005 22:03, Jason Barnett wrote: Tom Z. Meinlschmidt wrote: which disables using url wrappers in include/include_once/require/require_once statemens (switchable in http://php.net/manual/en/ini.php#ini.list allow_url_fopen = 0 I haven't had a look at the patch in

[PHP] Re: Authentication fails

2005-03-02 Thread John Swartzentruber
On 3/2/2005 9:22 AM Jason Barnett wrote: On the other hand, when the form action script is the *same* script that contains the form, when I do the same var_dumps, the data does *not* have any $_POST data. Also, the _SERVER[REQUEST_METHOD] is GET, not POST in this instance. My suspicion was that

[PHP] php-general-unsubscribe@lists.php.net

2005-03-02 Thread Raúl Castro Marín
- Original Message - From: yangshiqi [EMAIL PROTECTED] To: 'Tom Whitbread' [EMAIL PROTECTED]; 'php-general lists' php-general@lists.php.net Sent: Wednesday, March 02, 2005 4:36 AM Subject: RE: [PHP] Setting cookie on first visit When the user first visits your site, there is no skin in

Re: [PHP] patch to php 4.3.10 to disabling URL wrappers in include like statements

2005-03-02 Thread Bostjan Skufca @ domenca.com
From system security's standpoint: ?php $content = file_get_contents('http://www.domain.net/file.inc'); echo $content; ? is OK, but ?php include('http://www.domain.net/file.inc'); ? is NOT! Nice patch, Tom, will probably use it myself too... regards, Bostjan On Wednesday 02 March 2005

[PHP] Connecting to a AS/400?

2005-03-02 Thread Frank Arensmeier
Hello! Is there anyone who has some experience in connecting to a IBM AS/400 server with PHP? Any ideas where to start? Regards, Frank Frank Arensmeier Marketing Support NIKE HYDRAULICS AB Box 1107 631 80 Eskilstuna Sweden tel +46 16 82 34 fax +46

Re: [PHP] combining values

2005-03-02 Thread M. Sokolewicz
Mike Ford wrote: -Original Message- From: Bret Hughes Sent: 01/03/05 18:43 On Tue, 2005-03-01 at 11:44, Sascha Kaufmann wrote: $birthday = $day.'.'.$month.'.'.$year; why wouldn't $birthday = $day.$month.$year; because it does work aswell work as well. --- It

Re: [PHP] sql query

2005-03-02 Thread Jason Petersen
On Wed, 2 Mar 2005 13:02:39 +0200, William Stokes [EMAIL PROTECTED] wrote: Hello Can someone explain this to me. I don't know how to read this. if (!$variable = mysql_query(select id,sessid from users where ... What is this if(! This is a way to run a SQL query, capture the return

[PHP] mailserver logfile analyser

2005-03-02 Thread woldhekkie
Our mailserver writes a logfile every day, but it takes hours to analyse it manualy. I (newby) am trying to write a php script that reads the the logfile line by line and try to get a top 50 of spammers/clients that mail too much... I can get line by line all information like email-adres, from

Re: [PHP] Setting cookie on first visit

2005-03-02 Thread Dan Tappin
The manual detail this issue: http://ca.php.net/setcookie You can't see the cookie until you hit the next page. There is no way view the newly set cookie. Dan Tappin On Mar 2, 2005, at 2:18 AM, Tom Whitbread wrote: I am using a cookie to detect what skin a user wants to display. The problem is

[suspicious - maybe spam] [PHP] [suspicious - maybe spam] Re: [PHP] Connecting to a AS/400?

2005-03-02 Thread Dan Tappin
You need to clearer on 'connecting to' . Do you mean FTP, MySQL etc??? Dan Tappin On Mar 2, 2005, at 8:54 AM, Frank Arensmeier wrote: Hello! Is there anyone who has some experience in connecting to a IBM AS/400 server with PHP? Any ideas where to start? Regards, Frank

[PHP] update of mysql to 4.1

2005-03-02 Thread Peter
Hi, i'm thinking of updating my mysql-server from 3.23 to 4.1.10, and i can't find any serious information if i would have to rebuild php too. anybody tryed this already?? system: debian linux, apache 1.3.31, php 4.3.9, mysql 3.23.52 thanks peter -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] Re: patch to php 4.3.10 to disabling URL wrappers in include like statements

2005-03-02 Thread Tom Z Meinlschmidt
Tell me - how do you want to turn off remote includes and remain remote file working? allow_url_fopen turns off _both_. There's no choice what to disable tom Jason Barnett wrote: Tom Z. Meinlschmidt wrote: Hi, I've experienced a lot of attacks in my hosting server due to silly users and their

RE: [PHP] How can I secure database passwords used by PHP webpages

2005-03-02 Thread Chris W. Parker
Dan Tappin mailto:[EMAIL PROTECTED] on Wednesday, March 02, 2005 7:32 AM said: The best way is to not store the password at all. Store a hash of the password like this: INSERT INTO users SET pass = MD5('password'); Now not knowing how you authenticate those passwords this might not

[PHP] update of mysql to 4.x

2005-03-02 Thread Peter
Hi, i'm thinking of updating my mysql-server from 3.23 to 4.1.10, and i can't find any serious information if i would have to rebuild php too. anybody tryed this already?? system: debian linux, apache 1.3.31, php 4.3.9, mysql 3.23.52 thanks peter -- PHP General Mailing List (http://www.php.net/)

Re: [PHP] update of mysql to 4.x

2005-03-02 Thread John Nichel
Peter wrote: Hi, i'm thinking of updating my mysql-server from 3.23 to 4.1.10, and i can't find any serious information if i would have to rebuild php too. anybody tryed this already?? system: debian linux, apache 1.3.31, php 4.3.9, mysql 3.23.52 thanks peter Please don't spam the list with

Re: [PHP] Open source portal systems???

2005-03-02 Thread Judson Vaughn
I recommend Mambo or Geeklog. They aren't overdone and pretty easy to implement. Best of all, they are free. Jud. Judson Vaughn [EMAIL PROTECTED] | [EMAIL PROTECTED] Seiter Vaughn Communications 12455 Plowman Court Herndon, VA 20170 703.450.9740 svc Kostyantyn Shakhov wrote: I've got an order

[PHP] Bypassing php.ini setting for file uploads?

2005-03-02 Thread Matt Cassarino
Hi, I am trying to modify the php.ini settings for post_max_size and upload_max_filesize to allow for a custom script to upload files larger than 8MB, the default size limit set in php.ini. This is on a shared server, and my hosting company won't modify the limitation, although they will

[PHP] Download with header() - file corrupted

2005-03-02 Thread Werner Jäger
I try to download a file wit follow code: $len = filesize($file); $filename = basename($file); header(Pragma: public); header(Expires: 0); header(Cache-Control: must-revalidate, post-check=0, pre-check=0); header(Cache-Control: public); header(Content-Description: File

[PHP] FREETYPE and GD

2005-03-02 Thread Aaron Todd
Hello, I've created a simple script that takes in image and draws some lines and some text on top of it. I am having a problem with the text part of this. When the string that I am drawing on the image contains and apostrophe ( ' ) there is always a backslash ( \ ) before it. It make sense

Re: [PHP] Re: PHP 5.1 CVS Interface Question

2005-03-02 Thread Gavin Roy
Stolen from a oo reference site (who's URL I no longer have handy): An object interface--or simply interface--defines methods that can be implemented by a class. Interfaces are declared like classes, but cannot be directly instantiated and do not have their own method definitions. Rather, it is

Re: [PHP] php DBMS

2005-03-02 Thread Gerben
Thanks for all your responses, but I think I wasn't clear enough of my intentions. Actually, that what I'm looking for; A database engine written in PHP. I know this is not the most effecient way, but I'm not planning to use it for heavy weight database-driven-application. I just want a way to

Re: [PHP] sql query

2005-03-02 Thread William Stokes
OK got that. Thanks... Jason Petersen [EMAIL PROTECTED] kirjoitti viestissä:[EMAIL PROTECTED] On Wed, 2 Mar 2005 13:02:39 +0200, William Stokes [EMAIL PROTECTED] wrote: Hello Can someone explain this to me. I don't know how to read this. if (!$variable = mysql_query(select id,sessid

Re: [PHP] FREETYPE and GD

2005-03-02 Thread Richard Lynch
Aaron Todd wrote: I've created a simple script that takes in image and draws some lines and some text on top of it. I am having a problem with the text part of this. When the string that I am drawing on the image contains and apostrophe ( ' ) there is always a backslash ( \ ) before it. It

Re: [PHP] Download with header() - file corrupted

2005-03-02 Thread Richard Lynch
Werner Jäger wrote: I try to download a file wit follow code: $len = filesize($file); $filename = basename($file); header(Pragma: public); header(Expires: 0); header(Cache-Control: must-revalidate, post-check=0, pre-check=0); header(Cache-Control: public); Is it

RE: [PHP] php DBMS

2005-03-02 Thread Chris W. Parker
Gerben mailto:[EMAIL PROTECTED] on Wednesday, March 02, 2005 10:22 AM said: Thanks for all your responses, but I think I wasn't clear enough of my intentions. Actually, that what I'm looking for; A database engine written in PHP. Even if something like this did exist why would you want it

Re: [PHP] Bypassing php.ini setting for file uploads?

2005-03-02 Thread Ian Firla
There're all kinds of threads on this if you google around for a bit but one good on in my bookmarks is: http://www.webdevforums.com/showthread.php?t=7231 Ian On Wed, 2005-03-02 at 09:39 -0800, Matt Cassarino wrote: Hi, I am trying to modify the php.ini settings for post_max_size and

Re: [PHP] Bypassing php.ini setting for file uploads?

2005-03-02 Thread Richard Lynch
Matt Cassarino wrote: I am trying to modify the php.ini settings for post_max_size and upload_max_filesize to allow for a custom script to upload files larger than 8MB, the default size limit set in php.ini. This is on a shared server, and my hosting company won't modify the limitation,

RE: [PHP] php DBMS

2005-03-02 Thread Chris W. Parker
Chris W. Parker on Wednesday, March 02, 2005 10:38 AM said: Gerben mailto:[EMAIL PROTECTED] on Wednesday, March 02, 2005 10:22 AM said: Thanks for all your responses, but I think I wasn't clear enough of my intentions. Actually, that what I'm looking for; A database engine written

Re: [PHP] Connecting to a AS/400?

2005-03-02 Thread Richard Lynch
Frank Arensmeier wrote: Is there anyone who has some experience in connecting to a IBM AS/400 server with PHP? Any ideas where to start? I know somebody reported success back in the day on this list... Actually, it's so far back in the day, it just might be on the predecessor to this list,

Re: [PHP] Re: patch to php 4.3.10 to disabling URL wrappers in include like statements

2005-03-02 Thread Richard Lynch
Tom Z Meinlschmidt wrote: Tell me - how do you want to turn off remote includes and remain remote file working? Change the PHP source? That's the only viable answer I can think of; though I doubt it's one you want to hear/use. Sorry. allow_url_fopen turns off _both_. There's no choice what

Re: [PHP] patch to php 4.3.10 to disabling URL wrappers in include like statements

2005-03-02 Thread Richard Lynch
Bostjan Skufca @ domenca.com wrote: From system security's standpoint: ?php $content = file_get_contents('http://www.domain.net/file.inc'); echo $content; ? is OK, but ?php include('http://www.domain.net/file.inc'); ? is NOT! Nice patch, Tom, will probably use it myself too...

[PHP] Document root, preferred way to find it???

2005-03-02 Thread Al
I've been using in my scripts $_SERVER['DOCUMENT_ROOT'] to find the base path for includes, etc. We just moved the site to a new virtual host and it doesn't work. print_r() gives me: $_SERVER['document_root']= /usr/local/apache/htdocs $_SERVER['path_translated']= /home/user/public_html/ What

[PHP] PHP Sessions?

2005-03-02 Thread rory walsh
Hi everyone, I am trying to work with the idea of sessions in PHP. Basically I have a self-processing script called index.php but somehow I keep losing my session variable, it works the first time around but when I call it the second time around its gone? I do not reset the variable or destroy

Re: [PHP] mailserver logfile analyser

2005-03-02 Thread Richard Lynch
woldhekkie wrote: Our mailserver writes a logfile every day, but it takes hours to analyse it manualy. I (newby) am trying to write a php script that reads the the logfile line by line and try to get a top 50 of spammers/clients that mail too much... I can get line by line all information

Re: [PHP] Connecting to a AS/400?

2005-03-02 Thread Frank Arensmeier
Richard, you are my man! Thank you for the hints you gave me. I will do some digging in the list archives tonight. Thank you. /frank 2005-03-02 kl. 19.57 skrev Richard Lynch: Frank Arensmeier wrote: Is there anyone who has some experience in connecting to a IBM AS/400 server with PHP? Any ideas

Re: [PHP] Re: Authentication fails

2005-03-02 Thread Richard Lynch
On the other hand, when the form action script is the *same* script that contains the form, when I do the same var_dumps, the data does *not* have any $_POST data. Also, the _SERVER[REQUEST_METHOD] is GET, not POST in this instance. My suspicion was that this was what had happened as well,

Re: [PHP] Re: Authentication fails

2005-03-02 Thread Richard Lynch
I've got some more information and I hope someone can help me figure out the problem. I changed my original PHP program so that the form action script is a different script. In that file, I just do a var_dump on $_POST and $_SERVER. When I do that, it looks like all of the data comes through

Re: [PHP] Logging with PHP to SMTP server

2005-03-02 Thread Richard Lynch
kioto wrote: Richard Lynch wrote: kioto wrote: Hi all, there is a way to create log-system to authenticate to smtp server ? I don't understand the log-system part of this... You can authenticate to SMTP, depending on what the SMTP server considers suitable credentials. And you could write

Re: [PHP] Re: patch to php 4.3.10 to disabling URL wrappers in include like statements

2005-03-02 Thread Jason Wong
On Thursday 03 March 2005 03:04, Richard Lynch wrote: Tom Z Meinlschmidt wrote: Tell me - how do you want to turn off remote includes and remain remote file working? Change the PHP source? That's the only viable answer I can think of; though I doubt it's one you want to hear/use.

Re: [PHP] Setting cookie on first visit

2005-03-02 Thread Richard Lynch
Tom Whitbread wrote: I am using a cookie to detect what skin a user wants to display. The problem is if a user visits the site for the first time the cookie is not being set. I am detecting if its being set or not with if(!isset($_COOKIE['skin'])){ ... } It's not setting the cookie untill a

Re: [PHP] Connecting to a AS/400?

2005-03-02 Thread Stephen Johnson
According to Larry Hotchkiss on Jan 31,2001 Quote Its my understanding that you use the odbc functions to access db/2 400. I also recall reading that the db2/400 functionality is true db2 functionality and does not use the generic odbc layer even though it is grouped in. Apparently its smart

Re: [PHP] update of mysql to 4.x

2005-03-02 Thread Peter
sorry, i googled again, read nearly every post wich containes mysql and upgrade but i can't find a useful answer in this list. perhaps its me... so my question is still the same, would i have to recompile php or not peter @NG what means need? nobody needs an internet,using mysql4 would just

Re: [PHP] How can I secure database passwords used by PHP webpages

2005-03-02 Thread Richard Lynch
Rob Tanner wrote: We're a four year college. Some maintainers are faculty, some are staff and some are work-study (students) and centrally we have little say over who can and can't. You can put super crucial username/passwords into httpd.conf or root-readable files that get included into

Re: [PHP] Re: Authentication fails

2005-03-02 Thread John Swartzentruber
On 3/2/2005 2:29 PM Richard Lynch wrote: I've got some more information and I hope someone can help me figure out the problem. I changed my original PHP program so that the form action script is a different script. In that file, I just do a var_dump on $_POST and $_SERVER. When I do that, it looks

Re: [PHP] update of mysql to 4.x

2005-03-02 Thread Marek Kilimajer
Peter wrote: sorry, i googled again, read nearly every post wich containes mysql and upgrade but i can't find a useful answer in this list. perhaps its me... so my question is still the same, would i have to recompile php or not No, you don't. However, mysql = 4.1 uses new authentication

RE: [PHP] Document root, preferred way to find it???

2005-03-02 Thread Chris W. Parker
Al mailto:[EMAIL PROTECTED] on Wednesday, March 02, 2005 11:22 AM said: I've been using in my scripts $_SERVER['DOCUMENT_ROOT'] to find the base path for includes, etc. We just moved the site to a new virtual host and it doesn't work. print_r() gives me: $_SERVER['document_root']=

Re: [PHP] Supporting Cancel

2005-03-02 Thread Richard Lynch
Dan Tappin wrote: To be honest the real answer will be unpopular but since the old system is unusable, not maintainable it should be replaced. I think if you estimated the time / cost to rebuild the system from scratch it would still be the better than trying to continue with this PITA

[PHP] Re: PHP5 DOM - DomDocumentFragments empty

2005-03-02 Thread Jason Barnett
Here is a modified version of the code that you posted that should explain it. ?php $xmlData = XMLDATA ?xml version=1.0 encoding=ISO-8859-1 ? root subElementcontent/subElement /root XMLDATA; $dom = new DomDocument; $dom-loadXML( $xmlData ); $dom2 = new DomDocument; $fragment =

[PHP] loggin into linux account

2005-03-02 Thread Vaibhav Sibal
Hi, The scenario is, I made a login interface wherein i accept usernames and passwords from users and after comparing them to a database I log them in. The server runs Linux Fedora Core 2. Now I want to know whether there can be a scenario wherein I can make the logged in user have access to

Re: [PHP] update of mysql to 4.x

2005-03-02 Thread John Nichel
Peter wrote: sorry, i googled again, read nearly every post wich containes mysql and upgrade but i can't find a useful answer in this list. perhaps its me... so my question is still the same, would i have to recompile php or not peter @NG what means need? nobody needs an internet,using mysql4

RE: [PHP] PHP Sessions?

2005-03-02 Thread Chris W. Parker
rory walsh mailto:[EMAIL PROTECTED] on Wednesday, March 02, 2005 11:19 AM said: ?php if($_POST[username]==rory){//if user logs in as rory start session session_start(); header(Cache-control: private); $_SESSION['loggedin'] = yes; } Put session_start(); at the *very* beginning of your

Re: [PHP] Catalog or cart

2005-03-02 Thread Robby Russell
On Wed, 2005-03-02 at 02:45 -0800, Ryan A wrote: Hey all, I have a client who has a computer store, now he wants to put all his stuff in one site. He does not want to do any selling from his site, but just list all his items. After looking via google and the the usual script sites, agora

Re: [PHP] FREETYPE and GD

2005-03-02 Thread Aaron Todd
BEAUTIFUL Thats exactly what I was looking for. I'm not doing anything with MySQL so I am going to leave Magic Quotes on and just use stripslashes() Thanks a bunch. Richard Lynch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Aaron Todd wrote: I've created a simple script

Re: [PHP] PHP Sessions?

2005-03-02 Thread rory walsh
The problem there is that I have to test if the user has logged on so I need to include the if statement? Can the session_start not be called from within an if statement? Does it really have to be the very first thing in the script, if so I imagine that this means a single script cannot be

RE: [PHP] Catalog or cart

2005-03-02 Thread Chris W. Parker
Robby Russell mailto:[EMAIL PROTECTED] on Wednesday, March 02, 2005 1:15 PM said: Very flexible and runs on PostgreSQL. http://www.pgcart.com/ And yadda yadda yadda, I'm tired today, said the elephant. Chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] PHP Sessions?

2005-03-02 Thread Chris W. Parker
rory walsh mailto:[EMAIL PROTECTED] on Wednesday, March 02, 2005 1:26 PM said: The problem there is that I have to test if the user has logged on so I need to include the if statement? Can the session_start not be called from within an if statement? Does it really have to be the very

Re: [PHP] PHP Sessions?

2005-03-02 Thread rory walsh
Yes I see what you mean. I only wanted to start a session IF the user logged in, but I see your point, the session can be started as soon as anyone opens the main page. I'll give it a go and see if that helps, cheers, Rory. Chris W. Parker wrote: rory walsh mailto:[EMAIL PROTECTED] on

Re: [PHP] Catalog or cart

2005-03-02 Thread Robby Russell
On Wed, 2005-03-02 at 13:15 -0800, Robby Russell wrote: On Wed, 2005-03-02 at 02:45 -0800, Ryan A wrote: Very flexible and runs on PostgreSQL. http://www.pgcart.com/ Oops, forgot to provide link for an example of it in production: - http://www.johnbenzart.com/ -Robby --

Re: [PHP] PHP Sessions?

2005-03-02 Thread Jochem Maas
rory walsh wrote: The problem there is that I have to test if the user has logged on so I need to include the if statement? there are 2 tests to do: 1. check to see whether the user is logged on already 2. check to see whether the user is trying to log on Can the session_start not be called

Re: [PHP] Setting cookie on first visit

2005-03-02 Thread The Disguised Jedi
Why not use sessions instead? us2.php.net/session On Wed, 2 Mar 2005 11:42:02 -0800 (PST), Richard Lynch [EMAIL PROTECTED] wrote: Tom Whitbread wrote: I am using a cookie to detect what skin a user wants to display. The problem is if a user visits the site for the first time the cookie is

Re: [PHP] PHP Sessions?

2005-03-02 Thread rory walsh
Thanks everyone, I'm getting closer. The only problem I have not is that I keep entering that test, I modified it to change the session variable once we enter the test but it somehow does not seem to change it? This is the code, if(strlen($_SESSION['loggedin']==yes)){

Re: [PHP] loggin into linux account

2005-03-02 Thread Richard Lynch
Vaibhav Sibal wrote: The scenario is, I made a login interface wherein i accept usernames and passwords from users and after comparing them to a database I log them in. The server runs Linux Fedora Core 2. Now I want to know whether there can be a scenario wherein I can make the logged in user

Re: [PHP] Re: Authentication fails

2005-03-02 Thread Richard Lynch
John Swartzentruber wrote: VirtualHost 66.92..XX:80 10.X.0.3:80 ServerName john.swartzentruber.us ServerAdmin webmasXXXtzentruber.us DocumentRoot /var/www/vhosts/swartzentruber.us/john/html Directory /var/www/vhosts/swartzentruber.us/john/html

RE: [PHP] PHP Sessions?

2005-03-02 Thread Chris W. Parker
rory walsh mailto:[EMAIL PROTECTED] on Wednesday, March 02, 2005 2:08 PM said: Thanks everyone, I'm getting closer. The only problem I have not is that I keep entering that test, I modified it to change the session variable once we enter the test but it somehow does not seem to change it?

RE: [PHP] php DBMS

2005-03-02 Thread Richard Lynch
Chris W. Parker wrote: Gerben mailto:[EMAIL PROTECTED] on Wednesday, March 02, 2005 10:22 AM said: Thanks for all your responses, but I think I wasn't clear enough of my intentions. Actually, that what I'm looking for; A database engine written in PHP. Even if something like this did

[PHP] How to sort a Multidimensional array?

2005-03-02 Thread Mirco Blitz
Hi, i have a multidimensional array that look like this: $arr=array($key=array('item0key'='item0', 'item1key'='item1', 'item2key'='item2', 'item3key'='item3', 'item4key'='item4')); Lineview: 0item0key = item0 item1key = item1 item2key = item2 item3key = item3

Re: [PHP] PHP Sessions?

2005-03-02 Thread rory walsh
Sorry bout that little mistake. You right I mean to check to see if $_SESSION['loggedin'] == yes; That doesn't make a difference as it turns out. The reason that I immediately change this is that I want the content of the page to change, and in order to do that I want to stop it from going into

RE: [PHP] Catalog or cart

2005-03-02 Thread Ryan A
Hey all, Thanks guys, I'm checking the ones you recommended and taking most of your advise ;-) Feel free to write in if you missed anything in your old reply or have new recommendations. Cheers, Ryan Hey all, I have a client who has a computer store, now he wants to put all his stuff in

[PHP] How to sort a Multidimensional array?

2005-03-02 Thread Mirco Blitz
Hi, i have a multidimensional array that look like this: $arr=array($key=array('item0key'='item0', 'item1key'='item1', 'item2key'='item2', 'item3key'='item3', 'item4key'='item4')); Lineview: 0item0key = item0 item1key = item1 item2key = item2 item3key = item3

[PHP] How to sort a Multidimensional array?

2005-03-02 Thread Popbox
Hi, i have a multidimensional array that look like this: $arr=array($key=array('item0key'='item0', 'item1key'='item1', 'item2key'='item2', 'item3key'='item3', 'item4key'='item4')); Lineview: 0item0key = item0 item1key = item1 item2key = item2 item3key = item3

[PHP] How to sort a Multidimensional array?

2005-03-02 Thread Popbox
Hi, i have a multidimensional array that look like this: $arr=array($key=array('item0key'='item0', 'item1key'='item1', 'item2key'='item2', 'item3key'='item3', 'item4key'='item4')); Lineview: 0item0key = item0 item1key = item1 item2key = item2 item3key = item3

AW: [PHP] How to sort a Multidimensional array?

2005-03-02 Thread Mirco Blitz
Sorry for multipost. My ISP delayed sends for about an houre. I didn't recognize it. -Ursprüngliche Nachricht- Von: Popbox [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 2. März 2005 23:14 An: php-general@lists.php.net Betreff: [PHP] How to sort a Multidimensional array? Hi, i have a

Re: [PHP] How to sort a Multidimensional array?

2005-03-02 Thread Frank Arensmeier
Hello! This must be one of the most frequently asked questions ever. Anyway, take a look at the PHP manual. Look for a function called 'foreach'. To put it simple, with 'foreach' you are able to go through the array step-by-step, value by value. For example: ?php $arr = array('value1',

RE: [PHP] PHP Sessions?

2005-03-02 Thread Chris W. Parker
rory walsh mailto:[EMAIL PROTECTED] on Wednesday, March 02, 2005 2:38 PM said: Is it to do with the link: a href=\index.php?action=edit\ does this call the script again, just as an action=script.php in a form would? Cheers for the help on this. Yes it does. But it doesn't erase the

AW: [PHP] How to sort a Multidimensional array?

2005-03-02 Thread Mirco Blitz
Hi, Thank you, for the Hint. I just have looked in German Doc and that is incomplete. Here is my solution. If someone has the same problem. foreach($arr as $key=$values){ foreach($values as $valkey=$value){ $$valkey[$key]=$value; } } array_multisort($$_POST[sortby], $_POST[asc_desc], $arr);

Re: [PHP] Document root, preferred way to find it???

2005-03-02 Thread Leif Gregory
Hello Al, Wednesday, March 2, 2005, 12:21:58 PM, you wrote: A What do you guys use for you docroot? I ran into the same problem and also asked here for any ideas. I finally ended up writing my own function to do it. You can find the tutorial here:

Re: [PHP] PHP Sessions?

2005-03-02 Thread rory walsh
Yeah your right, I'm trying to walk before I can crawl! Cheers for the help, Rory. Chris W. Parker wrote: rory walsh mailto:[EMAIL PROTECTED] on Wednesday, March 02, 2005 2:08 PM said: Thanks everyone, I'm getting closer. The only problem I have not is that I keep entering that test, I

  1   2   >