[PHP] Newbie Directory question

2003-07-12 Thread brian
usion and ASP as well as PHP and would like to keep everything on one drive. Thanks in advance for any help you can give. Brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Network Connectivity help please

2001-05-18 Thread Brian
etwork. A simple ping would probably be easiest, but parsing a standard ping for 254 hosts would cause the script to have about a 10 minute load time. are there any quick easy, and most importly, low system overhead, solutions to this problem? Brian Artiaco [EMAIL PROTECTED] -- PHP General Ma

Re: [PHP] Network Connectivity help please

2001-05-18 Thread Brian
ping that when I move the final version over to our main webserver it will run the script at an acceptable speed. If not though, I have a feeling that I will most likely implement your suggestion, unless someone knows of the 'pretty' solution that I seek :) Brian "He did not know the

[PHP] WHOIS in PHP

2002-03-18 Thread Brian
Hi: Does anyone out there know how to execute a WHOIS query from within PHP? Thanks! --Brian Grossberg [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] phpChess - need beta testers

2001-11-08 Thread Brian
g, I'll release the version 1.0 source to most of the popular script databases. It's at http://www.smashland.com/chess/ ... anyone that would be interested in helping me clean up my code... email me, and I'll let you know how you can help. thanks, Brian -- PHP General Mailing

Re: [PHP] Replace or regex?

2004-09-30 Thread Brian
$var="##testcode##this is a ##code1## test of the ##code2## code replacement system ##code3##"; $varParsed=strParse($var); echo "$var"; echo $varParsed; function strParse($origString) { while ( $offsetFALSE) { $tmpString=substr($origString, $lastEnd, $foundBeg-$lastEnd); $tm

Re: [PHP] refresh page automaticly on PHP

2004-09-30 Thread Brian
As the others said, this isn't a function of php, php is a server-side script and a refresh is on the client side. A meta-refresh tag is fine depending on how reliable you want your refresh to be as it'll stop working after a day or so. If you need it to refresh forever you'll need to use javascr

Re: [PHP] Session Variable Security

2004-09-30 Thread Brian
Along with the other tips people gave, make sure that if you have register globals turned on, do not ever reference a session variable that way, always use $_SESSION On Thu, 30 Sep 2004 08:39:42 -0400, Aaron Todd <[EMAIL PROTECTED]> wrote: > Can anyone tell me how secure a session variable is. I

Re: [PHP] cURL and Proxy Servers

2004-09-30 Thread Brian
If you already resolve the proxy before the exec, just don't run the exec if it doesn't resolve, and set the proxy to the ip it resolved to so curl won't try to resolve it again. On Thu, 30 Sep 2004 16:27:52 +0200, Nick Wilson <[EMAIL PROTECTED]> wrote: > Hello everyone, > > I'm using cURL and h

Re: [PHP] alphabetic comparison

2004-09-30 Thread Brian
if ( "apples" < "oranges" ) {echo "apples comes before oranges";} On Thu, 30 Sep 2004 17:59:39 +0200, Diana Castillo <[EMAIL PROTECTED]> wrote: > Is there any way you can use the numerical comparisons < or > to see if one > word comes first alphabetically to another ? > what can I use to see if

Re: [PHP] Session Problem

2004-10-05 Thread Brian
Make sure you are doing a session_start first. On Tue, 5 Oct 2004 19:00:57 +0530, Kevin Javia <[EMAIL PROTECTED]> wrote: > Hi there, > > I have got PHP 5 installed on IIS6 with 'register_globals = on'. > > When run my page with session variable at top of the page > > $_SESSION['_user'] == ""

Re: [PHP] SOLVED: why this doesn't work as an external file but does internally?

2004-10-06 Thread Brian
Those of us that view emails as a list of conversations would appreciate not changing subject lines. On Wed, 6 Oct 2004 16:01:32 -0400, Aaron Wolski <[EMAIL PROTECTED]> wrote: > Hi All, > > Just wanted to thank everyone for their advice and help. > > What I ended up doing is simply doing an inc

Re: [PHP] [NOT FIXED] Re: [PHP] strip out wierd characters in a string

2004-10-18 Thread Brian
Note: The below function will also strip out tabs and newline characters. function str_clean($str) { for($i = 0; $i < strlen($str); $i++) { $tmp=ord($str[$i])) if ($tmp>31 && $tmp <127) { $new_str .= $str[$i]; } } return($new_str); } On Mon, 18 Oct 200

[PHP] Fwd:

2004-10-18 Thread Brian
Could the list admin please track down the address causing this and remove it, I get this everytime I post to the list. Thanks. Note: Mail headers below message. -- Forwarded message -- From: [EMAIL PROTECTED] <[EMAIL PROTECTED]> Date: Mon Oct 18 06:18:35 PDT 2004 Subject: To:

Re: [PHP] probs generating multiple drop down select lists within a single form

2004-10-18 Thread Brian
Year shouldn't be a multiple At the beginning of the second two selects: in your check: if ( isset($_GET['state'] && $_GET['year']<>'blank' && $_GET['term']<>'blank') { //ok, they selected something in all three of those so lets run some code here } else { //they didn't populate all

Re: [PHP] how to create multiple selects within php

2004-10-18 Thread Brian
with your code above the first option is going to be the default, so just make the default nothing: then check with: if ( $_GET['foo'] <> 'blank' ) On Mon, 18 Oct 2004 07:22:30 -0700, bruce <[EMAIL PROTECTED]> wrote: > ok... > > it appears to be a case of user err.. the spec seems to state t

Re: [PHP] how to create multiple selects within php

2004-10-18 Thread Brian
With most any browser nowadays, on a non-multiple select the first option will be selected unless you specifically setup a default. With a multiple select, it will not default to anything and will not even post/get a variable for it at all unless the user specifically selects something, which is w

Re: [PHP] setting index of array as 1

2004-10-18 Thread Brian
Why do you want your array to start with 1 so badly? On Mon, 18 Oct 2004 13:33:22 -0500, Afan Pasalic <[EMAIL PROTECTED]> wrote: > It's not what I was looking for. Looks like I didn't explain very well :) > > look at this case: > > $query = mysql_query("select name from names order by date desc

Re: [PHP] setting index of array as 1

2004-10-18 Thread Brian
r > unserialize() start with 0. > And then was conflict when I pull Qs and As from DB, they start with 1s > and Results, that start with 0 > > Hm, pretty complicated, ha? > :) > > Now, I have a feeling I didn't go correct way. Because, calculating > stats from ser

