Re: [PHP] mail()

2003-07-05 Thread Dan Anderson
> > Could someone let me know if it is possible to pass a resultset of a query > > to a single variable so it can be included as the message part of the mail > > function? if I were you I would try something like... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

Re: [PHP] Timing out fopen using https stream wrapper?

2003-07-05 Thread Dan Anderson
> It seems I have been over the documentation repeatedly, but there simply > isn't any documented way of setting a timeout duration. Any ideas? If you want to set a time out on execution of the /script/, check out: http://us3.php.net/manual/en/function.set-time-limit.php -Dan -- PHP General

Re: [PHP] Authorization script

2003-07-05 Thread Dan Anderson
> The problem is that if a user clicks cancel the control panel loads > instead of the program dying. Why and how do I stop it? Please provide more info -- like what do you mean by "if the user clicks cancel". -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:

Re: [PHP] Limit output of query field

2003-07-05 Thread Dan Anderson
Look up the function substr. It will allow you to create a string of the first 50 chars from your 400 char string. -Dan On Sat, 2003-07-05 at 09:58, [EMAIL PROTECTED] wrote: > Hi there, > > Hope you can help me with the following: > > I have a query and i'm showing the output: > > echo $row->

Re: [PHP] Limit output of query field

2003-07-05 Thread Dan Anderson
> Make it with your sql query, it will be faster: > SELECT ..., IF(LENGTH(text)>50, CONCAT(SUBSTRING(text,0,50),'...'), > text) as text I won't outright disagree, but warn fkessen to be careful. There are some scenarios in which that would not be faster. -Dan -- PHP General Mailing List (htt

Re: [PHP] Help a newbie.

2003-07-05 Thread Dan Anderson
If I were you I would create a mySQL (or Postgresql) database containing all of the thumbnails. Use the row id of the mySQL (Postgresql) table to decide which row to display. You probably will want to look up the documentation and/or google. -Dan On Sat, 2003-07-05 at 11:44, Michael Whiting w

RE: [PHP] Timing out fopen using https stream wrapper?

2003-07-05 Thread Dan Anderson
> This has no effect on stream operations. I have a timeout set in php.ini, > but the script never times out, so that should further illustrate the issue. But if you'd visited the page I sent you and viewed user comments you would see how to set a time limit for socket operations (what you're doi

Re: [PHP] Forms and PHP_SELF

2003-07-05 Thread Dan Anderson
Be careful when using PHP self. Not all servers support it. If you're planning on using this script over and over on multiple servers you may find creating a variable is helpful. $some_variable = "the_script_name.php"; Then, where you would use PHP_SELF just echo (or whatever) $

Re: [PHP] Forms and PHP_SELF

2003-07-05 Thread Dan Anderson
> Please don't mislead users! That's plain untrue. I assure you that server administrators can turn off the variables such as PHP SELF. It may not be common but it does happen. -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Timing out fopen using https stream wrapper?

