[PHP] split() - not working in this case
I have a string $to = abcd [EMAIL PROTECTED], efgh [EMAIL PROTECTED] ; I want a function returning an array of indivial names+mailids like from the $to seperated by , something like $tos[0] = abcd [EMAIL PROTECTED]; $tos[1] = efgh [EMAIL PROTECTED]; Now split() in the following function*** is notworking as needed. ie, I'm getting $tos[0] = abcd; $tos[1] = efgh; Not the complete name + mailid, Why ? /Chandu *** function split_addresses($addr) { $ad = array(); $ad = split(,,$addr); return $ad; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] split() - not working in this case
? function split_addresses($addr) { $ad = array(); $ad = split(,,$addr); return $ad; } $tos=array(); $to = abcd [EMAIL PROTECTED], efgh [EMAIL PROTECTED]; $tos=split_addresses($to); echo $tos[1]; ? echos efgh [EMAIL PROTECTED] ?? Whats the problem? Maybe you output to a browser and don't see [EMAIL PROTECTED] cause its between Op zondag 08 september 2002 10:17, schreef N. Pari Purna Chand: I have a string $to = abcd [EMAIL PROTECTED], efgh [EMAIL PROTECTED] ; I want a function returning an array of indivial names+mailids like from the $to seperated by , something like $tos[0] = abcd [EMAIL PROTECTED]; $tos[1] = efgh [EMAIL PROTECTED]; Now split() in the following function*** is notworking as needed. ie, I'm getting $tos[0] = abcd; $tos[1] = efgh; Not the complete name + mailid, Why ? /Chandu *** function split_addresses($addr) { $ad = array(); $ad = split(,,$addr); return $ad; } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] split() - not working in this case
On Sun, 8 Sep 2002, N. Pari Purna Chand wrote: $to = abcd [EMAIL PROTECTED], efgh [EMAIL PROTECTED] ; Now split() in the following function*** is notworking as needed. ie, I'm getting $tos[0] = abcd; $tos[1] = efgh; split didn't do anything wrong. use your browser's view source to see the desired output. funny things, those less-than greater-than characters ... they make browsers think you've created an HTML tag! Two things you can do to make displaying such data in a browser: 1) if you're trying to display text that has HTML entities in it, within a HTML page, use the htmlentities() function when printing output. http://www.php.net/htmlentities 2) if you don't care about HTML at all, send a Content-type header that tells the browser what you're sending is text. header( Content-type: text/plain ); g.luck, ~Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to program very basic chat on PHP?
Philip J. Newman wrote: You could create a scema, or module that is called with each page load, that checks for messages when the user is logged in. So when the message is stored into the databace, when the user loads the anypage while logged in it checks for new messages, and if the user has messages then the window pops up and the user can eather reply etc etc Phil Hello Phil, your idea is interesting. I am evaluating it because it is not a true 'chat' (if user doesnt load any page he will never see incoming msg), but your idea is the only thing I have to this time. Thanks Mig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Proposal for securing PHP sessions
Ooooh, it's a lesson every day! Right, back to the drawing board :( Justin French [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 08/09/02 5:04 AM, M1tch ([EMAIL PROTECTED]) wrote: Why not just use IP? I created a nice system, whereby if your IP is changed (or someone is hacking your session), the session is destroyed, and the user must log in. Does not add much overhead either. large ISPs like AOL use variable IPs (your IP could change from page to page)... that's a pretty good reason to start with. if people get disconnected, they too are likely to have a new IP on most dial-up ISPs. Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Credit Card Validation
Check Out Credit Card validation routine. Uses MOD 10 to check if credit card number is valid. http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=74 Validating Credit Card Numbers Without Bank Involvement http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=333 A set of functions to check the validity of a credit card number. http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=458 After discovering some credit card validation routines didn't work - here is one that I found works with all the numbers I have tried so far http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=505 Validation function for LUHNMod10 and variant. Can discriminate credit card numbers of varying lengths. Uses [Double Sum-of-Digits] transform. http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1463 Credit Card Identification and Validation Class - The credit card class provides methods for cleaning, validating and identifying the type of credit card numbers. http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=1805 Real-Time Transaction Processing PHP Class. Credit Cards Checks. Supports system check, address verification, authorization and deposit, deposit, credit, commercial card, electronic check debit, and more. http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=3107 ECHO-PHP Class Real Time Transaction Processor v1.4.4 for Credit Cards and Checks / ACH http://www.weberdev.com/index.php3?GoTo=get_example.php3?count=3190 Sincerely berber Visit http://www.weberdev.com/ Today!!! To see where PHP might take you tomorrow. -Original Message- From: Jeff Lewis [mailto:[EMAIL PROTECTED]] Sent: Saturday, September 07, 2002 11:03 PM To: [EMAIL PROTECTED] Subject: [PHP] Credit Card Validation I know it's been posted here several times and I've looked through the archives but I just need something very simple for this. I have a form that already takes in user information but now before accepting the information, I'd like to pass the credit card information to a function and return true or false. Is anyone using something like this that is simple? Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Proposal for securing PHP sessions
Okay, having had my own solution shot and burned ;), I would love to look at yours, but unfortunately the page (well, the entire site), will not load. It could be a temporary outage with either ISP, but is there anyway you could post it here? (I perhaps flag it as large?). On my site, I'm not really bothered about most of the session data being hijacked, because a user would still not be able to be malicious (any serious function- like post article/forum message/etc) has a permission check before it's executed, that verifies the username/password. Of course, this then becomes a problem if the user has stored the password in session, as this is the sensitive part. Why oh why is AOL so terrible. I didn't like them before, but now! Gr Andy Mar Tin [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Dear all: Until I read the article PHP Session security (http://www.webkreator.com/php/configuration/php-session-security.html) I haven't noticed how insecure PHP Sessions are. Basically there're 2 problems: *) It's possible to hijack a session if you know the SID (session id) 1) If you're on a shared server (cheap webhosting) other users can get the SIDs by doing ls /tmp/sess_* (/tmp/ is defined on session.save_path on the config file, so it may be different). 2) When a user clicks on an external link, the browser sends the REFERER url and sometimes it contains the SID (if session.use_trans_sid is enabled) PHP offers a security measure: with session.referer_check it will reject SIDs comming from other referers, but the referer url can be easily forged. *) Users can read session data from the session files, which are owned by the server process (every user which has an account on the webserver can read server owned files) (If you're intrested in the subject I would recommend to read full the article: http://www.webkreator.com/php/configuration/php-session-security.html) I have developed some functions to avoid this problems. They replace the standard session functions (using session_set_save_handler), so you only have to include the file at the beggining of your script and (afaik) you're safe :) This is the idea: Apart from the session cookie, I set another one (with the same name and the string '_sec' appended). On this cookie I set a random KEY. The name of the file which contains the session data is the md5 hash of the SID and the KEY together. This turns impossible to guess the session id by looking at the filenames. To hide the data inside the file, the serialized string is crypted using the KEY as password, so nobody can see the content of your user's sessions. You can find the code here: http://www.n3rds.com.ar/files/docs/php_sessions/sess_handler.txt Im looking for suggestions to make it 100% compatible with the standard session functions, and I would like to hear some thougts about the idea Martin Sarsale [EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Proposal for securing PHP sessions
lol, no sooner had I spoke than it sprang back into action! I now have the source you posted. Looking it over! M1tch [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Okay, having had my own solution shot and burned ;), I would love to look at yours, but unfortunately the page (well, the entire site), will not load. It could be a temporary outage with either ISP, but is there anyway you could post it here? (I perhaps flag it as large?). On my site, I'm not really bothered about most of the session data being hijacked, because a user would still not be able to be malicious (any serious function- like post article/forum message/etc) has a permission check before it's executed, that verifies the username/password. Of course, this then becomes a problem if the user has stored the password in session, as this is the sensitive part. Why oh why is AOL so terrible. I didn't like them before, but now! Gr Andy Mar Tin [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Dear all: Until I read the article PHP Session security (http://www.webkreator.com/php/configuration/php-session-security.html) I haven't noticed how insecure PHP Sessions are. Basically there're 2 problems: *) It's possible to hijack a session if you know the SID (session id) 1) If you're on a shared server (cheap webhosting) other users can get the SIDs by doing ls /tmp/sess_* (/tmp/ is defined on session.save_path on the config file, so it may be different). 2) When a user clicks on an external link, the browser sends the REFERER url and sometimes it contains the SID (if session.use_trans_sid is enabled) PHP offers a security measure: with session.referer_check it will reject SIDs comming from other referers, but the referer url can be easily forged. *) Users can read session data from the session files, which are owned by the server process (every user which has an account on the webserver can read server owned files) (If you're intrested in the subject I would recommend to read full the article: http://www.webkreator.com/php/configuration/php-session-security.html) I have developed some functions to avoid this problems. They replace the standard session functions (using session_set_save_handler), so you only have to include the file at the beggining of your script and (afaik) you're safe :) This is the idea: Apart from the session cookie, I set another one (with the same name and the string '_sec' appended). On this cookie I set a random KEY. The name of the file which contains the session data is the md5 hash of the SID and the KEY together. This turns impossible to guess the session id by looking at the filenames. To hide the data inside the file, the serialized string is crypted using the KEY as password, so nobody can see the content of your user's sessions. You can find the code here: http://www.n3rds.com.ar/files/docs/php_sessions/sess_handler.txt Im looking for suggestions to make it 100% compatible with the standard session functions, and I would like to hear some thougts about the idea Martin Sarsale [EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] split() - not working in this case
Yeah, I have outputted to browser Split() was working fine.. Sorry for the noise on the list. But I have realised that the very moment I posted the mail on the list. /Chandu - Original Message - From: Chris Wesley [EMAIL PROTECTED] To: [EMAIL PROTECTED] Cc: N. Pari Purna Chand [EMAIL PROTECTED] Sent: Sunday, September 08, 2002 2:33 PM Subject: Re: [PHP] split() - not working in this case On Sun, 8 Sep 2002, N. Pari Purna Chand wrote: $to = abcd [EMAIL PROTECTED], efgh [EMAIL PROTECTED] ; Now split() in the following function*** is notworking as needed. ie, I'm getting $tos[0] = abcd; $tos[1] = efgh; split didn't do anything wrong. use your browser's view source to see the desired output. funny things, those less-than greater-than characters ... they make browsers think you've created an HTML tag! Two things you can do to make displaying such data in a browser: 1) if you're trying to display text that has HTML entities in it, within a HTML page, use the htmlentities() function when printing output. http://www.php.net/htmlentities 2) if you don't care about HTML at all, send a Content-type header that tells the browser what you're sending is text. header( Content-type: text/plain ); g.luck, ~Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Proposal for securing PHP sessions
Just out of curiosity, do you know if any part (e.g. x1.x2.x3.x4) of the IP remains static when AOL changes it? Even if it's only the first part, that's better than nothing. I'm having a headache now, because I'm already behind schedule, and this has just thrown a spanner in the works :( (but still thanks for bringing it up now, rather than at production time!) Justin French [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 08/09/02 5:04 AM, M1tch ([EMAIL PROTECTED]) wrote: Why not just use IP? I created a nice system, whereby if your IP is changed (or someone is hacking your session), the session is destroyed, and the user must log in. Does not add much overhead either. large ISPs like AOL use variable IPs (your IP could change from page to page)... that's a pretty good reason to start with. if people get disconnected, they too are likely to have a new IP on most dial-up ISPs. Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Proposal for securing PHP sessions
Nope, have no idea... I've just allways been told (and adhered to) the rule that you don't trust anything client side, which would include IP address'. Even if you could get it working for AOL, what about some other ISP located in Australia, South Africa, or anywhere else on the planet that you've never heard of? Don't trust IPs. AOL was just an example. Justin on 08/09/02 8:50 PM, M1tch ([EMAIL PROTECTED]) wrote: Just out of curiosity, do you know if any part (e.g. x1.x2.x3.x4) of the IP remains static when AOL changes it? Even if it's only the first part, that's better than nothing. I'm having a headache now, because I'm already behind schedule, and this has just thrown a spanner in the works :( (but still thanks for bringing it up now, rather than at production time!) Justin French [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 08/09/02 5:04 AM, M1tch ([EMAIL PROTECTED]) wrote: Why not just use IP? I created a nice system, whereby if your IP is changed (or someone is hacking your session), the session is destroyed, and the user must log in. Does not add much overhead either. large ISPs like AOL use variable IPs (your IP could change from page to page)... that's a pretty good reason to start with. if people get disconnected, they too are likely to have a new IP on most dial-up ISPs. Justin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Proposal for securing PHP sessions
One thing that I did that may help. Every time a session is opened, the system insists on writing to disk on every page, whether the session is updated or not. With a lot of users, this is a bit of a system bog. So, I hold the contents of a session when 'read', in a global variable. Then, in the write function, I see if it's changed. If it has, I do the write. If it hasn't, I simply return from the function. Mar Tin [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Dear all: Until I read the article PHP Session security (http://www.webkreator.com/php/configuration/php-session-security.html) I haven't noticed how insecure PHP Sessions are. Basically there're 2 problems: *) It's possible to hijack a session if you know the SID (session id) 1) If you're on a shared server (cheap webhosting) other users can get the SIDs by doing ls /tmp/sess_* (/tmp/ is defined on session.save_path on the config file, so it may be different). 2) When a user clicks on an external link, the browser sends the REFERER url and sometimes it contains the SID (if session.use_trans_sid is enabled) PHP offers a security measure: with session.referer_check it will reject SIDs comming from other referers, but the referer url can be easily forged. *) Users can read session data from the session files, which are owned by the server process (every user which has an account on the webserver can read server owned files) (If you're intrested in the subject I would recommend to read full the article: http://www.webkreator.com/php/configuration/php-session-security.html) I have developed some functions to avoid this problems. They replace the standard session functions (using session_set_save_handler), so you only have to include the file at the beggining of your script and (afaik) you're safe :) This is the idea: Apart from the session cookie, I set another one (with the same name and the string '_sec' appended). On this cookie I set a random KEY. The name of the file which contains the session data is the md5 hash of the SID and the KEY together. This turns impossible to guess the session id by looking at the filenames. To hide the data inside the file, the serialized string is crypted using the KEY as password, so nobody can see the content of your user's sessions. You can find the code here: http://www.n3rds.com.ar/files/docs/php_sessions/sess_handler.txt Im looking for suggestions to make it 100% compatible with the standard session functions, and I would like to hear some thougts about the idea Martin Sarsale [EMAIL PROTECTED] __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] file include relative file addressing.
From the root of a website: / I had a file called /my.php which included a file /include/blah/my.inc.php In my.php if I put the include_once( ./include/blah/my.inc.php ); it works fine when my.php is in the root of the site. If I move /my.php to /blah/my.php, no matter how I address ../include/blah/my.php or /include/blah/my.php I keep getting path errors. How do I get around this problem using only relative paths (no absolute or placing in an include path) Neil. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] generating variable names
Hi Kevin, I find it a bit awkward to mix variables and arrays in a pseudo array. But I guess you have reasons... Anyhow, maybe this is what you want: $variable1=one; $variable2=two; $variable3 = array(); $variable3[0]=three; $variable4 = array(); $variable4[0]=four; $j=1; while($j5){ if (is_array(${variable.$j})) { print(${variable.$j}[0] . br /); } else { print(${variable.$j} . br /); }; $j++; } Timo Am Freitag den, 6. September 2002, um 20:37, schrieb Kevin Heflin: Hoping someone can help me with this. Below I have an example of what I'm trying to accomplish. Bottom line.. I need to print out $variable3[0] and $variable4[0] and my problem is that I'm trying to generate the variable name. I can get this to work with $variable1 and $variable2 which are not arrays, however that doesn't help me much. Any suggestions would be appreciated. Kevin ? $variable1=one; $variable2=two; $variable3[0]=three; $variable4[0]=four; $j=1; while($j5){ print(${variable.$j} BR); $j++; } $j=1; while($j5){ $k=\$variable.$j.[0]; print($k BR); print(${variable.$k} BR); $j++; } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] contact list re-ordering (php/mySQL CMS design)
Hi speedfreak, uh, clients. Can't they just send the checks an be content? :-) I have yet not done a user-sorted list in PHP/MySQL (I am using PHP since a week, now :-). But I think the following database setup should allow you to do it: id content above below 1 lalastart 2 2 blah1 3 3 sdfg2 5 5 oll 3 end By referencing to the entry displayed above/below, you can quite easily write functions for getting the list and for moving rows. Timo Am Samstag den, 7. September 2002, um 18:08, schrieb [EMAIL PROTECTED]: Dear guru's, Hit a problem while developing a CMS with php/mySQL. Part of this is a contact list and this works ok (add/edit/delete with insert/update/delete queries). Now the client has requested a new feature: ability to change the order in which the contacts are being presented in the public part of this CMS (don't ask me why). I've added a field 'show_pos' to the contacts table and am able to change its value when I edit an existing record or add a new one. What I can't wrap my head around at the moment is how one deals with updating 'show_pos' for the OTHER records (while editing/deleting present record (WHERE id='$id')? Could anyone give me some pointers as to how this could be done in php and/or SQL (preferable). I sure hope anyone understands what I mean ... Cheers! newbie@a_loss -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to program very basic chat on PHP?
Hi Mig, to create something that behaves more like a true chat, you need an active client side. For example, you could let a frame with the PHP be reloaded in a short interval. To create a real chat, you need a socket connection. The best solution would be Flash (which has great functions for that). Java is another option. Timo Am Sonntag den, 8. September 2002, um 12:05, schrieb M: Philip J. Newman wrote: You could create a scema, or module that is called with each page load, that checks for messages when the user is logged in. So when the message is stored into the databace, when the user loads the anypage while logged in it checks for new messages, and if the user has messages then the window pops up and the user can eather reply etc etc Phil Hello Phil, your idea is interesting. I am evaluating it because it is not a true 'chat' (if user doesnt load any page he will never see incoming msg), but your idea is the only thing I have to this time. Thanks Mig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and LDAP over SSL
On Wed, Sep 04, 2002 at 02:26:49PM +0200, Søren Henning Dalgaard wrote: I can make an ldap_connect with the ldaps://hostname/ parameter but what next: How can make an ldap_bind command? How can I encrypt and decrypt the data? When using ldaps:// all communications are through SSL, you do bind etc as usual and your data will be tunneled through SSL. How do I specify a key/certificate for encrypting and decrypting? For SSL and the necessary encryption you only need a certificate at the server. It seems you have done this, that is enough for the communications to be encrypted. You may want to give your client a certificate for the CA that signed the server certificate, see my mail on LDAP and SSL on php-general from Aug 26th (and the mail I replied to). It is also possible to give the client a certificate if you want the server to know which client it is talking to. For details on LDAP and SSL I suggest you look at OpenLDAP docs, in OpenLDAP list archives etc. Doing SSL with OpenLDAP is the same when using PHP and other tools. Using ldaps:// in the connect is similar to using -H ldaps:// to OpenLDAP tools like ldapsearch etc. Stig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 8 Sep 2002 13:49:48 -0000 Issue 1573
php-general Digest 8 Sep 2002 13:49:48 - Issue 1573 Topics (messages 115635 through 115661): How to do pass on information... 115635 by: Chuck PUP Payne 115636 by: Brad Bonkoski header() problem 115637 by: xdrag Re: Proposal for securing PHP sessions 115638 by: Justin French 115649 by: M1tch 115651 by: M1tch 115652 by: M1tch 115654 by: M1tch 115655 by: Justin French 115656 by: M1tch Re: Credit Card Validation 115639 by: Justin French 115650 by: Boaz Yahav php_flag in httpd.conf 115640 by: Mitch Vincent 115641 by: Jason Reid 115644 by: Mitch Vincent Stock Market data - where can I get it? 115642 by: olinux imagecopyresized problems 115643 by: Brian Shannon Windsor split() - not working in this case 115645 by: N. Pari Purna Chand 115646 by: Bas Jobsen 115647 by: Chris Wesley 115653 by: N. Pari Purna Chand Re: How to program very basic chat on PHP? 115648 by: M 115660 by: timo stamm file include relative file addressing. 115657 by: nelr Re: generating variable names 115658 by: timo stamm Re: contact list re-ordering (php/mySQL CMS design) 115659 by: timo stamm Re: PHP and LDAP over SSL 115661 by: Stig Venaas 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] -- ---BeginMessage--- Hi, I would like to know if there is a way that I can pass on an information from a pull down menu into a sql query. Right now I have to right a PHP page for each piece I am wanting to pass on. Example I have a movie database and now if I want to see what is in my Anime Category that starts with A I have to create a page like this: Select * FROM database WHERE category = 'anime' AND title like 'A%' I know I have to do an array? Would it be like this? $category $letter Select * FROM database WHERE category = '$category' and title is like '$letter' But it get to the sql statement is where I am lost. Chuck Payne Magi Design and Support ---End Message--- ---BeginMessage--- Can't you make a form? Lets say you have a lexical database for categories like: IDNAME 1 Anime 2 Action etc... then in the form so: select name='cat' ?php $query = select * from categories; $result = run_query($query); while($row = fetch_array($result) { echo option value=$row[0]$row[1]/option; } free_result($result) ? /select This would send to the form action page the numerical representation of the categoried selected from the drop down list. -Brad Chuck PUP Payne wrote: Hi, I would like to know if there is a way that I can pass on an information from a pull down menu into a sql query. Right now I have to right a PHP page for each piece I am wanting to pass on. Example I have a movie database and now if I want to see what is in my Anime Category that starts with A I have to create a page like this: Select * FROM database WHERE category = 'anime' AND title like 'A%' I know I have to do an array? Would it be like this? $category $letter Select * FROM database WHERE category = '$category' and title is like '$letter' But it get to the sql statement is where I am lost. Chuck Payne Magi Design and Support ---End Message--- ---BeginMessage--- Hi: is this a bug? [win98se + apache2.0.40 + PHP4.2.3 + IE6.0] download1.php: ?php ... header(Cache-Control: no-cache, must-revalidate); header(Content-Type:.$mime_type); header(Content-Disposition: filename=$filename); echo $filedata; ? works well download2.php: ?php ... header(Cache-Control: no-cache, must-revalidate); header(Content-Type:.$mime_type); header(Content-Disposition: attachment; filename=$filename); echo $filedata; ? please pay attention to header(Content-Disposition: ...) if you click this URL, for example download2.php?id=1, then click the save button, your browser will suffer a fatal error. You can not do anything else now! ---End Message--- ---BeginMessage--- on 08/09/02 5:04 AM, M1tch ([EMAIL PROTECTED]) wrote: Why not just use IP? I created a nice system, whereby if your IP is changed (or someone is hacking your session), the session is destroyed, and the user must log in. Does not add much overhead either. large ISPs like AOL use variable IPs (your IP could change from page to page)... that's a pretty good reason to start with. if people get disconnected, they too are likely to have a new IP on most dial-up ISPs. Justin ---End Message--- ---BeginMessage--- Ooooh, it's a lesson every day! Right, back to the drawing board :( Justin French [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 08/09/02 5:04
Re: [PHP] LDAP Authentication problem
On Wed, Sep 04, 2002 at 03:58:18PM -0400, Brad Harriger wrote: I'm trying to retrieve information from an NDS server using LDAP functions in PHP 4.06. I am able to establish the connection and bind to the server using an anonymous bind, but when I try to bind as a valid user, the app seems to run in an infinite loop. I'm not sure where to look for the cause of this problem. Any suggestions would be appreciated. The app, is that your PHP script? Or is it the LDAP library (PHP is stuck in ldap_bind()?), or is it the NDS server? Perhaps you should try to authenticate and search with ldapsearch or similar tool and see if it happens then? Stig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: file include relative file addressing.
??? I thought you said "my.inc.php" but you're including "my.php". This one should work: include_once "../include/blah/my.inc.php"; // filename is my.inc.php - E "Nelr" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... From the root of a website: / I had a file called /my.php which included a file /include/blah/my.inc.php In my.php if I put the include_once( "./include/blah/my.inc.php" ); it works fine when my.php is in the root of the site. If I move /my.php to /blah/my.php, no matter how I address ../include/blah/my.php or /include/blah/my.php I keep getting path errors. How do I get around this problem using only relative paths (no absolute or placing in an include path) Neil. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: file include relative file addressing.
??? I thought you said "my.inc.php" but you're including "my.php". This one should work: include_once "../include/blah/my.inc.php"; // filename is my.inc.php - E "Nelr" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... From the root of a website: / I had a file called /my.php which included a file /include/blah/my.inc.php In my.php if I put the include_once( "./include/blah/my.inc.php" ); it works fine when my.php is in the root of the site. If I move /my.php to /blah/my.php, no matter how I address ../include/blah/my.php or /include/blah/my.php I keep getting path errors. How do I get around this problem using only relative paths (no absolute or placing in an include path) Neil. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: file include relative file addressing.
??? I thought you said "my.inc.php" but you're including "my.php". This one should work: include_once "../include/blah/my.inc.php"; // filename is my.inc.php - E "Nelr" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... From the root of a website: / I had a file called /my.php which included a file /include/blah/my.inc.php In my.php if I put the include_once( "./include/blah/my.inc.php" ); it works fine when my.php is in the root of the site. If I move /my.php to /blah/my.php, no matter how I address ../include/blah/my.php or /include/blah/my.php I keep getting path errors. How do I get around this problem using only relative paths (no absolute or placing in an include path) Neil. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] dropping mail into queue
Hi list Is is possible to change the default behaviour of the mail() function to send the message to the queue instead of trying to send it immediately? I did do some research into this a while back, but it never really got to a point where I was completely satisfied with the results. I can recall from then that the behaviour of the mail() function was inherited from the way sendmail was configured on the server, but I cannot go that route ( ie, reconfigure sendmail to send all mail requests to the queue, as the server is not only a webserver, but servers my clients normal e-mail as well), so I'm basically asking if it is possible to override the sendmail behaviour when you issue the mail() function, or to even compose and write the message directly to the /var/spool/mqueue folder ( that would obviously NOT use the mail() function). The reason for all this is that there are some clients that are abusing/miss-using the mail() function to query a mysql db of 20K users with a while() loop and then doing a mail() inside the while, this is causing some serious problems on my server, and I'm trying to look for ways to put a tab on this.So any other suggestions are also very welcome. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Upload Progress
Everything I've read says that there is no way to display the progress of a file upload (via a form) using PHP. I'm currently working on a site which will regularly be accepting very large uploads, anywhere from 10 to 250+ mb and I really need a way to display the progress of the upload so that it doesn't appear as if the browser has frozen for a few hours. Any suggestions for a solution? thanks -jacob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Calling info from mySQL inside flash
I have a mySQL db, and a bunch of tables in it. What i want to do, is to pick up some data, and display in my Flash Movie. For example. I have a table with a list. Now on my main page, i display the total number of people in the list so far (By counting the rows). Now i want to display the same in my Flash movie. How can we exactly insert PHP Coding inside Flash Movie to make the code work? Any tips... Thanks, T. Edison Jr. __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Calling info from mySQL inside flash
How about giving this page a look over: http://www.macromedia.com/desdev/topics/php.html Here's an article especially for using PHP and MySQL with Flash MX http://www.macromedia.com/desdev/mx/flash/articles/flashmx_php.html HTH -Brad Thomas Edison Jr. wrote: I have a mySQL db, and a bunch of tables in it. What i want to do, is to pick up some data, and display in my Flash Movie. For example. I have a table with a list. Now on my main page, i display the total number of people in the list so far (By counting the rows). Now i want to display the same in my Flash movie. How can we exactly insert PHP Coding inside Flash Movie to make the code work? Any tips... Thanks, T. Edison Jr. __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Need a Linux Guru!
Hi, I'm setting up an Linux Server for codetesting an routing, but it takes about one week now to configure this s**t. I could make the routing working. But some Daemons don't start at bootup. Such as Apache, Squid, MySQL and so on. The only way I'm able to surf in the Internet is to start Squid after booting manually from Commandline via SSH. I've read somewhere that if the DNS isn't configured right squid is not able to run at bootup. So I believe it has something to do with this. I need really help on this. So please write me if you are willing and able to help me. I can give you the IP and the Root Acount information, or you describe me how i can solve my problem. The Server runs SuSE 8.0. Another Problem is, that I don't know where to setup or start the FTPD daemon. Please, please Help Sascha -- Sascha Braun --- Iltisstrasse 24 24143 Kiel Postfach 6345 24124 Kiel fon 0431 - 739 47 50 hdy 0175 - 458 73 74 GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upload Progress
There really isn't a great solution for this, that I know of. It's one of the few things that makes an argument for ASP over PHP, as far as I'm concerned (if you have the luxury of choosing). Below is what I did once to try to get around the problem. It worked *okay*. The bummer is that I had to ask people to enter the size of their file in a field. (Rough estimates were okay.) Then, as soon as somebody hit the submit button on my form, I popped up a small, modal, progress bar sized window that was actually two frames. I passed the file size value from the form field to the top frame. In the bottom frame, JavaScript created a bordered div equal in pixel length to the number of MB of the file being uploaded. The top frame, a PHP doc, would then refresh every three seconds, executing a filesize() on the uploaded file, converting it to MB, rounding up, and then using DHTML to resize the width of a blue-gradient gif contained in the div of the bottom frame of the progress bar window. Typically, this worked okay for me. It wasn't the prettiest progress bar in the world, but it did the trick for most people. HTH! Jed On the threshold of genius, Jacob Miller wrote: Everything I've read says that there is no way to display the progress of a file upload (via a form) using PHP. I'm currently working on a site which will regularly be accepting very large uploads, anywhere from 10 to 250+ mb and I really need a way to display the progress of the upload so that it doesn't appear as if the browser has frozen for a few hours. Any suggestions for a solution? thanks -jacob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] turn register_globals on
Hello I am working on a PHP server which has register_globals off. In my script is there anyway to turn it on, just for my script? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] turn register_globals on
I think it is a global configuration setting, so it would not be possible to turn it off for an individual script. Just use the $_SERVER['variable_name'] -Brad Anup wrote: Hello I am working on a PHP server which has register_globals off. In my script is there anyway to turn it on, just for my script? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upload Progress
Sorry, I wrote too quickly. I meant that the file size field value is passed to the bottom frame. And JavaScript is used to resize the gif, not DHTML. (Used to be DHTML when I was adding nbsp instead of resizing an image.) HTH, Jed On the threshold of genius, Jed Verity wrote: There really isn't a great solution for this, that I know of. It's one of the few things that makes an argument for ASP over PHP, as far as I'm concerned (if you have the luxury of choosing). Below is what I did once to try to get around the problem. It worked *okay*. The bummer is that I had to ask people to enter the size of their file in a field. (Rough estimates were okay.) Then, as soon as somebody hit the submit button on my form, I popped up a small, modal, progress bar sized window that was actually two frames. I passed the file size value from the form field to the top frame. In the bottom frame, JavaScript created a bordered div equal in pixel length to the number of MB of the file being uploaded. The top frame, a PHP doc, would then refresh every three seconds, executing a filesize() on the uploaded file, converting it to MB, rounding up, and then using DHTML to resize the width of a blue-gradient gif contained in the div of the bottom frame of the progress bar window. Typically, this worked okay for me. It wasn't the prettiest progress bar in the world, but it did the trick for most people. HTH! Jed On the threshold of genius, Jacob Miller wrote: Everything I've read says that there is no way to display the progress of a file upload (via a form) using PHP. I'm currently working on a site which will regularly be accepting very large uploads, anywhere from 10 to 250+ mb and I really need a way to display the progress of the upload so that it doesn't appear as if the browser has frozen for a few hours. Any suggestions for a solution? thanks -jacob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Warning: Could not execute mail delivery program
So do you think it has to be a server issue and not a code issue? My site's traffic load has increased significantly in the last week or so and that's kind of when it started happening. Could there be a resource problem? Is there any way to find out more on why it's not running? - Noah Noah Spitzer-Williams [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... PHP Warning: Could not execute mail delivery program in /htdocs/... Any suggestions on how to fix this? - Noah -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Warning: Could not execute mail delivery program
Here are my safemode parameters: ; Safe Mode safe_mode = Off safe_mode_exec_dir = safe_mode_allowed_env_vars = PHP_ ; Setting certain environment variables ; may be a potential security breach. ; This directive contains a comma-delimited ; list of prefixes. In Safe Mode, the ; user may only alter environment ; variables whose names begin with the ; prefixes supplied here. ; By default, users will only be able ; to set environment variables that begin ; with PHP_ (e.g. PHP_FOO=BAR). ; Note: If this directive is empty, PHP ; will let the user modify ANY environment ; variable! safe_mode_protected_env_vars = LD_LIBRARY_PATH - Noah ¡Û [EMAIL PROTECTED] wrote in message 42EOfJ$[EMAIL PROTECTED]">news:42EOfJ$[EMAIL PROTECTED]... == [EMAIL PROTECTED] (Noah Spitzer-Williams) ªº¤å³¹¤¤´£¨ì: PHP Warning: Could not execute mail delivery program in /htdocs/... Any suggestions on how to fix this? - Noah check your php.ini file. if should be safe_mode = Off -- [m[1;32m* Origin: LastLoveSongBBS (lls.twbbs.org) From: localhost.localdomai [m -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: turn register_globals on
Hi, Look at www.php.net/ini_set -- Nicos - CHAILLAN Nicolas [EMAIL PROTECTED] www.WorldAKT.com - Hébergement de sites Internet Anup [EMAIL PROTECTED] a écrit dans le message de news: [EMAIL PROTECTED] Hello I am working on a PHP server which has register_globals off. In my script is there anyway to turn it on, just for my script? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Troubles Inserting into MYSQL
Hello, My code below always dies! I've tried just about every iteration of the values, etc.. Can anybody show me how to insert into MySQL a value? INSERT INTO events ('user','detaildesc') VALUES ('$user','$details') I just don't get it! if ($update_type == update_Williams) { mysql_query(INSERT INTO events ('user', 'detaildesc', 'index', 'reference', 'date_added') VALUES (\'$cookiewho\', \'$add_Williams\',\'\',\'$row_num\',\'$last_update\'), $sql4) or die (could not do update); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Troubles Inserting into MYSQL
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, Send the results of mysql_errno() please. :) ~Pauly if ($update_type == update_Williams) { mysql_query(INSERT INTO events ('user', 'detaildesc', 'index', 'reference', 'date_added') VALUES (\'$cookiewho\', \'$add_Williams\',\'\',\'$row_num\',\'$last_update\'), $sql4) or echo mysql_errno()/*die (could not do update)*/; } On Sunday 08 September 2002 03:07 pm, you wrote: Hello, My code below always dies! I've tried just about every iteration of the values, etc.. Can anybody show me how to insert into MySQL a value? INSERT INTO events ('user','detaildesc') VALUES ('$user','$details') I just don't get it! if ($update_type == update_Williams) { mysql_query(INSERT INTO events ('user', 'detaildesc', 'index', 'reference', 'date_added') VALUES (\'$cookiewho\', \'$add_Williams\',\'\',\'$row_num\',\'$last_update\'), $sql4) or die (could not do update); } - -- ~Paul Nicholson Design Specialist @ WebPower Design The webthe way you want it! [EMAIL PROTECTED] It said uses Windows 98 or better, so I loaded Linux! Registered Linux User #183202 using Register Linux System # 81891 -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9e6McDyXNIUN3+UQRAriZAKCTPYsBfypW7N6k8vpG+UDJEZ77BQCfVtEi BmSkmFZDBbXuAm+g3nvw/tc= =InFX -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Troubles Inserting into MYSQL
Parse error: parse error, unexpected T_ECHO in /var/www/html/actionreg/doupdate.php on line 24 Forgot I had that function.. I don't understand the error though.. Steve Gaas Sr. Systems Engineer, Carrier Markets Riverstone Networks 972.668.8329 (follow-me) 877.713.7063 (pager analog dial) [EMAIL PROTECTED] (interactive pager) http://www.rstn.net / Nasdaq: RSTN Wisdom begins in wonder. -Socrates -Original Message- From: Paul Nicholson [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 08, 2002 2:21 PM To: Steve Gaas; [EMAIL PROTECTED] Subject: Re: [PHP] Troubles Inserting into MYSQL -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, Send the results of mysql_errno() please. :) ~Pauly if ($update_type == update_Williams) { mysql_query(INSERT INTO events ('user', 'detaildesc', 'index', 'reference', 'date_added') VALUES (\'$cookiewho\', \'$add_Williams\',\'\',\'$row_num\',\'$last_update\'), $sql4) or echo mysql_errno()/*die (could not do update)*/; } On Sunday 08 September 2002 03:07 pm, you wrote: Hello, My code below always dies! I've tried just about every iteration of the values, etc.. Can anybody show me how to insert into MySQL a value? INSERT INTO events ('user','detaildesc') VALUES ('$user','$details') I just don't get it! if ($update_type == update_Williams) { mysql_query(INSERT INTO events ('user', 'detaildesc', 'index', 'reference', 'date_added') VALUES (\'$cookiewho\', \'$add_Williams\',\'\',\'$row_num\',\'$last_update\'), $sql4) or die (could not do update); } - -- ~Paul Nicholson Design Specialist @ WebPower Design The webthe way you want it! [EMAIL PROTECTED] It said uses Windows 98 or better, so I loaded Linux! Registered Linux User #183202 using Register Linux System # 81891 -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9e6McDyXNIUN3+UQRAriZAKCTPYsBfypW7N6k8vpG+UDJEZ77BQCfVtEi BmSkmFZDBbXuAm+g3nvw/tc= =InFX -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Need a Linux Guru!
Hi, cd /etc/rc.d locate the scripts reflecting the services you need to start at boot do insserv for each script. e.g. insserv apache That way, next time it boots these services will start. Another way is to use the runtime-level editor of YaST2. -Stathis. [EMAIL PROTECTED] wrote: Hi, I'm setting up an Linux Server for codetesting an routing, but it takes about one week now to configure this s**t. I could make the routing working. But some Daemons don't start at bootup. Such as Apache, Squid, MySQL and so on. The only way I'm able to surf in the Internet is to start Squid after booting manually from Commandline via SSH. I've read somewhere that if the DNS isn't configured right squid is not able to run at bootup. So I believe it has something to do with this. I need really help on this. So please write me if you are willing and able to help me. I can give you the IP and the Root Acount information, or you describe me how i can solve my problem. The Server runs SuSE 8.0. Another Problem is, that I don't know where to setup or start the FTPD daemon. Please, please Help Sascha -- Sascha Braun --- Iltisstrasse 24 24143 Kiel Postfach 6345 24124 Kiel fon 0431 - 739 47 50 hdy 0175 - 458 73 74 GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Rouvas Stathis [EMAIL PROTECTED] http://www.di.uoa.gr/~rouvas -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Troubles Inserting into MYSQL
This syntax fixes the syntax error.. if ($update_type == update_Williams) { mysql_query(INSERT INTO events_Williams ('user', 'detaildesc', 'index', 'reference', 'date_added') VALUES \'$cookiewho\', \'$add_Williams\',\'\',\'$row_num\',\'$last_update\', $sql4) or print mysql_error(); } this is the output You have an error in your SQL syntax near ''user', 'detaildesc', 'index', 'reference', 'date_added') VALUES \'sgaas-wil\', ' at line 1 Steve Gaas Sr. Systems Engineer, Carrier Markets Riverstone Networks 972.668.8329 (follow-me) 877.713.7063 (pager analog dial) [EMAIL PROTECTED] (interactive pager) http://www.rstn.net / Nasdaq: RSTN Wisdom begins in wonder. -Socrates -Original Message- From: Steve Gaas Sent: Sunday, September 08, 2002 2:26 PM To: 'Paul Nicholson'; Steve Gaas; [EMAIL PROTECTED] Subject: RE: [PHP] Troubles Inserting into MYSQL Parse error: parse error, unexpected T_ECHO in /var/www/html/actionreg/doupdate.php on line 24 Forgot I had that function.. I don't understand the error though.. Steve Gaas Sr. Systems Engineer, Carrier Markets Riverstone Networks 972.668.8329 (follow-me) 877.713.7063 (pager analog dial) [EMAIL PROTECTED] (interactive pager) http://www.rstn.net / Nasdaq: RSTN Wisdom begins in wonder. -Socrates -Original Message- From: Paul Nicholson [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 08, 2002 2:21 PM To: Steve Gaas; [EMAIL PROTECTED] Subject: Re: [PHP] Troubles Inserting into MYSQL -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, Send the results of mysql_errno() please. :) ~Pauly if ($update_type == update_Williams) { mysql_query(INSERT INTO events ('user', 'detaildesc', 'index', 'reference', 'date_added') VALUES (\'$cookiewho\', \'$add_Williams\',\'\',\'$row_num\',\'$last_update\'), $sql4) or echo mysql_errno()/*die (could not do update)*/; } On Sunday 08 September 2002 03:07 pm, you wrote: Hello, My code below always dies! I've tried just about every iteration of the values, etc.. Can anybody show me how to insert into MySQL a value? INSERT INTO events ('user','detaildesc') VALUES ('$user','$details') I just don't get it! if ($update_type == update_Williams) { mysql_query(INSERT INTO events ('user', 'detaildesc', 'index', 'reference', 'date_added') VALUES (\'$cookiewho\', \'$add_Williams\',\'\',\'$row_num\',\'$last_update\'), $sql4) or die (could not do update); } - -- ~Paul Nicholson Design Specialist @ WebPower Design The webthe way you want it! [EMAIL PROTECTED] It said uses Windows 98 or better, so I loaded Linux! Registered Linux User #183202 using Register Linux System # 81891 -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9e6McDyXNIUN3+UQRAriZAKCTPYsBfypW7N6k8vpG+UDJEZ77BQCfVtEi BmSkmFZDBbXuAm+g3nvw/tc= =InFX -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Troubles Inserting into MYSQL
Shoudn't it be: if ($update_type == update_Williams) { mysql_query(INSERT INTO events_Williams ('user', 'detaildesc', 'index', 'reference', 'date_added') VALUES ('$cookiewho','$add_Williams','','$row_num','$last_update'), $sql4) or print mysql_error(); } You need the '(' and ')' in your query to group VALUES (And what's with all the escaping with '\'? They don't appear to be needed and make it look very cluttered, i.e. not very readable. HTH -Brad Steve Gaas wrote: This syntax fixes the syntax error.. if ($update_type == update_Williams) { mysql_query(INSERT INTO events_Williams ('user', 'detaildesc', 'index', 'reference', 'date_added') VALUES \'$cookiewho\', \'$add_Williams\',\'\',\'$row_num\',\'$last_update\', $sql4) or print mysql_error(); } this is the output You have an error in your SQL syntax near ''user', 'detaildesc', 'index', 'reference', 'date_added') VALUES \'sgaas-wil\', ' at line 1 Steve Gaas Sr. Systems Engineer, Carrier Markets Riverstone Networks 972.668.8329 (follow-me) 877.713.7063 (pager analog dial) [EMAIL PROTECTED] (interactive pager) http://www.rstn.net / Nasdaq: RSTN Wisdom begins in wonder. -Socrates -Original Message- From: Steve Gaas Sent: Sunday, September 08, 2002 2:26 PM To: 'Paul Nicholson'; Steve Gaas; [EMAIL PROTECTED] Subject: RE: [PHP] Troubles Inserting into MYSQL Parse error: parse error, unexpected T_ECHO in /var/www/html/actionreg/doupdate.php on line 24 Forgot I had that function.. I don't understand the error though.. Steve Gaas Sr. Systems Engineer, Carrier Markets Riverstone Networks 972.668.8329 (follow-me) 877.713.7063 (pager analog dial) [EMAIL PROTECTED] (interactive pager) http://www.rstn.net / Nasdaq: RSTN Wisdom begins in wonder. -Socrates -Original Message- From: Paul Nicholson [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 08, 2002 2:21 PM To: Steve Gaas; [EMAIL PROTECTED] Subject: Re: [PHP] Troubles Inserting into MYSQL -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, Send the results of mysql_errno() please. :) ~Pauly if ($update_type == update_Williams) { mysql_query(INSERT INTO events ('user', 'detaildesc', 'index', 'reference', 'date_added') VALUES (\'$cookiewho\', \'$add_Williams\',\'\',\'$row_num\',\'$last_update\'), $sql4) or echo mysql_errno()/*die (could not do update)*/; } On Sunday 08 September 2002 03:07 pm, you wrote: Hello, My code below always dies! I've tried just about every iteration of the values, etc.. Can anybody show me how to insert into MySQL a value? INSERT INTO events ('user','detaildesc') VALUES ('$user','$details') I just don't get it! if ($update_type == update_Williams) { mysql_query(INSERT INTO events ('user', 'detaildesc', 'index', 'reference', 'date_added') VALUES (\'$cookiewho\', \'$add_Williams\',\'\',\'$row_num\',\'$last_update\'), $sql4) or die (could not do update); } - -- ~Paul Nicholson Design Specialist @ WebPower Design The webthe way you want it! [EMAIL PROTECTED] It said uses Windows 98 or better, so I loaded Linux! Registered Linux User #183202 using Register Linux System # 81891 -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9e6McDyXNIUN3+UQRAriZAKCTPYsBfypW7N6k8vpG+UDJEZ77BQCfVtEi BmSkmFZDBbXuAm+g3nvw/tc= =InFX -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Troubles Inserting into MYSQL
Ohmygosh.. That works... if ($update_type == update_Williams) { mysql_query(INSERT INTO events_Williams (user, detaildesc, indexx, reference, date_added) VALUES ('$cookiewho', '$add_Williams','','$row_num','$last_update'), $sql4) or print mysql_error(); } inserts perfectly.. Steve Gaas Sr. Systems Engineer, Carrier Markets Riverstone Networks 972.668.8329 (follow-me) 877.713.7063 (pager analog dial) [EMAIL PROTECTED] (interactive pager) http://www.rstn.net / Nasdaq: RSTN Wisdom begins in wonder. -Socrates -Original Message- From: Brad Bonkoski [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 08, 2002 2:43 PM To: Steve Gaas Cc: '[EMAIL PROTECTED]' Subject: Re: [PHP] Troubles Inserting into MYSQL Shoudn't it be: if ($update_type == update_Williams) { mysql_query(INSERT INTO events_Williams ('user', 'detaildesc', 'index', 'reference', 'date_added') VALUES ('$cookiewho','$add_Williams','','$row_num','$last_update'), $sql4) or print mysql_error(); } You need the '(' and ')' in your query to group VALUES (And what's with all the escaping with '\'? They don't appear to be needed and make it look very cluttered, i.e. not very readable. HTH -Brad Steve Gaas wrote: This syntax fixes the syntax error.. if ($update_type == update_Williams) { mysql_query(INSERT INTO events_Williams ('user', 'detaildesc', 'index', 'reference', 'date_added') VALUES \'$cookiewho\', \'$add_Williams\',\'\',\'$row_num\',\'$last_update\', $sql4) or print mysql_error(); } this is the output You have an error in your SQL syntax near ''user', 'detaildesc', 'index', 'reference', 'date_added') VALUES \'sgaas-wil\', ' at line 1 Steve Gaas Sr. Systems Engineer, Carrier Markets Riverstone Networks 972.668.8329 (follow-me) 877.713.7063 (pager analog dial) [EMAIL PROTECTED] (interactive pager) http://www.rstn.net / Nasdaq: RSTN Wisdom begins in wonder. -Socrates -Original Message- From: Steve Gaas Sent: Sunday, September 08, 2002 2:26 PM To: 'Paul Nicholson'; Steve Gaas; [EMAIL PROTECTED] Subject: RE: [PHP] Troubles Inserting into MYSQL Parse error: parse error, unexpected T_ECHO in /var/www/html/actionreg/doupdate.php on line 24 Forgot I had that function.. I don't understand the error though.. Steve Gaas Sr. Systems Engineer, Carrier Markets Riverstone Networks 972.668.8329 (follow-me) 877.713.7063 (pager analog dial) [EMAIL PROTECTED] (interactive pager) http://www.rstn.net / Nasdaq: RSTN Wisdom begins in wonder. -Socrates -Original Message- From: Paul Nicholson [mailto:[EMAIL PROTECTED]] Sent: Sunday, September 08, 2002 2:21 PM To: Steve Gaas; [EMAIL PROTECTED] Subject: Re: [PHP] Troubles Inserting into MYSQL -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, Send the results of mysql_errno() please. :) ~Pauly if ($update_type == update_Williams) { mysql_query(INSERT INTO events ('user', 'detaildesc', 'index', 'reference', 'date_added') VALUES (\'$cookiewho\', \'$add_Williams\',\'\',\'$row_num\',\'$last_update\'), $sql4) or echo mysql_errno()/*die (could not do update)*/; } On Sunday 08 September 2002 03:07 pm, you wrote: Hello, My code below always dies! I've tried just about every iteration of the values, etc.. Can anybody show me how to insert into MySQL a value? INSERT INTO events ('user','detaildesc') VALUES ('$user','$details') I just don't get it! if ($update_type == update_Williams) { mysql_query(INSERT INTO events ('user', 'detaildesc', 'index', 'reference', 'date_added') VALUES (\'$cookiewho\', \'$add_Williams\',\'\',\'$row_num\',\'$last_update\'), $sql4) or die (could not do update); } - -- ~Paul Nicholson Design Specialist @ WebPower Design The webthe way you want it! [EMAIL PROTECTED] It said uses Windows 98 or better, so I loaded Linux! Registered Linux User #183202 using Register Linux System # 81891 -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9e6McDyXNIUN3+UQRAriZAKCTPYsBfypW7N6k8vpG+UDJEZ77BQCfVtEi BmSkmFZDBbXuAm+g3nvw/tc= =InFX -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help me regarding redirecting a page
hello, i dont know how to redirect a page... i mean i want to have the effect of submit button without clicking on the submit button. thank you anjali __ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Upgrading PHP on Redhat
Hi all. What's the correct procedure to upgrade PHP (in this case 4.0.6) on a Red Hat system? Usually I just get the PHP tarball compile it myself but for this particular machine I just want to upgrade the Redhat PHP that's on the system. As you guys know Redhat puts its PHP (and Apache) files in different locations- e.g. php.ini is in /etc. I looked for some RPMs but I kept getting failed dependencies when trying to install them- e.g.: # rpm -Uvh php-4.1.2-7.2.4.i386.rpm error: failed dependencies: php = 4.0.6-15 is needed by php-manual-4.0.6-15 php = 4.0.6-15 is needed by php-imap-4.0.6-15 php = 4.0.6-15 is needed by php-ldap-4.0.6-15 php = 4.0.6-15 is needed by php-mysql-4.0.6-15 php = 4.0.6-15 is needed by php-odbc-4.0.6-15 php = 4.0.6-15 is needed by php-pgsql-4.0.6-15 I'm not an expert in using rpm so I'm probably doing something completely wrong??? David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Proposal for securing PHP sessions
I think you are definitely on the right track here, though I unfortunately haven't had time to look at your code (thus, I'm just going by your description). Due to frequent vulnerabilities found in Internet Explorer's cookie handling (versions 4.0 - 6.0 allow anyone to view cookies from any domain, regardless of the cookie's characteristics), cookies should be considered public by any system attempting to be secure. Meaning, if both your key that you describe as well as the session ID are stored in cookies, a compromise of both these cookies opens you up to a presentation attack. This does not require the attacker to sniff the HTTP traffic in any way, so even the use of another security method such as SSL does not prevent this type of attack. Instead, you should consider some sort of combination approach, where you utilize both URL variables and cookies. URL variables are quite exposed (and can be revealed with the Referer HTTP header), so you want to make the exposure of this by itself useless to an attacker. At the same time, you want a cookie compromise to not compromise your entire mechanism. By requiring both types of attacks, you at least make a compromise more difficult and therefore slightly strengthen what you've already got. Hope that helps. Happy hacking. Chris mar tin wrote: Dear all: Until I read the article PHP Session security (http://www.webkreator.com/php/configuration/php-session-security.html) I haven't noticed how insecure PHP Sessions are. Basically there're 2 problems: *) It's possible to hijack a session if you know the SID (session id) 1) If you're on a shared server (cheap webhosting) other users can get the SIDs by doing ls /tmp/sess_* (/tmp/ is defined on session.save_path on the config file, so it may be different). 2) When a user clicks on an external link, the browser sends the REFERER url and sometimes it contains the SID (if session.use_trans_sid is enabled) PHP offers a security measure: with session.referer_check it will reject SIDs comming from other referers, but the referer url can be easily forged. *) Users can read session data from the session files, which are owned by the server process (every user which has an account on the webserver can read server owned files) (If you're intrested in the subject I would recommend to read full the article: http://www.webkreator.com/php/configuration/php-session-security.html) I have developed some functions to avoid this problems. They replace the standard session functions (using session_set_save_handler), so you only have to include the file at the beggining of your script and (afaik) you're safe :) This is the idea: Apart from the session cookie, I set another one (with the same name and the string '_sec' appended). On this cookie I set a random KEY. The name of the file which contains the session data is the md5 hash of the SID and the KEY together. This turns impossible to guess the session id by looking at the filenames. To hide the data inside the file, the serialized string is crypted using the KEY as password, so nobody can see the content of your user's sessions. You can find the code here: http://www.n3rds.com.ar/files/docs/php_sessions/sess_handler.txt Im looking for suggestions to make it 100% compatible with the standard session functions, and I would like to hear some thougts about the idea -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] borders in dreamwever please Help
Hi I setup Easy php on my PC (windows 98) , I try to use dreamweaver 4.0 to make borders as it is done with frontpage. I used (SSI ) like that : !--#include virtual=/OnLine/borders/Left/left.htm -- but the pb the borders (top , left and bottom.htm) appears in my dreamweaver but in local host they don't appear (the local host is apache 1.3.20 ) please can some one help me __ Pour mieux recevoir vos emails, utilisez un PC plus performant ! Découvrez la nouvelle gamme DELL en exclusivité sur i (france) http://www.ifrance.com/_reloc/signedell -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: turn register_globals on
Hello I am working on a PHP server which has register_globals off. In my script is there anyway to turn it on, just for my script? ini_set(register_globals, 1); at the top of your script. Jome -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upgrading PHP on Redhat
Hi David, you should start by checking your current php instalation: # rpm - qa | grep php This will show you all packages which contains php. It will be something like following: php-4.1.2-7.2.4 php-manual-4.0.6-15 php-imap-4.0.6-15 php-ldap-4.0.6-15 php-mysql-4.0.6-15 php-odbc-4.0.6-15 php-pgsql-4.0.6-15 Now you know what packages you have installed on your system. Now go to Red Hat web site to find all this packages - you should to upgrade all of them. If you have Red Hat Linux 7.2, go to http://rhn.redhat.com/errata/RHSA-2002-102.html and find all of this packages and download them. Be sure you are downloading rpms for your version (ie. 7.2). If you will have all these files downloaded, write the folowwing rpm command whitch will update all of packages: # rpm -Uv php-4.1.2-7.2.4.i386.rpm php-manual-4.1.2-7.2.4.i386.rpm \ php-imap-4.1.2-7.2.4.i386.rpm php-ldap-4.1.2-7.2.4.i386.rpm \ php-mysql-4.1.2-7.2.4.i386.rpm php-odbc-4.1.2-7.2.4.i386.rpm \ php-pgsql-4.1.2-7.2.4.i386.rpm All the packages are on the one line. Something like following: # rpm - UV package_1 package_2 ... packege_n By this way you will update all the packages and there shouldn't be any dependencies error. If yes, please let me know. I'm not an expert for Red Hat Linux but I am yousind this distribution and I am doing it by this way... and it's works for me. Best regards, Jan - Original Message - From: David Yee [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, September 08, 2002 10:59 PM Subject: [PHP] Upgrading PHP on Redhat Hi all. What's the correct procedure to upgrade PHP (in this case 4.0.6) on a Red Hat system? Usually I just get the PHP tarball compile it myself but for this particular machine I just want to upgrade the Redhat PHP that's on the system. As you guys know Redhat puts its PHP (and Apache) files in different locations- e.g. php.ini is in /etc. I looked for some RPMs but I kept getting failed dependencies when trying to install them- e.g.: # rpm -Uvh php-4.1.2-7.2.4.i386.rpm error: failed dependencies: php = 4.0.6-15 is needed by php-manual-4.0.6-15 php = 4.0.6-15 is needed by php-imap-4.0.6-15 php = 4.0.6-15 is needed by php-ldap-4.0.6-15 php = 4.0.6-15 is needed by php-mysql-4.0.6-15 php = 4.0.6-15 is needed by php-odbc-4.0.6-15 php = 4.0.6-15 is needed by php-pgsql-4.0.6-15 I'm not an expert in using rpm so I'm probably doing something completely wrong??? David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: help me regarding redirecting a page
? header(Location: http://your.redirection.url/;); die; ? http://www.php.net/manual/en/function.header.php HTH.. Take care.. peace.. eriol Anjali Kaur [EMAIL PROTECTED] disgorged: : i dont know how to redirect a page... i mean i want to : have the effect of submit button without clicking on : the submit button. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: turn register_globals on
Does this work for the original poster? Does not work for me (of course I am going the opposite way, wanting to test scripts one-by-one to verify they work with register_globals off) running: ini_set(register_globals, 0); (and, tried both) ini_set(register_globals, Off); According to the docs it says: register_globals 0PHP_INI_PERDIR|PHP_INI_SYSTEM Stating that this variable can only be changed in .htaccess, or php.ini It does seem to return the correct value, but it does not make the same changes to my script that setting this value to Off in php.ini does. So, is this allowable to set in user scripts? Or is the dosumentation correct in saying it cannot? -Brad Jome wrote: Hello I am working on a PHP server which has register_globals off. In my script is there anyway to turn it on, just for my script? ini_set(register_globals, 1); at the top of your script. Jome -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] checkbox question
How to ontain data from a group of checkbox using same name? For example, in a form there're 6 checkboxes and all named as Interesting_Area. I know if put a pairs of square brackets at the end of the name then in php all the values of them can be ontained. However, for some reason I cannot use square brackets. Please help me out if anyone know how to do the trick. THanks! Alex -- --- TrafficBuilder Network: http://www.bestadv.net/index.cfm?ref=7029 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: checkbox question
Why you can't use square brackets? Alex Shi [EMAIL PROTECTED] escribió en el mensaje [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... How to ontain data from a group of checkbox using same name? For example, in a form there're 6 checkboxes and all named as Interesting_Area. I know if put a pairs of square brackets at the end of the name then in php all the values of them can be ontained. However, for some reason I cannot use square brackets. Please help me out if anyone know how to do the trick. THanks! Alex -- --- TrafficBuilder Network: http://www.bestadv.net/index.cfm?ref=7029 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to program very basic chat on PHP?
timo stamm wrote: Hi Mig, to create something that behaves more like a true chat, you need an active client side. For example, you could let a frame with the PHP be reloaded in a short interval. To create a real chat, you need a socket connection. The best solution would be Flash (which has great functions for that). Java is another option. Timo Hello Timo, thanks very much. I don't know flash, but do you think Flash 5 has this option also?. I read a basic Flash manual and didn't find some feature for 'sockets' or something else. For Java, I know a very basic programming of it, I will try study more of it to understand socket functions. Thanks all of you for your responses. Mig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
php-general Digest 9 Sep 2002 02:21:53 -0000 Issue 1574
php-general Digest 9 Sep 2002 02:21:53 - Issue 1574 Topics (messages 115662 through 115696): Re: LDAP Authentication problem 115662 by: Stig Venaas Re: file include relative file addressing. 115663 by: . Edwin 115664 by: . Edwin 115665 by: . Edwin dropping mail into queue 115666 by: Petre Agenbag Upload Progress 115667 by: Jacob Miller 115671 by: Jed Verity 115674 by: Jed Verity Calling info from mySQL inside flash 115668 by: Thomas Edison Jr. 115669 by: Brad Bonkoski Need a Linux Guru! 115670 by: SaschaBraun.gmx.de 115681 by: Rouvas Stathis turn register_globals on 115672 by: Anup 115673 by: Brad Bonkoski 115677 by: nicos.php.net 115689 by: Jome 115692 by: Brad Bonkoski Re: Warning: Could not execute mail delivery program 115675 by: Noah Spitzer-Williams 115676 by: Noah Spitzer-Williams Troubles Inserting into MYSQL 115678 by: Steve Gaas 115679 by: Paul Nicholson 115680 by: Steve Gaas 115682 by: Steve Gaas 115683 by: Brad Bonkoski 115684 by: Steve Gaas help me regarding redirecting a page 115685 by: Anjali Kaur 115691 by: eriol Upgrading PHP on Redhat 115686 by: David Yee 115690 by: Jan Kudrman Re: Proposal for securing PHP sessions 115687 by: Chris Shiflett borders in dreamwever please Help 115688 by: Iguider Trying to install PHPAuction on e-Smith 115693 by: James Redfern checkbox question 115694 by: Alex Shi 115695 by: Rodrigo Dominguez Re: How to program very basic chat on PHP? 115696 by: M 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] -- ---BeginMessage--- On Wed, Sep 04, 2002 at 03:58:18PM -0400, Brad Harriger wrote: I'm trying to retrieve information from an NDS server using LDAP functions in PHP 4.06. I am able to establish the connection and bind to the server using an anonymous bind, but when I try to bind as a valid user, the app seems to run in an infinite loop. I'm not sure where to look for the cause of this problem. Any suggestions would be appreciated. The app, is that your PHP script? Or is it the LDAP library (PHP is stuck in ldap_bind()?), or is it the NDS server? Perhaps you should try to authenticate and search with ldapsearch or similar tool and see if it happens then? Stig ---End Message--- ---BeginMessage--- ??? I thought you said "my.inc.php" but you're including "my.php". This one should work: include_once "../include/blah/my.inc.php"; // filename is my.inc.php - E "Nelr" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... From the root of a website: / I had a file called /my.php which included a file /include/blah/my.inc.php In my.php if I put the include_once( "./include/blah/my.inc.php" ); it works fine when my.php is in the root of the site. If I move /my.php to /blah/my.php, no matter how I address ../include/blah/my.php or /include/blah/my.php I keep getting path errors. How do I get around this problem using only relative paths (no absolute or placing in an include path) Neil. ---End Message--- ---BeginMessage--- ??? I thought you said "my.inc.php" but you're including "my.php". This one should work: include_once "../include/blah/my.inc.php"; // filename is my.inc.php - E "Nelr" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... From the root of a website: / I had a file called /my.php which included a file /include/blah/my.inc.php In my.php if I put the include_once( "./include/blah/my.inc.php" ); it works fine when my.php is in the root of the site. If I move /my.php to /blah/my.php, no matter how I address ../include/blah/my.php or /include/blah/my.php I keep getting path errors. How do I get around this problem using only relative paths (no absolute or placing in an include path) Neil. ---End Message--- ---BeginMessage--- ??? I thought you said "my.inc.php" but you're including "my.php". This one should work: include_once "../include/blah/my.inc.php"; // filename is my.inc.php - E "Nelr" [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... From the root of a website: / I had a file called /my.php which included a file /include/blah/my.inc.php In my.php if I put the include_once( "./include/blah/my.inc.php" ); it works fine when my.php is in the root of the site. If I move /my.php to /blah/my.php, no matter how I address ../include/blah/my.php or /include/blah/my.php I keep getting path errors. How do I get around this problem using only relative paths (no absolute or placing in an
Re: [PHP] How to program very basic chat on PHP?
Gerhard Hoogterp wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello Phil, your idea is interesting. I am evaluating it because it is not a true 'chat' (if user doesnt load any page he will never see incoming msg), but your idea is the only thing I have to this time. But with a frame or iframe and a little javascript the reloading can be automated.. gerhard Hello Gerhard, I had an idea, and would like you say to me if it is possible or not. I program little javascript, and I think there is a timer function into JS. My question is: what if some timer start every nn seconds a function to read stored msgs table? My doubt is: how to start a function in JS to read a table?. Remember PHP and Mysql are server-sided operations, while JS is cliente side op. Maybe your idea is JS start a new window embedded into iframe, and this window then would exec a PHP script to check msgs table. Is this true? Thanks Mig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to program very basic chat on PHP?
An extremely basic chat would be a frame or iframe which has a meta tag refresh (or javascript refresh) of a plain HTML page every 10-20 seconds. As far as the flash stuff goes, have a look at macromedia.com or the 1000's of flash sites... I'm positive you'll find some development tools for a pre-built chat room that you can modify. I'm certain I got one of macromedia.com a few years back (flash 4 days i think). Justin on 09/09/02 12:37 PM, M ([EMAIL PROTECTED]) wrote: Gerhard Hoogterp wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello Phil, your idea is interesting. I am evaluating it because it is not a true 'chat' (if user doesnt load any page he will never see incoming msg), but your idea is the only thing I have to this time. But with a frame or iframe and a little javascript the reloading can be automated.. gerhard Hello Gerhard, I had an idea, and would like you say to me if it is possible or not. I program little javascript, and I think there is a timer function into JS. My question is: what if some timer start every nn seconds a function to read stored msgs table? My doubt is: how to start a function in JS to read a table?. Remember PHP and Mysql are server-sided operations, while JS is cliente side op. Maybe your idea is JS start a new window embedded into iframe, and this window then would exec a PHP script to check msgs table. Is this true? Thanks Mig -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Problems with GD 2.0.1
Hello everyone, I should get GD 2.0.1 installed to my PHP 4.2.2 binary running as a module in the Apache 1.3. The box is RedHat 7.3. There is a previous version of GD (1.8.4) installed as a default and it seems that I can't even get ereased it due to depencies. Anyway, I'd need that GD 2.0.1 due to some functions previous versions of GD don't have at all. I explored the PHP manual and found this little help: http://www.php.net/~rasmus/gd.html. Wonderful, or not! I followed those items in the Rasmus' file step by step, but still without results. I tried to build PHP with make clean (that was only way when the configure changes really affected to the configure command on phpinfo() -function) and then all steps. But no... My PHP script is still shouting Warning: imagecreatetruecolor(): requires GD 2.0 or later. Grr... My current PHP build is configured with following string: './configure' '--with-mysql' '--with-apxs=/etc/httpd/bin/apxs' '--with-curl' '--with-gd=/usr/local/gd-2.0.1' '--with-xml' '--enable-ftp' '--enable-sockets' '--with-freetype-dir=/usr' '--enable-gd-native-ttf' '--enable-gd-imgstrttf' '--with-zlib' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' Well. Any ideas? Ville -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] turn register_globals on
Hi, Monday, September 9, 2002, 3:42:44 AM, you wrote: A Hello I am working on a PHP server which has register_globals off. In my A script is there anyway to turn it on, just for my script? By the time your script is read register_globals has already done it's checking so it is too late and won't have any effect. The only way is by .htaccess if you have apache. -- regards, Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Upload Progress
Yikes, I sort of lied. It's been awhile... Clients uploaded files from an intranet server to an external servier via their browser and ftp_put. It wasn't local machine to remote server. Sorry! Best of luck, Jed P.S. I wonder, though, if there isn't some way to execute a script with exec() to get the info through the file system. There was some talk awhile back about using flush(), too. If you haven't already, check the archives for that one... On the threshold of genius, Jacob Miller wrote: I was considering this option earlier but I couldn't figure out how to determine the tmp file name of the file being uploaded (in cases where there is more than one upload in progress at a time). How did you go about determining the name of the tmp file? thanks - Jacob At 01:29 09/09/2002, you wrote: There really isn't a great solution for this, that I know of. It's one of the few things that makes an argument for ASP over PHP, as far as I'm concerned (if you have the luxury of choosing). Below is what I did once to try to get around the problem. It worked *okay*. The bummer is that I had to ask people to enter the size of their file in a field. (Rough estimates were okay.) Then, as soon as somebody hit the submit button on my form, I popped up a small, modal, progress bar sized window that was actually two frames. I passed the file size value from the form field to the top frame. In the bottom frame, JavaScript created a bordered div equal in pixel length to the number of MB of the file being uploaded. The top frame, a PHP doc, would then refresh every three seconds, executing a filesize() on the uploaded file, converting it to MB, rounding up, and then using DHTML to resize the width of a blue-gradient gif contained in the div of the bottom frame of the progress bar window. Typically, this worked okay for me. It wasn't the prettiest progress bar in the world, but it did the trick for most people. HTH! Jed On the threshold of genius, Jacob Miller wrote: Everything I've read says that there is no way to display the progress of a file upload (via a form) using PHP. I'm currently working on a site which will regularly be accepting very large uploads, anywhere from 10 to 250+ mb and I really need a way to display the progress of the upload so that it doesn't appear as if the browser has frozen for a few hours. Any suggestions for a solution? thanks -jacob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: turn register_globals on
So, is this allowable to set in user scripts? Or is the dosumentation correct in saying it cannot? My bad, you (and the documentation) are correct. :-) Jome -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] turn register_globals on
Anup wrote: Hello I am working on a PHP server which has register_globals off. In my script is there anyway to turn it on, just for my script? One trick for using old PHP code is to use extract($HTTP_POST_VARS); ...at the beginning of your script. That will autocreate all the POST variables for you. Works for GET and others, too. - Steve Yates - Psychology: the study of the id by the odd. ~ Do you like my taglines? Add them to your messages and ~ laugh through hundreds more by downloading Taglinator ~ at www.srtware.com today! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: HTTP_SERVER_VARS not working. Please help
Cirstoiu Aurel Sorin [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... I tried to use $HTTP_SERVER_VARS['HTTP_HOST'] but the result is null. I believe your web server has to set that variable. Does phpinfo() show a value for it? - Steve Yates - Friends don't let friends drive naked. ~ Do you like my taglines? Add them to your messages and ~ laugh through hundreds more by downloading Taglinator ~ at www.srtware.com today! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php