[PHP] php.ini not loaded?

2009-02-11 Thread brian
with php.ini in /apps/local/php5/lib, readable by all: phpinfo says : "configuration file path /apps/local/php5/lib" phpinfo also says: "loaded configuration file: (none)" so i'm not getting anything from php.ini. can someone point me at the fix for this problem? thanks in advance b

Re: [PHP] php.ini not loaded?

2009-02-11 Thread brian
hi nathan thanks for the response... it's webserver. so the phpinfo() result in the browser should be accurate. looks like the rx is where it should be. Nathan Nobbe wrote: > On Wed, Feb 11, 2009 at 9:54 AM, brian <mailto:brian.l...@vt.edu>> wrote: > > > w

[PHP] fileinfo on RHEL5

2009-05-12 Thread brian
RHEL5/PHP 5.1.6 I'm having some trouble getting the Fileinfo package working. It installed fine, and phpinfo() says it's enabled. But it consistently returns an empty string when getting the MIME of a file. /usr/share/pear/bin/pecl install fileinfo vi /etc/php.d/fileinfo.ini extension=fileinf

Re: [PHP] fileinfo on RHEL5

2009-05-13 Thread brian
Thodoris wrote: Is fileinfo pecl extension installed as a package or with pecl? In case it is installed as an rpm try to remove it and install it as an extension in case the package is broken for some reason. I installed it with PECL: /usr/share/pear/bin/pecl install fileinfo Other questio

Re: [PHP] fileinfo on RHEL5

2009-05-13 Thread brian
Thodoris Goltsios wrote: Thodoris wrote: Is fileinfo pecl extension installed as a package or with pecl? In case it is installed as an rpm try to remove it and install it as an extension in case the package is broken for some reason. I installed it with PECL: /usr/share/pear/bin/pecl ins

Re: [PHP] fileinfo on RHEL5

2009-05-13 Thread brian
Thodoris wrote: fileinfo.so is, indeed, in /usr/lib/php/modules. But I know it's enabled, in any case. So, anyone know if this extension doesn't work well with 5.1.6? Well you could enable the error messages to see what is going wrong. The $type var is probably empty because the instanti