2003-07-05 Thread Dan Anderson
here did you see that would be useful to my use of > fopen('http://etc')? > > -Original Message- > From: Dan Anderson [mailto:[EMAIL PROTECTED] > Sent: Saturday, July 05, 2003 5:28 PM > To: Giz > Cc: [EMAIL PROTECTED] > Subject: RE: [PHP] Timing ou

Re: [PHP] Reading from remote file

2003-07-06 Thread Dan Anderson
Since you're using a break to determine when to leave why not... > $handle = fopen ("http://www.php.net/";, "rb"); > $contents = ""; while (!(feof($handle))) > { > $data = fread ($handle, filesize ($filename)); > if (strlen($data) == 0) { > break; > } > $contents .= $dat

Re: [PHP] daemonized php

2003-07-07 Thread Dan Anderson
start your PHP files with: #! /usr/bin/php Replace /usr/bin/php with the path to php. You will need to make the file executable by chmod ing it. (try: $ chmod +x ./yourscript.php ) As a side note, starting any text file with #! followed by the path to a language interpreter, and chmoding the

Re: [PHP] what licence for documentation ?

2003-07-07 Thread Dan Anderson
Check out: http://www.php.net/license/ -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: Re[2]: [PHP] daemonized php

2003-07-07 Thread Dan Anderson
Remember to http://us4.php.net/manual/en/function.set-time-limit.php That will allow your PHP program to run infinitely long -- and not time out after x seconds. -Dan On Mon, 2003-07-07 at 09:08, Uros wrote: > Hello, > > Ok let be more specific about my idea. Because I'm better php programer

Re: [PHP] serialize?

2003-07-08 Thread Dan Anderson
Because it is desirable to create many small tables over one very large table I usually allow PHP to create dynamic tables. For instance, you could have a table called polls, and use the row id to create a unique table: -Dan On Tue, 2003-07-08 at 07:28, Sævar Öfjörð wrote: > Hi. Im coding a po

RE: [PHP] (pas d'objet)

2003-07-08 Thread Dan Anderson
as always if PHP runs at even 10% of the speed of C++ (yes, i know it's faster), and most scripts would take several miliseconds in C++, the benefits of using a language with bounds checking, and ease of programming are immense. -dan On Tue, 2003-07-08 at 08:49, Jay Blanchard wrote: > [snip] > PH

Re: [PHP] Re: Zend extensions license

2003-07-08 Thread Dan Anderson
Check out the license at the source: http://www.php.net/license/ http://www.trolltech.com/products/qt/freelicense.html Quoting: Q. So, what's the point of the Zend license? When should I be concerned about it? A. You should be aware of the Zend license in two cases. First, if you publish patch

Re: [PHP] Please Help !

2003-07-08 Thread Dan Anderson
> I know this is really basic but i have a form for users to enter the > date of an event that i would like to store in a mysql database how do i > get the users input into the database in the right format. Read up in the manual of mySQL, and the parts of the PHP doc on mySQL. mySQL dates are s

RE: [PHP] Read a file

2003-07-08 Thread Dan Anderson
implode the array and explode it when you're done... -dan On Tue, 2003-07-08 at 11:52, carlos castillo wrote: > But them how i can look for the tag i need if i have the file in an > array, i need to read an xml file and extract the info between tags > and . > > Thanks, > > Carlos A. Castill

RE: [PHP] PHP forum

2003-07-09 Thread Dan Anderson
me three! j/k. -Dan On Wed, 2003-07-09 at 00:21, PHP4 Emailer wrote: > HOLY COW, > > I never laughed so hard in my life, This is DEAD ON, for what happens in > this exact forum. > > Damn that [EMAIL PROTECTED] is funny!! > > And I've only been here for about 3 months now. I've see about every

Re: [PHP] PHP, MySQL and Flash

2003-07-09 Thread Dan Anderson
Why don't you just write a program in Java? It would be simple to do, wouldn't require Flash, and might make your life easier. -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Is it possible to test an uploaded file to check the type?

2003-07-12 Thread Dan Anderson
Is it possible to check a file in $_FILES['userfile']['tmp_name'] to make sure it is of a certain format? I want to allow a user to only upload jpegs or mpegs, and want to check what format the file is in. Thanks in advance, Dan Anderson -- PHP General Mailing List (htt

[PHP] How can I clean uploaded files from /tmp in safe mode?

2003-07-12 Thread Dan Anderson
I am running a script which accepts uploaded files in safe mode. Is there a way to get rid of all files stored in /tmp using PHP or do I need to run a cron jobbed script to delete files of the form "php*"? Thanks in advance, Dan Anderson -- PHP General Mailing List (http://www.ph

Re: [PHP] How can I clean uploaded files from /tmp in safe mode?

2003-07-12 Thread Dan Anderson
> Uploaded files should automatically be purged when script ends. What are you > trying to do? A...thank youI didn't realize they were deleted when the script ended. -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Is it possible to test an uploaded file to check thetype?

2003-07-14 Thread Dan Anderson
There are some very good reasons to check a file's mime type. For one thing, if you send a user an executable when you meant to send them a jpg, and that executable unleashes a virus, that is no good. Not only will noone visit your site if they know you are a source of viruses, you may get sued f

Re: [PHP] Is it possible to test an uploaded file to checkthe type?

2003-07-14 Thread Dan Anderson
> Concerning infecting the server, if the files are chmodded without the > executable bit, shouldn't that be considered *safer* > It may seem that mime_content_type() isnt an option. I tried it on a > flash file, and it reported it as text/plain. Well, again, everything is dependent on what yo

[PHP] How do I dump a blob or text into a mySQL Database?

2003-07-14 Thread Dan Anderson
I'm trying to split up a file and dump it into a mySQL database BLOB. Wherever I run the query: mysql_query("INSERT INTO table (field) VALUES ('{$buffer}')"); Nothing ever shows up in the table -- whethere field is a text or a blob and whether I dump in text or binary. Oddly enough when I run t

[PHP] How can I display an image within a script?

2003-07-15 Thread Dan Anderson
Because of restrictive safe mode settings I cannot display images from their folder. Is there a way to embed them within a web page? i.e. \n"; readfile('image.jpeg'); print "\n"; ?> Thanks in advance, Dan Anderson -- PHP General Mailing List (http://www.php

[PHP] Why wouldn't a simple script work on my server that works on otherservers?

2003-07-29 Thread Dan Anderson
I have a client who had me upload a relatively simple script to his server. Oddly, it does not work there but works every where else I test it. AND he has other PHP scripts running on his server. So I checked out his server and all scripts are of the form: // HTML HERE versus my scripts as

Re: [PHP] Why wouldn't a simple script work on my server thatworks on other servers?

2003-07-30 Thread Dan Anderson
> Also, what (if any) errors does PHP/Browser report? That's the really bizarre thing. It spits out the entire PHP code as the web page. The browser then tries to render it and can produce some really humourous results. And execute permissions shouldn't matter, right? -Dan -- PHP General Ma

[PHP] hehe....is this a repost?

2003-07-30 Thread Dan Anderson
Student Suspended over Use of PHP: http://bbspot.com/News/2000/6/php_suspend.html -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Multiple targets with fscanf

2003-08-01 Thread Dan Anderson
Is there any reason you couldn't do something like: "); { $li_tag_start_position = strpos($buffer,""); $li_tag_end_position = strpos($buffer,""); $data = substr($buffer,(4 + $li_tag_start_position),(4 + $li_tag_end_position)); $buffer = substr($buffer, (4 + $li_tag_end_position)); } ?> Note that

Re: [PHP] Multiple targets with fscanf

2003-08-01 Thread Dan Anderson
> Thanks a lot. hehe no thanks needed. Just remember to read up on the functions so you'll know how they work. ;-) -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Multiple targets with fscanf

2003-08-02 Thread Dan Anderson
> I've found some bugs there too, so dont worry. Like the lol...sorry but it was a quick reply... -dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] how do i get assosciative name in foreach

2003-08-10 Thread Dan Anderson
I want to send an assosciative array to a foreach loop. Is there any way to get the name? For instance, now I have: I want to do: Is what I want possible? Thanks in advance, Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] does PHP have a equivalent to the C++ #ifndef #define?

2003-08-11 Thread Dan Anderson
een required in main.php, I get an error about the function being defined twice. Is there an equivalent to the C++: #ifndef some_header_file_h #define some_header_file_h // insert code that shouldn't be repeated here #endif // some_header_file_h Thanks in advance, Dan Anderson -- PHP Genera

[PHP] how do I spoof a get request

2003-08-14 Thread Dan Anderson
I have noticed that sometimes I cannot fopen($web_address,'r') or use any similar files if the web address contains a form get in it. (i.e. ends in a ?var1=xxx&var2=xxx...). I was wondering if there is any way to spoof a get request to a web address? I looked at fsockopen and think I need to loo

[PHP] Running PHP 5.0 (to play with) concurrent with PHP 4

2003-08-14 Thread Dan Anderson
I'm running PHP 4.x (where x is something I don't remember). I want to install PHP 5.0 beta just to play with, but don't want to mess up the current installation of PHP. What is the easiest way to do this? Throwing a seperate apache server running on another port and modding PHP 5 into it? Or

Re: [PHP] Importing file

2003-08-14 Thread Dan Anderson
I've actually run into a similar problem trying to use spanish in mail. I can't remember the exact solution off the top of my head but it basically involved going from ASCII to UTF. -Dan On Tue, 2003-08-12 at 19:23, Richard Baskett wrote: > When I import a file using the file() function it is sc

Re: [PHP] how do I spoof a get request

2003-08-14 Thread Dan Anderson
Doesn't this have to be precompiled in? -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] how do I spoof a get request

2003-08-14 Thread Dan Anderson
> It should work. You said sometimes. What are the times it doesn't work? I have a script to grab various info from web pages. Insert a web page address and it outputs the results. It's useful for different things. But some web pages when I cut and paste the URLs don't work. Like when I sear

Re: [PHP] PHP vs ASP.NET "formal opinions" request

2003-08-14 Thread Dan Anderson
I hate to be the one to break it to you but in the real world if a client or the boss says "program in ASP .NET" you program in ASP.NET because, well, that's where the money is. That doesn't mean there isn't room for using better products, but sometimes you don't get an option. -Dan On Sun, 2003

[PHP] need help with cookies

2003-08-18 Thread Dan Anderson
More importantly, if I have cookies from domain x which provides y cookies and go to a second web page from domain x which provides z cookies, if I go to another web page on domain x should I concatanate the y and z cookies, or just send the last z cookies recieved? Thanks in advance, Dan And

RE: [PHP] READ RECEIPTS [WAS: $GLOBAL question]

2003-08-18 Thread Dan Anderson
> p.s. Is there not an option on your mail reader to automatically send > read receipts? I mean, can't you have it by default send the receipt > instead of requesting your intervention? If not, you might like to think > about getting a better client. thanks! You ever open a spam and 30 seconds lat

RE: [PHP] READ RECEIPTS [WAS: $GLOBAL question]

2003-08-18 Thread Dan Anderson
On Mon, 2003-08-18 at 17:22, Robert Cummings wrote: > This is pretty off topic -- but most clients also let you refuse to send > receipts automatically -- which is how I deal with them. Yes but read reciepts do exist for a purpose. If you happen to work at a place where you /want/ read re

Re: [PHP] pop3 functions

2003-08-18 Thread Dan Anderson
> I'm wondering how many php users are C programmers... > Can only blame the php inventors for using a bad model. C and C++ were the first languages I learned and I think that it's a terrific model. So powerful. But many C/C++ programmers aren't able to code properly (or accident prone, or code

Re: [PHP] Losing a session?

2003-08-19 Thread Dan Anderson
I would speculate that because what you are doing involves cookies at coke.com $_SESSION['name'] == X and at pepsi.com $_SESSION['name'] == NotX. On the other hand if on foo.coke.com you set $_SESSION['name'] I'm not sure if it will be written over at bar.coke.com -Dan On Tue, 20

Re: [PHP] "back" works in opera but not in internet explorer

2003-08-19 Thread Dan Anderson
> Is this an internal IE-issue, or could I make my php-script IE-friendly? There are lots and lots of things that IE does differently then the rest of the world. Of course, that is because as probably the biggest monopoly they feel no problems with breaking standards -- at least the stand

Re: [PHP] in the middle of shift and pop

2003-08-19 Thread Dan Anderson
Well, if you knew (for instance) that $A[2] should be removed then you could do something like: $value) { if ($key < 2) { $B[$key] = $value; } elseif ($key > 2) { $B[($key - 1)] = $value; } } ?> Modify the above code as needed... -Dan On Tue, 2003-08-19 at 22:25, Decapode Azur wrote:

Re: [PHP] in the middle of shift and pop

2003-08-19 Thread Dan Anderson
If you unset an array that isn't associative, will that mean there will be a gap in the numbers? Or will PHP realize "OK I need to change the numbers indexing the other elements"? -Dan On Tue, 2003-08-19 at 22:27, andu wrote: > On Wed, 20 Aug 2003 00:25:32 +0200 > Decapode Azur <[EMAIL PROTECTED

Re: [PHP] calling a user defined java class method .....

2003-08-20 Thread Dan Anderson
> i am trying to call, in php , a java class method which happens to > be my own as well user defined that is > > how do i go about this > and that also if its possible at all . Well you could use exec("") to execute a shell command. Of course, that is /if/ safemode isn't enabled.

Re: [PHP] This is getting rediculus

2003-08-20 Thread Dan Anderson
Just throw up a filter deleting messages and threads from anybody you don't like. This can include obnoxious users, or mailer daemons (gets rid of all the worm garbage). -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] This is getting rediculus

2003-08-20 Thread Dan Anderson
> This is fine an dandy but this problem needs to be resolved. not > ignored!!! What a brilliant idea! I'll tell you what, you start in the Eastern United States and tell everyone to use something besides Windows and I'll start in the Western United states. We'll meet up somewhere in the Great

RE: [PHP] This is getting ridiculous

2003-08-20 Thread Dan Anderson
> Blocking the users is not solving the issue... Don't just block random users. Create a rule something like: if (sender contains POSTMASTER or MAILER or DAEMON) AND (cc, to, or bcc contains [EMAIL PROTECTED]) DELETE Doing things like this, adding in filters like "if subject contains VIRUS" a

RE: [PHP] This is getting ridiculous

2003-08-20 Thread Dan Anderson
> Second, it would be better if the list owners would do something about > it. Sure, I absolutely agree with you. But there are a lot of lists /not/ doing anything about it. So whatever. Don't spend a half hour bitching about the spam -- spend 5 minutes blocking it and be done with it. -Dan

RE: [PHP] This is getting ridiculous

2003-08-20 Thread Dan Anderson
> 1. I can see that you have issues with anger. Have you thought about > seeing a therapist? If you see me as angry you're reading wyyy too much into these e-mails. I'm trying to educate... > 2. So because other lists aren't doing it, this one shouldn't also? I > wonder, would you ju

Re: [PHP] functions/methods and what they should return

2003-08-20 Thread Dan Anderson
You want to break off things into as many functions and components as possible. The idea is that if you want to change the way tables are displayed with the data, for instance, you can't break the way data is queried. I usually have a bunch of different files like "inc.function.something.php" and

RE: [PHP] functions/methods and what they should return

2003-08-20 Thread Dan Anderson
> Hmm.. Although this sounds like a good idea at first, it seems like it > would get pretty complicated really fast. Am I missing something? Well the idea is that on very large programs you create a number of different components that can be used and changed independently. To give you an

RE: [PHP] functions/methods and what they should return

2003-08-20 Thread Dan Anderson
While I'm still on my soapbox... There are a number of great books out there on object oriented programming. Basically the idea is to take a top down approach -- decide what components makes up what you want to do, what components make up those components, and so on until you can program

Re: [PHP] Content of Variable ist html code

2003-08-24 Thread Dan Anderson
I'm not sure what you're asking but... Using htmlentities() and undohtmlentities() (look up the real functions) to data going into and out of your database will allow you to store it without getting lots of errors... mySQL storage (even TEXT and BLOB types) can't be larger then so many bytes (sys

Re: [PHP] Using PHP on an .html file

2003-08-24 Thread Dan Anderson
> Better to do this in an .htaccess file, so you don't incur PHP processing > overhead on the entire server (if there are others using it). Apache suggests not using .htaccess files at all because they require a recursive traversing of directories looking for .htaccess files, because some supersed

[PHP] How can I check form variables in $_POST to make sure they are theright format?

2003-06-06 Thread Dan Anderson
Is there a way to check form variables provided in $_POST once a user submits the form to make sure they are currency or numbers? Thanks, Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] How can I check form variables in $_POST to make surethey are theright format?

2003-06-06 Thread Dan Anderson
ble check to see if there are any $s or similar, and strip them (maybe trim?). And I want to convert the number from a string to a number -- which is another reason I want to make sure nobody enters something stupid like "eighteen dollars". Thanks, -Dan > > > - O

Re: [PHP] sending email

2003-05-29 Thread Dan Anderson
HTML E-mail is just HTML code embedded in the e-mail. Pick up a book on HTML code. Even easier, make a web page using your favorite editor (note ms word and open office allow you to save as web page) and cut and paste the code. I think there /might/ be an extra line or two you might have to add

[PHP] Is It Possible to Tell PHP To Output x Decimal Places Per Float?

2003-06-09 Thread Dan Anderson
Is it possible to tell PHP when converting a number to a string (i.e. in an echo or print command) to use x decimal places? Specifically, if I And some_price is $1.50, it outputs: $1.5 Thanks in advance, Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://

Re: [PHP] Documents on Images.

2003-06-10 Thread Dan Anderson
> Can someone point me to some documents about pulling images from out side the doc > root? > Go to php.net and search for the following functions: file() fopen() fget() These functions should have listings to other functions. In case you knew about these functions but didn't know, you can us

Re: [PHP] add groups to linux with apache + php

2003-06-10 Thread Dan Anderson
a) $man su for more info b) because suing and passing in arbitrary commands is a hackers dreams you may have some problems with safe mode and the like -Dan On Tue, 2003-06-10 at 03:45, josemaria wrote: > Hi everybody, > > Maybe this is not the exact place for this post, as is more a problem with

