Re: [PHP] probelem with script

2002-06-05 Thread Stuart Dallas
On Wednesday, June 5, 2002 at 1:57:09 PM, you wrote: // the error is bieng caused here $size = int filesize($file) You don't need the int and you were missing a semicolon... $size = filesize($file); -- Stuart -- PHP General Mailing List

Re[2]: [PHP] Parse Error in my Mail Function -UPDATED

2002-06-07 Thread Stuart Dallas
On Friday, June 7, 2002 at 7:08:00 PM, you wrote: Lines 29, 30, and 31 //29 $headers = $from . \r\n . $bcc . \r\n //30 - The Next Line is where I'm getting the parse Error at: mail ($to, $setting_site_name, $mailpost, $headers) or $emailsuccess =Failure sending email.; //31 if

Re[2]: [PHP] Re: strip_tags bug ?

2002-06-07 Thread Stuart Dallas
On Friday, June 7, 2002 at 10:23:08 PM, you wrote: Hmm... you could always do something like: $t = ereg_replace( , lt; , $t); $t = ereg_replace( , gt; , $t); $nt = strip_tags($t); $nt = ereg_replace( lt; , , $nt); $nt = ereg_replace( gt; , , $nt); maybe? That depends on what

Re[3]: [PHP] Re: strip_tags bug ?

2002-06-07 Thread Stuart Dallas
On Friday, June 7, 2002 at 10:30:59 PM, I wrote: /SCRIPT There should be another space here... /SCRIPT -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re[2]: [PHP] Tracking Problem -- Force full script execution?

2002-06-07 Thread Stuart Dallas
On Friday, June 7, 2002 at 11:00:24 PM, you wrote: I don't have an answer, but I'm impressed that you're able to get 144,000,000 hits a day - on par with Yahoo which was previously considered the runaway leader in web traffic volume. That must be some pretty amazing porn. I'm more amazed

Re: [PHP] Form Variables

2002-06-07 Thread Stuart Dallas
On Saturday, June 8, 2002 at 1:56:35 AM, you wrote: I recently installed PHP 4.2.1 on my G4 Powerbook (OS X v10.1.4) running Apache 1.3.2. I have verified that php is running and apache is running. When I access a page locally http://127.0.0.1/simple_form.php, fill in the only text box and

Re[2]: [PHP] Form Variables