Re: [PHP] warning & question about mysql sessions & concurrency

2005-03-15 Thread Brian
session_write_close() is also nice in that freeing the lock doesn't destroy your existing copy of the session variables, you can still use them in the rest of your script just remember that they exist in your current script as they were when you called session_start(), even if some other script mod

Re: [PHP] OT - C programming

2005-03-16 Thread Brian
To understand the *'s just google for c pointer tutorial, you're likely to find alot of helpful material. On Tue, 15 Mar 2005 11:37:26 -0500, Jason Barnett <[EMAIL PROTECTED]> wrote: > Rasmus Lerdorf wrote: > > Jason Barnett wrote: > > > >> Jay Blanchard wrote: > ... > > In the end you are probab

[PHP] Including SSI in your PHP scripts

2005-05-16 Thread Brian
Is there any possible way to use my sitewide include files which have SSI in them in a PHP script, such as phpBB, with PHP installed as a cgi? I see there is a virtual() function which is intended to mimick apache's virtual include, however it does not work as a CGI. Thanks in advance, Brian

Re: [PHP] QuickTime question

2007-08-15 Thread brian
what you want. You'll need to create an object tag. But (since we're already off-topic) i'd suggest you check out the anarchy media player: http://an-archos.com/anarchy-media-player This thing is wonderful. 5 stars! Grab the "Standalone Javascript for non-WP sites" version. brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] A question that has been bugging me..

2007-08-16 Thread brian
ething like this in your shtml file: foo you can change it husly for a PHP script: foo (where top.html contains CSS links, script tags, etc.) So, in order to create any of your PHP pages, you can simply copy one of the SHTML files and make those simple changes to the include

Re: [PHP] html to jpeg conversion.

2007-08-18 Thread brian
you could use kwebdesktop, which uses Konqueror's layout engine to create PNGs (a better choice for this than JPEG, IMO). brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] keeping fields moving forward

2007-08-21 Thread brian
he class first. This way, my form markup can have, eg: so that on the first pass the empty object returns NULL. When i want to re-display the form (because there was an error somewhere) the already-populated vars are written back to the form. brian -- PHP General Mailing List (http://w

Re: [PHP] php to generate java-script

2007-08-21 Thread brian
telling the PHP engine to load the same page again. When it does that it's going to call your function *again* on the same page. Rinse and repeat. But i don't understand what putting those tags in an array is going to accomplish. Perhaps there's a lot more to this, but i'd be

Re: [PHP] Upload and resize file

2007-08-23 Thread brian
t one'; print $tmpimg'; unlink($tmpimg); ... print 'second one'; print $tmpimg'; unlink($tmpimg); etc. This way you'll be able to at least see what is in the var $tmpimg. brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] check array values for all NULL

2007-08-23 Thread brian
I have an array that is initialised with many keys and all values set to NULL. I'd like to be able to test these values later to see if any of them have been set. I tried: if (!empty(array_values($the_array))) but that's not allowed, so: $array_check = array_values($the_array); if (!empty($ar

Re: [PHP] SQL Distinct-like behaviour

2007-08-23 Thread brian
x27;/^([a-zA-Z-_]+)_[0-9]+\.jpg$/' If you'll have more than one file extension, replace 'jpg' with '[a-z]+' However, the array_unique call will cause, eg. both 'bar_01.jpg' and 'bar_01.png' to output 'bar' only once, which may not be what you want. HTH, brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] upload temp dir in vhost env.

2007-08-26 Thread brian
rrently, there could be a confusion as to where each file should be transfered to. That's unlikely to occur. In fact, i'd be surprised if it were possible that PHP would assign a temp name that already existed. brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Database includes

2007-08-28 Thread brian
Larry Garfield wrote: On Sunday 26 August 2007, Bruce Cowin wrote: I'm curious as to how everyone organises and includes their classes in PHP5. Then have a config file of some sort in which you specify your DB credentials. There's a variety of ways to do that (ini file, a PHP file with a da

Re: [PHP] Database includes

2007-08-28 Thread brian
Larry Garfield wrote: On Tuesday 28 August 2007, brian wrote: If you have to modify anything other than a single config file in order to move your site/app from one server to another, then you have a design flaw. (I'd say that applies for moving the site to a subdirectory on a server too

Re: [PHP] Pragmatically changing a "Record Number"

2007-08-29 Thread brian
Jason Pruim wrote: Hi Everyone, I think after I get this question answered, I can stop asking for awhile since my project will be done, at least until the users say "What happened to XYZ" then I'll ask again :) I asked on a MySQL list about "Resetting a auto increment filed" so that

[PHP] Re: [WD]: PHP Question - any help is appreciated

2007-08-29 Thread brian
ssign this to a variable so, instead of using echo, do: $padded = sprintf("%'x${len}.${len}s", $str); HTH brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] PHP/MySQL not playing nicely. Server drops connection. . .

2007-08-31 Thread brian
result)) { die('bad query: ' . $result->getUserInfo()); } Of course, you shouldn't blindly echo out this sort of thing on a production server. brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Reload page after form submit