[PHP] Is there a way to get rid of \' and \" ?

2003-06-21 Thread Dan Anderson
I have a form which feeds into an e-mail. When I use the mail function all 's turn into \'s and all "s turn into \"s. I tried set_magic_quotes_runtime(0) and it didn't do anything, neither did urldecode(). Is there a function to strip escape charechters? Thanks, Dan -- PHP General Mailing L

[PHP] Are there any PHP functions for creating graphs and/or charts?

2003-06-24 Thread Dan Anderson
Hi, I just finished (finally!) with a pet project involving a database. I want to link the data through to charts and was wondering if anyone could recommend any packages I could use to create images which could be displayed dynamically within web pages. Thanks, Dan Anderson -- PHP General

Re: [PHP] Can't Connect Within Function?!

2003-09-01 Thread Dan Anderson
add this in the 1st line of the body of the function: global $shs_MySQLServer; global $shs_MySQLUser; global $shs_MySQLPassword; On Mon, 2003-09-01 at 14:20, Seth Willits wrote: > If I try to connect to a database within a function, I get the > following error. Why is this? > > > MySQL Connec

Re: [PHP] Restart Apache with PHP???

2003-09-02 Thread Dan Anderson
Search the archives. Somebody wanted to restart their server using a web page, and a clever solution was pointed out. By creating a script that monitored for a particular file in temp and restarted the server if it existed it, and cronning it for every minute, they could do it safely and securely

