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

2003-07-30 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: ? start_session() ? // HTML HERE ?

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

[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: ?php $buffer = implode(\n,file($somesite)); while (strstr($buffer,li); { $li_tag_start_position = strpos($buffer,li); $li_tag_end_position = strpos($buffer,/li); $data = substr($buffer,(4 + $li_tag_start_position),(4 + $li_tag_end_position));

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: ?php $array['element1']['name'] = 'element1'; $array['element1']['value'] = 'value1'; $array['element2']['name'] = 'element2'; $array['element2']['value'] = 'value1'; foreach

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

2003-08-11 Thread Dan Anderson
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 General Mailing List (http

[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=xxxvar2=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

[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?

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

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

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,

[PHP] need help with cookies

2003-08-18 Thread Dan Anderson
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 Anderson

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 later

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: [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,

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

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: ?php foreach ($A as $key = $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

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!!! sarcasm 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

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 and

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 jump

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

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 supersede

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 Connect

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

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

Re: [PHP] Block HTML Control

2003-09-02 Thread Dan Anderson
You do realize that you don't need a semicolon right after ?php tags, correct? -Dan On Tue, 2003-09-02 at 04:59, Viraj Kalinga Abayarathna wrote: Seth, try to mingle PHP and HTML.. that means escape the PHP and jump to HTML when you want the HTML.. like this... ?php if (!$var) {

[PHP] if else while statement speed

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

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:

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 anything

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: INPUT TYPE=HIDDEN NAME='authorization_bool' VALUE='FALSE' It's not very hard for a computer saavy person to

[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

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) { /*

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

[PHP] Running PHP scripts in PHP Nuke

2003-09-06 Thread Dan Anderson
to run a script from within a 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 decided

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

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

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

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 yes,

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? Throw In 2 Cents I totally agree with you, but I find it funny that many times when talking to

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: ?php foreach ($_POST as $key = $value) { if (!(($key == 'dont_save') OR ($key == 'dont_save_2'))) { hidden($key, $value); } } function hidden($key, $value) // saves lots of time { print

[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

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 and

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

RE: [PHP] Looking for a real good editor with some specific featrues ...

2003-09-10 Thread Dan Anderson
60% of what makes an editor good is familiarity. Take emacs for instance (http://www.gnu.org/software/emacs/emacs.html). Running PHP Mode (http://sourceforge.net/projects/php-mode/) I fly through code. But I've also spent quite a lot of time memorizing the zillion or so commands to do things

Re: [PHP] Escaping the ' character

2003-09-10 Thread Dan Anderson
I believe the general posting guidelines discourage posting HTML to mailing lists, and to be quite honest many of us pay for our bandwidth and don't need your 8k image eating up resources. If you don't like somebodys post just ignore it. I'd bet your 2 cents that you don't find every post to

Re: [PHP] loading classes and efficiency

2003-09-10 Thread Dan Anderson
Hi there i was wondering is it more efficient to load class files and objects when needed per page or is it ok to include them in my main include file ? require_once() or include_once() The files containing the class files before you need them. They will only be loaded when needed that way.

Re: [PHP] Attention Moderator - Autoresponder Needs Unsubing from list

2003-09-11 Thread Dan Anderson
I get the same. (Although [EMAIL PROTECTED] is now being filtered to the trash. :-D ) -Dan On Thu, 2003-09-11 at 07:34, Jay Blanchard wrote: Each time I send/respond I get an autoresponder from (major snippage to header) Received: from lns.hs.ro (lns.hs.ro [194.102.195.10]) Received:

RE: [PHP] loading classes and efficiency

2003-09-11 Thread Dan Anderson
The way I understand it (maybe you know something I don't?) require/include_once only prevent an included file from being included MORE than one time, hence the character string _once tacked onto the end of include() and require(). It does NOT however include a file only when it's needed,

RE: [PHP] Escaping the ' character

2003-09-11 Thread Dan Anderson
You've completely misread and misinterpreted Robert's comments. He didn't say he didn't want to read posts he wasn't interested in and he didn't ask the poster to not post things he wasn't interested in reading. He DID however request that people not send html emails to the list. Oh wait, he

RE: [PHP] loading classes and efficiency

2003-09-11 Thread Dan Anderson
woah u kiddin me ? i'm sure i edited a function in a functions file which wasnt executed and it still got parsed (spat out errors) Well connecting to a database, etc. does take overhead above and beyond a function. So yes, it does save resources to include it. And I am not completely sure of

Re: [PHP] Integrating an Applet with PHP

2003-09-12 Thread Dan Anderson
why does it work in IE and not in Netscape 7.1? I'm pretty sure ActiveX controls don't run on anything besides MS Windows Lockinware (TM). There are a number of other things that netscape does not fully support (try loading a page with an iframe tag in Netscape). You probably ran into another

RE: [PHP] Integrating an Applet with PHP

2003-09-12 Thread Dan Anderson
I am implementing a site with an Iframe, and having no problems with recent releases of Netscape, older releases are a problem, even with IE. Try running Netscape 7.1 on Linux and the iframe may be broken under certain conditions. As always, your mileage may vary, and they may have patched

Re: [PHP] Integrating an Applet with PHP

2003-09-12 Thread Dan Anderson
one or the other by detecting the browser in php. good luck, Warren Vail -Original Message- From: Dan Anderson [mailto:[EMAIL PROTECTED] Sent: Friday, September 12, 2003 9:10 AM To: Todd Cary Cc: Vail, Warren; PHP List Subject: Re: [PHP] Integrating an Applet

Re: [PHP] Mozilla and german 'Umlaute'

2003-09-13 Thread Dan Anderson
Does anyone know this problem? Does someone have a solution for this? You are probably using UTF16 (or is it called UTF8?) encoding which allows many spiffier things then ASCII. There are functions to allow conversion between UTF and ASCII. I ran into this problem when a spanish client tried

[PHP] Verifying E-mail Addresses

2003-09-14 Thread Dan Anderson
I'm having a problem with e-mail addresses entered by users that are invalid (i.e. $email == some person at somewhere.com). Is there a function I could call like: ?php if (email_is_valid($email)) { mail_out_newsletter($email); } else { yelp_and_whine(); } ? Thanks in advance, Dan

[PHP] How do I squelch warnings (without editing php.ini)?

2003-09-15 Thread Dan Anderson
I am running a script that occasionally utters a few warnings when the user does something dumb (but it does not kill the script). Is there a way to turn off warnings within a script? I really don't want my users to see them. Thanks in advance, Dan Anderson -- PHP General Mailing List (http

[PHP] Is the PHP List Automoderator a spam bot?

2003-09-15 Thread Dan Anderson
I just got an email from some daemon claiming to be the PHP List Automoderator asking me to reply before my e-mail could be sent to the list. I assume that this is a spam bot. Anybody else having this problem? -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] PHP|Con insane pricing

2003-09-15 Thread Dan Anderson
The pricing seems insane, and geared towards people with lots of spare money... ::snip:: but I'm not going to shell out $495 (the cheapest non-student If you consider the average salary for a computer programmer is probably $40k - $50k (at least in the US) this is not insane. (Heck, it's

Re: [PHP] PHP|Con insane pricing

2003-09-15 Thread Dan Anderson
Yea its not bad if you dont have a life outside of programming and/or computers Well most professionals who would go to this conference -- IMHO -- would be doing it because it would be worth while. For instance, I considered going because if it reduced the time it takes for me to develop

Re: [PHP] PHP|Con insane pricing

2003-09-15 Thread Dan Anderson
Unless I'm missing out on all the gold (which is a possibility), speakers usually get a very modest honorarium and their expenses paid. I can't imagine that speakers are the most significant cost of a conference. Well it does depend on the fame (or infamy) of the speaker. If you want Bill

Re: [PHP] PHP|Con insane pricing

2003-09-15 Thread Dan Anderson
ah like with 4 kids I have nothing better to do than run down and grab a book and evaluate my parenting skills. It's not about parenting but about money management. It's pretty cool and shows you how to minimize taxes (so the govn't gets less then 40%). umm I take it you dont have kids and

Re: [PHP] Re: PHP|Con insane pricing

2003-09-15 Thread Dan Anderson
These gatherings are most likely for people sponsored by their employers, don't imagine participants come out of it $500 smarter then they went in. If it makes Well I suppose that depends on exactly what you are looking to get out of it. Conferences can be many things. For instance, you have

Re: [PHP] MS-SQL 2000 weird problem

2003-09-15 Thread Dan Anderson
Any thoughts? Are you dying and outputting an error where something could happen to bodge up the server? I'm not familiar with MS SQL Server, but I know under mysql: ?php $link = mysql_connect($host,$username,$password) or die(); // I forget the next line off the top of my head /* returns

[PHP] Need Help With gethostbyname()

2003-09-17 Thread Dan Anderson
I have a section of my script where I call gethostbyname($hostname) . For some host names that are not registered (according to register.com) I am still getting an IP address returned? What is happening? -Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Mathematical differences?!

2003-09-18 Thread Dan Anderson
Without spending a lot of time looking at your problem I would speculate this is the result of round off error. What is roundoff error you ask? Well the number 0.6255264658909423 does not designate 0.6255264658909423... but 0.6255264658909423 and some fraction that could not be

Re: [PHP] Session with various Browser.

2003-09-18 Thread Dan Anderson
Try running newer browsers. I'd be curious how everything handles with Netscape 7 or the newest incarnation of IE. -Dan On Thu, 2003-09-18 at 22:53, Harry Yau wrote: Hi all, I am new to php. At first, I wrote a php script to generate a pdf file from a tex file and load that pdf file to

Re: [PHP] Reading URL is changed

2003-09-19 Thread Dan Anderson
First of all, you can use Javascript to submit a form when the link is pressed. Andu has a good idea too, but I figured I'd elaborate: If you create a form like: FORM METHOD=GET ACTION='http://www.foo.com' INPUT TYPE=HIDDEN NAME='foo' VALUE='bar' INPUT TYPE=HIDDEN NAME='bar' VALUE='foo'

[PHP] Do PHP boolean operators short circuit?

2003-09-19 Thread Dan Anderson
I am learning perl and my book describes boolean short circuiting. Basically: function1() OR function2(); (function2 never is evaluated if function1 is true). Will this work in PHP for any function? Thanks in advance, -Dan -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Dan Anderson
Why are you using php:// below? If stdin is a file './stdin' will suffice (or the path instead of ./). If you want to run the PHP script in stdin you should use one of the following: include() include_once() require() require_once() See the manual at php.net for pertinent sections... if(

Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Dan Anderson
One more thing: gdb doesn't do a damned thing for debugging PHP scripts. Look for the errors and warnings output to the browser. (or tty if you're using /usr/bin/php). -Dan On Sat, 2003-09-20 at 00:33, Robert Cummings wrote: I wanted t play around with the CGI (not CLI) version of PHP and

Re: [PHP] Problem with getting non-blocking data from stdin

2003-09-19 Thread Dan Anderson
I find your responses to my e-mails quite humorous. Upon review -- aside from a single WTF -- I don't think I was condescending in any way shape or form. I was just trying to offer help. After reading about wrappers, I find it doubly humorous that you didn't just disregard my e-mail when I

[PHP] How to get the Web Address of the Script

2003-09-20 Thread Dan Anderson
I am creating a script and there is an autoconfig file. I want to read in the web address of the server, and throw some correct URLs into the database. Will using $_SERVER['HTTP_HOST'] guarantee getting me the domain name of the server on which the web page I am viewing is hosted? I am

RE: [PHP] non-php issue

2003-09-22 Thread Dan Anderson
Yes, it is possible to secure anything if you know what you are doing. But the average user doesn't know what he or she is doing. So they run their computer as the superuser because they don't want to have to log off and back on to install a program, and all of a sudden any virus that

Re: [PHP] PHP Editor - which to use?

2003-09-22 Thread Dan Anderson
Best PHP Editor on the market: called Notepad. Written by a tiny little software dev company called Microsoft. Very nicely written, compared to the rest of their software. You must either be insane, a genius, or joking. I couldn't imagine writing code without context sensitive highlighting

Re: [PHP] IP to Postal Code CSV? anyone messed around with this and PHP

2003-09-23 Thread Dan Anderson
If you find a good public free resource which is frequently updated (as it would need to be as the Internet is always changing) then please let me know. I have been unable to find something and have looked on multiple occasions. Please let me know too. I think that the resources

Re: [PHP] Validation: Problems with header(Location) in PHP

2003-09-23 Thread Dan Anderson
HTTP 1.1 says the following: 1. Client (with web browser) sends GET request to server. 2. Server responds with something like: Content-type: text/html Content-size:...blah...blah...blah 3. Server sends the web page. The header is sent on #2. What is happening is that somewhere in the

Re: [PHP] mySQL vs pgSQL | php vs others

2003-09-24 Thread Dan Anderson
Is pgsql , better ? faster ? more reliable than mysql ? I won't speculate on which one is faster (although I think both camps would claim ownership of the trump card). But Postgresql does conform closer to the SQL standard, and there are a number of features available in it that are not

[PHP] Accellerators and Encryptors: Taking Scripts to the Next Level

2003-09-24 Thread Dan Anderson
On this listserv I have heard quite a bit of talk about accelerators. And I have also seen some advertisements about Encryptors -- letting PHP code be sold in a byte compiled type form so your clients can't pirate your scripts. Do these things work? And if they do, can you

Re: [PHP] sql faq

2003-09-24 Thread Dan Anderson
On Wed, 2003-09-24 at 12:30, Jonatan Pugliese. wrote: select MaeSocio.* from MaeSocio LEFT JOIN MaeSeguro ON MaeSocio.NroSocio=MaeSeguro.NroSocio where MaeSeguro.NroSocio is null MaeSeguro.NroSocio is not null count(*) MaeSocio = 354000 count(*) MaeSeguro=108000 how i can retype this

  1   2   >