RE: [PHP] Apache config + PHP include paths
Title: RE: [PHP] Apache config + PHP include paths Shaun, you can also define php_value (but NOT php_admin_value) lines in a .htaccess file rather than in your httpd.conf, assuming you gave (or were given) the appropriate AllowOverride parameters to use .htaccess... Unless you are running your own server or know root, then thats what might be your best (quickest) bet. the appropriate format would be: php_value include_path ".:/path/to/includes:/another/path/somewhere/else" (personally, i use a "." as the first path to check current directory as well.. (covered in the manual as well, i believe) -- Aaron Bennett [EMAIL PROTECTED] -Original Message- From: lenar [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 21, 2001 8:32 AM To: [EMAIL PROTECTED] Subject: Re: [PHP] Apache config + PHP include paths in your virtualhost definition use: php_value include_path "new include path" might be that instead of php_value you have to use php_admin_value, not sure. this is explained in "Chapter 3. Configuration" of php manual. lenar. ""Butler, Shaun"" <[EMAIL PROTECTED]> wrote in message 0106240506.10472@progeny" TARGET="_blank">news:0106240506.10472@progeny... > is there a way to set up a different include path per virtual host in the > apache config or in the php.ini ? > > so www.blahblah.com would have /www/libs as the include path > > and > > www.moomoo.com would have /www/moo > > -- Shaun > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] SMTP/mail question
Title: RE: [PHP] SMTP/mail question Michi, Try having your sysadmin add this line to your apache virtualhost entry: php_admin_value sendmail_path "/usr/sbin/sendmail [EMAIL PROTECTED] -t -i" (dont forget the '-f' before your email address...) this sets the sendmail envelope headers to be 'originating' from your address, instead of something like [EMAIL PROTECTED], which inevitably returns bounced emails to root... Let me know if that works, Aaron Bennett [EMAIL PROTECTED] -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, June 21, 2001 1:52 AM To: Jason Murray Cc: [EMAIL PROTECTED] Subject: RE: [PHP] SMTP/mail question > > I tried all possible headers (Return-Path, Error-To, Sender, ...) to > > redirect the bouncing mail to my address but nothing worked - > > all bouncing-mails go to root! > > this works for me: > > mail("[EMAIL PROTECTED]", "Subject", "Email body", > "Return-path: [EMAIL PROTECTED]\n"); > > Maybe you mistyped the header or something... no, this header (as well as Sender:) is being overwritten by the ISP's sendmail!!! and the recipient would see this header in the mail!!! I don't want the recipient to see his address in To: nor the Return-Path: !!! First I thought this is not possible, but it works great with perl! any idea??? thanks michi -- GMX - Die Kommunikationsplattform im Internet. http://www.gmx.net -- GMX Tipp: Machen Sie Ihr Hobby zu Geld bei unserem Partner 1&1! http://profiseller.de/info/index.php3?ac=OM.PS.PS003K00596T0409a -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] Is this a joke?!
Title: RE: [PHP] Is this a joke?! Indeedy... http://uptime.netcraft.com/up/graph?mode_u=off&mode_w=on&site=www.perl.com&submit=Examine -- Aaron -Original Message- From: James Moore [mailto:[EMAIL PROTECTED]] Sent: Friday, June 22, 2001 1:06 PM To: 'Fredrik Arild Takle'; [EMAIL PROTECTED] Subject: RE: [PHP] Is this a joke?! > Is this a joke? > http://www.perl.com/search/index.php > > *hehe* I see someone has been reading my sig, and no its for real. - James -- James Moore [EMAIL PROTECTED] http://www.perl.com/search/index.php - we must be doing somthing right -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] PHP code secrity on VirtualHost
Title: PHP code secrity on VirtualHost Hi everyone, Does anyone know the best way to php secure source code for a virtualhost account so it is not group/world readable? I've been looking for a way to get PHP to play with suexec NOT in cgi mode, but nothing has popped up yet.. Anyone have any ideas short of running outside a virtualhost? Thanks in advance! -- Aaron Bennett
Re: [PHP] Using PHP + GD to make bar graphs?
I've had good success in creating SVG (Scalable Vector Graphic) documents for producing bar/line/pie graphs... The format uses an XML document for its structure, so producing data from a database connection is very easy and produces nice results.. More information at: http://www.w3.org/Graphics/SVG/Overview.htm8 It does require a download of a viewer to embed documents into the webpage... available from adobe... There is also a SDK for converting SVG documents to a raster image (PNG, Gif, Jpeg) called Batik, I believe. I found this to be a little easier than gd, plus a lot more exchangable (due to its XML nature). Hope this proves to be helpful! -- Aaron Bennett [EMAIL PROTECTED] - Original Message - From: "Gonyou, Austin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 03, 2001 1:13 PM Subject: [PHP] Using PHP + GD to make bar graphs? > I'm looking to see if it's possible to do something like this. Has anyone > seen anything like this at all? Thanks for the time. > -- > Austin Gonyou > Systems Architect, CCNA > Coremetrics, Inc. > Phone: 512-796-9023 > email: [EMAIL PROTECTED] > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
RE: [PHP] PHP/Apache security question
Does anyone know if SuExec plays "friendly" with PHP? From my recollection, when using suexec, it only alters the current UID/GID for scripts executed by httpd. Does PHP get treated the same way as would say a perl cgi script? I've looked a little at how phpwebhosting.com does it, and they set each user to their own unique primary group, and are (i believe) using suexec in their apache config setting each VirtualHost with their respective user and group... But does that really 'secure' everyone's code from other equally privileged users? :-? -- Aaron Bennett [EMAIL PROTECTED] -Original Message- From: ..s.c.o.t.t.. [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 07, 2001 4:33 PM To: Php-General Subject: RE: [PHP] PHP/Apache security question of course that's possible... it's not default, but it's very possible i think it's an apache module called suEXEC that will run the script with the script owner's name.group, not apache.apache > -Original Message- > From: [EMAIL PROTECTED] > Subject: [PHP] PHP/Apache security question > > Is there anything anyone can do about this? of course it would be ideal if > php would inherit uid/gid from the script file instead of the server > ownership but I think there is no way to accomplish this, so this is why > I am clueless. > > Oh, one more thingie: I have this CGI script here: > > #!/usr/bin/php > . > etc etc > > > I try to access it and the "security warning!" page appears. The > documentation sais that it's ok to use such CGI scripts, and warns the > user about the security threat of using the php binary as a CGI. Obviously > I am not using the php binary as a CGI, rather I am creating a CGI script > that's interpreted using the php binary, so what seems to be the problem > here? > > Thx a lot, > georgeb > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Getting any possible value inside an array
Hi everyone... Does someone have a quick and dirty way of returning _any_ possible value contained within an array? For instance: $myarray[0] = "red"; $myarray[1] = "red"; $myarray[2] = "red"; $myarray[3] = "blue"; $myarray[4] = "green"; $myarray[5] = "blue"; $myarray[6] = "red"; and i'd output "red", "blue" and "green", but not have multiple instances of each. Thanks in advance! -- Aaron Bennett
RE: [PHP] Getting any possible value inside an array
Perfect! I actually was making up the 'colors' analogy, but i've adapted it to what i need! -- Aaron -Original Message- From: mike cullerton [mailto:[EMAIL PROTECTED]] Sent: Saturday, July 07, 2001 11:05 PM To: Aaron Bennett; [EMAIL PROTECTED] Subject: Re: [PHP] Getting any possible value inside an array i think this should work $color_list = array(); // not sure if you need this foreach ($myarray as $color) { if (!in_array($color,$color_list)) $color_list[] = $color; } http://php.net/in_array on 7/7/01 11:51 PM, Aaron Bennett at [EMAIL PROTECTED] wrote: > Hi everyone... > > Does someone have a quick and dirty way of returning _any_ possible value > contained within an array? > > For instance: > > $myarray[0] = "red"; > $myarray[1] = "red"; > $myarray[2] = "red"; > $myarray[3] = "blue"; > $myarray[4] = "green"; > $myarray[5] = "blue"; > $myarray[6] = "red"; > > and i'd output "red", "blue" and "green", but not have multiple instances of > each. > > Thanks in advance! > -- > Aaron Bennett > -- mike cullerton
[PHP] Sort an array by its values
Hi All, I'm trying to sort an array of objects by the value of one of those objects... for instance, I'll have an object with 2 properties, "id" and "score", where id is unique and score is its relevant (and sometimes simelar) score. i've tried using sort() and asort() but i can't figure how to base the sorting off the value (i.e. score) of the object in the array. Any help? -- Aaron
RE: [PHP] Sort an array by its values
Chris, I'm looking at ksort as i type... the problem i'm having is that i'm trying to sort a value inside an object inside that array (rather than paired values in an assoc. array) -- Aaron -Original Message- From: Chris Lambert - WhiteCrown Networks [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 1:33 AM To: Aaron Bennett Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Sort an array by its values Do you mean something like www.php.net/ksort or www.php.net/krsort? I'm not sure of the actual structure of your array, though, so those might not work as expected. /* Chris Lambert, CTO - [EMAIL PROTECTED] WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ - Original Message - From: Aaron Bennett <[EMAIL PROTECTED]> To: Php-General (E-mail) <[EMAIL PROTECTED]> Sent: Sunday, July 08, 2001 4:25 AM Subject: [PHP] Sort an array by its values | Hi All, | I'm trying to sort an array of objects by the value of one of those | objects... | for instance, I'll have an object with 2 properties, "id" and "score", where | id is unique and score is its relevant (and sometimes simelar) score. i've | tried using sort() and asort() but i can't figure how to base the sorting | off the value (i.e. score) of the object in the array. Any help? | -- | Aaron |
RE: [PHP] Sort an array by its values
Chris, Due to the amount of HTML contained within the object, it would be nearly impossible to decipher from a print_r() the way it was... I was able to make an assoc. array with the id as the key and score as value, so i get something more like: Array ( [29] => 152 [13] => 98 [58] => 134 [6] => 66 [9] => 66 [15] => 68 [18] => 86 [49] => 66 [50] => 104 [51] => 66 [52] => 66 [59] => 100 [61] => 68 [66] => 68 ) which i should be able to use uasort() and array_reverse() to order them and maintain the correct index... Thanks for the help, i think i got it from here. -- Aaron -Original Message- From: Chris Lambert - WhiteCrown Networks [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 1:38 AM To: Aaron Bennett Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Sort an array by its values Can you print_r($variable) and post it here? /* Chris Lambert, CTO - [EMAIL PROTECTED] WhiteCrown Networks - More Than White Hats Web Application Security - www.whitecrown.net */ - Original Message - From: Aaron Bennett <[EMAIL PROTECTED]> To: 'Chris Lambert - WhiteCrown Networks' <[EMAIL PROTECTED]>; Aaron Bennett <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Sunday, July 08, 2001 4:34 AM Subject: RE: [PHP] Sort an array by its values | Chris, | I'm looking at ksort as i type... the problem i'm having is that i'm | trying to sort a value inside an object inside that array (rather than | paired values in an assoc. array) | -- | Aaron | | -Original Message- | From: Chris Lambert - WhiteCrown Networks [mailto:[EMAIL PROTECTED]] | Sent: Sunday, July 08, 2001 1:33 AM | To: Aaron Bennett | Cc: [EMAIL PROTECTED] | Subject: Re: [PHP] Sort an array by its values | | | Do you mean something like www.php.net/ksort or www.php.net/krsort? | | I'm not sure of the actual structure of your array, though, so those might | not work as expected. | | /* Chris Lambert, CTO - [EMAIL PROTECTED] | WhiteCrown Networks - More Than White Hats | Web Application Security - www.whitecrown.net | */ | | - Original Message - | From: Aaron Bennett <[EMAIL PROTECTED]> | To: Php-General (E-mail) <[EMAIL PROTECTED]> | Sent: Sunday, July 08, 2001 4:25 AM | Subject: [PHP] Sort an array by its values | | | | Hi All, | | I'm trying to sort an array of objects by the value of one of those | | objects... | | for instance, I'll have an object with 2 properties, "id" and "score", | where | | id is unique and score is its relevant (and sometimes simelar) score. i've | | tried using sort() and asort() but i can't figure how to base the sorting | | off the value (i.e. score) of the object in the array. Any help? | | -- | | Aaron | | |
RE: [PHP] Polls
Marius, 2 tables (or more) is definatly the way to approach this... I'd also add an "answerId" column in the Answer table as well so you can primary key it.. for instance. CREATE TABLE questions ( questionId INT NOT NULL, date DATETIME, question TEXT, questionDesc TEXT, PRIMARY KEY questionId ) ; CREATE TABLE answers ( answerId INT NOT NULL, questionId INT NOT NULL, answer INT NOT NULL, PRIMARY KEY answerId ) ; all you have to do then is "SELECT answerId,answer FROM answers WHERE questionId=$phpQuestionId". and thats about it... the 'answers.answer' column could be another type if you dont want and int.. I suggest using that rather than an enum just in case you want 26+ answers to a question... You could use a char or varchar if you like... I also didn't include a date column in the answers table because in the application's sense, they should be tied to the same date.. afterall, how would you design answers for your poll questions dated differently? Also, you can put in a 'sortOrder' column if you don't want the answers to be pulled from your db in order of the answerId or likewise. Keep in mind how you are going to store your response... You will need another table if you are going to capture it to a database.. You'll also need to reference the questionId and answerId (or you can do a join with just the answerId)... Best of Luck! -- Aaron Bennett -Original Message- From: Andrew Brampton [mailto:[EMAIL PROTECTED]] Sent: Sunday, July 08, 2001 6:03 AM To: Marius Pertravcius Cc: [EMAIL PROTECTED] Subject: Re: [PHP] Polls have 2 tables. Questions Table: Question ID Date Question Answers Table: Question ID Answer Then you can make as many answers as you like as long as the Question ID is for your question This make sense? Andrew - Original Message - From: "Marius Pertravèius" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, July 08, 2001 12:31 PM Subject: [PHP] Polls > Sveiki, php-general, > > I'm making some kinf of poll system. I want to use mysql table like > this: > date > question > answer1 > answer2 > answer3 > . > answern > > but how to do this table. To write new fields isn't very good. So, > is there any better way? > > > > > 2001.07.08, sekmadienis > Marius Pertravèius > [EMAIL PROTECTED] > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] Splitting a string first by quotes then spaces
Ok, heres one for y'all I have the user entering a free formed string (such as a search engine query).. and i want to parse that string into an array of string elements... If the user enters elements within double quotes, that would appear as one entity.. for each word outside of containing quotes, it would be treated as a sole entity.. For instance, the query: house shoe "mother goose" story would return an array with elements: [0] => house [1] => shoe [2] => mother goose [3] => story (note element [2] is multiple word...) I've been playing with explode($delimiter,$array) but if i use a double quote there, it will want to split anything up to the first instance into a sincle entity, then on from there... any ideas? -- Aaron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Book (and DVD) Database
How about DVDs? Unfortunatly, sitting at work right now, i'm not able to pick up a stack of dvd's and look for a unique number.. Do they have ISBN? is there a central repository to search for pertinant info (and parse it)? just wondering, Aaron - Original Message - From: "Chris Lott" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Cc: "Php-General (E-mail)" <[EMAIL PROTECTED]> Sent: Monday, July 09, 2001 11:53 AM Subject: RE: [PHP] Book Database > The Library of Congress web site is good for that sort of thing. You can > search for an ISBN and have returned a formatted MARC record/etc which is > fairly easy to parse. I don't have code anymore, but I did exactly this at > one time. > > c > > > -Original Message- > > From: Reuben D Budiardja [mailto:[EMAIL PROTECTED]] > > Sent: Monday, July 09, 2001 10:55 AM > > To: [EMAIL PROTECTED] > > Subject: [PHP] Book Database > > > > > > > > Hi, > > I'm doing project using php that will allow me to enter an > > ISBN number of a > > book, and put that book info into my database. > > > > Is there any free book database out there that I can query > > using ISBN, and > > will return me the info such as the title, author, publisher? > > If I can just > > get the title and author, that would be great. > > > > Thanks. > > Reuben D. Budiardja > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: > > [EMAIL PROTECTED] > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] HTML/PHP's static state problem.
And don't forget the 'no-no' of requiring javascript for basic functionality... Split it onto 2 pages, or have it resubmit to $PHP_SELF with a hidden field (how about a button that says "Get Cities >>"?) and populate from there.. If you're hell-bent on having it auto-populate the second select box, may i request that it also work when JS is turned off? -- Aaron - Original Message - From: "Maxim Maletsky" <[EMAIL PROTECTED]> To: "Boget, Chris" <[EMAIL PROTECTED]>; "'PHP'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; "Alexander Deruwe" <[EMAIL PROTECTED]> Sent: Monday, July 09, 2001 10:02 AM Subject: RE: [PHP] HTML/PHP's static state problem. > That is why I am saying - loading two pages is cooler then do it all on one. > Some people are still scratching the web on 28 and 36 K - those gonna get > sick submitting your form. > > Plus a page view. > > > > Sincerely, > > Maxim Maletsky > Founder, Chief Developer > > PHPBeginner.com (Where PHP Begins) > [EMAIL PROTECTED] > www.phpbeginner.com > > > > > -Original Message- > From: Boget, Chris [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, July 10, 2001 1:51 AM > To: 'PHP'; [EMAIL PROTECTED]; Alexander Deruwe > Subject: RE: [PHP] HTML/PHP's static state problem. > > > > I've done this very thing for a leasing company. I used > > PHP and MySQL to create a series of arrays in Javascript. > > When the user clicked on a value in the first combobox I > > used onClick to call a function which loaded information > > into the second box. > > A definite possibility. The only downside being is if there is > *alot* of data it'll take a while for the user to DL the page. > > Chris > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP Conference in California
Well, exhibit hall is free... I'll be there.. of course, its only 10 minutes away. *grin* -- Aaron - Original Message - From: "Uri Even-Chen" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 10, 2001 9:11 AM Subject: [PHP] PHP Conference in California > I have heard about the PHP Conference & O'Reilly Open Source Convention > in San Diego, California. Do you think it is worth being there? I saw > the prices and it's quite expensive. Not to mention the cost to get > there... > > http://conferences.oreilly.com/oscon/ > > > Thanks, > > Uri Even-Chen > Speedy Software > Raanana, Israel. > > Welcome to Speedy Net (In Hebrew): >http://www.speedy.co.il/ > Speedy Dating (In Hebrew): >http://dating.speedy.co.il/ > Speedy Composer (In English): >http://www.speedy.co.il/composer/ > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] PHP Conference in California
Well the exhibit hall is free... So if you're in town, and have a day or two sick-leave stored up, you might want to go... I'm still unclear if exhibit passes get you into any of the keynotes, but there will be a (heated) debate with MS sr. VP Craig Mundie and RedHat's Michael Tiemann... (http://conferences.oreillynet.com/cs/os2001/view/e_sess/1834) Unless your company will spring for it, i'd skip the PHP seminar.. at $895, its no cheap vacation... I personally live in the area, and am just going to the exhibit.. I'd like to talk with those ActiveState and ArsDigita guys.. I'd also like to see what Roadsend.com is doing with their PHP-SiteManager.. (www.roadsend.com). Jabber.com is also going to be there, and (from what i hear) they're doing some stuff with XML exchanges... -- Aaron - Original Message - From: "Uri Even-Chen" <[EMAIL PROTECTED]> To: "Aaron Bennett" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Tuesday, July 10, 2001 2:43 PM Subject: Re: [PHP] PHP Conference in California > Is it worth going there for the exhibit hall only? I am also interested > in the sessions & tutorials, but it looks quite expensive to participate > in them. > > By the way, do you live in San Diego? > > Uri. > > > Aaron Bennett wrote: > > > > Well, exhibit hall is free... I'll be there.. of course, its only 10 minutes > > away. *grin* > > -- > > Aaron > > > > - Original Message - > > From: "Uri Even-Chen" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Sent: Tuesday, July 10, 2001 9:11 AM > > Subject: [PHP] PHP Conference in California > > > > > I have heard about the PHP Conference & O'Reilly Open Source Convention > > > in San Diego, California. Do you think it is worth being there? I saw > > > the prices and it's quite expensive. Not to mention the cost to get > > > there... > > > > > > http://conferences.oreilly.com/oscon/ > > > > > > > > > Thanks, > > > > > > Uri Even-Chen > > > Speedy Software > > > Raanana, Israel. > > > > > > Welcome to Speedy Net (In Hebrew): > > >http://www.speedy.co.il/ > > > Speedy Dating (In Hebrew): > > >http://dating.speedy.co.il/ > > > Speedy Composer (In English): > > >http://www.speedy.co.il/composer/ > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] how to find out the mysql version from php?
Jakob, See if this does what you're looking for. // returns a string with the current mySQL version connecting handled by $dbh. $mysqlver = pos(mysql_fetch_row(mysql_query("SELECT VERSION()",$dbh))); -- Aaron - Original Message - From: "Jakob" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, July 10, 2001 2:56 PM Subject: [PHP] how to find out the mysql version from php? > > several people seem the have the "case sensitivity problem" > regarding different mysql versions - see this extract from > the mysql manual: > > " > Prior to MySQL Version 3.23.4, REGEXP is case sensitive, and the previous query > will return no rows. To match either lowercase or uppercase `b', use this query > instead: > > mysql> SELECT * FROM pet WHERE name REGEXP "^[bB]"; > > From MySQL 3.23.4 on, to force a REGEXP comparison to be case sensitive, use > the BINARY keyword to make one of the strings a binary string. This query will > match only lowercase `b' at the beginning of a name: > > mysql> SELECT * FROM pet WHERE name REGEXP BINARY "^b"; > " > > is there a way to find out _programmatically_ which version of mysql is running > (phpinfo() gives some information, but i don't know how this can be accessed) > on the server. > > thanks in advance, > Jakob. > > PS: please cc me, i am on the very long digest list. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] how to find out the mysql version from php?
or the more simple: mysql_get_server_info($dbh); // where $dbh is optional. http://www.php.net/manual/en/function.mysql-get-server-info.php Note: this is a new function for 4.0.5+. cheers, Aaron - Original Message - From: "Aaron Bennett" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]>; "Jakob" <[EMAIL PROTECTED]> Sent: Tuesday, July 10, 2001 3:58 PM Subject: Re: [PHP] how to find out the mysql version from php? > Jakob, > See if this does what you're looking for. > > // returns a string with the current mySQL version connecting handled by > $dbh. > $mysqlver = pos(mysql_fetch_row(mysql_query("SELECT VERSION()",$dbh))); > > -- > Aaron > > - Original Message - > From: "Jakob" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Tuesday, July 10, 2001 2:56 PM > Subject: [PHP] how to find out the mysql version from php? > > > > > > several people seem the have the "case sensitivity problem" > > regarding different mysql versions - see this extract from > > the mysql manual: > > > > " > > Prior to MySQL Version 3.23.4, REGEXP is case sensitive, and the previous > query > > will return no rows. To match either lowercase or uppercase `b', use this > query > > instead: > > > > mysql> SELECT * FROM pet WHERE name REGEXP "^[bB]"; > > > > From MySQL 3.23.4 on, to force a REGEXP comparison to be case sensitive, > use > > the BINARY keyword to make one of the strings a binary string. This query > will > > match only lowercase `b' at the beginning of a name: > > > > mysql> SELECT * FROM pet WHERE name REGEXP BINARY "^b"; > > " > > > > is there a way to find out _programmatically_ which version of mysql is > running > > (phpinfo() gives some information, but i don't know how this can be > accessed) > > on the server. > > > > thanks in advance, > > Jakob. > > > > PS: please cc me, i am on the very long digest list. > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
[PHP] .htaccess php_value
Hi There, I currently use .htaccess files to override the include path, which works great for me... One of my concerns was the portability of the code, and the possibility of not having control of http.conf I'm now in the process of porting some of the sites onto a winnt architecure (but still using apache as my webserver...). The contents of some of these .htaccess files looks simelar to: php_value include_path ".:/home/www/htdocs/php-lib:/home/www/htdocs/includes" unfortunatly, apache for windows would prefer the format somewhat like: php_value include_path ".;c:\web\site\php-lib;c:\php\whatever\includes" (note the use of ';' rather than ':' as well) So my question, is whats the best way to make the site's as portable as can be? I assume that i could go thru _all_ the code and make include references relative rather than relying on the config to find include()'s Any suggestions? -- Aaron Bennett [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Export to Excel
Interesting... I have excel2k, and it worked fine for me... The only thing i can think of is maybe some extra garbage you get when it generates the file... maybe headers? -- Aaron Bennett [EMAIL PROTECTED] - Original Message - From: "Boget, Chris" <[EMAIL PROTECTED]> To: "'Brady Hegberg'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> Cc: "Jorge Alvarez" <[EMAIL PROTECTED]> Sent: Friday, July 13, 2001 11:33 AM Subject: RE: [PHP] Export to Excel > > Here's something I found on the PHP Code Exchange: > > Generate Excel files from PHP by Christian Novak on > > 2000-11-25 11:47:24 (v for 4.0) is 1974 bytes. > > Small function library to generate Excel files/stream > > directly from PHP. > > http://px.sklar.com/code.html?code_id=488 > > I haven't tried it out...it doesn't look terribly sophisticated but it > > might work. > > I just tried it and it didn't work. At least, not for Excel2k. It > created an .xls file but it wasn't something that could be opened > and read by my version of XL. > > Chris > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Using an image as a reset button on a PHP script
Aside from doing 2 tricky... well... tricks. You can't.. Standard HTML (to my knowledge) does not support the ability to have a reset button be set to an image. only those large gray Cadillac sized hideous buttons. Now, with that said.. there are 2 ways you can do it. ;-) Client Side - If you used a client side scripting language, like javascript, you could set the action of that image to (onMouseUp) clear the contents of the form.. I have seen this done pleanty of times before... Keep in mind that won't always work, but hey.. its just a reset button, right? Server Side - Its possible (php certainly included) that in the code the form submits to, it could check the value of that form image button, and if true, return you to the form and clear all the fields... I'm trying to think of anyone who does this, and am drawing a blank.. There isn't much reason not to though... In fact, i much like this way, and if no one has objections, i think i'll start doing it. ;-) -- Aaron Bennett - Original Message - From: "Brandon Orther" <[EMAIL PROTECTED]> To: "PHP User Group" <[EMAIL PROTECTED]> Sent: Friday, July 13, 2001 2:46 PM Subject: [PHP] Using an image as a reset button on a PHP script > Hello, > > I am making a script at the moment and want to use images instead of the > usual buttons. Does anyone know how I can use the image as a reset > button? > Thank you, > > > Brandon Orther > WebIntellects Design/Development Manager > [EMAIL PROTECTED] > 800-994-6364 > www.webintellects.com > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]