Re: [PHP] Re: Copy database from MySQL to MSAccess

2003-09-02 Thread Dan Anderson
> server. So I'm actually never gonna use Access, it's just the database I'm > using for storage of data. Well ODBC implies that you are going to have a database program (i.e. Oracle, SQL Server, Access, whatever) to connect to. At least that's how I understand it to work. So if you don't have a

Re: [PHP] read / unread system for my forum

2003-09-02 Thread Dan Anderson
> i'm coding a little forum an now i want to make a read / unread system for > the new posts and topics. > Can anybody explain to me, how I can do that? I'm not sure what you mean, do you mean let each users mark messages as read or not read? Well, if you don't mind the space in a mySQL database

Re: [PHP] Backup Database

2003-09-02 Thread Dan Anderson
Do some googling. I keep seeing this on the listserv and there has to be a free/opensource one out there somewhere. -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] opening remote tar.gz files

2003-09-02 Thread Dan Anderson
There are a number of possible solutions. If i remember correctly some compressed file types need the ability to handle them compiled into PHP. Try different things. Sometimes the easiest way to do things is to FTP into the remote server and ftp into your server to transfer it. -Dan -- PHP Ge

Re: [PHP] Block HTML Control

2003-09-02 Thread Dan Anderson
You do realize that you don't need a semicolon right after Seth, > try to mingle PHP and HTML.. that means escape the PHP and jump to HTML > when > you want the HTML.. like this... > > > if (!$var) { > ?> > > > ; > } else { >