2007-08-31 Thread brian
your_submit_btn'])) or some other form element, at least. I don't know if this was simply because it was a rough draft of the code or even if it's the cause of the problem (which i still don't quite understand) but, anyway ... brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Reload page after form submit

2007-08-31 Thread brian
Afan Pasalic wrote: brian wrote: The problem that i see is here: if (isset($_POST)) This will always return TRUE. It should rather be: if (isset($_POST['name_of_your_submit_btn'])) or some other form element, at least. I don't know if this was simply because it was a rou

Re: [PHP] Pragmatically changing a "Record Number"

2007-09-02 Thread brian
s that all this is about is displaying a rowcount. The ids can be anything at all and it'll still look spiffy. brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] mail() takes too much time

2007-09-02 Thread brian
largest so that your script only has to retrieve messages with id > last_id. brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Pragmatically changing a "Record Number"

2007-09-03 Thread brian
tedd wrote: At 10:27 AM +1000 9/3/07, Chris wrote: tedd wrote: At 6:14 PM -0400 9/2/07, brian wrote: tedd wrote: How is that contrary to what I said? You are actually changing the id's in the database. Brian's example is making up an id to display (much like the excel ro

Re: [PHP] Re: mail() takes too much time

2007-09-03 Thread brian
$plain_content)); $message->attach(new Swift_Message_Part($html_content, 'text/html')); /* if you're sending the mails from, eg. an admin page ... */ set_time_limit(0); ignore_user_abort(); flush(); /* send it out */ $num_sent = $swift->batchSend($message, $recipients, new Swift_Addre

Re: [PHP] Pragmatically changing a "Record Number"

2007-09-03 Thread brian
tedd wrote: At 11:48 AM -0400 9/3/07, brian wrote: Arrggg. No, I did not say create another auto_increment field -- I said: Quote The reason for not wanting to care about the auto_increment id is that it is something that the database uses and really should not be changed. If you want to

Re: [PHP] Pragmatically changing a "Record Number"

2007-09-03 Thread brian
tedd wrote: At 3:17 PM -0400 9/3/07, brian wrote: Well, yes, that would work also but is horribly inefficient because the *entire table* must be altered any time a row is deleted. "horribly inefficient"? Renumbering anything is pretty quick these days. To me, things that are

Re: [PHP] Pragmatically changing a "Record Number"

2007-09-04 Thread brian
tedd wrote: At 6:18 PM -0400 9/3/07, brian wrote: It may be just fine in your case, but from a DB design standpoint it most certainly is not efficient. Why re-order the entire table for something like this? Altering an entire table because one row has been deleted suggests to me that the

Re: [PHP] Dealing with auto-increment in MySQL

2007-09-04 Thread brian
ordering. id PLU index 1 foo-324 1 2 foo-894 2 <- delete this row 3 foo-929 3 4 foo-653 4 Okay I'm done now :) me too, i think brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] MySQL, PHPMyAdmin, GRANT, headaches

2007-09-04 Thread brian
el like i've taken crazy pills! Please, someone tell me this isn't true! How does one debug a problem like this? How can i know if i have SELECT rights to the table? [1] http://ca3.php.net/manual/en/function.mysql-error.php#44168 brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Dealing with auto-increment in MySQL

2007-09-04 Thread brian
Jason Pruim wrote: On Sep 4, 2007, at 12:20 PM, brian wrote: Jason Pruim wrote: so to put my 2¢ in on this, I would say to leave alone the auto increment field especially if it's included in an index. If you need a record number, either store it in the database in a separate

Re: [PHP] MySQL, PHPMyAdmin, GRANT, headaches

2007-09-04 Thread brian
mple things one forgets to do, isn't it? GRANT USAGE ON *.* TO ... GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP... So, i'm back to square one, i see. brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Dealing with auto-increment in MySQL

2007-09-04 Thread brian
tedd wrote: Jason: Well, at least you read and comprehended what was said -- that's better than some. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com Nice. Good luck with your database endeavours! brian -- PHP General Mailing List

Re: [PHP] Pragmatically changing a "Record Number"

2007-09-04 Thread brian
tedd wrote: At 12:11 PM -0400 9/4/07, brian wrote: You are confusing a product ID with this index number. They are very much not the same thing. A product ID (PLU, serial #, whatever) should not change. This index does change, any time a row is removed from the database. How can you suggest

Re: [PHP] Opening a file

2007-09-05 Thread brian
ydir/fruits.txt $filepath = "${_SERVER['DOCUMENT_ROOT']}/mydir/fruits.txt"; brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] IE Not Following Header("Location: /path/to/file.php");

2007-09-06 Thread brian
or testing. brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Preventing Access to Private Files

2007-09-06 Thread brian
Daevid Vincent wrote: Depends on your host I guess. Some hosts give you an entire Virtual Machine with root access. It depends on your distro too. But usually it's in /etc/apache... If you don't have direct access, you will have to talk to them about if mod_auth_mysql is installed and have them

Re: [PHP] Fwd: 403 Forbiden

2007-09-06 Thread brian
host Check the permissions on php/provincias.php brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Php script for mail in a xhtml page

2007-09-07 Thread brian
ot; /> - That your script's purpose is to send mail has nothing to do with how it displays in a browser. Anyway, that should do it. Be sure to validate the page. brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] LAMP Server setup help

2007-09-08 Thread brian
l?) in your install arguments? You need that for apxs but i don't know if aptitude takes care of that. You could try: aptitude purge libapache2-mod-php5 aptitude install libapache2-mod-php5 or: apt-get remove --purge apache2 php5 libapache2-mod-php5 brian -- PHP General Mailing