2002-06-07 Thread Stuart Dallas
On Saturday, June 8, 2002 at 2:22:02 AM, you wrote: I just read the release notes and do not believe they are referring to my dilemma. Actually, I think they point out the exact reason for your 'dilemma'. Here is the code I am using. Just a basic form Form_act.php ? if ($phrase){ echo

Re: [PHP] Not php related - php.net logo in Netscape 7?

2002-06-07 Thread Stuart Dallas
On Saturday, June 8, 2002 at 3:04:30 AM, you wrote: I am using Netscape 7 preview release. When I go to www.php.net, it displays the php logo in the address bar. Does anyone know how this is done? If I'm not mistaken, it's a favicon.ico file. See http://www.favicon.com/ for full info.

Re: [PHP] Reading from a dir.

2002-06-08 Thread Stuart Dallas
On Saturday, June 8, 2002 at 3:23:01 PM, you wrote: Is there another way to read the files from a directory? http://www.php.net/readdir -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] array_reverse() recursive

2002-06-10 Thread Stuart Dallas
Monday, June 10, 2002, 5:07:48 PM, you wrote: Does anyone have or know of a function that will take an array and do array_reverse() recursively? I have the following array/structure: Something like this (UNTESTED!!)... function recursive_array_reverse($arr) { foreach ($arr as $key =

Re: [PHP] array_reverse() recursive

2002-06-10 Thread Stuart Dallas
Monday, June 10, 2002, 5:12:50 PM, you wrote: Monday, June 10, 2002, 5:07:48 PM, you wrote: Does anyone have or know of a function that will take an array and do array_reverse() recursively? I have the following array/structure: Something like this (UNTESTED!!)... function

Re: [PHP] Help with header function

2002-06-10 Thread Stuart Dallas
On Monday, June 10, 2002 at 8:03:40 PM, you wrote: header(Location:http://www.mysite.com/file_exists.php;); You should have a space after Location:... header(Location: http://www.mysite.com/file_exists.php;); If that's not it, please post the error/what happens. We are not mind readers. --

Re: [PHP] Array into database

2002-06-11 Thread Stuart Dallas
On Tuesday, June 11, 2002 at 10:25:36 PM, you wrote: I would like to know wether it's possible to put an array into a database? If not, what is the best way to archieve something like that? Yes it is. See http://www.php.net/serialize -- Stuart -- PHP General Mailing List

Re: [PHP] Array into database

2002-06-11 Thread Stuart Dallas
On Tuesday, June 11, 2002 at 10:59:00 PM, you wrote: So this would handle 2-demensional arrays too? So, if I have $array = ( foo = bar, wom = bat ); (erm, i know it's late, but that looks like a 1-dimensional associative array) it would work? As far as I know, serialize

Re: [PHP] How do I stop foreach if $menu not set??

2002-06-11 Thread Stuart Dallas
On Tuesday, June 11, 2002 at 10:59:13 PM, you wrote: I Have worked out this, but when $menu is not set it does the foreach function anyway, and desplays an error. What Can I do to stop the foreach function from working if $menu is not set?? http://www.php.net/isset -- Stuart -- PHP

Re[2]: [PHP] netscape wont show form result

2002-06-12 Thread Stuart Dallas
On Wednesday, June 12, 2002 at 5:48:02 AM, you wrote: An 'exit' directive had secretly sneaked into the script! which caused ns to abort the rest of the script (as it should) while ie blissfully ignored it(??). Anyway it all works now. Thanks again. Just thought I'd point out an error in

Re[2]: [PHP] Array into database

2002-06-12 Thread Stuart Dallas
On Wednesday, June 12, 2002 at 7:18:18 AM, you wrote: And how should I store a serialized variable in my database? As String or as Blob? Since serialize returns a string, I would guess that you store it in a mongoose. Sorry for the sarcasm, but it's getting late and that info is on the manual

Re: [PHP] passing name / value pairs in URL

2002-06-13 Thread Stuart Dallas
Thursday, June 13, 2002, 1:37:03 AM, you wrote: Until the recent version of PHP i've enjoyed being able to pass variables as name/value pairs within my URL. this has been essential for accessing my mysql database. here is an example of a url. Why can't you continue to enjoy it?

Re: [PHP] goto

2002-06-13 Thread Stuart Dallas
On Thursday, June 13, 2002, 1:22:07 PM, Stephen Brewster wrote: HTML table products type=loop tr tdproducts type=text field=name/td tdproducts type=text field=price/td /tr products type=endloop /tr PHP --- if($type == 'LOOP') { $sql = 'SELECT * FROM

Re: [PHP] php-speed

2002-06-13 Thread Stuart Dallas
Thursday, June 13, 2002, 2:09:23 PM, you wrote: I don't think so. The difference is (IMHO + the article linked below) if you use ...a href=?=$Var?Foo/a... (faster) or ? print ...a href=\$Var\Foo/a...; ? (slower) Actually, Brian is right. PHP parses text contained within s whereas it

Re: [PHP] view source with opera

2002-06-13 Thread Stuart Dallas
On Thursday, June 13, 2002, 2:20:29 PM, you wrote: I'm quite sure that this won't work... The server isn't delivering the php source, so the client will not get the source code but only the resulting code the script generated. So IMHO this is a hoax. Unless your server has phps (source

Re: [PHP] view source with opera

2002-06-13 Thread Stuart Dallas
On Thursday, June 13, 2002, 2:49:56 PM, you wrote: I'm quite sure that this won't work... The server isn't delivering the php source, so the client will not get the source code but only the resulting code the script generated. So IMHO this is a hoax. Unless your server has phps

Re: RES: [PHP] view source with opera

2002-06-13 Thread Stuart Dallas
On Thursday, June 13, 2002, 2:59:35 PM, you wrote: yes the bad guy says it only happen in opera i ask to show me how but give no response until now Let us know what he says. I think we'd all be interested. -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] $HTTP_USER_AGENT

2002-06-13 Thread Stuart Dallas
On Thursday, June 13, 2002, 4:36:29 PM, you wrote: Why $HTTP_USER_AGENT don't work?? I can't get it's value, but in phpinfo the value appears. why this??? Try $_SERVER['HTTP_USER_AGENT']. If that works, read http://www.php.net/manual/en/language.variables.predefined.php. -- Stuart -- PHP

Re: [PHP] PHP with No Web Server?

2002-06-13 Thread Stuart Dallas
On Thursday, June 13, 2002, 5:00:23 PM, you wrote: In other words.. Can PHP serve as the Web Server or is another web server required to handle the socket connections, etc.? PHP can serve as a web server, but you would need to write (find) the code to do it - I'm sure there is plenty out

Re[2]: [PHP] PHP with No Web Server?

2002-06-13 Thread Stuart Dallas
On Thursday, June 13, 2002 at 5:18:31 PM, you wrote: Would that work? Surley it'd not be a particularly efficiant webserver if written in PHP? Would be interesting to try.. I had a quick look for such code but could'nt see any... perhaps a PHP-GTK app could work I suppose... if you were

Re: [PHP] Spam Bots/E-mail Addys

2002-06-13 Thread Stuart Dallas
On Thursday, June 13, 2002 at 6:10:35 PM, you wrote: If I have a site that stores information about people in a database, including e-mail addresses, and that information is only viewable when called via a user-specific variable, i.e. their alias, can spambots still harvest those e-mail

Re[2]: [PHP] Spam Bots/E-mail Addys

2002-06-13 Thread Stuart Dallas
On Thursday, June 13, 2002 at 6:24:17 PM, you wrote: Analysis Solutions wrote: If you don't need the address to be hyperlinkable, you can put the user, and domain in different table cells. Or even put each letter in a separate cell. Could even set the border, cellspacing and cellpadding

Re[2]: [PHP] Spam Bots/E-mail Addys

2002-06-13 Thread Stuart Dallas
On Thursday, June 13, 2002 at 6:30:11 PM, you wrote: So basically, to keep the address away from bots, keep it away from normal users. Okay, so something like this would be more effective: Have a form with a hidden input of the user's alias, and an input of E- mail me!, that form posts to an

Re: [PHP] [arrays] reading from a form.

2002-06-13 Thread Stuart Dallas
On Thursday, June 13, 2002 at 6:38:10 PM, you wrote: I have a example.html --- script function add() { var res=0; for(x=0;x3;x++)res=res+parseFloat(example.text[x].value); example.result.value=res; } /script html form name=example action=show.php input

Re[2]: [PHP] beginner in PHP

2002-06-13 Thread Stuart Dallas
On Thursday, June 13, 2002 at 7:44:39 PM, you wrote: Yes, here is the checkout code I used... function chout(){ session_destroy(); unset ($mycart); unset ($cart_items); echo pThank you for shopping!/p;

Re: [PHP] php server on Windows

2002-06-13 Thread Stuart Dallas
On Thursday, June 13, 2002 at 7:54:30 PM, Phil Schwarzmann wrote: I know that PHP on Windows has some limitations as compared to Linux. What are these limitations? There are limitations? Where did you hear this? If there are any I haven't come across them yet. Which version of Windows would

Re: [PHP] sessions help

2002-06-13 Thread Stuart Dallas
On Thursday, June 13, 2002 at 9:46:10 PM, you wrote: First, I load Doc 1 (to set the session variable). Then I load Doc 2 to retrieve the variable. When doc 2 runs, I get the following:

Re[2]: [PHP] sessions help

2002-06-13 Thread Stuart Dallas
On Thursday, June 13, 2002 at 10:04:05 PM, you wrote: I just tried adding session_start() to the beginning of both files. When I load Doc 1, I get this warning twice(!): Warning: Cannot send session cache limiter - headers already sent (output started at c:\program files\apache

Re[3]: [PHP] sessions help

2002-06-13 Thread Stuart Dallas
On Thursday, June 13, 2002 at 10:32:25 PM, you wrote: Thanks to Julie and Stuart for helping me. With your direction, I got rid of the warning about the headers by putting the session_start() at the beginning of the file. Now I get a different sort of error when I try to retrive the

Re: [PHP] RE: GD Questions: Please help.

2002-06-13 Thread Stuart Dallas
On Thursday, June 13, 2002 at 10:39:51 PM, you wrote: if /path/to/image/cache/$id exists then just spit that file back to the browser and exit If you're gonna do this, be sure to check that $id doesn't contain something dangerous such as

Re[4]: [PHP] sessions help

2002-06-13 Thread Stuart Dallas
On Thursday, June 13, 2002 at 11:07:16 PM, you wrote: I've stripped the code down to barest bones to try to figure this out: [getglobal.php] ... echo Node is {$_SESSION['node']}.; ... [session.php] ... $_SESSION['node'] = 10.2; ... Other than the standard html, head, title, body tags

[PHP] Re: [PHP-WIN] SSL Support for PHP....

2002-06-14 Thread Stuart Dallas
On Friday, June 14, 2002, 9:13:59 AM, Brian McGarvie wrote: How does IIS fair against Apache with servring multiple sites? each site will be like... http://customername.ourdomain.co.uk Both are capable of serving multiple sites without any issues that I am aware of. Also - more an IIS/Apache

Re: [PHP] Reg-Maximum allowed size for uploaded files

2002-06-14 Thread Stuart Dallas
On Friday, June 14, 2002, 11:51:22 AM, SenthilVelavan wrote: How to increase the time out time.Whether we have to edit the httpd.conf or php.ini file to increase the time out time. Per script: http://www.php.net/set_time_limit In PHP.ini:

[PHP] Re: [PHP-WIN] SSL Support for PHP....

2002-06-14 Thread Stuart Dallas
On Friday, June 14, 2002, 11:07:24 AM, Brian McGarvie wrote: Basically then there is no real reason for Apache over IIS on win2k server? Not now Apache 2 is here. Apache 1.x has always been considered by the Apache group as beta code and therefore not suitable for use in a production

Re[2]: [PHP] Re: php server on Windows

2002-06-14 Thread Stuart Dallas
On Friday, June 14, 2002 at 11:30:07 PM, Bruce Karstedt wrote: Put your site on a *nix box with apache its a heck of a lot faster and a heck of a lot more stable and a heck of a lot easier to configure and upgrade. It's all very well saying that, but have you got any evidence to back those

Re: [PHP] PLEASE HELP! session variable fails to persist!!

2002-06-14 Thread Stuart Dallas
On Saturday, June 15, 2002 at 12:53:47 AM, Zlutarch G. wrote: The session ID is the same for a given session, that means the server knows its the same session. And since I get the value 1 each time, I can see that the $_SESSION[var] is a global variable with a value of 1. But it seems that

Re: [PHP] 'CC' and 'BCC' in mail function

2002-06-14 Thread Stuart Dallas
On Friday, June 14, 2002 at 10:01:24 PM, Sridhar Moparthy wrote: Does any one know how to make mail() function to send mail to 'CC' and 'BCC' address. I have tried to keep 'CC' and BCC' in header, but it is not working. Mail function is sending the message to 'To' address but not to 'CC' and

Re[2]: [PHP] PLEASE HELP! session variable fails to persist!!

2002-06-14 Thread Stuart Dallas
On Saturday, June 15, 2002 at 1:27:58 AM, Zlutarch G. wrote: I tried your idea but it didn't work. When I used session_encode(), I got nothing! It seems that it's not being registered as a session variable. Any idea why that is the case? I hope this will help clear up any confusion. Go

Re[4]: [PHP] PLEASE HELP! session variable fails to persist!!

2002-06-14 Thread Stuart Dallas
On Saturday, June 15, 2002 at 1:42:45 AM, Zlutarch G. wrote: I tried your script, but I couldn't get it to work. I guess it has to be something wrong with my server configuration? I am using Apache 1.3.14. I am new to Apache, so I don't know what could possibly be the configuration problem.

Re[6]: [PHP] PLEASE HELP! session variable fails to persist!!

2002-06-14 Thread Stuart Dallas
On Saturday, June 15, 2002 at 2:05:50 AM, Zlutarch G. wrote: Thanks. I added error_reporting (E_ALL); and it gave me the following error msg: Warning: Undefined index: var in c:\program files\apache group\apache\htdocs\php\superstock\ssi\valuecalc\valuescreen\testsess.php on line 6 Here

Re[4]: [PHP] Re: php server on Windows

2002-06-15 Thread Stuart Dallas
On Saturday, June 15, 2002 at 3:48:03 AM, you wrote: An opinion was requested, and I gave it. And everyone is entitled to an opinion, but what you gave was the typical down with windows response when you clearly have not evidence to back it up. I will make a few pointed comments and then I

Re: [PHP] PHP timeout

2002-06-15 Thread Stuart Dallas
On Saturday, June 15, 2002 at 10:52:14 AM, Kim Bauters wrote: In the file php.ini, the 2 timeout settings are both changed from 30 to 300, but I keep on getting an error like CGI script Timeout. I think you'll find that's the IIS CGI timeout, not PHPs. You can find that setting in the site

Re[2]: [PHP] PHP timeout

2002-06-15 Thread Stuart Dallas
On Saturday, June 15, 2002 at 11:43:05 AM, Kim Bauters wrote: indeed, it is a IIS CGI timeout. However, when I take a look at the tab you gave me, I can only seem to find the tabs called App Mappings, App Options and App Debugging. Is this the right place and is the tab just missing or is

Re[2]: [PHP] Apache/2.0.36 + Win98 + PHP4=Error(31)

2002-06-15 Thread Stuart Dallas
On Saturday, June 15, 2002 at 3:34:06 PM, Chris Garaffa wrote: If I recall correctly, PHP 4.x doesn't work with Apache 2 There is a module specifically for Apache 2 in PHP 4.2.0 onwards. I'm not sure what error using the module for Apache 1.3.x would produce. This could be the problem. The

Re[4]: [PHP] PHP timeout

2002-06-15 Thread Stuart Dallas
On Saturday, June 15, 2002 at 11:58:44 AM, Kim Bauters wrote: My IIS version is 5.0 Hmm, same as mine. Have a look in the master properties of the server. If it's not there then I suggest you search the MS site for help. -- Stuart -- PHP General Mailing List (http://www.php.net/) To

Re[2]: [PHP] Parsing Text File

2002-06-15 Thread Stuart Dallas
On Saturday, June 15, 2002 at 9:05:40 PM, Nathan Taylor wrote: ?php $open = fopen(file.txt,r+); while($contents = fgets($open)) { $line_array[$x] = $contents; $x++; } ? This wheel exists: http://www.php.net/file ?php $line_array = file('file.txt'); ? -- Stuart -- PHP General

Re: [PHP] find replace quotes with single quotes

2002-06-18 Thread Stuart Dallas
On Tuesday, June 18, 2002, 2:54:31 PM, Dan McCullough wrote: I need to strip out the double quotes and replace it with single quotes. Any help would be appreciated. $dest = str_replace(\, ', $source); -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Cc / Bcc don't work on win2k but on linux???

2002-06-21 Thread Stuart Dallas
On Friday, June 21, 2002, 3:14:17 PM, you wrote: i am facing the above issue. i set the headers up for the mail(). tried submitting the email. it worked great on linux server. but when i try to run it on a win2k. i just get: Warning: Server Error in blahblah.php on line blahblah my piece

Re: [PHP] Cc / Bcc don't work on win2k but on linux???

2002-06-21 Thread Stuart Dallas
On Friday, June 21, 2002, 4:01:44 PM, Lance wrote: i tried that. using different email addresses. all of them are valid. still getting the same error. however, when i change the Cc to cc, no error was thrown. but only the To: will receive the email. the Cc: never get the mail. any other

Re: [PHP] Cc / Bcc don't work on win2k but on linux???

2002-06-21 Thread Stuart Dallas
On Friday, June 21, 2002, 4:40:00 PM, Lance wrote: yes, and it did show me whats wrong. but i have no idea why is that the case... 127.0.0.1 SMTPSVC1 RCPT - +TO:[EMAIL PROTECTED] 250 127.0.0.1 SMTPSVC1 RCPT - +TO:Cc:[EMAIL PROTECTED] 501 i don't understand why the Cc is been treated as a

Re: [PHP] Using Oracle Data base store procedure (function, procedure, package)

2002-06-24 Thread Stuart Dallas
On Monday, June 24, 2002, 3:46:02 AM, èdy kurniawan wrote: The manual doesn't show how we can execute kind of oracle store procedure .. I know nothing about using Oracle from PHP, but a quick search on Google revealed the following: http://www.phpworld.com/manual/ref.oci8.html - example 2 shows

Re: [PHP] Dynamic List Boxes

2002-06-29 Thread Stuart Dallas
On Saturday, June 29, 2002 at 10:03:16 PM, Chase wrote: I am *very* new to PHP, so this may seem like a stupid question... I am trying to generate dynamic drop-down lists for use in an HTML form, but I have done something wrong with my code. Instead of getting one list box with three

Re: [PHP] whats wrong with this function

2002-07-03 Thread Stuart Dallas
On Wednesday, July 3, 2002, 1:47:05 PM, Adrian Murphy wrote: whats wrong with this. it's getting stuck somewhere Somewhere isn't very helpful. When asking for help be sure to include as much information as possilble. Laying out your code so the structure can be seen... ?php function

Re: [PHP] Stock Prices

2002-07-03 Thread Stuart Dallas
On Wednesday, July 3, 2002, 4:12:02 PM, Analysis Solutions wrote: On Fri, Mar 29, 2002 at 03:00:29AM +0200, David Russell wrote: How would I get recent stock prices in a page? I obviously need to get this from some source. I am looking for local (South African) and international share

Re: [PHP] phpBB Info

2002-07-06 Thread Stuart Dallas
On Saturday, July 6, 2002 at 5:35:26 PM, BrettM wrote: I wanna be able to do some stuff, which involves getting data from my phpBB board. Member Count: (this section should autoupdate) Number Of Forums: (this section should autoupdate) Highest Post Count: (this section shouldauto

Re: [PHP] integrating usenet into http? how is this done???

2002-07-15 Thread Stuart Dallas
On Monday, July 15, 2002, 1:55:44 PM, Andy wrote: I just found a site where they have integrated a usenet forum into their own forum. I am wondering how this is technicaly done? The postings seem to be pretty up to date ( I did compare them with the usenet ones) Here is the link:

Re: [PHP] integrating usenet into http? how is this done???

2002-07-15 Thread Stuart Dallas
On Monday, July 15, 2002, 2:42:24 PM, Stuart Dallas wrote: On Monday, July 15, 2002, 1:55:44 PM, Andy wrote: Has anybody an idea how they do this. It would be relatively straight-forward to have a PHP script run periodically, read from an NNTP server and add new posts into the forum database

[PHP] Re: NMTP server and db

2002-07-15 Thread Stuart Dallas
Please don't contact me privately unless you want to hire me. On Monday, July 15, 2002, 5:13:35 PM, andy wrote: ok sounds logical. Don't have any experiance on doing anything nntp related in php. There are some questions I am wondering about: - do I have to compile php with a special flag

Re: [PHP] Re: NMTP server and db

2002-07-15 Thread Stuart Dallas
On Monday, July 15, 2002, 6:00:44 PM, I wrote: You can do it 2 ways: either using the sockets or with the IMAP functions. I'm not too sure about sockets, but the IMAP function require the IMAP module to be loaded. D'oh, forgot the link: http://www.php.net/manual/en/ref.imap.php -- Stuart

Re: [PHP] Any sites like www.webcron.org?

2002-07-15 Thread Stuart Dallas
On Monday, July 15, 2002, 6:49:06 PM, Leif K-Brooks wrote: I'm making a web site with a friend. For now, we're stuck on a free host with no cron. We need it, and I tried www.webcron.org, but it seems to be down. Does anyone here know of similar services? Thanks for any help. I don't

Re: [PHP] Browser cache

2002-04-23 Thread Stuart Dallas
José León Serna [EMAIL PROTECTED] wrote: Hello: How could I disable the browser cache?, I have a script that generates an image and shows it via IMG SRC=myimage. The problem is if I change the image, the browser doesn't reflect the changes until I push refresh. I supose is sending a

RE: [PHP] bulletin board algorithm in php - how to write one?

2002-04-24 Thread Stuart Dallas
Good description. One minor addition I would suggest: That schema only allows for one level of replies. Add a parentpostid to the posts table and you can easily handle replies to replies to replies to replies (etc) to a thread. Stuart -Original Message- From: Kevin Stone [mailto:[EMAIL

Re: [PHP] basename unix/windows

2002-04-25 Thread Stuart Dallas
ROBERT MCPEAK [EMAIL PROTECTED] wrote: In other words: basename(/usr/blah/doh/yuck/wow/abigfile.html) resolves to : abigfile.html but basename(adirectory\onawindowsbox\abigfile.html) does not resovle to abigfile.html. Does anybody have a workaround for this? Convert all \ to /

RE: [PHP] web application development question

2002-04-26 Thread Stuart Dallas
Almost all the databases I work with have a table called vars. This table consists of two fields, strkey and strval, both VARCHAR(255). I then have 2 functions defined in the global include file for the site called GetVar and SetVar. This solution works well for me. -- Stuart -Original

RE: [PHP] simplify if/then statement

2002-04-27 Thread Stuart Dallas
$incfilename = Calc.$state..class.inc; if (file_exists($incfilename)) include($incfilename); else echo Please select a State.br\n; -- Stuart -Original Message- From: Jim Long [mailto:[EMAIL PROTECTED]] Sent: 27 April 2002 20:00 To: php Subject: [PHP] simplify if/then

RE: [PHP] Removing empty elements from an array

2002-04-28 Thread Stuart Dallas
If $arr is your array, something like... foreach ($arr as $key=$val) { if (strlen($val) == 0) unset($arr[$key]); } HTH, Stuart -Original Message- From: Craig Westerman [mailto:[EMAIL PROTECTED]] Sent: 28 April 2002 15:37 To: php-general-list Subject: [PHP] Removing empty

RE: [PHP] Auto refresh when data changed in Mysql

2002-04-28 Thread Stuart Dallas
All header calls need to be made before any content is sent back to the browser. Try this... -- BEGIN CODE -- ?php header (Expires: Mon, 1 Jan 1990 05:00:00 GMT);// Date in the past header (Last-Modified: . gmdate(D, d M Y H:i:s) . GMT);

RE: [PHP] Deleting from a SQL db

2002-04-29 Thread Stuart Dallas
Replace the die(...) with die(mysql_error()) and the message should tell you what's wrong. Stuart -Original Message- From: Joshua E Minnie [mailto:[EMAIL PROTECTED]] Sent: 29 April 2002 20:11 To: [EMAIL PROTECTED] Subject: [PHP] Deleting from a SQL db Can anyone help me understand why

RE: [PHP] Deleting from a SQL db

2002-04-29 Thread Stuart Dallas
: 29 April 2002 20:21 To: [EMAIL PROTECTED] Subject: Re: [PHP] Deleting from a SQL db Stuart Dallas [EMAIL PROTECTED] wrote: Replace the die(...) with die(mysql_error()) and the message should tell you what's wrong. It never gets to the die(...) statement. The script is returning a positive

RE: [PHP] Deleting from a SQL db

2002-04-29 Thread Stuart Dallas
mssql_affected_rows() Sorry, that should be mssql_rows_affected(). Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Variable Help.

2002-05-01 Thread Stuart Dallas
On 1 May 2002 at 18:39, Randum Ian wrote: I want to link to a page like this: http://www.danceportal.co.uk/charts.php?wk0001-fri-18-jan-2002 How do I get the information into a script? The variable $_SERVER[QUERY_STRING] will contain wk0001-fri-18-jan-2002. -- Stuart -- PHP General

Re: [PHP] Replacing non exact strings

2002-05-03 Thread Stuart Dallas
On 3 May 2002 at 11:36, Julio Nobrega Trabalhando wrote: $searched = Joe Doe; $original = Joe Cougar Doe; $final = bJoe/b Cougar bDoe/b; Any ideas about how can I achieve this result? I am currently using eregi_replace($searched, b$searched/b, $original), so that's why it only accepts

Re: [PHP] date(), strtotime(), Wed, Dec 31, 1969 ??

2002-05-03 Thread Stuart Dallas
On 3 May 2002 at 12:04, ROBERT MCPEAK wrote: $blah=2002-05-02; $thedate = date(D, M d, Y, strtotime($blah)); $echo $thedate; $blah will = 1995. Try putting quotes around the date... $blah = 2002-05-02; -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] sendmail return-path (not 4 newbies)

2002-05-03 Thread Stuart Dallas
On 3 May 2002 at 12:48, Anthony Rodriguez wrote: PROBLEM When a php script uses mail() and sendmail, if the e-mail address is not right, the e-mail is returned to the envelope sender (the hosting provider), NOT to the From, Reply-To, Return-Path, or any other additional headers included

Re: [PHP] Controlling Word Files (FDA Concern)

2002-05-03 Thread Stuart Dallas
On 3 May 2002 at 14:11, Gary wrote: Does anyone know of how to put a Word file on a web page without the user being able to save it to their hard drive? And also another issue of making it so they can't print it. If they can read it, they can save it and print it. Nothing you can do to stop

RE: [PHP] I-worm/Klez and a GIF query/question

2002-05-03 Thread Stuart Dallas
On 3 May 2002 at 21:51, Maciej Uhlig wrote: What you could do, is to produce ten digits [0..9] icons as gifs using commercial software and then display them randomly using the best PHP script :-) The only problem with that is that it would be pretty easy for a script to parse the page and

RE: [PHP] I-worm/Klez and a GIF query/question

2002-05-03 Thread Stuart Dallas
On 3 May 2002 at 15:42, Miguel Cruz wrote: There are browsers that are still in somewhat common use that cannot gracefully display PNGs. Try IE 4.5 on a Mac, for instance. In that case, use JPEGs, or am I missing something? -- Stuart -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Sessions

2002-05-04 Thread Stuart Dallas
On 4 May 2002 at 18:22, Alex Francis wrote: Warning: open(/tmp\sess_51d4849918d3ffe4d2cc70013d678f6b, O_RDWR) failed: No such file or directory (2) Does the directory it's trying to write to exist? Seeing as you've posted this question, I'll assume that you don't understand the error

Re: [PHP] Re: SSH

2002-05-05 Thread Stuart Dallas
On 5 May 2002 at 14:12, Kyle Gibson wrote: Warning: Cannot execute using backquotes in safe mode in test.php on line 2 Your ISP has safe mode turned on which means you cannot use backquotes. Read all about it at http://www.php.net/manual/en/features.safe-mode.php. -- Stuart -- PHP General

RE: [PHP] file_exists

2002-05-07 Thread Stuart Dallas
On 6 May 2002 at 20:30, Craig Westerman wrote: File is on another server. Is there a way to check if file exists on another server? I wrote the following function a while ago to do this. It works with http URLs and should also work with https and ftp, but I have only tested http. I hope it's

Re: [PHP] permissions issue under NT?

2002-05-07 Thread Stuart Dallas
Jason Wong [EMAIL PROTECTED] wrote: I've tried changing the /tmp permissions, but the combinations are considerable, and I don't have time to try them all. I was hoping someone could point me in the right direction. Set it world readable/writeable? Oooh, nasty. That should be your last

Re: [PHP] httpS connection with FILE

2002-05-10 Thread Stuart Dallas
On 10 May 2002 at 16:07, Bert Buckley wrote: I would like very much to retrieve data from an https server using the file function, but it only supports an http call. 1. Can someone suggest a good alternative http://www.php.net/curl -- Stuart -- PHP General Mailing List

Re: [PHP] read all files in directory

2002-05-11 Thread Stuart Dallas
On Sun, 12 May 2002 00:39:21 +0200, you wrote: How can I read all files in a directory, when I don't know which files are there? http://www.php.net/manual/en/class.dir.php -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Authentication with register_globals OFF

2002-05-11 Thread Stuart Dallas
On Sat, 11 May 2002 21:21:27 -0400, you wrote: Trying to get accustomed to PHP 4.2.0 and PHP's preference for register_globals off, I have register_globals off. However, when I try to use $PHP_AUTH_USER and $PHP_AUTH_PW, my script fails (attempting to validate username and password credectials

Re: [PHP] Genus who came up with Self Destruct Code Copy Pro tection

2002-05-14 Thread Stuart Dallas
Collins, Robert [EMAIL PROTECTED] wrote: Put something like this in the top of each of the pages that have common functions PSUDO CODE if(file_exists(/path/to/file/core_functions.php)){ $core_functions = /path/to/file/core_functions.php; }else{

Re: [PHP] switch and register_globals.

2002-05-14 Thread Stuart Dallas
Gerard Samuel [EMAIL PROTECTED] wrote: With register_globals off, switch() has a little handicap. ie switch($foo) { break; } $foo, is now illegal/not set. Why can't you just use switch($_POST['foo'])? Or did I leave my brain at home today? -- Stuart -- PHP General

Re: [PHP] switch and register_globals.

2002-05-14 Thread Stuart Dallas
Gerard Samuel [EMAIL PROTECTED] wrote: foo can also be $_GET['foo'] in the same script In that case use $_REQUEST['foo']. -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Getting all files in a directory

2002-05-14 Thread Stuart Dallas
notoriousvic_ca [EMAIL PROTECTED] wrote: Is there anyway I can get all the file and directories in a specific directory? http://www.php.net/readdir -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Getting all files in a directory

2002-05-14 Thread Stuart Dallas
Stuart Dallas [EMAIL PROTECTED] wrote: notoriousvic_ca [EMAIL PROTECTED] wrote: Is there anyway I can get all the file and directories in a specific directory? http://www.php.net/readdir And I'd suggest that you read this to avoid sarcastic answers: http://www.tuxedo.org/~esr/faqs/smart

Re: [PHP] what does this mean in plain english?

2002-05-17 Thread Stuart Dallas
On 17 May 2002 at 12:23, Jeff Field wrote: $theValue = ($theValue != ) ? ' . $theValue . ' : NULL; It's a shortened version of the if...else construct. As in... condition ? this_if_true : this_if_false -- Stuart -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] How to simultaneously send HTML *and* start download?

2002-05-21 Thread Stuart Dallas
On 21 May 2002 at 20:37, D. D. Brierton wrote: The result I'm looking for is like the CGI script at netscape for downloading NS6 - it takes you to a page which says aomething like The download should start automatically and then the download begins. I'm having trouble figuring out how to do

Re: [PHP] exec() under win2000 apache not works?

2002-05-28 Thread Stuart Dallas
Posteingang [EMAIL PROTECTED] wrote: $cmd_commando = cmd /c xcopy C:\php\INPUT\* C:\php\OUTPUT\* /w /f /i /s /e /h /y; You need to escape your backslashes... $cmd_commando = cmd /c xcopy C:\\php\\INPUT\\* C:\\php\\OUTPUT\\* /w /f /i /s /e /h /y; Also, make sure the account Apache is

Re: [PHP] Apache query error affecting PHP?

2002-05-28 Thread Stuart Dallas
Weston Houghton [EMAIL PROTECTED] wrote: Apache will actually return the directory listing of the assets/ directory (assuming you have directory listing enabled, otherwise it returns the standard forbidden error). It does not seem to matter what the actual variable name following the ? is.

Re: [PHP] mail() source code

2002-05-28 Thread Stuart Dallas
Anthony Rodriguez [EMAIL PROTECTED] wrote: I'm planning to write a modified mail() to include the true return-path. In order to do so, I need to communicate directly with sendmail and, in my newbie's opinion, a good start would be to review the source code of the mail(). Before you do that

  1   2   3   4   5   6   >