[PHP] if else while statement speed

2003-09-03 Thread Dan Anderson
I have a function where I have: would it be quicker to do the above code or: if ($option1) { while(something()) { do_1(); } } elseif ($option2) { while (something()) { do_2(); } } // ... continue for 10 or more options... Thanks, Dan -- PHP General Mailing List (http://www.php.net

Re: [PHP] installing php5

2003-09-03 Thread Dan Anderson
> Has anyone an idea, what I could do? You might be better off joining the beta testing mailing list if one exists. Many PHP 5 questions don't get much attention here for whatever reasons. -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.ph

Re: [PHP] Refreshing After Submitting a From

2003-09-03 Thread Dan Anderson
> Does anyone have any ideas on how I could do this? Is there any reason you can't throw a refresh command into a header before any data is sent? -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] How can I get IP of ppp0?

2003-09-05 Thread Dan Anderson
> [snip] > How can I get IP Address from my connection ppp0 or ppp1 in Linux? What > 's the function? > [/snip] Well, you can (if I'm not mistaken) create PHP modules using C++. You could also create shell scripts you could exec(). PHP isn't really meant to be a server control though. So anyth

Re: [PHP] POST security

2003-09-05 Thread Dan Anderson
Be careful about hidden variables and form variables. A clever user can create a new form with custom edited fields and ACTION="yoursite.com" For instance, if you keep a hidden variable: It's not very hard for a computer saavy person to create a new form where it says: And circumvent your

