php-general Digest 12 Mar 2010 17:52:38 -0000 Issue 6635
php-general Digest 12 Mar 2010 17:52:38 - Issue 6635 Topics (messages 302736 through 302750): Re: PHP MySQL Insert Statements 302736 by: Kevin Kinsey Doing dynamic routing for an office 302737 by: Ian 302738 by: Per Jessen mysqli procedural calls and manual entries ? 302739 by: Per Jessen 302746 by: Daniel Brown 302747 by: Per Jessen how to upload large file ( bigger than 1G) with PHP 302740 by: ¶ÅÔ½ 302741 by: vikash.iitb.gmail.com 302743 by: Rene Veerman 302744 by: Devendra Jadhav 302745 by: Ashley Sheridan headers help 302742 by: MEM 302750 by: Nathan Rixham Re: Object Oriented Programming question 302748 by: Andrew Brookins 302749 by: Ashley Sheridan Administrivia: To subscribe to the digest, e-mail: php-general-digest-subscr...@lists.php.net To unsubscribe from the digest, e-mail: php-general-digest-unsubscr...@lists.php.net To post to the list, e-mail: php-gene...@lists.php.net -- ---BeginMessage--- Martine Osias wrote: Hi, My insert statements on this web page don't execute. The select statements do work. This tells me that the database connection is working. The username and password are the administrator's. What else could prevent the insert statements from executing? Thank you. Martine Should be trivial to find out what's happening. Something like: $success=mysql_query($insert_statement) or die(Uh-oh, mysql said:.mysql.error()); HTH, Kevin Kinsey ---End Message--- ---BeginMessage--- Hi, I have had a weird request as a project and that is to build a system where the clients can put down their office plans into a system and based on where you are in the buliding (either via defined kiosks or mobile dropdown filters) it will print out directions on how to get somewhere within that building. Now, to do it from a fixed location is okay - that could just be a manual input for each building, but for the variable start point I have no idea how to do it. To explain in another way: * You enter one of the clients offices - you walk up to the touch screen kiosk and say you are looking to go to Mr Awesomes office. The system then says, okay - head to the elevators on your right, go to the eighth floor, turn right walk to the end of the passage and the office is on your left. This part is easy - the following isnt. * You are new to the company. You are having a smoke break in a smoking room and remember you have a meeting. You logon to a mobile site from your phone (or from your workstation) and you are presented with some filtering options to pin point where you are (since we cant use GPS here), you then again say you need to go to Mr Awesomes offices and the system works out that you need to exit the smoking room left, second passage way right, first left, into the elevators, up 2 floors, right out the elevators and walk to the end of the passage and office is on your left. Any ideas how I could do this easily? The front end isnt a problem, its the processing behind it actually working out the route. Hope my description is clear enough and sorry if this has been discussed before - I have no idea what to search for :) Thanks Ian ---End Message--- ---BeginMessage--- Ian wrote: Hi, I have had a weird request as a project and that is to build a system where the clients can put down their office plans into a system and based on where you are in the buliding (either via defined kiosks or mobile dropdown filters) it will print out directions on how to get somewhere within that building. Now, to do it from a fixed location is okay - that could just be a manual input for each building, but for the variable start point I have no idea how to do it. I don't know exactly where to go and look, but such mapping systems are very common these days (think GPS navigation systems etc), so the algorithms involved must be equally well known and -documented. /Per -- Per Jessen, Zürich (-1.7°C) ---End Message--- ---BeginMessage--- I run a local mirror of the PHP manual, and I most often go straight to the Search for box to look up the format of a function. With the mysqli functions, I've found than many of them simply aren't available that way. E.g. mysqli_connect() - Sorry, but the function mysqli_connect is not in the online manual.. Would it be a lot of effort to create function manual entries for the procedural style of mysqli_*? /Per -- Per Jessen, Zürich (-1.4°C) ---End Message--- ---BeginMessage--- On Fri, Mar 12, 2010 at 02:49, Per Jessen p...@computer.org wrote: I run a local mirror of the PHP manual, and I most often go straight to the Search for box to look up the format of a function. With the mysqli functions, I've found than many of them simply aren't available that way. E.g. mysqli_connect() - Sorry, but the function mysqli_connect
[PHP] how to upload large file ( bigger than 1G) with PHP
hello, guys, I have tried many ways and was told to use C or Perl. Perl is a stranger to me and I never use C in a project. Is there anybody would tell me how to make php interact with C/Perl and how to maintain sessions during the interacting time ? thanks in advance!
Re: [PHP] how to upload large file ( bigger than 1G) with PHP
Hi, You can always change php.ini settings to allow larger file uploads. *upload_max_filesize = 2M* Increase it to fit your need. You may need to change this as well: *post_max_size = 10M * Let me know if it works for you. :) -- Regards, Vikash Kumar -- http://vika.sh On Fri, Mar 12, 2010 at 1:39 PM, 杜越 o...@gmail.com wrote: hello, guys, I have tried many ways and was told to use C or Perl. Perl is a stranger to me and I never use C in a project. Is there anybody would tell me how to make php interact with C/Perl and how to maintain sessions during the interacting time ? thanks in advance!
[PHP] headers help
Hello all, I must confess I know the very basics on this language and have even less knowledge about http headers. I wish you could help me out on this: I have a form that sends html e-mails and an optional file as attachment. The issue is that, if the file is NOT send, the e-mail receives two times the same content, one that gets read by the mail clients as HTML properly, and, a literal print of my $message string variable that contains: html head /head boby tableMy form contents/table /body /html I believe that the reason for this lies on the $header options, probably on line number 8 ? Here is the, what I believe, is the relevant code: http://pastebin.com/5ywdK0UU What should I do, to avoid this extra html code on the e-mail messages ? Thanks in advance, Márcio
Re: [PHP] how to upload large file ( bigger than 1G) with PHP
try http://jumploader.com/ it's java+php, and free. On Fri, Mar 12, 2010 at 9:09 AM, 杜越 o...@gmail.com wrote: hello, guys, I have tried many ways and was told to use C or Perl. Perl is a stranger to me and I never use C in a project. Is there anybody would tell me how to make php interact with C/Perl and how to maintain sessions during the interacting time ? thanks in advance! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to upload large file ( bigger than 1G) with PHP
Always prefer FTP for large file uploads. On Fri, Mar 12, 2010 at 3:38 PM, Rene Veerman rene7...@gmail.com wrote: try http://jumploader.com/ it's java+php, and free. On Fri, Mar 12, 2010 at 9:09 AM, 杜越 o...@gmail.com wrote: hello, guys, I have tried many ways and was told to use C or Perl. Perl is a stranger to me and I never use C in a project. Is there anybody would tell me how to make php interact with C/Perl and how to maintain sessions during the interacting time ? thanks in advance! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Devendra Jadhav देवेंद्र जाधव
Re: [PHP] how to upload large file ( bigger than 1G) with PHP
On Fri, 2010-03-12 at 18:11 +0530, Devendra Jadhav wrote: Always prefer FTP for large file uploads. On Fri, Mar 12, 2010 at 3:38 PM, Rene Veerman rene7...@gmail.com wrote: try http://jumploader.com/ it's java+php, and free. On Fri, Mar 12, 2010 at 9:09 AM, 杜越 o...@gmail.com wrote: hello, guys, I have tried many ways and was told to use C or Perl. Perl is a stranger to me and I never use C in a project. Is there anybody would tell me how to make php interact with C/Perl and how to maintain sessions during the interacting time ? thanks in advance! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I've noticed that large uploads over http seem to behave a little unpredictably at times, and aren't something I'd rely on. FTP is definitely the way to go, and there are plenty of Java applets that allow you to do this. Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] mysqli procedural calls and manual entries ?
On Fri, Mar 12, 2010 at 02:49, Per Jessen p...@computer.org wrote: I run a local mirror of the PHP manual, and I most often go straight to the Search for box to look up the format of a function. With the mysqli functions, I've found than many of them simply aren't available that way. E.g. mysqli_connect() - Sorry, but the function mysqli_connect is not in the online manual.. Would it be a lot of effort to create function manual entries for the procedural style of mysqli_*? Actually, Per, they do exist it's a problem with the manual error-router itself. I'll take a look at that again today. It's been forgotten for years, for some reason. I'll let you know if/when there's a solution hopefully I can get to it and finish it today. In the meantime, you can find the XML sources for those on your local mirror in {$MIRROR_ROOT}/reference/mysqli/ and it's children. Specifically for mysqli_connect(), see {$MIRROR_ROOT}/reference/mysqli/mysqli/connect.xml . -- /Daniel P. Brown daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ Looking for hosting or dedicated servers? Ask me how we can fit your budget! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] mysqli procedural calls and manual entries ?
Daniel Brown wrote: On Fri, Mar 12, 2010 at 02:49, Per Jessen p...@computer.org wrote: I run a local mirror of the PHP manual, and I most often go straight to the Search for box to look up the format of a function. With the mysqli functions, I've found than many of them simply aren't available that way. E.g. mysqli_connect() - Sorry, but the function mysqli_connect is not in the online manual.. Would it be a lot of effort to create function manual entries for the procedural style of mysqli_*? Actually, Per, they do exist it's a problem with the manual error-router itself. I'll take a look at that again today. Hi Daniel That's what I thougfht too, but I wasn't sure. The pages are clearly there, e.g.: http://php/manual/en/mysqli.connect.php It's been forgotten for years, for some reason. I'll let you know if/when there's a solution hopefully I can get to it and finish it today. Cool, thanks. /Per -- Per Jessen, Zürich (1.8°C) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Object Oriented Programming question
On Tue, Jan 19, 2010 at 7:11 AM, Ben Stones b3n...@googlemail.com wrote: Hi, I've been learning about object oriented programming for the past few weeks and I've understood it pretty well, but I have one question. Usually with PHP scripts I make, all the functionality for a specific page is in the actual PHP file, and I'd use PHP functions in a separate directory which would be included in whichever PHP file needs specific functions I have created. The functions would be for the specific things in my script, such as validation checks, functionality that will be used/repeated a lot throughout my script, etc. What I don't understand about OOP is what its primary purpose is for. Do I use OOP for all the functionality of my application, in separate directories, and include these specific class files and call the methods to complete specific functionality needed for whatever PHP file I'm working on, or is OOP used for specific functionality like I would with functions? Essentially what I'm asking is what is the primary purpose for OOP? Hope you understand. Thanks, Hey, Ben, The primary purpose of object-oriented programming is to make code easier to maintain. Typically moving to an OO approach means designing your scripts with objects in mind from the ground up. You might find it helpful to start fresh with a new project and try to write it all with classes and methods. This can be a challenge, depending on how long you have been programming without objects. I recommend that you find some open-source, object-oriented scripts similar to ones you have worked on in the past and read through the code to see how it's done. An object-oriented framework like CodeIgniter can help get you on the right track, though there are also pitfalls with using frameworks. Watch out for over-complex frameworks that will only confuse you. Also, there are a lot of poorly-written and/or non-OO PHP scripts floating around out there, so it might help to read OO code written in Python, Ruby, or some other scripting language. I have found that in general, the quality of publicly available work is higher in those two languages than in PHP. Andrew -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Object Oriented Programming question
On Fri, 2010-03-12 at 06:49 -0800, Andrew Brookins wrote: On Tue, Jan 19, 2010 at 7:11 AM, Ben Stones b3n...@googlemail.com wrote: Hi, I've been learning about object oriented programming for the past few weeks and I've understood it pretty well, but I have one question. Usually with PHP scripts I make, all the functionality for a specific page is in the actual PHP file, and I'd use PHP functions in a separate directory which would be included in whichever PHP file needs specific functions I have created. The functions would be for the specific things in my script, such as validation checks, functionality that will be used/repeated a lot throughout my script, etc. What I don't understand about OOP is what its primary purpose is for. Do I use OOP for all the functionality of my application, in separate directories, and include these specific class files and call the methods to complete specific functionality needed for whatever PHP file I'm working on, or is OOP used for specific functionality like I would with functions? Essentially what I'm asking is what is the primary purpose for OOP? Hope you understand. Thanks, Hey, Ben, The primary purpose of object-oriented programming is to make code easier to maintain. Typically moving to an OO approach means designing your scripts with objects in mind from the ground up. You might find it helpful to start fresh with a new project and try to write it all with classes and methods. This can be a challenge, depending on how long you have been programming without objects. I recommend that you find some open-source, object-oriented scripts similar to ones you have worked on in the past and read through the code to see how it's done. An object-oriented framework like CodeIgniter can help get you on the right track, though there are also pitfalls with using frameworks. Watch out for over-complex frameworks that will only confuse you. Also, there are a lot of poorly-written and/or non-OO PHP scripts floating around out there, so it might help to read OO code written in Python, Ruby, or some other scripting language. I have found that in general, the quality of publicly available work is higher in those two languages than in PHP. Andrew I'd just like to add my own thoughts on OOP. Whereas with conventional procedural PHP you might put your functions outside in a separate file to be called whenever you need them, going the OOP route allows you to section out your functions into groups as it were. Imagine a company site selling products and support online. You might have an object to deal with the logins, shopping cart and shopping history, another object for dealing with the blog/forum where you support is given, maybe another for pulling the general content of the page together. This would allow you to only load in those bits you need on each part of the site and re-use specific parts on other sites easily. Thanks, Ash http://www.ashleysheridan.co.uk
[PHP] Re: headers help
MEM wrote: Hello all, I must confess I know the very basics on this language and have even less knowledge about http headers. I wish you could help me out on this: mime headers not http :) I have a form that sends html e-mails and an optional file as attachment. The issue is that, if the file is NOT send, the e-mail receives two times the same content, one that gets read by the mail clients as HTML properly, and, a literal print of my $message string variable that contains: html head /head boby tableMy form contents/table /body /html I believe that the reason for this lies on the $header options, probably on line number 8 ? Here is the, what I believe, is the relevant code: http://pastebin.com/5ywdK0UU I've had a quick look and this: http://pastebin.com/RswEBPLd may work; if not though you want to view the source of an email from anywhere which displays correctly; and the source of one from your application - then compare to get the fix :) Regards! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP backup in Minnesota
Thanks to all! I got who I needed. Best regards - -- - Ken -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to upload large file ( bigger than 1G) with PHP
On Fri, Mar 12, 2010 at 4:41 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: I've noticed that large uploads over http seem to behave a little unpredictably at times, and aren't something I'd rely on. FTP is definitely the way to go, and there are plenty of Java applets that allow you to do this. FTP is not a realistic option, for a multitude of reasons. a) mapping an HTTP request and user - FTP account / pick this file up b) firewall issues c) additional services having to be enabled and routed to on the server side While I do agree FTP is FILE transfer protocol, it still isn't the right solution IMHO. Ideally, HTML5 will provide a more industry standard method (IIRC, a coworker already pointed out something in the spec for it, but I forget) A very workable solution we've came up with has been using Google Gears + PHP. Re-using the browser and HTTP conversations provides us multiple benefits: a) Cookie support - to identify the user b) supports HTTP and HTTPS c) Firewalls are not an issue - reuses the same proxy settings The difference between standard file upload using a single POST vs. our method is key - it's chunking the file. Google Gears has this support, Java can too; send up portions of the file at a time, and either glue it together on the fly on the server, or take all the chunks and merge them all at once at the end. By doing it in a chunked format, it allows us to also re-transmit failed chunks and treat files of any size in bite size chunks - with a little bit of Javascript, PHP and Gears, we can support files of any size (within filesystem and OS limits) and it does not require -any- tweaking of the webserver. It is chunks of data sent to the server using standard POSTs and small enough to fit under even small PHP and webserver memory limits (and could always be configurable) - no more suhosin.memory_limit, memory_limit, post_max_size, upload_max_filesize to fuss with. It's a shame that Google had to decide to stop developing and maintaining Gears. It was a lightweight, perfect solution. We're working on a Java-based version instead now. Lightest footprint we can possibly get in Java, but it's the only applet language that has all the support we need for chunking, cross-browser, cross-platform, etc. I believe our plan is to release it out to the public so people can enhance it, use it, do whatever... For now though, Gears works pretty awesome for us, a handful of our users have complained though Gears won't install for them (not sure why) and there is no support for Snow Leopard, I believe. So we're starting to hit the point where it isn't our magical solution anymore. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to upload large file ( bigger than 1G) with PHP
On Fri, 2010-03-12 at 11:37 -0800, Michael Shadle wrote: On Fri, Mar 12, 2010 at 4:41 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: I've noticed that large uploads over http seem to behave a little unpredictably at times, and aren't something I'd rely on. FTP is definitely the way to go, and there are plenty of Java applets that allow you to do this. FTP is not a realistic option, for a multitude of reasons. a) mapping an HTTP request and user - FTP account / pick this file up b) firewall issues c) additional services having to be enabled and routed to on the server side While I do agree FTP is FILE transfer protocol, it still isn't the right solution IMHO. Ideally, HTML5 will provide a more industry standard method (IIRC, a coworker already pointed out something in the spec for it, but I forget) A very workable solution we've came up with has been using Google Gears + PHP. Re-using the browser and HTTP conversations provides us multiple benefits: a) Cookie support - to identify the user b) supports HTTP and HTTPS c) Firewalls are not an issue - reuses the same proxy settings The difference between standard file upload using a single POST vs. our method is key - it's chunking the file. Google Gears has this support, Java can too; send up portions of the file at a time, and either glue it together on the fly on the server, or take all the chunks and merge them all at once at the end. By doing it in a chunked format, it allows us to also re-transmit failed chunks and treat files of any size in bite size chunks - with a little bit of Javascript, PHP and Gears, we can support files of any size (within filesystem and OS limits) and it does not require -any- tweaking of the webserver. It is chunks of data sent to the server using standard POSTs and small enough to fit under even small PHP and webserver memory limits (and could always be configurable) - no more suhosin.memory_limit, memory_limit, post_max_size, upload_max_filesize to fuss with. It's a shame that Google had to decide to stop developing and maintaining Gears. It was a lightweight, perfect solution. We're working on a Java-based version instead now. Lightest footprint we can possibly get in Java, but it's the only applet language that has all the support we need for chunking, cross-browser, cross-platform, etc. I believe our plan is to release it out to the public so people can enhance it, use it, do whatever... For now though, Gears works pretty awesome for us, a handful of our users have complained though Gears won't install for them (not sure why) and there is no support for Snow Leopard, I believe. So we're starting to hit the point where it isn't our magical solution anymore. It's not much trouble to map the FTP to a file and have the right permissions, and FTP is a doddle to set up on a server. I'd say a darn sight less work than rolling your own mechanism in Java. Lastly, I don't think firewalls are that big an issue, as most firewalls I've seen will allow outgoing FTP connections from a users computer by default. Thanks, Ash http://www.ashleysheridan.co.uk
[PHP] CodeBubbles -- the coolest IDE innovation since since syntax highlighting and intellisense
Wow. Maybe the coolest IDE innovation I've seen since syntax highlighting and intellisense. http://www.cs.brown.edu/people/acb/codebubbles_site.htm http://www.cs.brown.edu/people/acb/codebubbles_site.htm http://www.cs.brown.edu/people/acb/codebubbles_beta_signup.htm Code Bubbles is built on top of Eclipse so it can open/work with any existing Eclipse project. ...are you listening Zend? Someone needs to port this over for a PHP IDE (It's JAVA only AFAIK)
Re: [PHP] how to upload large file ( bigger than 1G) with PHP
On Fri, Mar 12, 2010 at 11:51 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: It's not much trouble to map the FTP to a file and have the right permissions, and FTP is a doddle to set up on a server. I'd say a darn sight less work than rolling your own mechanism in Java. Well, mechanisms already exist. We're just trying to create a cleaner one that works with the browser's DOM so it looks native in the browser, has the chunk support, etc. FTP servers can be easy to setup but mapping who uploaded what and keeping that secure is a pain. Do you use one generic account, or one random account per user? If one generic account, how do you keep others from downloading someone else's content? etc? Lots of questions come to mind. But lunch is more important... :) Lastly, I don't think firewalls are that big an issue, as most firewalls I've seen will allow outgoing FTP connections from a users computer by default. Must not deal with that many corporate firewalls :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CodeBubbles -- the coolest IDE innovation since since syntax highlighting and intellisense
looks very cool indeed. On Fri, Mar 12, 2010 at 9:43 PM, Daevid Vincent dae...@daevid.com wrote: Wow. Maybe the coolest IDE innovation I've seen since syntax highlighting and intellisense. http://www.cs.brown.edu/people/acb/codebubbles_site.htm http://www.cs.brown.edu/people/acb/codebubbles_site.htm http://www.cs.brown.edu/people/acb/codebubbles_beta_signup.htm Code Bubbles is built on top of Eclipse so it can open/work with any existing Eclipse project. ...are you listening Zend? Someone needs to port this over for a PHP IDE (It's JAVA only AFAIK) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: headers help
I've had a quick look and this: http://pastebin.com/RswEBPLd may work; if not though you want to view the source of an email from anywhere which displays correctly; and the source of one from your application - then compare to get the fix :) Regards! Thanks Nathan, I will give it a try. Mime headers is what I should look for, ok. :) I found weird having more than 1 content-type defined, and more than one decoding method defined as well. I will do my part and try the code you give, try to understand the changes, do some testing, and now, search MIME Headers. Maybe the issue could also lie on conditional placement/logic parts, here the block code in the complete context: http://pastebin.com/NjC1C3U9 Best Regards, Márcio -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Object Oriented Programming question
I also agree OOP is not a fad. Its a step up from procedural/including. And it's still evolving. While PHP is able to do polymorphism perfectly without OOP/classes, through require($plugin/className); $varFunctionName ($p1, $p2, etc);, My newsscraper works very well that way. But if you want inheritance features it's best to cross into OOP land. A MVC app (front scripts that forward functionality to many other scripts) does not have to include dozens of scripts to get things done. You can require_once() the functionality that you need within switch($command) statements. Bytecachers and compilers furher reduce this problem (to insignificance as far as i'm concerned). But in my 20+ yrs exp, OOP-ing everything in an app from the start costs too much (wasted) design time in the first half of any large project. So i've reverted back to sticking to procedural programming for nearly everything, except well walled-off problems that scream OOP me. For my own CMS i first had designed classes to handle the businesslogic near the database level (a dossier class containing refs to media-item classes for instance), but as my CMS was evolving i was spending too much time re-and-re-designing those dossier and media classes. The conflict between a well written class and a class that does what i need atm kept popping up. I found that using functions and arrays as return/command objects is much nimbler. I get things done quicker not OOP-ing. But i bet some other programmers prefer OOP over procedural for the same reason. I do use OOP-ed objects for several of my subsystems (adodb.sf.net is my current favorite), and if i have a small app to share (especially in javascript) then i put it in an object, for namespace cleanness. OP: if you want to use OOP to it's max, read http://www.amazon.com/Design-Patterns-Elements-Reusable-Object-Oriented/dp/0201633612/ref=sr_1_1?ie=UTF8s=booksqid=1268432214sr=8-1 On Tue, Jan 19, 2010 at 7:12 PM, Robert Cummings rob...@interjinn.com wrote: I would have to agree that OOP is not a fad, perhaps over-hyped at times, but definitely not a fad. The argument about class dependencies is an invalid argument since functions will also have dependencies on other functions from other libraries, quite likely located in multiple source files. In fact, you've argued an advantage for OOP in the context of PHP since autoload can be used to mitigate this issue for classes, but not for functions. Another advantage of OOP that is difficult to provide via the procedural paradigm is polymorphism. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CodeBubbles -- the coolest IDE innovation since since syntax highlighting and intellisense
Its very good if you have a big monitor. I have one. Its quite good for me. Problem is its for Java. Not PHP :( I thought its for PHP as this is PHP list. -- Shiplu Mokaddim My talks, http://talk.cmyweb.net Follow me, http://twitter.com/shiplu SUST Programmers, http://groups.google.com/group/p2psust Innovation distinguishes bet ... ... (ask Steve Jobs the rest) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] CodeBubbles -- the coolest IDE innovation since since syntax highlighting and intellisense
I'd settle for Intellisense/code completion working consistently and reliably in Eclipse PDT in the first place. I don't remember the last time it did. --Larry Garfield On 3/12/10 2:43 PM, Daevid Vincent wrote: Wow. Maybe the coolest IDE innovation I've seen since syntax highlighting and intellisense. http://www.cs.brown.edu/people/acb/codebubbles_site.htm http://www.cs.brown.edu/people/acb/codebubbles_site.htm http://www.cs.brown.edu/people/acb/codebubbles_beta_signup.htm Code Bubbles is built on top of Eclipse so it can open/work with any existing Eclipse project. ...are you listening Zend? Someone needs to port this over for a PHP IDE (It's JAVA only AFAIK) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP Sessions
Hi: I need to store variables to send then between pages. I don't need the variables in a database so I try to send them with sessions. The variables don't seem to be there when I try to get them. What could be the problem. Here are the pages where I store and retrieve the variables. Page 1 (variables stored): ?php session_start(); $_SESSION['scripture_text'] = $row_scripture['ScriptureText']; $_SESSION['scripture_ref'] = $row_scripture['ScriptureRef']; ? Page 2 (variables retrieved): ?php session_start(); include(includes/config.php); ? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head /head body table width=100% align=center border=0 tr td align=left?=laquo;.$_SESSION['scripture_text'].raquo;?/td /tr tr td style=font-size: smaller; align=right?=$_SESSION['scripture_ref']?/td /tr /table /body /html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Sessions
On Fri, 2010-03-12 at 19:29 -0500, Martine Osias wrote: Hi: I need to store variables to send then between pages. I don't need the variables in a database so I try to send them with sessions. The variables don't seem to be there when I try to get them. What could be the problem. Here are the pages where I store and retrieve the variables. Page 1 (variables stored): ?php session_start(); $_SESSION['scripture_text'] = $row_scripture['ScriptureText']; $_SESSION['scripture_ref'] = $row_scripture['ScriptureRef']; ? Page 2 (variables retrieved): ?php session_start(); include(includes/config.php); ? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head /head body table width=100% align=center border=0 tr td align=left?=laquo;.$_SESSION['scripture_text'].raquo;?/td /tr tr td style=font-size: smaller; align=right?=$_SESSION['scripture_ref']?/td /tr /table /body /html Are there any errors, either displayed or in the error log? Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] PHP Sessions
Martine Osias wrote: Hi: I need to store variables to send then between pages. I don't need the variables in a database so I try to send them with sessions. The variables don't seem to be there when I try to get them. What could be the problem. Here are the pages where I store and retrieve the variables. Page 1 (variables stored): ?php session_start(); $_SESSION['scripture_text'] = $row_scripture['ScriptureText']; $_SESSION['scripture_ref'] = $row_scripture['ScriptureRef']; Do sessions work at all? Something simple, like ?php //a.php session_start(); $_SESSION['test']=foo; echo 'a href=b.phpClick me/a'; ? ?php //b.php session_start(); echo $_SESSION['test']; // should say foo ? * ... would be a good 1st test. If that works, I'd suspect that $row_scripture['ScriptureText'] and friends are empty. If it doesn't, I'd suspect a combination of very strict browser privacy settings (disallow all cookies) with lame server config (use_only_cookies), or that session support is missing or disabled. HTH, KDK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Sessions
Forgot to mention, you could check into the privacy vs. server settings by doing: session_start(); echo session_id(); on both pages. If they're different, then this is the problem. KDK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP Sessions
Hello Martine, Try to make on the second page a print_r ($_SESSION); -- With best regards from Ukraine, Andre Skype: Francophile; WlmMSN: arthaelon @ yandex.ru; Jabber: arthaelon @ jabber.org Yahoo! messenger: andre.polykanine; ICQ: 191749952 Twitter: m_elensule - Original message - From: Martine Osias webi...@gmail.com To: php-general@lists.php.net php-general@lists.php.net Date: Saturday, March 13, 2010, 2:29:41 AM Subject: [PHP] PHP Sessions Hi: I need to store variables to send then between pages. I don't need the variables in a database so I try to send them with sessions. The variables don't seem to be there when I try to get them. What could be the problem. Here are the pages where I store and retrieve the variables. Page 1 (variables stored): ?php session_start(); $_SESSION['scripture_text'] = $row_scripture['ScriptureText']; $_SESSION['scripture_ref'] = $row_scripture['ScriptureRef']; ? Page 2 (variables retrieved): ?php session_start(); include(includes/config.php); ? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head /head body table width=100% align=center border=0 tr td align=left?=laquo;.$_SESSION['scripture_text'].raquo;?/td /tr tr td style=font-size: smaller; align=right?=$_SESSION['scripture_ref']?/td /tr /table /body /html -- 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] Re: PHP Sessions
The sessions variables are OK. They don't print when I put them on the HTML page with this code. tr td align=left?=laquo;.$_SESSION['scripture_text'].raquo;?/td /tr tr td style=font-size: smaller; align=right?=$_SESSION['scripture_ref']?/td /tr Thank you. Martine Martine Osias webi...@gmail.com wrote in message news:95.0c.13686.c7cda...@pb1.pair.com... Hi: I need to store variables to send then between pages. I don't need the variables in a database so I try to send them with sessions. The variables don't seem to be there when I try to get them. What could be the problem. Here are the pages where I store and retrieve the variables. Page 1 (variables stored): ?php session_start(); $_SESSION['scripture_text'] = $row_scripture['ScriptureText']; $_SESSION['scripture_ref'] = $row_scripture['ScriptureRef']; ? Page 2 (variables retrieved): ?php session_start(); include(includes/config.php); ? !DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd; html xmlns=http://www.w3.org/1999/xhtml; head /head body table width=100% align=center border=0 tr td align=left?=laquo;.$_SESSION['scripture_text'].raquo;?/td /tr tr td style=font-size: smaller; align=right?=$_SESSION['scripture_ref']?/td /tr /table /body /html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] database credentials with ini_set() question?
I know that phpinfo() will show the pass and username as plain text, but other than that what are the security reasons for not using ini_set() for database credentials? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP in HTML code
An HTML/PHP code migrated to a different hosting platform seems to behave differently. The PHP statements within HTML fields or within tables does not execute PHP within table: tr td align=left?=laquo;.$_SESSION['scripture_text'].raquo;?/td /tr This PHP code doesn't print in the HTML page. PHP within form field: input type=text name=reservation_date value=?=$_GET['rdate'];? readonly= This PHP code shows on the page when it shouldn't. The same variable is an input and an output in this form: form name=frm method=post action=ins_reservation.php onsubmit=return (submitonce(this) doValidate(this)); table border=0 width=100% align=center tr td valign=top width=23% strongYour Pledge For:/strong/strong/td td width=75% p ?php if($_POST['reservation_date'] != ) { ? input type=text name=reservation_date value=?=$_POST['reservation_date'];? readonly= ?php }else { ? input type=text name=reservation_date value=?=$_GET['rdate'];? readonly= ?php } ? nbsp;img src=images/cal.gif onclick=cal17.select(document.forms[0].reservation_date,'anchor17','MM/dd/'); return false; name=anchor17 id=anchor17 !--td width=1%-- ?php require(calendar/make_update_calendar.php); ? /p ?php if ($totalRows_findme == 0 $_GET['email'] != ) { // Show if recordset empty ? span class=style1Not found. Please enter info/span ?php } // Show if recordset empty ?/td /tr /table table border=0 width=100% align=center ?php if ($totalRows_findme == 0) { // Show if recordset empty ? tr td class=st1Email:span style=color: #CC;*/span/td td class=st1input name=email type=text class=v_email id=email value=?=$_GET['email'];? / span style=padding-left: 3px; input type=button name=button id=button value=Get my Information onclick=getacctt() / /span/td /tr tr td width=34% class=st1 First Name:span style=color: #CC;*/span /td td width=66% class=st1input name=first_name type=text class=v_required value=?=$_GET['fname'];? //td /tr tr td class=st1Last Name:span style=color: #CC;*/span/td *** Are there times when the ? statements in HTML code don't execute? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: PHP in HTML code
Martine Osias wrote: An HTML/PHP code migrated to a different hosting platform seems to behave differently. The PHP statements within HTML fields or within tables does not execute PHP within table: tr td align=left?=laquo;.$_SESSION['scripture_text'].raquo;?/td /tr This PHP code doesn't print in the HTML page. PHP within form field: input type=text name=reservation_date value=?=$_GET['rdate'];? readonly= This PHP code shows on the page when it shouldn't. The same variable is an input and an output in this form: snip code Are there times when the ? statements in HTML code don't execute? Yes - when short_open_tag is disabled in the config. See http://www.php.net/manual/en/ini.core.php#ini.short-open-tag for more info. I'd suggest you move away from using short tags, if for no other reason than portability. Cheers -- David Robley A conclusion is simply the place where you got tired of thinking. Today is Boomtime, the 72nd day of Chaos in the YOLD 3176. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php