[PHP] preg_replace
I bought PHP & MySQL for DUMMIES and it shows me how to use special characters for pattern matching and I've figured out the basics of using preg_replace to replace pattern matches. What I am having trouble with, though, is figuring out how to replace anything that does not match the pattern. For example, I want to replace anything that is NOT an alphanumeric character. Any help would be appreciated. Thanks. Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] https setup
PJ wrote: > Can't find anything on G or web - but I probably didn't try hard > enough. Correct :-) > I am unable to set my virtual hosts to handle https. > I have apache22, mod_ssl, opnenssl and the httpd and httpd-vhosts.conf > files are set up "correctly" but directing a sensitive user > information page to an HTTPS page returns an error of "not found". The > virtual hosts works fine, except for HTTPS. > This is on my intranet for local developing. Is your webserver listening for https requests? Port 443, check it with "netstat -ltn". Or check your "listen.conf" file. /Per -- Per Jessen, Zürich (20.2°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] preg_replace
Oh yeah - not sure if spaces are considered alphanumeric or not, but I need to keep spaces - replacing anything that is NOT a letter, a number or a space. Thanks again. -Original Message- From: Ben Miller [mailto:biprel...@gmail.com] Sent: Friday, June 05, 2009 2:09 AM To: php-general@lists.php.net Subject: [PHP] preg_replace I bought PHP & MySQL for DUMMIES and it shows me how to use special characters for pattern matching and I've figured out the basics of using preg_replace to replace pattern matches. What I am having trouble with, though, is figuring out how to replace anything that does not match the pattern. For example, I want to replace anything that is NOT an alphanumeric character. Any help would be appreciated. Thanks. Ben -- 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] preg_replace
Hey Ben, to replace everything thats not alphanumeric, use the following statement: $output = preg_replace('/[^[:alnum:]]/', '', $input); Greetings from Germany Marc PS: Spaces are not alphanumeric ;) Ben Miller wrote: Oh yeah - not sure if spaces are considered alphanumeric or not, but I need to keep spaces - replacing anything that is NOT a letter, a number or a space. Thanks again. -Original Message- From: Ben Miller [mailto:biprel...@gmail.com] Sent: Friday, June 05, 2009 2:09 AM To: php-general@lists.php.net Subject: [PHP] preg_replace I bought PHP & MySQL for DUMMIES and it shows me how to use special characters for pattern matching and I've figured out the basics of using preg_replace to replace pattern matches. What I am having trouble with, though, is figuring out how to replace anything that does not match the pattern. For example, I want to replace anything that is NOT an alphanumeric character. Any help would be appreciated. Thanks. Ben -- Synchronize and share your files over the web for free http://bithub.net/ My Twitter feed http://twitter.com/MarcSteinert -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Listening on host:port - Windows
Thanks, you are right. I used php.exe -v to confirm cgi version. My query is what parameter do I use to specify host and port? That will have the same effect as -b in php5. Sorry if I didn't make it clear. John _ From: ?? [mailto:delm...@gmail.com] Sent: Friday, June 05, 2009 8:24 AM To: j.fair...@bcs.org.uk Subject: Re: [PHP] Listening on host:port - Windows in php4,php.exe is the cgi version for default,and php-cli is the cli version in php5,php.exe is the cli version,and php-cgi is the cgi version i think you can use php.exe instead of php-cgi.exe in php4 2009/6/5 John Fairley I'm running my test server on Windows XP SP3 and have been successfully running PHP 5 for some time using: php-cgi.exe -b 127.0.0.1:1 My live server is running on PHP 4.4 and that gives an incompatibility risk in problem solving. So I've removed PHP 5 on my test server and have installed PHP 4.4.9 but I can't find how I set host and port in php. Running php -v has confirmed that this is the cgi-fcgi version. I'm sure it's simple but I'm being driven nuts. TIA, John
[PHP] databse query
Hello to all, please i'm new PHP and trying to display some records from my db using dreamweaver. I have 2 tables ( Subjects and Pages) where Subjects is the parent and Pages is the child. I want to get all pages belonging to each subject but my query gives me all pages under the first result of the query. How can I get only pages of each subject under it's own ID ( parent + it's child)? I'll include my code for better reference. http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";> http://www.w3.org/1999/xhtml";> menu_list {$row_menu_list['subget_name']}" ; while ($row_pages = mysql_fetch_assoc($pages)){ echo "{$row_pages['page_name']}";} } ?> The query gives this result: * informatica * Dove Siamo * Lorem * web templates in vendita * assistenza * shop * contatti
Re: [PHP] https setup
PJ wrote: Can't find anything on G or web - but I probably didn't try hard enough. I am unable to set my virtual hosts to handle https. I have apache22, mod_ssl, opnenssl and the httpd and httpd-vhosts.conf files are set up "correctly" but directing a sensitive user information page to an HTTPS page returns an error of "not found". The virtual hosts works fine, except for HTTPS. This is on my intranet for local developing. TIA By "not found" do you mean a 404 error from the https domain? If so, then you probably just have the DocumentRoot directive set up incorrectly for your secure domain. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] formatting - design question
PJ wrote: > tedd wrote: >> At 3:58 PM -0400 6/4/09, PJ wrote: >>> tedd wrote: >>> >>> > Style sheets are meant simplify things so decide on how you want things to look uniformly throughout your site and then stick with it. There's really no good reason to keep changing things throughout a site. Cheers, tedd >>> Maybe I'm just too complicated. ;-) >>> I do try to keep it simple. But then, little things creep in, like a >>> login box on the index page which mucks up all the other pages. Then >>> there is a recipe page which is totally different, yet to keep is >>> stylistically continuous it uses a similar layout to the other pages but >>> different. The same for the main recipe page, and the same for the >>> portraits of producers - all the pages are different yet remain within a >>> cohesive style. CSS gets super bloated and almost unamageable. Most >>> sites are very repetitive; mine tend to be "provocative" or semthing >>> like that. I really don't see an ooption. Although, Nitsan's body tags >>> sound promising. I'll have to try that; maybe the solution is to do a >>> series of definitions unique just fo certain pages. :-) >> That's simply an example of not thinking things out before you write >> the code. >> >> First you figure out a layout, then you populate it. You don't pick a >> layout, populate it and then change the layout. That leads to a >> lackluster and "lack of thought" site. >> >> Cheers, >> >> tedd >> >> > If only it were that simple. > When one is developing, one is always changing. And even when you're > finally "live and on the air", you will still be changing or else your > site will die before your client gets a chance to see all you can offer. > It's a matter of evolution and adaptation, Darwin. ;-) > Agree with PJ here: More likely, you go live and the boss says "Can you make that look more like ...?" "Er, yes, but it totally stuffs the whole design..." Evolution was *not* carefully thought out - that would be Intelligent Design -- Peter Ford phone: 01580 89 Developer fax: 01580 893399 Justcroft International Ltd., Staplehurst, Kent -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Graphing Libraries...?
> ... I would have to suggest RGraph... ( http://www.rgraph.net ) :-) It's uses canvas though, so browser support is limited at the moment though to Firefox 3.5, Safari 4 and Chrome 2. -- Richard Heyes HTML5 graphing: RGraph (www.rgraph.net - updated 23rd May) PHP mail: RMail (www.phpguru.org/rmail) PHP datagrid: RGrid (www.phpguru.org/rgrid) PHP Template: RTemplate (www.phpguru.org/rtemplate) PHP SMTP: http://www.phpguru.org/smtp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP, OOP and AJAX
Update. Hello Everyone, First of all, thank you all for your input. I ran a sinmple test using the suggestions you gave me and and require_once. Using firebug to test the output, I got an internal server error. I found out what the problem was. What I am doing is I have classes which represent the objects, another class containing the functions. From the function class I create an instance of each object, manipulate the information, return the HTML result. Finally I have a runner class that creates an instance of the function class, calls the function required and outputs the information. What the problem was for some reason I was did not create an instance of the function class, just was calling the function. Well by creating the runner class I solved the problem. Thanks all for your help. Regards Julian
Re: [PHP] PHP Graphing Libraries...?
On Jun 5, 2009, at 5:26 AM, Richard Heyes wrote: ... I would have to suggest RGraph... ( http://www.rgraph.net ) :-) It's uses canvas though, so browser support is limited at the moment though to Firefox 3.5, Safari 4 and Chrome 2. I've looked at the docs and I don't see how exactly it handles "x,y" plotting. I need the ability to plot multiple lines (which it obviously does) with wildly varying "x,y" values. It seems that all of these libraries "cheat" and force common "x" values via the labels. I need something like the following (all in the same chart): $line_one_data = [x,y,x,y,x,y,x,y,x,y,x,y,x,y,x,y,x,y,x,y,x,y,x,y] $line_two_data = [x,y,x,y,x,y,x,y] $line_three_data = [x,y,x,y,x,y,x,y,x,y,x,y,x,y] $graph->plot($line_one_data,$line_two_data,$line_three_data) As I said, each "line" has its own set of "x,y", and although they're all obviously numbers, they don't all have "y" results at the same "x intervals" so I need to be able to control them independently. Surely there's something that can accommodate this...? Best, Michael
Re: [PHP] PHP Graphing Libraries...?
I've had a lot of success with flot, but that's a jQuery plugin, so it may not be exactly what you need. If you're just making graphs for client side viewing, it ought to be sufficient, though. On Fri, Jun 5, 2009 at 8:33 AM, li...@mgreg.com wrote: > > On Jun 5, 2009, at 5:26 AM, Richard Heyes wrote: > > ... >>> >> >> I would have to suggest RGraph... ( http://www.rgraph.net ) :-) It's >> uses canvas though, so browser support is limited at the moment though >> to Firefox 3.5, Safari 4 and Chrome 2. >> > > > I've looked at the docs and I don't see how exactly it handles "x,y" > plotting. I need the ability to plot multiple lines (which it obviously > does) with wildly varying "x,y" values. It seems that all of these > libraries "cheat" and force common "x" values via the labels. I need > something like the following (all in the same chart): > >$line_one_data = [x,y,x,y,x,y,x,y,x,y,x,y,x,y,x,y,x,y,x,y,x,y,x,y] >$line_two_data = [x,y,x,y,x,y,x,y] >$line_three_data = [x,y,x,y,x,y,x,y,x,y,x,y,x,y] > >$graph->plot($line_one_data,$line_two_data,$line_three_data) > > As I said, each "line" has its own set of "x,y", and although they're all > obviously numbers, they don't all have "y" results at the same "x intervals" > so I need to be able to control them independently. Surely there's > something that can accommodate this...? > > > Best, > Michael
Re: [PHP] Web application design considerations - a good reference ?
Hi, If you want to develop a professional business - enterprise application I suggest you research books related to Database Design and Development, and Business Systems Analysis. UML or Unified Modeling Language will help you with database design and system design. ERD - Entity Relationship Diagrams are the bassis of understading weather you have a good dtabse design. The RDBMS - Relational Database Management System. Other models will help you understand the flow of your programme before you start and development. Inorder to have a good system you have to have a good design. A GOOD DESIGN IS THE BASIS OF EVERYHTHING. Through this you will learn other things such as SDLC - Software Develpment Life Cycle. There are many diffrent models you may use to develop an profesional application. In the end its up to you to choose. Regards Julian On Tue, Jun 2, 2009 at 6:50 AM, Angus Mann wrote: > Hi all. > > I'm working on a PHP project for my own personal business use. It will > handle billing and invoices as well as payments and time management, > bookings, appointments and a few more. I may add things like personal > messaging between the various users and a customer login to check on the > progress of their accounts. > > It is a big project and will probably take a year or so to complete in my > spare time. > > I have made a couple of starts but I have no experience in creating such > large applications and I find I often end up with spaghetti code. I've tried > using session variables to keep track of where and what the program is doing > but there are so many permuations and combinations I found myself writing > endless streams of if's, and's and or's just to figure out what page to > display. > > The code is not the probblem for me...it's the flow and organization of the > code. > > Can anybody point me to a good book or tutorial that lays down the > principles and gives some suggestions for integrating the many subroutines > of a large application? I want to make the code readable and logical in its > flow, and avoid repetition of code segments. > > Much appreciated. > Angus > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] PHP Graphing Libraries...?
On Thu, Jun 04, 2009 at 09:17:07PM -0700, Michael A. Peters wrote: > Paul M Foster wrote: >> On Thu, Jun 04, 2009 at 01:50:28PM -0700, Michael A. Peters wrote: >> >>> li...@mgreg.com wrote: Hi All, I'm currently looking for a quality (preferably open source) PHP graphing library that will allow me to create various graphs and plot points. I've seen several that do some amazing things, but cost a fortune -- others are either limited, lack documentation, or don't allow plotting of points for multiple entities within the same graph. Can anyone make any quality suggestions? Best, Michael >>> gnuplot may be what you want - but it doesn't have php bindings as far >>> as I know, so you'll have to call it via a system call. >> >> I use Gnuplot every week to graph the statistics of my business. It's >> extremely flexible, and will output not only to graphics formats, but to >> PDF format, if I'm not mistaken. > > I know for a fact it outputs to postscript, as I've used that with TeX > before, so it probably does pdf as well (and if not - pdf is just a > ps2pdf away). Now that I think of it, that's probably how I do it (ps2pdf). Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP Graphing Libraries...?
li...@mgreg.com wrote: Hi All, I'm currently looking for a quality (preferably open source) PHP graphing library that will allow me to create various graphs and plot points. I've seen several that do some amazing things, but cost a fortune -- others are either limited, lack documentation, or don't allow plotting of points for multiple entities within the same graph. Can anyone make any quality suggestions? Best, Michael Imagemagick may do it for you. Here is just one example. http://www.imagemagick.org/Usage/draw/#bezier Use the PHP API http://docs.php.net/manual/en/book.imagick.php Here are some simple graph examples: http://valokuva.org/?cat=2&paged=2 The learning curve is a bit steep; but, once you get the hang of it, things work great. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Google Calendar Integration
HI All, Has anyone used Google Calendar (of course via PHP) to allow clients to schedule appointments from the business's webpage? If so, would you please tell me how you made it so it would only show the client times which were available and of course not listing private client details? Thanks, -- Leonard Burton, N9URK http://www.jiffyslides.com serv...@jiffyslides.com leonardbur...@gmail.com "The prolonged evacuation would have dramatically affected the survivability of the occupants." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] formatting - design question
At 4:54 PM -0400 6/4/09, PJ wrote: tedd wrote: > That's simply an example of not thinking things out before you write the code. First you figure out a layout, then you populate it. You don't pick a > layout, populate it and then change the layout. > > If only it were that simple. When one is developing, one is always changing. And even when you're finally "live and on the air", you will still be changing or else your site will die before your client gets a chance to see all you can offer. It's a matter of evolution and adaptation, Darwin. ;-) I understand clients changing their minds in mid-stream and wanting things to be different. That's Okay, because they pay for it -- PROVIDED -- that a meeting of the minds was made with the last layout. So, before any change is made to the current layout, an agreement must be made as to what that change is going to be. Anything else (i.e., let's see if I like it) is going to be very time consuming on your part. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Graphing Libraries...?
li...@mgreg.com wrote: On Jun 5, 2009, at 5:26 AM, Richard Heyes wrote: ... I would have to suggest RGraph... ( http://www.rgraph.net ) :-) It's uses canvas though, so browser support is limited at the moment though to Firefox 3.5, Safari 4 and Chrome 2. I've looked at the docs and I don't see how exactly it handles "x,y" plotting. I need the ability to plot multiple lines (which it obviously does) with wildly varying "x,y" values. It seems that all of these libraries "cheat" and force common "x" values via the labels. I need something like the following (all in the same chart): $line_one_data = [x,y,x,y,x,y,x,y,x,y,x,y,x,y,x,y,x,y,x,y,x,y,x,y] $line_two_data = [x,y,x,y,x,y,x,y] $line_three_data = [x,y,x,y,x,y,x,y,x,y,x,y,x,y] $graph->plot($line_one_data,$line_two_data,$line_three_data) As I said, each "line" has its own set of "x,y", and although they're all obviously numbers, they don't all have "y" results at the same "x intervals" so I need to be able to control them independently. Surely there's something that can accommodate this...? Sure - the gd library. Scale the x/y position according to your needs. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Graphing Libraries...?
On Jun 5, 2009, at 9:41 AM, Michael A. Peters wrote: Sure - the gd library. Scale the x/y position according to your needs. Well, I was trying to avoid building from scratch, but you may be right. I'm surprised no one else has need for an intuitive setup of this nature. Thanks, Michael
Re: [PHP] formatting - design question
At 10:23 AM +0100 6/5/09, Peter Ford wrote: PJ wrote: > tedd wrote: >> First you figure out a layout, then you populate it. You don't pick a >> layout, populate it and then change the layout. >> If only it were that simple. When one is developing, one is always changing. And even when you're finally "live and on the air", you will still be changing or else your site will die before your client gets a chance to see all you can offer. It's a matter of evolution and adaptation, Darwin. ;-) Agree with PJ here: More likely, you go live and the boss says "Can you make that look more like ...?" "Er, yes, but it totally stuffs the whole design..." If your Boss wants you to "test out" designs for his approval, that's one thing. I see no problem with a "Let's see what this might look like?" initial design decisions -- after all, he's paying for your time. However, IMO his buck would be better spent if he hired a designer to design something around the needs of the project. I understand that sometimes "Bosses" aren't the brightest lot when it comes to things outside of their job description. But it is also your charge to explain the change asked for "totally stuffs the whole design..." If your Boss doesn't care about cost overruns in development, then start studying for his position because his boss does. I am addressing what to do with clients who change their minds on agreed layouts. My practice is the client decides on a layout that fits their needs before any development is done. If the client wants to change their mind in the middle of the development stage, that's fine -- but they will also pay for that change. In my book, the "best" way to design a site is to: 1) decide what functionality is needed; 2) and then design a layout that presents the functionality in an attractive and accessible manner. Creating a site is a lot like programming. The time spent identifying the problem will: a) shorten the overall time required to create a solution; b) and will also provide a more stable solution. Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] formatting - design question
On 04 June 2009 19:09, PJ advised: > Nitsan Bin-Nun wrote: >>> From my experience I tend to use a difference ID for the > body tag, for >> instance and then format it in my CSS using ID >> reference: #homepage .classname { >> color: blue; >> } >> >> This way you can use a default format for all the pages and create minor >> (or major) changes in the theme in no time :) >> >> I would also suggest to attach the CSS filename reference at the >> tag the update time of the file, so that the browser will automatically >> update the cache of the CSS whenever you decide to edit it. >> >> Just my 2 cents ;) >> > Oh, I think it's worth a lot more than that. > I just installed IE 8 just to have it for verification. It's no better > than IE 6. I never use them personally. > But how do you produce interesting web pages to look well on both > without making stupid compromises. What looks well on Firefox, looks like > MSshit on IE. This may be a silly question, but reading this just makes me wonder -- you do have an appropriate http://disclaimer.leedsmet.ac.uk/email.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Perplexing problem.
I have a form script that is not cooperating. When I fill out this form, I get the checkbox "yes", but not the checkbox "info" Also, in the message on the result page that displays, I get "Yes, send me referral Caards! at the bottom. ( I have spelled card as Ccard and Caard to see where they are coming from). So if(isset) for the info is not working, but the if(isset) for the yes is. I have switched positions but no change. The link to try this is http://www.paulgdesigns.com/elk/referform.inc.php Can anyone see what I am missing here? Thanks. Gary "; echo "You have submitted the following information."; echo "Name: $fname $lname"; echo "Title: $title"; echo "Company: $company"; echo "Address: $street $town $zip"; echo "Zip: $zip"; echo "Phone Number: $phone"; echo "Fax Number: $fax"; echo "E-Mail Address: $email"; if (isset($_POST['info'])) { echo "Yes, send me information on your referral program!"; } if (isset($_POST['yes'])) { echo "Yes, send me referral Cards!"; } echo "$fname, we have also sent you an e-mail to $email with the submitted information as well as our contact information for your convienience. Thank you for the opportunity to serve you!"; // checks if bot if ($_POST['address'] != '' ){ die("Changed field"); } /*This is the email message to submitter*/ $contact="sanitized"; $from_d="$email"; $to_d="$email"; $subject_d='Thank you from ; $msg_d="Thank you $fname for your submission, find our contact information listed for your convenience.\n\n" ."$contact\n\n" . "You have submitted the following information\n\n" . "Name: $fname $lname \n" . "Street Address: $street\n" . "Town: $town\n" . "Zip Code: $zip\n" . "Phone Number: $phone\n" . "E-Mail Address: $email\n" . "Yes, Send me referral Cards\n" . "Yes, Send me infomation on your referral program\n" ; mail($to_d, $subject_d, $msg_d, 'From:' . $from_d); /*this is to elk, y*/ $from="$email"; $to="xxx..com"; $subject="Submission from Referral Form"; $msg= "This is a submission from elkenv.com. Please send referral cards.\n\n" . "Clients Name: $fname . $lname \n" . "Title: $title\n" . "Company Name: $company\n" . "Street Address: $street\n" . "Town:$town\n" . "Zip: $zip\n" . "Telephone: $phone\n" . "Email Address: $email\n" ; if (isset($_POST['info'])) { echo "Yes, send me information on your referral program!"; } if (isset($_POST['yes'])) { echo "Yes, send me referral Caards!"; } mail($to, $subject, $msg, 'From:' .$from); ?> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Perplexing problem.
On Fri, Jun 5, 2009 at 11:28, Gary wrote: > I have a form script that is not cooperating. When I fill out this form, I > get the checkbox "yes", but not the checkbox "info" Also, in the message on > the result page that displays, I get "Yes, send me referral Caards! at > the bottom. ( I have spelled card as Ccard and Caard to see where > they are coming from). [snip!] I got both confirmations on the page, Gary, but in the second echo block do you mean to append it to $msg instead? Having it echo out will display it, not add it to the email. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Perplexing problem.
Unbeleieable I am now getting it correct on Chrome, but not FF...I have been wracking my brain and it was firefox I dont get it... "Daniel Brown" wrote in message news:ab5568160906050838k682271eeg1e0a5f90b916c...@mail.gmail.com... On Fri, Jun 5, 2009 at 11:28, Gary wrote: > I have a form script that is not cooperating. When I fill out this form, I > get the checkbox "yes", but not the checkbox "info" Also, in the message > on > the result page that displays, I get "Yes, send me referral Caards! at > the bottom. ( I have spelled card as Ccard and Caard to see where > they are coming from). [snip!] I got both confirmations on the page, Gary, but in the second echo block do you mean to append it to $msg instead? Having it echo out will display it, not add it to the email. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Perplexing problem.
As usual, thank you for your help. How do I get it to display in the emails only if the boxes are checked? Thanks again. Gary "Daniel Brown" wrote in message news:ab5568160906050838k682271eeg1e0a5f90b916c...@mail.gmail.com... On Fri, Jun 5, 2009 at 11:28, Gary wrote: > I have a form script that is not cooperating. When I fill out this form, I > get the checkbox "yes", but not the checkbox "info" Also, in the message > on > the result page that displays, I get "Yes, send me referral Caards! at > the bottom. ( I have spelled card as Ccard and Caard to see where > they are coming from). [snip!] I got both confirmations on the page, Gary, but in the second echo block do you mean to append it to $msg instead? Having it echo out will display it, not add it to the email. -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Perplexing problem.
On Fri, Jun 5, 2009 at 11:50, Gary wrote: > As usual, thank you for your help. How do I get it to display in the emails > only if the boxes are checked? -- daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ 50% Off All Shared Hosting Plans at PilotPig: Use Coupon DOW1 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Google Calendar Integration
2009/6/5 Leonard Burton > HI All, > > Has anyone used Google Calendar (of course via PHP) to allow clients > to schedule appointments from the business's webpage? If so, would > you please tell me how you made it so it would only show the client > times which were available and of course not listing private client > details? > > Thanks, > > -- > Leonard Burton, N9URK > http://www.jiffyslides.com > serv...@jiffyslides.com > leonardbur...@gmail.com > > "The prolonged evacuation would have dramatically affected the > survivability of the occupants." > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > Haven't done this yet, but this this link should help: http://framework.zend.com/download/gdata Apparently you don't have to use the whole Zend framework for it. HTH
Re: [PHP] PHP Graphing Libraries...?
At 4:33 PM -0400 6/4/09, li...@mgreg.com wrote: Hi All, I'm currently looking for a quality (preferably open source) PHP graphing library that will allow me to create various graphs and plot points. I've seen several that do some amazing things, but cost a fortune -- others are either limited, lack documentation, or don't allow plotting of points for multiple entities within the same graph. Can anyone make any quality suggestions? Best, Michael Michael: All sorts of stuff out there -- check out GDGraph Here's an example: http://webbytedd.com/ccc/charts/ Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Graphing Libraries...?
Hi, > I've looked at the docs and I don't see how exactly it handles "x,y" > plotting. I need the ability to plot multiple lines (which it obviously > does) with wildly varying "x,y" values. It seems that all of these > libraries "cheat" and force common "x" values via the labels. I need > something like the following (all in the same chart): > $line_one_data = [x,y,x,y,x,y,x,y,x,y,x,y,x,y,x,y,x,y,x,y,x,y,x,y] > $line_two_data = [x,y,x,y,x,y,x,y] > $line_three_data = [x,y,x,y,x,y,x,y,x,y,x,y,x,y] > $graph->plot($line_one_data,$line_two_data,$line_three_data) > As I said, each "line" has its own set of "x,y", and although they're all > obviously numbers, they don't all have "y" results at the same "x intervals" > so I need to be able to control them independently. Surely there's > something that can accommodate this...? Well the line doesn't do this, the X values are linear. However the Scatter works like this. ie You set an maximum X value and the X values are put in the corresponding places. -- Richard Heyes HTML5 graphing: RGraph (www.rgraph.net - updated 23rd May) PHP mail: RMail (www.phpguru.org/rmail) PHP datagrid: RGrid (www.phpguru.org/rgrid) PHP Template: RTemplate (www.phpguru.org/rtemplate) PHP SMTP: http://www.phpguru.org/smtp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] https setup
Michael A. Peters wrote: > PJ wrote: >> Can't find anything on G or web - but I probably didn't try hard enough. >> I am unable to set my virtual hosts to handle https. >> I have apache22, mod_ssl, opnenssl and the httpd and httpd-vhosts.conf >> files are set up "correctly" but directing a sensitive user information >> page to an HTTPS page returns an error of "not found". The virtual hosts >> works fine, except for HTTPS. >> This is on my intranet for local developing. >> TIA >> > > By "not found" do you mean a 404 error from the https domain? > If so, then you probably just have the DocumentRoot directive set up > incorrectly for your secure domain. > The problem was and remains in httpd-ssl.conf. It is not at all clear how the ssl.conf and the vhosts.conf files are related. The same site is entered in https-ssl.conf and in httpd-vhosts.conf but uner different ports *:80 and :*:443. What is rather annoying is that in the ssl-conf file there is a dummy setup but it does not indicate that this is what you have to change - rather than the vhosts file. Nothing like having the blind leading the blind. ;-) I solved my immediate problem by modifying the httpd-ssl.conf file; up to then I understood that the the configuration for vhosts depended on the port where vhosts was pointing. Now, what is not clear is whether I need to add more entries in the httpd-ssl.conf file for the other sites; I would assume yes. Thanks for responding. PJ -- Hervé Kempf: "Pour sauver la planète, sortez du capitalisme." - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] https setup
Per Jessen wrote: > PJ wrote: > > >> Can't find anything on G or web - but I probably didn't try hard >> enough. >> > > Correct :-) > > >> I am unable to set my virtual hosts to handle https. >> I have apache22, mod_ssl, opnenssl and the httpd and httpd-vhosts.conf >> files are set up "correctly" but directing a sensitive user >> information page to an HTTPS page returns an error of "not found". The >> virtual hosts works fine, except for HTTPS. >> This is on my intranet for local developing. >> > > Is your webserver listening for https requests? Port 443, check it > with "netstat -ltn". Or check your "listen.conf" file. > > /Per > > Thanks for responding. The problem was muddy instructions for the setup. I finally figure it out. -- Hervé Kempf: "Pour sauver la planète, sortez du capitalisme." - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] formatting - design question
Peter Ford wrote: > PJ wrote: > >> tedd wrote: >> >>> At 3:58 PM -0400 6/4/09, PJ wrote: >>> tedd wrote: > Style sheets are meant simplify things so decide on how you want > things to look uniformly throughout your site and then stick with it. > There's really no good reason to keep changing things throughout a > site. > > Cheers, > > tedd > > > Maybe I'm just too complicated. ;-) I do try to keep it simple. But then, little things creep in, like a login box on the index page which mucks up all the other pages. Then there is a recipe page which is totally different, yet to keep is stylistically continuous it uses a similar layout to the other pages but different. The same for the main recipe page, and the same for the portraits of producers - all the pages are different yet remain within a cohesive style. CSS gets super bloated and almost unamageable. Most sites are very repetitive; mine tend to be "provocative" or semthing like that. I really don't see an ooption. Although, Nitsan's body tags sound promising. I'll have to try that; maybe the solution is to do a series of definitions unique just fo certain pages. :-) >>> That's simply an example of not thinking things out before you write >>> the code. >>> >>> First you figure out a layout, then you populate it. You don't pick a >>> layout, populate it and then change the layout. That leads to a >>> lackluster and "lack of thought" site. >>> >>> Cheers, >>> >>> tedd >>> >>> >>> >> If only it were that simple. >> When one is developing, one is always changing. And even when you're >> finally "live and on the air", you will still be changing or else your >> site will die before your client gets a chance to see all you can offer. >> It's a matter of evolution and adaptation, Darwin. ;-) >> >> > > Agree with PJ here: > More likely, you go live and the boss says "Can you make that look more like > ...?" > "Er, yes, but it totally stuffs the whole design..." > > Evolution was *not* carefully thought out - that would be Intelligent Design > > Chuckle, chuckle. ;-) -- Hervé Kempf: "Pour sauver la planète, sortez du capitalisme." - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] https setup
Shanon Swafford wrote: >> -Original Message- >> From: PJ [mailto:af.gour...@videotron.ca] >> Sent: Thursday, June 04, 2009 3:59 PM >> To: php-general@lists.php.net >> Subject: [PHP] https setup >> >> Can't find anything on G or web - but I probably didn't try hard enough. >> I am unable to set my virtual hosts to handle https. >> I have apache22, mod_ssl, opnenssl and the httpd and httpd-vhosts.conf >> files are set up "correctly" but directing a sensitive user information >> page to an HTTPS page returns an error of "not found". The virtual hosts >> works fine, except for HTTPS. >> This is on my intranet for local developing. >> TIA >> > > > - > > >From what I've found, it doesn't work like http. You can NOT do virtual > hosts via https with apache listening on the same IP AND PORT. Something > about the encrypted session is set up before the domain is analyzed by > apache. > > You have to have a unique IP or PORT for each domain you want to serve with > https. > > For example, if you want: > https://example1.com > and > https://example2.com > > all on the same http server, you have to either: > > assign a separate IP for each domain and let apache do the vhost by IP > or > define a separate PORT for each domain and make apache do the vhost by PORT. > > If I'm wrong, somebody please let me know because I'd love to do vhosts like > this as well. > > Regards, > Shanon > > > I solved my problem. Problem was unclear directions for setup; httpd-ssl.conf and httpd-vhosts.conf were not properly explalin for configuration. The secure setup is done in the ssl file with the 443 port and the same host is repeated in the vhost file. I haven't mentioned this, but my setup is with name-based vhosts, not address or whatever... So far as I can see, this should work fine for numerous hosts both on whatever ports you choose plus the default 443 for ssl. Don't forget, you have to have a certificate, real or dummy for this to work. :-) -- Hervé Kempf: "Pour sauver la planète, sortez du capitalisme." - Phil Jourdan --- p...@ptahhotep.com http://www.ptahhotep.com http://www.chiccantine.com/andypantry.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Graphing Libraries...?
Hi Friends, I don't remember the exact OP's question, but for graphing I use the Google Chart API ; see: http://code.google.com/apis/chart/#radar For an overview of chart types, see: http://code.google.com/apis/chart/types.html HTH, Cor - Original Message - From: "tedd" To: ; Sent: Friday, June 05, 2009 7:31 PM Subject: Re: [PHP] PHP Graphing Libraries...? At 4:33 PM -0400 6/4/09, li...@mgreg.com wrote: Hi All, I'm currently looking for a quality (preferably open source) PHP graphing library that will allow me to create various graphs and plot points. I've seen several that do some amazing things, but cost a fortune -- others are either limited, lack documentation, or don't allow plotting of points for multiple entities within the same graph. Can anyone make any quality suggestions? Best, Michael Michael: All sorts of stuff out there -- check out GDGraph Here's an example: http://webbytedd.com/ccc/charts/ Cheers, tedd -- --- http://sperling.com http://ancientstones.com http://earthstones.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] Outputting File To The Browser Failed And Kill Apache
Hi List, I'm using the following code to output a file to the browser. Each file size is in the range of 5-10MB, all of them are MP3. header("Pragma: public"); > header("Expires: 0"); > header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); > header("Cache-Control: public"); > header("Content-Description: File Transfer"); > header("Content-Type: {$info['mimetype']}"); > header("Content-Disposition: attachment; > filename=\"{$info['filename']}\""); > header("Content-Transfer-Encoding: binary"); > header("Content-Length: " . $info['size']); > > set_time_limit(0); > > $file = > @fopen($config['storage'][$config['current_storage']].$info['md5'].".".$info['extension'],"rb"); > if ($file) { > while(!feof($file)) { > print(fread($file, 1024*8)); > flush(); > if (connection_status()!=0) { > @fclose($file); > die(); > } > } > @fclose($file); > } I'm running this script on a VPS which has a 10MBIT connection. When I posted a link to this download stream php file about 50 users started download it, then the script stopped from sending the whole file (for instance, the file is 5MB, the script sends 2MB, 1MB and it continue this way). In the apache log file I have seen these lines, but I have no idea what are their meaning: [Fri Jun 05 22:02:28 2009] [error] (12)Cannot allocate memory: fork: Unable > to fork new process > [Fri Jun 05 22:02:38 2009] [error] (12)Cannot allocate memory: fork: Unable > to fork new process > [Fri Jun 05 22:02:48 2009] [error] (12)Cannot allocate memory: fork: Unable > to fork new process > [Fri Jun 05 22:11:35 2009] [error] (12)Cannot allocate memory: fork: Unable > to fork new process > I have no idea what's going on. Any ideas to solve this issue will be very appreciated. My 12K users are suffering right now, I would really really appreciate any idea in the right direction :) :) :) Thank you!
Re: [PHP] Outputting File To The Browser Failed And Kill Apache
My partner ran this command through SSH. This is the returned value: (as root) [r...@s1 ~]# ulimit -a > core file size (blocks, -c) 0 > data seg size (kbytes, -d) unlimited > file size (blocks, -f) unlimited > pending signals (-i) 397311 > max locked memory (kbytes, -l) 32 > max memory size (kbytes, -m) unlimited > open files (-n) 1024 > pipe size(512 bytes, -p) 8 > POSIX message queues (bytes, -q) 819200 > stack size (kbytes, -s) 10240 > cpu time (seconds, -t) unlimited > max user processes (-u) 397311 > virtual memory (kbytes, -v) unlimited > file locks (-x) unlimited > This is the output as the user files which runs my PHP files: [fi...@s1 root]$ ulimit -a > core file size (blocks, -c) 0 > data seg size (kbytes, -d) unlimited > file size (blocks, -f) unlimited > pending signals (-i) 397311 > max locked memory (kbytes, -l) 32 > max memory size (kbytes, -m) unlimited > open files (-n) 1024 > pipe size(512 bytes, -p) 8 > POSIX message queues (bytes, -q) 819200 > stack size (kbytes, -s) 10240 > cpu time (seconds, -t) unlimited > max user processes (-u) 397311 > virtual memory (kbytes, -v) unlimited > file locks (-x) unlimited > I have no idea which of these settings can have an effect on my script, if you have any idea that would be highly appreciated :) Thanks! On Fri, Jun 5, 2009 at 10:10 PM, Marc Steinert wrote: > Maybe your apache user is exceeding system limitations? > > For further detail have a look at > > http://www.ss64.com/bash/ulimit.html > > Greetings from Germany > > Marc > > > > Nitsan Bin-Nun wrote: > >> Hi List, >> >> I'm using the following code to output a file to the browser. Each file >> size >> is in the range of 5-10MB, all of them are MP3. >> >> header("Pragma: public"); >> >>> header("Expires: 0"); >>> header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); >>> header("Cache-Control: public"); >>> header("Content-Description: File Transfer"); >>> header("Content-Type: {$info['mimetype']}"); >>> header("Content-Disposition: attachment; >>> filename=\"{$info['filename']}\""); >>> header("Content-Transfer-Encoding: binary"); >>> header("Content-Length: " . $info['size']); >>> >>> set_time_limit(0); >>> >>> $file = >>> >>> @fopen($config['storage'][$config['current_storage']].$info['md5'].".".$info['extension'],"rb"); >>> if ($file) { >>>while(!feof($file)) { >>>print(fread($file, 1024*8)); >>>flush(); >>>if (connection_status()!=0) { >>>@fclose($file); >>>die(); >>>} >>>} >>>@fclose($file); >>> } >>> >> >> >> >> I'm running this script on a VPS which has a 10MBIT connection. When I >> posted a link to this download stream php file about 50 users started >> download it, then the script stopped from sending the whole file (for >> instance, the file is 5MB, the script sends 2MB, 1MB and it continue this >> way). >> >> In the apache log file I have seen these lines, but I have no idea what >> are >> their meaning: >> >> [Fri Jun 05 22:02:28 2009] [error] (12)Cannot allocate memory: fork: >> Unable >> >>> to fork new process >>> [Fri Jun 05 22:02:38 2009] [error] (12)Cannot allocate memory: fork: >>> Unable >>> to fork new process >>> [Fri Jun 05 22:02:48 2009] [error] (12)Cannot allocate memory: fork: >>> Unable >>> to fork new process >>> [Fri Jun 05 22:11:35 2009] [error] (12)Cannot allocate memory: fork: >>> Unable >>> to fork new process >>> >>> >> >> I have no idea what's going on. Any ideas to solve this issue will be very >> appreciated. My 12K users are suffering right now, I would really really >> appreciate any idea in the right direction :) :) :) >> >> Thank you! >> >> > > -- > Synchronize and share your files over the web for free > http://bithub.net/ > > My Twitter feed > http://twitter.com/MarcSteinert > > > > >
Re: [PHP] Outputting File To The Browser Failed And Kill Apache
if the problem is due to flow control issues between the script and the httpd server then perhaps changing the approach could help. i quit using this approach of writing files to the php output buffer a little while ago. it seemed that it was better to leave the flow control issues entirely to apache. so i wrote the file to a specific directory on the server and redirected the client to it, using the apache directive on that directory: Header set Content-Disposition attachment you can use that directive to send whatever headers you need. On 6/5/09 3:52 PM, "Nitsan Bin-Nun" wrote: > Hi List, > > I'm using the following code to output a file to the browser. Each file size > is in the range of 5-10MB, all of them are MP3. > > header("Pragma: public"); >> header("Expires: 0"); >> header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); >> header("Cache-Control: public"); >> header("Content-Description: File Transfer"); >> header("Content-Type: {$info['mimetype']}"); >> header("Content-Disposition: attachment; >> filename=\"{$info['filename']}\""); >> header("Content-Transfer-Encoding: binary"); >> header("Content-Length: " . $info['size']); >> >> set_time_limit(0); >> >> $file = >> @fopen($config['storage'][$config['current_storage']].$info['md5'].".".$info[ >> 'extension'],"rb"); >> if ($file) { >> while(!feof($file)) { >> print(fread($file, 1024*8)); >> flush(); >> if (connection_status()!=0) { >> @fclose($file); >> die(); >> } >> } >> @fclose($file); >> } > > > > I'm running this script on a VPS which has a 10MBIT connection. When I > posted a link to this download stream php file about 50 users started > download it, then the script stopped from sending the whole file (for > instance, the file is 5MB, the script sends 2MB, 1MB and it continue this > way). > > In the apache log file I have seen these lines, but I have no idea what are > their meaning: > > [Fri Jun 05 22:02:28 2009] [error] (12)Cannot allocate memory: fork: Unable >> to fork new process >> [Fri Jun 05 22:02:38 2009] [error] (12)Cannot allocate memory: fork: Unable >> to fork new process >> [Fri Jun 05 22:02:48 2009] [error] (12)Cannot allocate memory: fork: Unable >> to fork new process >> [Fri Jun 05 22:11:35 2009] [error] (12)Cannot allocate memory: fork: Unable >> to fork new process >> > > > I have no idea what's going on. Any ideas to solve this issue will be very > appreciated. My 12K users are suffering right now, I would really really > appreciate any idea in the right direction :) :) :) > > Thank you! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php