[PHP] mySQL overhead: Tweaking Scripts for Speed

2003-09-05 Thread Dan Anderson
I'm trying to figure out ways to tweak my scripts for performance. I've figured out that all mySQL queries should use indexed ids for speed. (For anyone who doesn't know: mySQL indexes fields with PRIMARY KEY, UNIQUE, or AUTO_INCREMENT in them. This means they're stored in binary trees internall

Re: [PHP] mySQL overhead: Tweaking Scripts for Speed

2003-09-05 Thread Dan Anderson
> While multiple connections will just return the first connection, anyhow, > why do the extra work, right? Yes that was what I was thinking. But I was also thinking that I would need to global the $link and $db variables and run mysql_query() with them in options. So I'm wondering how much work

Re: [PHP] Remove vars from memory?

2003-09-06 Thread Dan Anderson
> yes, you must use unset() to remove a variable, otherwise it will stay > for the duration of the script. Don't worry about memory management if you're going to use PHP. The point of using a high level language like PHP is you can just ignore it. Let's say you decided to: if ($temp) { /* some

Re: [PHP] Function calling from url

2003-09-06 Thread Dan Anderson
I know what you're trying to do you just don't quite know how to say it... I use something like: if ($_GET['somevar'] AND $_GET['something_else']) { do_something($_GET['somevar'], $_GET['something_else']); } else { output_error_message(); } -Dan On Sat, 2003-09-06 at 13:19, Robin Kopetzky wr

[PHP] Running PHP scripts in PHP Nuke

2003-09-06 Thread Dan Anderson
PHP nuke page? Thanks, Dan Anderson -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Linux Issues

2003-09-06 Thread Dan Anderson
> I went to the online manual for Mandrake and it said to add the text "noauto" which > I did for the boot sequence. Same error. Any ideas what's going on and how to fix it? Did you run an md5 sum of your burnt isos? What about double checking the burnt CD against the iso? Try redownloading and

Re: [PHP] Linux Issues

2003-09-06 Thread Dan Anderson
Oh also make sure you are using /9.1/ and NOT /9.2 RC1/! -Dan On Sat, 2003-09-06 at 22:51, Stephen Craton wrote: > Hello, > > This isn't really a PHP issue but I have no where else to go to get help really. > Hopefully someone here can still help me. > > I am running Windows XP and have deci

Re: [PHP] Running PHP scripts in PHP Nuke

2003-09-07 Thread Dan Anderson
> You need to be more specific. What error do you get? I don't get any error. It will ask me for the HTML code to the page and just not work. So I'm assuming that instead of being processed by Apache and a preprocessor that can send it to PHP it's being printed to the screen. -Dan -- PHP Gen

Re: [PHP] Linux Issues

2003-09-07 Thread Dan Anderson
> When downloading Linux ISOs or whatever, which do I need? What is the > difference between i386, PPC, and all those other exactly? How do I know > which I need? This may be the source of your problems. i386, PPC, etc. are architectures: i386: x386 or higher i586: Pentium II or higher (or equiv

Re: [PHP] Linux Issues

2003-09-07 Thread Dan Anderson
> I'll try finding these things in i786, thanks for the help! Well you don't need an i786 and probably won't find one. i786 means you can use it if you have a PIV but not a PIII -- basically it takes advantage of architecture specific things. You could use an i586 or i686 or i386 fine -- you jus

Re: [PHP] Remove vars from memory?

2003-09-07 Thread Dan Anderson
> Note that you don't technically need to worry about it but if you are > going to work with other languages it is a good habit to get into. > Also I have noticed a significant performance increase in scripts that > are coded more cleanly, if you don't need a variable anymore unset() > it. Well y

RE: [PHP] Benchmarking PHP vs ASP.net

2003-09-08 Thread Dan Anderson
> OMG! PHP > is slower. The difference is .035 seconds. Does this matter? Who is > asking which is faster? Why do they care? Are they looking for a reason > to choose one technology over another? I totally agree with you, but I find it funny that many times when talking to people they

Re: [PHP] Form data

2003-09-08 Thread Dan Anderson
Forget about cookies and sessions (because cookies are evil). The way I do something like this is: $value) { if (!(($key == 'dont_save') OR ($key == 'dont_save_2'))) { hidden($key, $value); } } function hidden($key, $value) // saves lots of time { print "\n"; } ?> Then you can keep i

[PHP] Creating a Calender

2003-09-08 Thread Dan Anderson
Does anybody know how to generate calendars easily? (i.e. print out complete calenders from the current month on) Thanks in advance, -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] upload problems