Re: [PHP] Can't execute PHP script

2007-09-08 Thread brian
there and uncommented. And that you restart httpd. brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Can't execute PHP script

2007-09-09 Thread brian
Børge Holen wrote: On Saturday 08 September 2007 17:21, brian wrote: Randy Patterson wrote: Hey, [Note:] This is a different problem from the one I posted earlier today. I can't get my LAMP server setup to run PHP script. As returned by apache2ctl, I am running; Apache/2.2.4 (Debian

Re: [PHP] Buxa Coding Guidelines

2007-09-09 Thread brian
but to assert that there is *one* proper way for all cases seems a bit off to me. Use what works, makes sense, and is *safe* within *your* workflow. Just thought i'd add something to get the discussion going beyond, "Me too! That way is teh suxxor." ;-) brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Buxa Coding Guidelines

2007-09-09 Thread brian
Greg Donald wrote: On Sat, 8 Sep 2007, mike wrote: although handing off to a templating engine/presentation layer would be even better of course. eval() is my favorite templating engine. You've just made my day. Mind if i put that on a t-shirt? -- PHP General Mailing List (http://www.php.

Re: [PHP] Link problem - newbie question

2007-09-09 Thread brian
ur meta tag is not closed (the attribute quote isn't even closed). Additionally, don't put spaces around the "=" in your tags. brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Buxa Coding Guidelines

2007-09-09 Thread brian
Per Jessen wrote: brian wrote: Per Jessen wrote: magoo wrote: In their oppinion stuff like the short PHP init "" is forbidden. Do you people code that strict? Yep. If you're using XHTML you have no other option. If you're parsing XHTML that is choking on any in

Re: [PHP] Buxa Coding Guidelines

2007-09-09 Thread brian
Jim Lucas wrote: brian wrote: Or, perhaps what you mean is that the by PHP (as opposed to an XHTML parser misinterpreting PHP tags)? If that's the case, simply don't leave it bare in the script. Have PHP print it. brian Or, even better, turn off short_open_tag Then PHP will n

Re: [PHP] Php script for mail in a xhtml page

2007-09-10 Thread brian
Chris wrote: brian wrote: - You can do without the "echo" by using, eg. Yet later in another thread you complain about short_tags being an option.. can't have it both ways. Oh, is that so? Let's see what i wrote ... -- snip -- ... Better yet, PHP should do away

Re: [PHP] remove page referrer

2007-09-11 Thread brian
u want to do this to protect against duplicate form submissions. If that's the case, this article may be of some use: Redirect after POST http://www.theserverside.com/tt/articles/article.tss?l=RedirectAfterPost brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] look at all files, then go elsewhere

2007-09-11 Thread brian
=="")" is reached for each and every file found in the directory. That is, every time you grep for $user in a file, you're re-setting $userinfo, regardless of the result. Then you're running ldap_check(). Basically, you need a break in there, at the very minimum. And

