RE: [PHP] need for $_POST[''] changed after server upgrade
Register globals is no longer ON I believe. That is why it happened. To fix this: Foreach($_POST as $key = $value) ${$key} = $value; That will convert all of your post variables to local variables. :) Thanks, Matt Babineau Criticalcode 858.733.0160 [EMAIL PROTECTED] http://www.criticalcode.com TAKE ORDERS from the WEB and add them right into QUICKBOOKS! Ask me how... -Original Message- From: Ray [mailto:[EMAIL PROTECTED] Sent: Sunday, December 11, 2005 10:29 PM To: php-general@lists.php.net Subject: [PHP] need for $_POST[''] changed after server upgrade Hello All, We just upgraded our server at work, and one client's web site stoped working. I didn't write the code, I just get to clean up someone else's mess. :) After a little troubleshooting, I found that forms refered back to the same script. so far, so good. very normal. The strange part was the variable names were just $foo not, $_POST['foo']. After the upgrade, the variable $foo was not recognized when the form was processed, so of course, everything failed. My solution was to put if (isset($_POST[foo])) {$foo=$_POST[foo]}; at the top of the script. This seems to make everything work. My two questions are: first, is there a better way to fix this, and second, how did this work in the first place? TIA Ray -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: R: [PHP] Date Function Questions
System Time Is the system time through Linux, Apache or through the php.ini file? On 12/11/05, Sebastian En3pY Zdrojewski [EMAIL PROTECTED] wrote: afaik it's the system time. Cheers En3pY Sebastian Konstanty Zdrojewski URL: http://www.en3py.net/ E-Mail: [EMAIL PROTECTED] Le informazioni contenute in questo messaggio sono riservate e confidenziali. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora Lei non fosse la persona a cui il presente messaggio è destinato, La invito ad eliminarlo dal Suo Sistema ed a distruggere le varie copie o stampe, dandone gentilmente comunicazione. Ogni utilizzo improprio è contrario ai principi del D.lgs 196/03 e alla legislazione Europea (Direttiva 2002/58/CE). -Messaggio originale- Da: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Inviato: lunedì 12 dicembre 2005 6.57 A: PHP-General Oggetto: [PHP] Date Function Questions This maybe a dumb questions, but in php where is the information taken from for the date() function? Is it pulled through Apache or the hardware or in the php.ini file? I am having an issue to where the time arbitraly changed one day from PST to CST. -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.13.13/197 - Release Date: 09/12/2005 -- ** The content of this e-mail message and any attachments are confidential and may be legally privileged, intended solely for the addressee. If you are not the intended recipient, be advised that any use, dissemination, distribution, or copying of this e-mail is strictly prohibited. If you receive this message in error, please notify the sender immediately by reply email and destroy the message and its attachments. * -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Select and $_POST
$query = SELECT * FROM login WHERE username = '.$_POST['username'].' AND pass = '. $_POST['pass'].'; What is the correct syntax for $query = SELECT * FROM login where username='$_POST['username']' AND pass ='$_POST['pass']'; Thought this would work. R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] HTML - PDF PHP Package
Ok I just went through great lengths investigating this. If you have complex HTML, forget it. All the HTML - PDF conversions only work out with very simple HTML. If you are trying to convert a web page to PDF if most likely will look terrible - to check on this try it using Acrobat Distiller, assumably the best HTML to PDF converter out there (utilizing Print to PDF from browser) it still fails to output PERFECT PDF. It really bites that this isn't more easy either. That said, there are some solutions using Ghostscript, htmldoc that are really cool and fairly easy to get working! Thanks, Matt Babineau Criticalcode 858.733.0160 [EMAIL PROTECTED] http://www.criticalcode.com -Original Message- From: Christian Calloway [mailto:[EMAIL PROTECTED] Sent: Friday, July 15, 2005 10:56 AM To: php-general@lists.php.net Subject: [PHP] HTML - PDF PHP Package Hi Everyone, I am looking for a PHP based packaged (though it doesn't necesarily have to be) that will convert HTML files to their PDF representations; on the fly of course. Anyone know or have any experience w/this? Thanks in advance, Christian -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Some CLASS file help, should be a quick answer...
Ok so I set a variable at the top of my class definition var $tmp; bunch of functions Function $func1() { do some stuff $n = $this-result_from_another_function($var1, $var2, $var3); // this function returns an ARRAY //print_r($n); $this-tmp = $n; } When I try to set $this-tmp = $n, it doesn't work!? But if I print_r($n) the array that gets returned by $this-result_from_another_function($var1, $var2, $var3) gets printed out and I can't understand this!! There is plenty of data in $n, but not in $this-tmp!!! I've read a couple tutorials but none explain this very wellanyone have any thoughts? Thanks, Matt Babineau Criticalcode 858.733.0160 [EMAIL PROTECTED] http://www.criticalcode.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP vs. ColdFusion
Yeah - I'll second all of this. I'm a Certified Macromedia CF Developer, why do you ask am I on this list? The answer is simple, php is better. However with the recent developments in CF6, CF has become very comparable. Why would I still choose PHP over CF given this? Ease of management. I don't have to even think about the server. I spend about 1 hr a month messing around with the server (daemon restarts or php config changes). That's where LAMP's value really shines through I think you will find. Thanks, Matt Babineau Criticalcode 858.733.0160 [EMAIL PROTECTED] http://www.criticalcode.com -Original Message- From: Brad Pauly [mailto:[EMAIL PROTECTED] Sent: Monday, June 27, 2005 11:09 AM To: php-general@lists.php.net Subject: Re: [PHP] PHP vs. ColdFusion On 6/26/05, Rick Emery [EMAIL PROTECTED] wrote: My employer has (finally) decided to take full advantage of our intranet, and wants to move from client-server applications to web-based applications. To that end, we're trying to determine the best platform for our applications. We're a Microsoft shop, with Microsoft SQL Server 2000 for all of our databases (that won't change any time soon, if ever). Due to past experience that I won't get into, we (the Development group) have all agreed that ASP.Net is out (at least for the short term). We had the opportunity to visit a local enterprise that has deployed ColdFusion, and they couldn't stop singing its praises. I'm partial to PHP, even after sampling Coldfusion, so what I would like is some ammunition that I can take into a meeting to sell management on PHP instead of ColdFusion. I've already been harping on the difference in cost, so I'm looking for other points to go with. Besides, we'll probably invest in Zend products if we choose PHP, and Macromedia has government rates available; I don't have any numbers (yet), but the cost difference may not be that great in the end. Any input would be greatly appreciated. Opinions are welcome (especially from programmers with experience in both), but I have to sell it to management (I'm already on the PHP side), so links to data or articles comparing the two are best. It might not be easy to put a number on, but consider your (and possibly the other developers') enthusiasm about PHP. I would guess that you will be more productive with something that you are excited about. I have done a lot of work in both ColdFusion and PHP and I much prefer PHP. There are some technical reasons (i.e., I like shared nothing), but some of it is also personal preference. I just like it. CF is fine and I don't think it's dead, but it just isn't as fun to work with. My biggest problem with CF is probably that I have to use it on Windows and, well, I really don't like that. ;) You mention being in a Windows environment so maybe you don't have a choice with that aspect. If management can see that you are stoked to use PHP that might help your cause. - Brad -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Something is messing up the php output
I bet if you connect using the IP directly it will solve your problem. Thanks, Matt Babineau Criticalcode 858.733.0160 [EMAIL PROTECTED] http://www.criticalcode.com -Original Message- From: Jonathan Duncan [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 22, 2005 6:27 PM To: php-general@lists.php.net Subject: [PHP] Something is messing up the php output I have a site that has this problem every once in a while, and seemingly randomly. It is a database driven site, as indicated by the error. This same page when loaded numerous times will sometimes work just fine, and then sometimes it will give an error message like this: - Warning: mysql_connect(): Unknown MySQL Server Host 'hostn[]me.domain.com' (1) in /usr/local/apache/htdocs/filename.php on line 8 Unknown MySQL Server Host 'hostn[]me.domain.com' (1) - Notice that in the word hostname the 'a' is not an 'a'. It is one of the empty boxes that usually indicates an unknown character. Here I represent it with square brackets for visual effect. When the source is check, there is absolutely nothing wrong with the hostname in the mysql_connect function. As I mentioned, if this page is reloaded it may be fine. After a while it may not have anymore problems for weeks. Or it may come back the next day. When It is happening I do not notice any major server process usage. The mis-interpreted character problem sometimes truncates a word, or just messes up a cerain random characters. I have had this happen on more than one site on more than one server. Does anyone have any idea what this may be? I am even accepting wild guesses at this point. Thanks, Jonathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Beautiful HTML Invoice - Prints like crap! I need somesuggestions!
Ok all - I've been playing with this print styl sheet thing. I can get the media=print to behave correctly, but I cannot get table background colors set. I want to print the table bg colors and background images. I was hoping this was possible with CSS2. Does anyone have any input on this? I build some diagrams using html and graphics which are on the invoice, and I use bgcolor on my tables to show the separator lines in the line item section with the prices and such. I don't know how to proceed best, or if I am heading down a dead end with this. Anyone have any more input on this? Everything I have read so far has been very helpful and I thank you for that. Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED] -Original Message- From: Marcus Bointon [mailto:[EMAIL PROTECTED] Sent: Thursday, June 09, 2005 5:02 AM To: PHP General Subject: Re: [PHP] Beautiful HTML Invoice - Prints like crap! I need somesuggestions! On 7 Jun 2005, at 23:46, Chris Martin wrote: Is a simple CSS print stylesheet out of the question? If the site is marked up properly, this should be trivial, and would be much easier/more efficient. CSS is definitely the way to go. Here are some good articles: http://www.alistapart.com/articles/printyourway/ http://www.alistapart.com/articles/goingtoprint/ Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Beautiful HTML Invoice - Prints like crap! I need somesuggestions!
Unfortunately you can't override this setting. It is really quite frustrating overall - I'm sure some of you have used background color to create an excel style table...or maybe I'm just doing things totally wrong. Customers get to login to get their invoices, so I really want them to be able to print a copy. I've looked into PDFing the invoice but its just a bit easier to hit the print button and be done since Adobe PDF usually crashes your browser :( Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED] -Original Message- From: Warren Vail [mailto:[EMAIL PROTECTED] Sent: Thursday, June 09, 2005 2:05 PM To: 'Matt Babineau'; php-general@lists.php.net Subject: RE: [PHP] Beautiful HTML Invoice - Prints like crap! I need somesuggestions! Isn't this a user selectable option, which by default is turned off (on most browsers)? My Internet explorer has an advance configuration option that enables Print background colors and images. Don't think you can override the users selection on this. Warren Vail [EMAIL PROTECTED] -Original Message- From: Matt Babineau [mailto:[EMAIL PROTECTED] Sent: Thursday, June 09, 2005 1:48 PM To: php-general@lists.php.net Subject: RE: [PHP] Beautiful HTML Invoice - Prints like crap! I need somesuggestions! Ok all - I've been playing with this print styl sheet thing. I can get the media=print to behave correctly, but I cannot get table background colors set. I want to print the table bg colors and background images. I was hoping this was possible with CSS2. Does anyone have any input on this? I build some diagrams using html and graphics which are on the invoice, and I use bgcolor on my tables to show the separator lines in the line item section with the prices and such. I don't know how to proceed best, or if I am heading down a dead end with this. Anyone have any more input on this? Everything I have read so far has been very helpful and I thank you for that. Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED] -Original Message- From: Marcus Bointon [mailto:[EMAIL PROTECTED] Sent: Thursday, June 09, 2005 5:02 AM To: PHP General Subject: Re: [PHP] Beautiful HTML Invoice - Prints like crap! I need somesuggestions! On 7 Jun 2005, at 23:46, Chris Martin wrote: Is a simple CSS print stylesheet out of the question? If the site is marked up properly, this should be trivial, and would be much easier/more efficient. CSS is definitely the way to go. Here are some good articles: http://www.alistapart.com/articles/printyourway/ http://www.alistapart.com/articles/goingtoprint/ Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Beautiful HTML Invoice - Prints like crap! I need somesuggestions!
Yeah I do understand this. That is primarily what I was trying to find a workaround for. It doesn't seem like CSS will save me on this one. I can't seem to get table borders to look identical in ff/ie using CSS they render differently. My Diagrams mostly rely on bg colors, so I'm really up a creek right now - unless I convert the bg images to foreground image which would really suck...but could be done. Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED] -Original Message- From: Leif Gregory [mailto:[EMAIL PROTECTED] Sent: Thursday, June 09, 2005 2:29 PM To: Matt Babineau Subject: Re: [PHP] Beautiful HTML Invoice - Prints like crap! I need somesuggestions! Hello Matt, Thursday, June 9, 2005, 2:47:51 PM, you wrote: M Ok all - I've been playing with this print styl sheet thing. I can M get the media=print to behave correctly, but I cannot get table M background colors set. I want to print the table bg colors and M background images. I was hoping this was possible with CSS2. Does M anyone have any input on this? I build some diagrams using html and M graphics which are on the invoice, and I use bgcolor on my tables to M show the separator lines in the line item section with the prices and M such. I don't know how to proceed best, or if I am heading down a M dead end with this. Anyone have any more input on this? Everything I M have read so far has been very helpful and I thank you for that. You realize that the printing of background colors is determined primarily by the user's browser right? In IE: Tools / Internet Options / Advanced / Under Printing section. In Firefox: File / Page Setup / Under Options -- Leif (TB lists moderator and fellow end user). Using The Bat! 3.5.26 under Windows XP 5.1 Build 2600 Service Pack 2 on a Pentium 4 2GHz with 512MB -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Php.net/pdf - Making a PDF from the invoice
Speaking of PDF...I was looking at php.net/pdf and couldn't figure out if there was a way I could just dump in the html of the page and have it output as a pdf? Does anyone have any sample code for dumping HTML to PDF format? (Using PDFlib). Didn't seem like the samples on php.net were that good. Thx- Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED] -Original Message- From: Kristen G. Thorson [mailto:[EMAIL PROTECTED] Sent: Thursday, June 09, 2005 2:05 PM To: php-general@lists.php.net Subject: Re: [PHP] Beautiful HTML Invoice - Prints like crap! I need somesuggestions! Most web browsers I know of don't print anything specified as background by default. I imagine that functionality extends to CSS-defined background colors and images. I doubt there's a way to change that preference other than setting it manually. If changing the print settings on your machine will not work for you, then you may consider PDF, though it certainly comes with it's own hassles. kgt Matt Babineau wrote: Ok all - I've been playing with this print styl sheet thing. I can get the media=print to behave correctly, but I cannot get table background colors set. I want to print the table bg colors and background images. I was hoping this was possible with CSS2. Does anyone have any input on this? I build some diagrams using html and graphics which are on the invoice, and I use bgcolor on my tables to show the separator lines in the line item section with the prices and such. I don't know how to proceed best, or if I am heading down a dead end with this. Anyone have any more input on this? Everything I have read so far has been very helpful and I thank you for that. Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED] -Original Message- From: Marcus Bointon [mailto:[EMAIL PROTECTED] Sent: Thursday, June 09, 2005 5:02 AM To: PHP General Subject: Re: [PHP] Beautiful HTML Invoice - Prints like crap! I need somesuggestions! On 7 Jun 2005, at 23:46, Chris Martin wrote: Is a simple CSS print stylesheet out of the question? If the site is marked up properly, this should be trivial, and would be much easier/more efficient. CSS is definitely the way to go. Here are some good articles: http://www.alistapart.com/articles/printyourway/ http://www.alistapart.com/articles/goingtoprint/ Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture [EMAIL PROTECTED] | http://www.synchromedia.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Beautiful HTML Invoice - Prints like crap! I need somesuggestions!
Yikeshas anyone got a url for a good Make PDF From HTML Class that uses my newly installed PDFlib library? Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED] -Original Message- From: Leif Gregory [mailto:[EMAIL PROTECTED] Sent: Thursday, June 09, 2005 3:21 PM To: Matt Babineau Subject: Re: [PHP] Beautiful HTML Invoice - Prints like crap! I need somesuggestions! Hello Matt, M Thanks for the info - its all quite helpful. I guess I'll go for the M PDF for now and maybe I'll redo all the graphics too. :( Yeah, I know the feeling of resignation well But, with a PDF, being that they were designed to do this, I think you'll have more luck. I will warn you though, building a PDF in PHP isn't a piece of cake, even with the available classes out there. Tagline of the day: Cat (kat') n. 1. A dog with an attitude problem. -- Leif Gregory Development Supervisor Licensing, Regulation and Small Projects Section The Information Technology Services Division leads the State of New Mexico in customer-focused IT services as it supports the Department of Health in building a healthy New Mexico. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Three queries. One Form.
Well after the first query you could do this: $art_id = mysql_insert_id(); There is your new unique art_id you just created. Do this for the next table, the do the insert on your 3rd table. Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED] -Original Message- From: jack jackson [mailto:[EMAIL PROTECTED] Sent: Thursday, June 09, 2005 4:06 PM To: php-general@lists.php.net Subject: [PHP] Three queries. One Form. Hi, I am trying to make one form on a single page insert info into three tables; query 1 creates an art_id (auto-increment) for the newly created row in table art; query2 creates a media_id in table media. Then I need to get the art_id and media_id created by the first two queries to insert into an intersection table as query three. Must I run an intermediate query to get the ids, and assign it to vars? What would it even look like? Thanks in advance, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Beautiful HTML Invoice - Prints like crap! I need some suggestions!
Hi all - I've got a great html invoice that prints like crap because of my user of background images and foreground images. Does anyone have any good suggestions other than turn on images in IE to get this thing to print the graphics? Is there a good way I could convert the HTML view to a JPG? I'm on a linux box and have php 4.3.10. Thanks for the help! Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED]
RE: [PHP] Beautiful HTML Invoice - Prints like crap! I need somesuggestions!
Yeah I was considering that...I'm trying the html2pdf site right now. It seems alright...its choking on my invoice as we speak (lots of html). Is there a way to make a JPG? I've looked at a few sites from google..most are activeX...somewhat undersirable. Looking for something I can run on the server to do the convert work. Thanks, Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED] -Original Message- From: Jack Jackson [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 07, 2005 3:21 PM To: php-general@lists.php.net Subject: Re: [PHP] Beautiful HTML Invoice - Prints like crap! I need somesuggestions! Matt Babineau wrote: Hi all - I've got a great html invoice that prints like crap because of my user of background images and foreground images. Does anyone have any good suggestions other than turn on images in IE to get this thing to print the graphics? Is there a good way I could convert the HTML view to a JPG? I'm on a linux box and have php 4.3.10. Thanks for the help! Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED] Make it a pdf? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Php + flash, need some help making a small .FLA
Hi all - Does anyone have any experience with integrating php + flash? Or know of any good tutorial sites? Basically what I want to do is have an animated loading screen, and then pull pictures from a database and display text from a database, text could be scrolling across the bottom like CNN or something. Anyone familiar with some techniques on doing this? Any examples people may have of this would be great, just send me some sample .FLA scripts!! If you've got some examples of exactly what I want to do, and you also have a paypal account, I can make it worth your time :-D Thanks, Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED]
RE: [PHP] Preorder Modified Tree Traversal
Yeah, I read this article, and it works, but it doesn't set you up for a drill down scenario... Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED] -Original Message- From: Chris W. Parker [mailto:[EMAIL PROTECTED] Sent: Thursday, March 24, 2005 8:55 AM To: Burhan Khalid; Matt Babineau Cc: php-general@lists.php.net Subject: RE: [PHP] Preorder Modified Tree Traversal Burhan Khalid mailto:[EMAIL PROTECTED] on Wednesday, March 23, 2005 10:25 PM said: Sitepoint has a great article that has PHP snippets on both pmtt and the flat drill-down method. http://www.sitepoint.com/article/hierarchical-data-database I would like to add that this is the article where I found out about pmtt. It's also the article where I got the functions for traversing/adjusting pmtt. In other words, the building blocks for whatever you need regarding pmtt are probably in that article. (At least that was the case for me.) Chris. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Preorder Modified Tree Traversal
Hi all, I'm trying to use pmtt to display a windows explorer style view of products in a database. If anyone is familiar with pmtt could you send me an email, I'm looking for some help. I built some code to pull the Levels out of the database, I need some help tracking which level the user is clicking on so that I can create a drill-down scenario. I know this can most likely be achieved more easily using the adjacent tree method, but I need something a bit more robust than that. Let me know if you have created any systems that are drill-down style menus or whatnot, I'm interested in the methods you used to achieve your success. Thanks All! PS- Thanks to those who suggested the Linux command line HTML 2 PDF package!! Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED]
[PHP] HTML - to - PDF
Hi All, I have some reports I need converted from HTML to PDF, I'm on a LAMP box, so does anyone have any free suggestions? Thanks, Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED]
[PHP] RE: Problem with SELECT SQL_CALC_FOUND_ROWS
Ok I installed PHP 4.3.10 and it still has not fixed the problem. If I remove the SQL_CALC_FOUND_ROWS from the query, it works no problems! This is very strange behavior! Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED] -Original Message- From: Matt Babineau [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 01, 2005 12:52 PM To: 'Michael Dykman' Cc: 'MySQL General' Subject: RE: Problem with SELECT SQL_CALC_FOUND_ROWS Weird thing is that I am running PHP 4.3.9I guess I can upgrade and see what happens? Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED] -Original Message- From: Michael Dykman [mailto:[EMAIL PROTECTED] Sent: Tuesday, February 01, 2005 12:47 PM To: Matt Babineau Cc: 'MySQL General' Subject: Re: Problem with SELECT SQL_CALC_FOUND_ROWS Matt, I suspect your problem is PHP, not MySQL. refer to http://bugs.php.net/bug.php?id=16906edit=1 On Tue, 2005-02-01 at 15:20, Matt Babineau wrote: Hi All- I'm running a query that uses SQL_CALC_FOUND_ROWS for my search engine on a real estate site. The problem is that I get an error when I run my query: Warning mysql_query(): Unable to save result set in /clients/search.php My Query is: SELECT SQL_CALC_FOUND_ROWS propertyData.*, propertyDataBulk.propertyDesc FROM propertyData LEFT JOIN propertyDataBulk ON propertyData.id = propertyDataBulk.propertyID WHERE state = 'CA' limit 0, 5 Very odd that this happens, I am running MySQL 4.1.9 Thanks, Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED] -- - michael dykman - [EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Sigh....regex - need to search/replace string for anything but numbers
Ahh so the regex gods are pissed at me. This is simple (I think), but I need to figure out how to strip out everything in a string that is not a number. Any takers? Thanks, Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED]
[PHP] Multiple select boxes - select in one box, populate from DB in second with no refresh!
Hi all - I know this has been covered a lot but my searching has resulting in not much success, was hoping someone had the link to a good page on this. I have on select box that when I select something in it I need the other select box to get vales from a database table with out having the page refresh. I have thought about the Iframe solution - does this work in Mozilla? Are there non-iFrame solutions? Thanks, Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED]
RE: [PHP] Multiple select boxes - select in one box, populate from DB in second with no refresh!
I just found a descent tutorial after another 45 mins of searching and pulling a php file into the ifram to output the data, then pulling the data in from the iframe will work, thanks for your response! I was concerned with cross-browser compatability but hey who cares about netscape4 anyway ;-) Matt Babineau Criticalcode w: http://www.criticalcode.com p: 858.733.0160 e: [EMAIL PROTECTED] -Original Message- From: Richard Lynch [mailto:[EMAIL PROTECTED] Sent: Friday, January 21, 2005 12:41 PM To: Matt Babineau Subject: Re: [PHP] Multiple select boxes - select in one box, populate from DB in second with no refresh! Matt Babineau wrote: I know this has been covered a lot but my searching has resulting in not much success, was hoping someone had the link to a good page on this. I have on select box that when I select something in it I need the other select box to get vales from a database table with out having the page refresh. I have thought about the Iframe solution - does this work in Mozilla? Are there non-iFrame solutions? If the page isn't refreshing, then you aren't using PHP, because PHP only runs on the server. JavaScript could do this, if you dump all possible values for the second box out as part of JavaScript data. I have no idea how iFrame works, but you can probably get JavaScript to work right in Mozilla for this. -- Like Music? http://l-i-e.com/artists.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Re: Installing GD library
Installing GD for Linux can be a little more challanging: If you are running red had here are a few things you will probably need: RPMS: Zlib Zlib-devel Libjpeg Libjpeg-devel GD (comes with php 4.3.0) I think that was all I needed. Then when you compile php try something like this: ./configure --with-mysql --with-apxs=/usr/local/apache/bin/apxs --with-gd --with-zlib-dir=/usr/include --enable-sockets You can optionally add --with-jpeg and --with-jpeg-dir=/wherever-libjpeg-got-installed That's a basic install guild for GD on linux for use with PHP...I may not be 100% correct its been a while and I just woke up but that's the nutshell verion. Matt -Original Message- From: Aaron Wolski [mailto:[EMAIL PROTECTED] Sent: Friday, May 07, 2004 11:56 AM To: 'Kim Steinhaug'; [EMAIL PROTECTED] Subject: RE: [PHP] Re: Installing GD library Now... what about installing for Linux? Any ideas? :) Aaron -Original Message- From: Kim Steinhaug [mailto:[EMAIL PROTECTED] Sent: May 7, 2004 2:57 PM To: [EMAIL PROTECTED] Subject: [PHP] Re: Installing GD library put the DLL file in your PHP DLL file directory, uncomment the line in php.ini referring to it. Restart apache if running, IIS doesnt need to be restarted. -- -- Kim Steinhaug -- There are 10 types of people when it comes to binary numbers: those who understand them, and those who don't. -- www.steinhaug.com - www.easywebshop.no - www.webkitpro.com -- Phpu [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Hi, I've downloaded the GD library. Can someone tell me how do i install it on a windows system? I found in internet a few articles but i don't quite understand. Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] SCP a file from my server to another using PHP
Its getting run from PHP with the User of nobody:nobody in Apache -Original Message- From: Vail, Warren [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 04, 2004 5:45 PM To: 'Matt Babineau'; [EMAIL PROTECTED] Subject: RE: [PHP] SCP a file from my server to another using PHP Matt, Question: when you run it and it fails, are you running it with php from the command line under your own userid or are you running it under a web server by invoking the php file using a URL as userid (nobody)? Warren Vail -Original Message- From: Matt Babineau [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 04, 2004 4:26 PM To: [EMAIL PROTECTED] Subject: [PHP] SCP a file from my server to another using PHP Hey All: Interesting problem that I haven't been able to solve using google. I want to move a file from my system using php, and I want to SCP it to another system. I setup the 2 keys and I can SCP files w/o using a password from the command line with no problem. When I take the same string that I jsut used to scp the file and run it using exec, system, passthru it doesn't work!! I'm baffled and was hoping someone had successfully done this before. Here is a chunk of code: $address = www.url.com; $value = foldername; if ($urlStatus == Stopped) { $cmd = scp /home/dev.site.com/mail_admin/commands/remove .$gs['address'].:/home/www/$value/command; echo nbsp;nbsp;.$cmd.br; exec($cmd, $tmp, $rtmp); print_r($tmp); echo $rtmp; echo brbr; } TIA for anyone who has done this and knows the answer!!! -Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SCP a file from my server to another using PHP
Hey All: Interesting problem that I haven't been able to solve using google. I want to move a file from my system using php, and I want to SCP it to another system. I setup the 2 keys and I can SCP files w/o using a password from the command line with no problem. When I take the same string that I jsut used to scp the file and run it using exec, system, passthru it doesn't work!! I'm baffled and was hoping someone had successfully done this before. Here is a chunk of code: $address = www.url.com; $value = foldername; if ($urlStatus == Stopped) { $cmd = scp /home/dev.site.com/mail_admin/commands/remove .$gs['address'].:/home/www/$value/command; echo nbsp;nbsp;.$cmd.br; exec($cmd, $tmp, $rtmp); print_r($tmp); echo $rtmp; echo brbr; } TIA for anyone who has done this and knows the answer!!! -Matt
[PHP] mysql_list_fields() bug?
Hey All - just wanted to check in with anyone who has used this function. I currectly have a function that I created, and inside it I have this function. Outside of my custom function I have a mysql_pconnect() statement and a mysql_select_db() statement. I also have another custom function that runs a SQL query and returns the results. My problem is why does the custom function with mysql_list_fields(), fail to run unless I put a separate pconnect and select_db statement in the custom function itself and my other custom function can query the DB fine. $db = mysql_pconnect(ip, user, password); mysql_select_db(db); function one() { $db = mysql_pconnect(ip, user, password); mysql_select_db(db); $fields = mysql_list_fields(db, table); } function two() { $q = SELECT * FROM user; $result = mysql_query($q); return $result; } So the end result being if I take the connect statement out of the function one(), it fails, but function two() still works! Am I doing something wrong here? Thanks, Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mysql_list_fields() bug?
On Mon, 2003-11-10 at 16:43, Jay Blanchard wrote: [snip] Outside of my custom function I have a mysql_pconnect() statement and a mysql_select_db() statement. So the end result being if I take the connect statement out of the function one(), it fails, but function two() still works! Am I doing something wrong here? [/snip] It's just a small misunderstanding Matt. Your $db = mysql_pconnect(ip, user, password); is LOCAL to the function http://us3.php.net/language.variables.scope The other connection string you mention sits OUTSIDE of any other function, so it is GLOBAL (you didn't show that code). You are not calling for the GLOBAL connection in function one. As someone famous once said, Location, location, location! If you add the resource identifier to the request in function one to $fields = mysql_list_fields(db, table, $db); it should work just fin Ok, I added the resource identifier, and got an error. I think what is happening now is the resource identifier $db is outside the function one(), so it cannot be referenced from the mysql_list_fields() fuction which is inside. Does that make sense? Is the resource indentifier a GLOBAL thing, because I sure didn't make it one :) The error I got was, supplied argument is not a valid Mysql-Link resource. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] mysql_list_fields() bug?
Ok, this ended up working well. I'm still wondering why in my example function two() works, without needing to provide the resource identifier to mysql_query(), how can mysql_query() pick up the resource identifier automatically while mysql_list_fields does not? Thx- Matt On Mon, 2003-11-10 at 17:00, Jay Blanchard wrote: [snip] Ok, I added the resource identifier, and got an error. I think what is happening now is the resource identifier $db is outside the function one(), so it cannot be referenced from the mysql_list_fields() fuction which is inside. Does that make sense? Is the resource indentifier a GLOBAL thing, because I sure didn't make it one :) The error I got was, supplied argument is not a valid Mysql-Link resource. [/snip] Add GLOBAL to the function function one() { global $db; mysql_select_db(db); $fields = mysql_list_fields(db, table, $db); } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] w3c-compliant form-action parameters
All this aside what about using the ASCII value of the symbol. (I think its ASCII). You know how sometimes links with spaces in them are %20 instead of the actual space? I'm not sure what it is but I am pretty sure there is a %something for and ampersand symbol. That may workif its not already been suggested. -Matt On Fri, 2003-10-24 at 17:03, Chris Shiflett wrote: --- Nathan Taylor [EMAIL PROTECTED] wrote: This problem should be handled by modifying the php.ini. In my experience W3C is a whiney bitch that always gets it's way. Just throw this code on all your pages (or better yet, in a header) and the problem will go away. // The communists at W3C don't like the ampersand, so let's make sure it isn't used. ini_set('arg_separator.output', 'amp;'); I'm sorry, but that's about the most foolish post I've seen on this list, and I've been around a long time. If you're going to ridicule a standards body like the W3C, you should at least have some sort of valid reason, and even then a little tact doesn't hurt. In addition, trying to throw in prejudice and politics just makes things worse. The arg_separator.output directive won't fix his problem. That just makes it so that you can override PHP's default separator of when it builds a URL for whatever reason (trasparent session ID propogation, for example). His question was regarding the fact that he had changed his own code to use amp; instead of . And, of course there is the fact that an HTTP header can't be used to set php.ini directives, so that recommendation does no good. Chris = My Blog http://shiflett.org/ HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Weird problem when creating a db connection and trying to reference it in a function
Hey all- I found another strange problem. I am creating a mysql database connection like this: @ $db = mysql_pconnect(host, user, pass); mysql_select_db(dbname); Now, I have a function that inside uses mysql_list_fields() function getFields($table, $dbname) { $fields = mysql_list_fields($dbname, $table); return $fields; } The problem is this always errors saying it cant find the database. However, if I ran a mysql_query(select * from users) function, it would work fine. Any ideas on what the deal is with this function?? Thanks, Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] cURL Authorize.Net Super slow processing times!!
I have not tried using anything other then CURL, what sort of options are available other then CURL? Could the problem be that I am posting from a non-secure page? (Yes I know, but it is on my test server) Would an SSL page make the transaction any faster? On Wed, 2003-10-15 at 05:24, Burhan Khalid wrote: Matt Babineau wrote: Hey All- Just built a cart, and I want to connect it to Authorize.net with cURL and I am able to do that fine. The problem is, it takes a while to process the transaction. Sometimes the user's browser just sits there for 5, 10 or even 30 seconds before the page finishes processing and they are taken to their confirmation receipt. I was wondering if anyone had any similar experiences with Authorize.net or would know how to speed this process WAY up. Its just too darn slow. Have you tried using something other than cURL? -- Burhan Khalid phplist[at]meidomus[dot]com http://www.meidomus.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] header() refresh vs location
In this example, index.php would be a violation i think. however you don't need to provide an absolute URL, you could provide / or ever /index.php I say this because the header specifying the Host had already been sent. so you could do Location: Host + Relative_URL or Location: Relative_URL since the browser already knows what Host you are connected to. I could be totally wrong, just my experience in the path month or so. Cheers! Matt On Tue, 2003-10-14 at 15:08, Chris Shiflett wrote: --- Chris Hubbard [EMAIL PROTECTED] wrote: header('Location: index.php'); The Location header requires an absolute URL. This example demonstrates a violation of the specification and can have unknown results. Chris = My Blog http://shiflett.org/ HTTP Developer's Handbook http://httphandbook.org/ RAMP Training Courses http://www.nyphp.org/ramp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] cURL Authorize.Net Super slow processing times!!
Hey All- Just built a cart, and I want to connect it to Authorize.net with cURL and I am able to do that fine. The problem is, it takes a while to process the transaction. Sometimes the user's browser just sits there for 5, 10 or even 30 seconds before the page finishes processing and they are taken to their confirmation receipt. I was wondering if anyone had any similar experiences with Authorize.net or would know how to speed this process WAY up. Its just too darn slow. It seems that my web server takes forever to process the transactions which make it look like the page is timing out to the user. I have a fast server, at a great hosting facility. Does anyone have any examples of really fast authorize.net code? Here is how my code works: 1. user enters payment info 2. hit sumbit and goes to payment processing page 3. pages sends transaction to authorize.net 4. user is redirected to receipt page using header(Location) upon success otherwise back to payment page upon failure. I am using an Authorize.net class off zend.com for the processing, you'll find I submitted an updated version to them a few months ago. Does anyone have a better way of doing this? or have any suggestion for the best speed related solution? Thanks!! Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] anyone have any idea as to how to display a messageafter a page has started loading??
Perhaps you wrap a table around your image and set the background= of the table to an image of the same size that says Loading Thumbnails, then when the image loads, it loads over the background. Matt On Fri, 2003-08-22 at 15:08, Jeffrey D. Means wrote: I am looking for a way to say please wait generating thumbnails... while actually doing so. I have tried calling the JavaScript alert() function before starting the image processing but it waits for the page to complete loading before displaying the alert box. anyone have any ideas on this?? BTW: at the time I am trying to display a message I have already started output to the browser. --- Jeffrey D. Means CIO for MeansPC [EMAIL PROTECTED] --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Need help with GD installation on RH9
Hey All- If anyone has some experience getting GD setup on RH9, I could really use some. Please email me off list if you are willing to answer a few questions. Thanks! Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Stripping out and URL hacking characters from a URL
Hi All-- Does anyone have a function or something they have already written to remove any URL hacking characters, mainly the single quote, but I'm looking for a nice function to filter my _GET variables against. Gotta protect the database...ya know :) TIA- Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Stripping out and URL hacking characters from a URL
Hi All-- Does anyone have a function or something they have already written to remove any URL hacking characters, mainly the single quote, but I'm looking for a nice function to filter my _GET variables against. Gotta protect the database...ya know :) TIA- Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] is the list getting virus spammed?
Hmmwondering why I keep receiving email sent to the list, that has this stupid attachment...anyone else getting these? Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Checkboxes
You could try this: input type=hidden name=box1 value=0 input type=checkbox name=box1 value=1 So basically when it get submitted, you'll have either a 0 or 1 response to know whether or not it has been checked. Does this help? Matt On Fri, 2003-08-15 at 14:25, Cesar Aracena wrote: Hi all, I am wondering what would be the best way to handle checkboxes. I am making a site that will display several items in a 20-items-per-page format and each item will have a checkbox next to it for the user to select them. Now, what I need to do is to record the items selected by the user when clicking the Next button into a MySQL table. Should I name all the checkboxes the same, using the item IDs as values and then use an array to see which ones where selected or maybe another thing? Thanks in advanced, Cesar Aracena http://www.icaam.com.ar www.icaam.com.ar Note: The information inside this message and also in the attached files might be confidential. If you are not the desired receptor or the person responsible of delivering the message, we notify you that it's copy, distribution, keep or illegal use of the information it has it's prohibited. Therefore we ask you to notify the sender by replying this message immediately and then delete it from your computer. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] If you ever had a Vic20
mysql_num_rows($news) On Fri, 2003-08-15 at 17:42, John Taylor-Johnston wrote: OK, I tried this, but am getting this error: Warning: Wrong parameter count for mysql_num_rows() in /.../testals.php on line 189 189 if (mysql_num_rows() == 1) What's up? John $myconnection = mysql_connect($server,$user,$pass); mysql_select_db($db,$myconnection); $news = mysql_query(select StudentId from $table where StudentID = $StudentID); if (mysql_num_rows() == 1) include (./html/access_error.htm); else include (./html/registration.htm); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] OT - my apologies
No problems :-) It sounds like Outlook was working like a charm? On Wed, 2003-08-13 at 13:48, [EMAIL PROTECTED] wrote: Aloha all, I just wanted to apologize for some of the Out of Office alerts some of you may have gotten from me yesterday. I had thought I had disabled the function, but it did not work. In any case, I hope that it wasn't too much of a nuisance to you all. Mahalo for your understanding, Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] LAMP
I have RH9, Apache 2.0.47 running in SAPI compiled with apxs2, PHP 4.3.2, and MySQL 4.0.14-standard I compiled all of these as doing it the rpm was too annoying. On Tue, 2003-08-12 at 14:54, Rankin, Randy wrote: I am setting up a new Redhat Linux 9 box for use as a non-production test server. I prefer to use source files v. RPM's. Anyone know which of the newest versions of Apache, MySQL and PHP will play together nicely. Thanks Randy Rankin -- 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
Take a look at cURL: http://www.php.net/manual/en/ref.curl.php On Tue, 2003-08-12 at 20:13, Dan Anderson wrote: 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 look over the http specifications, but is there an easier way? Also, is there any easy way to spoof posting a form? Thanks in advance, Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] How to Authenitcate using PHP (RH9, PHP 4.3.2, MySQL 4)
Hi All- I was wondering if anyone had any suggestions on how to properly authenticate users using redhat php and mysql. Currently we are using .htaccess files, but I was thinking it may be easier to manage this via a php/mysql admin interface... I imagine plenty of authentication schemes have been put in place but which one might be the best? Opinions? Thanks, Matt -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] LAMP I need a good tutorial on how to install and configure GD2
Anyone have a good place to help with this... Google was seeming a bit light on good help. I tried to get it going but there seemed to be some dependant libraries tha tI could not build myself, they were erroring out..blah blah. Is there any easier way to do this? Thanks, Matt -- 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
Yeah, I believe on Apache/Linux, it needs to be compiled in, and on windows there is just some configuration and file moving to do. cURL will do what you need it to, there is even code on the PHP site for making the POST happen. Matt On Tue, 2003-08-12 at 20:27, Dan Anderson wrote: 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
[PHP] Make an MDB File on the Fly
I have a client that currently gets MDB exports of their database to run reports and mail merges with. Has anyone heard of or have any idea of how to make an MDB (Access Data File) on the file from PHP or any other scripting language? Thx- Matt
[PHP] re: ini_set() / Jason Wong / dynamically setting this?
Hi everyone: I just read the reply from Jason Wong pretty much just about my question. Using the ini_set() command at the top of all my pages I think would work out ok, but when I upload my pages to the server, how can I dynamically set the include path to match the root of my web folder on the shared server? I am working on a website, and I have a shared hosting account on a win2k machine. When I upload from my local machine to the shared hosting machine I have to change a variable on each of my pages that gives me the proper path to including the necessary files to execute the page properly. If I don't I get an error. I've included a link to the error message below. As an aside, I picked up this piece of software that lets me grab HTML or other content from web pages and puts it into its own window and gives me a link to it. I am finding it way handy for sharing these errors that I get with other people. They just click the link to view the error, rather then getting a ton of debug code in an email message. I highly recommend trying it out, makes my life a lot easier. http://www.amplifytheweb.com/amplify/?13B53210-FD7A-4DDA-999E-993D243F4 BB4 http://www.amplifytheweb.com/amplify/?13B53210-FD7A-4DDA-999E-993D243F4B B4 So my question is, Is there a way to make a custom PHP.INI sort of thing that works only for my site, that I can include in my pages so I don't have to keep changing the dang path every time I want to do an upload? I'm sure someone must have a solution to this. Thanks, Matt
RE: [PHP] HTML issue... spaces in between images
TABLE TR TDIMG SRC=/images/image.gif/TD TDIMG SRC=/images/image.gif/TD TDIMG SRC=/images/image.gif/TD TDIMG SRC=/images/image.gif/TD /TR /TABLE Matt Babineau MCWD / CCFD - e: [EMAIL PROTECTED] p: 603.943.4237 w: http://www.criticalcode.com PO BOX 601 Manchester, NH 03105 -Original Message- From: Michael Zornek [mailto:[EMAIL PROTECTED]] Sent: Monday, August 12, 2002 9:26 PM To: [EMAIL PROTECTED] Subject: [PHP] HTML issue... spaces in between images Ok so in my HTML I have: img src=img/tab_1l.gif width=9 height=24 img src=img/home_on.gif width=80 height=24 img src=img/tab_10.gif width=15 height=24 but because they are on separate lines with spaces, I get spaces rendered on the screen. If I write the code like: img src=img/tab_1l.gif width=9 height=24img src=img/home_on.gif width=80 height=24img src=img/tab_10.gif width=15 height=24 I get no spaces but it's harder to read anyone know of a way to tell html to ignore these spaces? I could in theory do something like this in PHP: $buffer .= ' img src=img/tab_1l.gif width=9 height=24 img src=img/home_on.gif width=80 height=24 img src=img/tab_10.gif width=15 height=24 '; $buffer = someFunction($buffer); // this function kills all spaces and new lines in between and chars but it seems like kind of a hassle for readability. Please help. ~ Mike -- Mike Zornek | Project Leader Apple Student Developers The Insanely Great Site with the Insanely Long URL http://www.applestudentdevelopers.org Personal Site: http://www.mikezornek.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Hosting
If any PHP hosts are out there I have a question: How do you keep users from erasing / altering files out side of their web folder with PHP? Doesn't PHP run in the system user context? Is is possible to prevent a user from using PHP to alter anything but in their Web folder? Matt Babineau MCWD / CCFD - e: mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] p: 603.943.4237 w: http://www.criticalcode.com/ http://www.criticalcode.com PO BOX 601 Manchester, NH 03105
RE: [PHP] Problem with ?xml .... inside the PHP code, due to ?
?php $XML = \?xml version='1.0' encoding='UTF-8'\?ProductApple/Product; echo $XML; ? Try this? Matt Babineau MCWD / CCFD - e: [EMAIL PROTECTED] p: 603.943.4237 w: http://www.criticalcode.com PO BOX 601 Manchester, NH 03105 -Original Message- From: Scott Fletcher [mailto:[EMAIL PROTECTED]] Sent: Thursday, August 01, 2002 12:03 PM To: [EMAIL PROTECTED] Subject: [PHP] Problem with ?xml inside the PHP code, due to ? Anyone know the workaround with the situation here? Here is the sample script. The problem is I include the XML tag into the PHP variable and it messed up everything. It all had to do with ? here since PHP use it also. --clip-- ?php $XML = ?xml version='1.0' encoding='UTF-8'?ProductApple/Product; echo $XML; ? Thanks, FletchSOD -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Browser Javascript capabilities
You could use a dummy page, with META HTTP-EQUIV=Refresh CONTENT=0;URL=newpage.php?jscript=off SCRIPT location.href='newpage.php?jscript=on'; /SCRIPT What this should do is redirect if javascript is enabled or disabled giving you a URL variable to parse. I have not tested it but theorectically could work. Matt Babineau MCWD / CCFD - e: [EMAIL PROTECTED] p: 603.943.4237 w: http://www.criticalcode.com PO BOX 601 Manchester, NH 03105 -Original Message- From: Dennis Gearon [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 12:12 PM To: [EMAIL PROTECTED] Subject: [PHP] Browser Javascript capabilities Is it possible from the browser requests to tell if it is jscript enabled so that an appropriate page can be sent for en/disabled browsers? -- If You want to buy computer parts, see the reviews at: http://www.cnet.com/ **OR EVEN BETTER COMPILATIONS**!! http://sysopt.earthweb.com/userreviews/products/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Browser Javascript capabilities
Yeah probably, you might need to add a 1 or 2 second delay to the meta refresh... Matt Babineau MCWD / CCFD - e: [EMAIL PROTECTED] p: 603.943.4237 w: http://www.criticalcode.com PO BOX 601 Manchester, NH 03105 -Original Message- From: Chris Boget [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 31, 2002 12:36 PM To: Matt Babineau; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP] Browser Javascript capabilities META HTTP-EQUIV=Refresh CONTENT=0;URL=newpage.php?jscript=off Pardon my ignorance, but wouldn't this immediately send the browser onto the next page before it had the opportunity to get to and run this: SCRIPT location.href='newpage.php?jscript=on'; /SCRIPT ? If that's the case, wouldn't you want to delay the refresh by a few seconds to allow the javascript to force the redirection? Chris -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Patch 4.2.2
Did you restart Apache? I am an Apache Newbie, but I would think you would need to simple restart apache to take the old PHP out of memory so it can load the new one? Matt Babineau MCWD / CCFD - e: [EMAIL PROTECTED] p: 603.943.4237 w: http://www.criticalcode.com PO BOX 601 Manchester, NH 03105 -Original Message- From: Sonket [mailto:[EMAIL PROTECTED]] Sent: Monday, July 29, 2002 10:15 AM To: [EMAIL PROTECTED] Subject: [PHP] Patch 4.2.2 I download Patch for 4.2.1 to become to 4.2.2 I apply it : cd /usr/local patch -p0 path/to/patch it seems the patch is correctly installed, but when the result of phpinfo() tells me that the installed version is 4.2.1 yet ! NEWS file is modified, etc, but i don't know if this patch is working. I don't know too, if afterwards 'patch -p0 path/to/patch' i have run ./configure make make install I never have apply any patch for my php... Sorry for my poor english :P -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Consulting Quote Format (fro mprevious discussion)
I seem to remember a previous thread about quotes and how much other people are charging etc for PHP development. Someone posted a link to a quote they had recently done, I am looking for a standard format that I can use to send out my quotes with. Does anyone have anything like this or remember the thread, I can't seem to find it. Matt Babineau MCWD / CCFD - e: mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] p: 603.943.4237 w: http://www.criticalcode.com/ http://www.criticalcode.com PO BOX 601 Manchester, NH 03105
[PHP] Sessions, how they exist and die
My question is, if I have a user on my web site, and they leave and come back does their session still exist? the file in the /tmp folder exists until it is deleted by the OS? If the user comes back will they get assigned the same session they had before? I know the questions are pretty newbish but I have had experiences in other languages in the past where this is the case. The session cookie stayed in the users browser, so they kept getting the same session and not a new session if they left and came back a day later. Matt Babineau MCWD / CCFD - e: mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] p: 603.943.4237 w: http://www.criticalcode.com/ http://www.criticalcode.com PO BOX 601 Manchester, NH 03105
RE: [PHP] Paying Job...
When first speaking with a client, would you charge an initial constation fee for lets say conference calls? How would you invoice stuff like this? on a monthly basis? Or every two weeks? Matt Babineau MCWD / CCFD - e: [EMAIL PROTECTED] p: 603.943.4237 w: http://www.criticalcode.com PO BOX 601 Manchester, NH 03105 -Original Message- From: Peter J. Schoenster [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 25, 2002 12:36 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Paying Job... On 25 Jul 2002 at 11:46, Gerard Samuel wrote: Basically, someone is looking to get a database driven site built, and Ive never written code for money before. Im looking for advice, as to how the experienced coders in here charge for their work. Do you charge by the page, script or by the hour (that would be nice). Not talking about what to charge but how to charge. Good question. I've travelled quite a bit and in a lot of countries a price is how much do you want to pay. Seriously, when you ask the price the answer is usually that, sometimes excactly that or other times what the seller considers you might pay based on his quick evalution of you. Now, are software companies much different than that? I don't think so. Try to get a price on some software products. Not as easy as it seems. What are you really selling? You are not selling packaged software. You are selling a service. Most, not all, services get priced by time. I worked at an ad agency and I had to account for 7.75 hours per day. I would attach my time to jobs and the account execs would bill the clients periodically (and sometimes they reduced the time I spent). Often there was the thought to bill for value provided rather than time which is tricky if not also walking an ethical borderline, imho. I love the people who bill by the project. They will spend all of 10 minutes to know a project and bid. I guess most of them hope to whine later to get more money. I would bet that this method has the most success. But then you would make more money selling drugs than providing software solutions so success is probably not measured by money or acceptance. Personally, if it's a small thing like fixing something broken in software I understand or just doing something that's pretty generic I will provide an estimate of time, as in from 4 - 8 hours. The client must trust me and be willing to pay the high figure if need be. I will usually not bill more than the high figure if I've underestimated. If it's a project (more than 15 hours) then I prefer to try and get a blueprint going so I can determine what it is I'm going to build before I agree to build it at a price. This worked for me three times, for FedEx and for an Architectural Firm and a monster type job company. Usually this method fails because your client will balk at paying for what is so obvious :) and when other developers will also agree that it's so obvious. So, imho, it is a question of who you are to determine how to charge. Best bet, imho, is to try to understand the project as much as possible and give them a decent range. Be prepared to spend a lot more time on it than you budget. Try to get the job especially since it sounds like it's your first. If they want a fixed price for something which isn't even fixed yet, heck, give it, plenty of others will. Experience helps, understanding the nature of the client helps ... I'd suggest do whatever you have to do to get the job, you want the experience more than the money (possibly). Peter http://www.coremodules.com/ Web Application Software and Support at Affordable Prices -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] GD Library
Not only the solution just posted, but I was using this before and needed to set the dll used to php_gd2.dll, I am pretty sure it got renamed in one of the more recent releases of PHP. Matt Babineau MCWD / CCFD - e: [EMAIL PROTECTED] p: 603.943.4237 w: http://www.criticalcode.com PO BOX 601 Manchester, NH 03105 -Original Message- From: Ryan Moore [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 25, 2002 2:44 PM To: [EMAIL PROTECTED] Subject: [PHP] GD Library I am trying to use GD Library on a windows 2000 installation of PHP. php_gd.dll is in the extensions folder and the line: ;extension=php_gd.dll is in my php.ini file, but I recieve the error: Fatal error: Call to undefined function: imagecreate() when I try to use the imagecreate(100,100) function. Any ideas? Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] PHP Security Advisory: Vulnerability in PHP versions4.2.0 and 4.2.1
Heh ASP. Hehehehehe Matt Babineau MCWD / CCFD - e: [EMAIL PROTECTED] p: 603.943.4237 w: http://www.criticalcode.com PO BOX 601 Manchester, NH 03105 -Original Message- From: 1LT John W. Holmes [mailto:[EMAIL PROTECTED]] Sent: Monday, July 22, 2002 1:52 PM To: Richard Baskett; PHP General Subject: Re: [PHP] PHP Security Advisory: Vulnerability in PHP versions4.2.0 and 4.2.1 Well from the sound of it, it's a quick painless process to upgrade php to the newest version using the patch. Can anyone that has done it comment on the complexities of the upgrade? Im just going on what it says on the php homepage... Nice and easy for me, I'm running it on windows, though. Just delete the old PHP folder, unzip and copy the new one, and restart IIS. (php.ini is elsewhere). This other guy needs to quit his freakin whining and just do his job. Or go use ASP...the choice is yours. ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] What does register_globals do?
I have never had a clear understanding about what this does, the php.ini has an explanation but being newer to PHP I don't understand it very well. Could someone prodive a human explanation about what register_globals does and why it is so important? Matt Babineau MCWD / CCFD - e: mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] p: 603.943.4237 w: http://www.criticalcode.com/ http://www.criticalcode.com PO BOX 601 Manchester, NH 03105
[PHP] $_SESSION - autostart, or session_start() ?
If I set the SESSION autostart = 1 in the PHP config, would that eliminate my need to use session_start() in my code? I have some PHP inline with some HTML, and the PHP is telling me: Warning: Cannot send session cookie - headers already sent Any ideas how to remedy this? Matt Babineau MCWD / CCFD - e: mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] p: 603.943.4237 w: http://www.criticalcode.com/ http://www.criticalcode.com PO BOX 601 Manchester, NH 03105
[PHP] exec() function question on Solaris
I have an interesting question. I am working on a system that I need to run two commands in the shell, but when I use passthru() on the first command then run the second command to get the results from the first command, it doesn't work. Is there any way I can run 2 shell commands in the same execution space so that I can get the results from the first becaus eI think it is running them separately so when I try to pull the results, it has no results to pull. Does this make sense? any suggestions? Thanks, Matt Babineau MCWD / CCFD - e: mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] p: 603.943.4237 w: http://www.criticalcode.com/ http://www.criticalcode.com PO BOX 601 Manchester, NH 03105