2003-09-08 Thread Dan Anderson
If you go to the PHP site they have a nice section on file uploads: http://us2.php.net/features.file-upload Double check that $_FILES['cat1_thumb']['error'] == 0 See: http://us2.php.net/manual/en/features.file-upload.errors.php -Dan -- PHP General Mailing List (http://www.php.net/) To unsubsc

Re: [PHP] Dynamic Form checking

2003-09-08 Thread Dan Anderson
if $quantity isn't filled you get NULL or FALSE. so you could use: if ($_POST['variable']) etc. Try posting less code and more question to the list. Nobody's going to wade through 5 pages of code to analyze it and give you an answer. -Dan On Mon, 2003-09-08 at 03:41, Aris Santillan wrote: >

[PHP] Multiple Forms

2003-09-09 Thread Dan Anderson
Is it possible to tell a browser to send form a to URL a and form b to URL b? (i.e. post to two different URLS) Thanks, -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Upload seems to time out over 7.5 M

2003-09-10 Thread Dan Anderson
try: set_time_limit(0); // don't time out. By default, if it takes more then 30 seconds (or is it 60?) to execute a web page PHP kills the script. -Dan On Wed, 2003-09-10 at 14:15, Lou Parmelee wrote: > Hello all, > > I couldn't upload any files larger than 2M. So I searched around an

RE: [PHP] Upload seems to time out over 7.5 M

2003-09-10 Thread Dan Anderson
> In the php.ini file set this value? I believe so. If safe mode isn't stopping you from doign so you should be able to set_time_limit manually. -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

  1   2   >