Re: [PHP] SEARCHING for an answer...

2007-09-11 Thread brian
Jay Blanchard wrote: So Jason you learned three valuable lessons today. a. plan your code (use paper and pencil or something like it) b. always account for security c. comment properly I'll add two more: d: Check the source that your script outputs. Send it to the W3C validator (WebDevelop

Re: [PHP] MySQL upload problem

2007-09-11 Thread brian
cho 'sucess'; } Sorry, you'll have to hunt down the other return codes that MySQl might send back. If safe_mode is enabled, your command will be escaped with escapeshellcmd() but that's about it. If you can FTP it but can't get a shell is there any chance you coul

Re: [PHP] MySQL upload problem

2007-09-11 Thread brian
py everything out, you could import everything to a local database (if you don't have it already) and dump out each table to a separate file. brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] MySQL upload problem

2007-09-11 Thread brian
brian wrote: tedd wrote: I was thinking that I could ftp the sql file to the clients server and then run a php script on his server, something like: $sql = "mysql -h$dbhost -u$dbuser -p$dbpass $dbname < $filename"; system($sql); But, that didn't work -- however -- u

Re: [PHP] my paging task with PHP does not work. It uses cookie.

2007-09-12 Thread brian
re of a lot of the heavy lifting and is very configurable. http://pear.php.net/package/Pager This does not require setting any cookies. brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] About MYSQL/PHP Shopping Cart's Product Quantity Change Input Forms

2007-09-14 Thread brian
of the quantities may be updated in one POST. Or, if your cart resides solely in $_SESSION, you may still provide the quantity fields and update later. brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Finding next recored in a array

2007-09-16 Thread brian
return the key: return (array_key_exists($next_key) ? $next_key : NULL); // or the value: return (array_key_exists($next_key) ? $arr[$next_key] : NULL); } However, in your example, you're searching for the key that points to the value '5'. What if the v

Re: [PHP] Finding next recored in a array

2007-09-17 Thread brian
($val, $array)+1]); Cheers, tedd Not quite: $array = array('0','1','3','5','8','15','25'); $val = "25"; echo($array[array_search($val, $array)+1]); Notice: Undefined offset: 7 ... brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Finding next recored in a array

2007-09-17 Thread brian
== an array that essentially just points to the value '5'. I also noticed that your dump shows that the days begin with 0. If these are calendar days you're adding a further layer of complexity. brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Finding next recored in a array

2007-09-19 Thread brian
tedd wrote: At 11:52 AM -0400 9/17/07, brian wrote: tedd wrote: Richard Kurth wrote: $Campaign_array| = array('0','1','3','5','8','15','25');| I know that I can find the next recored in a array using next. What I do no

Re: [PHP] scaling and uploading the pt 2

2007-09-20 Thread brian
uality setting). Do: // note, also, that you had the dest. width & height hard-coded. imagecopyresized($thumb, $source, 0, 0, 0, 0, $newwidth, $newheight, $width, $height); $target_path = // resolve this if (imagejpeg($thumb, $target_path)) { echo 'Huzzah!'; } else { echo 'back to php-general ...'; } brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Finding next recored in a array

2007-09-20 Thread brian
tedd wrote: At 4:14 PM -0400 9/19/07, brian wrote: tedd wrote: >>> Duh? You program for that -- you want me to write the entire code? ~sigh~ Grasshopper, the point i was trying to make is that your example displays what *not* to do with array_search(). Though a wonderful tea

Re: [PHP] MAX_FILE_SIZE not working with file uploads

2007-09-22 Thread brian
ou're actually grabbing the value of the input's "size" attribute, which has a default of 0. You'll see this if you edit the input to have, eg. size="100" brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] MAX_FILE_SIZE not working with file uploads

2007-09-22 Thread brian
llow it to poll the file size (if it couldn't, things would get messy on the server, quick). But Javascript is a whole 'nother thing, and it is not (normally--see Jim Lucas' post) able to get this information (thankfully). So, your PHP script is not receiving a file at all.

Re: [PHP] MAX_FILE_SIZE not working with file uploads

2007-09-22 Thread brian
brian wrote: Jeff Cohan wrote: It seems that the server had to know the size of the file in order to know it exceeded MAX_FILE_SIZE. So how can my script find out the size? Not at all. The user-agent is built to ignore files that exceed the MAX_FILE_SIZE value. Ack! I meant, "The

Re: [PHP] Re: Strategy for Secure File Storage

2007-09-24 Thread brian
e to open in Adobe Reader, MSExcel, etc. You also might want to add these two with your no-cache header: header ('Expires: Mon, 1 Apr 1974 05:00:00 GMT'); header ('Last-Modified: ' . gmdate('D,d M YH:i:s') . ' GMT'); I seem to remember that it was IE that wanted these in order to play nice. brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] php downlaod script

2007-09-25 Thread brian
You'll want to echo out $content before the exit call. And filesize($size) makes no sense here--this function expects the path to a *file* given to it. brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Newbie: special characters in regex?

2007-09-25 Thread brian
e you really expecting someone to have a forward slash in their name? If so, change it to: '/([\(\)\/,]+)/' brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] counting with leading zeros

2007-09-26 Thread brian
'$1', $last)); /* increment, format with leading zero again if necessary, * and return it */ return sprintf('%02d', ++$count) } else { return '01'; } } Note that there almost certainly will never be more than 99 images to a series. In

Re: [PHP] counting with leading zeros

2007-09-26 Thread brian
Robert Cummings wrote: On Wed, 2007-09-26 at 15:11 -0400, brian wrote: I have a directory that contains many images (no, not pr0n, unfortunately) and i'm working on an admin script for adding to it. I've got something that works alright but i'm wondering if there's a Bett

Re: [PHP] counting with leading zeros

2007-09-26 Thread brian
Robert Cummings wrote: On Wed, 2007-09-26 at 15:58 -0400, brian wrote: Robert Cummings wrote: On Wed, 2007-09-26 at 15:11 -0400, brian wrote: I have a directory that contains many images (no, not pr0n, unfortunately) and i'm working on an admin script for adding to it. I&#

Re: [PHP] counting with leading zeros

2007-09-26 Thread brian
Robert Cummings wrote: On Wed, 2007-09-26 at 19:10 -0400, brian wrote: If my response to that gave you the impression i was complaining, i assure you that i wasn't. I was simply suggesting that i was wondering if there was a *much* simpler way to do this, ie. without using several functio

Re: [PHP] counting with leading zeros

2007-09-26 Thread brian
Robert Cummings wrote: When you use sort() the default behaviour is a lexical sort. This is why the 100th index breaks your system. I'm not trying to be a dickhead, just pointing out the flaw in your logic. You may be well aware that in counting 100 comes after 99, but it would seem you are not w

Re: [PHP] counting with leading zeros

2007-09-27 Thread brian
tedd wrote: At 3:58 PM -0400 9/26/07, brian wrote: Well, this is almost precisely the same thing i have, save for using POSIX character classes, str_pad instead of sprintf(), and incrementing elsewhere. What i was really wondering is if there was a *much simpler* way to do this, not just re

Re: [PHP] counting with leading zeros

2007-09-29 Thread brian
tedd wrote: At 8:30 PM -0400 9/27/07, brian wrote: I wasn't bitching! And i *thought* that my numerous attempts at explaining such would have been enough. Obviously not, but wtf can you do with people who seem to want only to stir up shit? It sure sounded like you were bitching.

[PHP] strange include path error

2007-06-27 Thread brian
shows no problems at all. I also have no .htaccess files for this particular site, and the vhost conf checks out. Any idea what the heck just happened here? brian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: strange include path error

2007-06-27 Thread brian
Greg Beaver wrote: brian wrote: PHP 5.1.4 on Fedora 2 I recieved a note from a client about a problem with their site today. Looking at the error log, i found that the DB connection script that's included into any other that needs it was throwing an error because MDB2.php couldn'

  1   2   3   4   5   6   7   8   9   10   >