Re: [PHP] Apache's PHP handlers
On Thursday, September 19, 2013, Stuart Dallas wrote: On 19 Sep 2013, at 14:39, Aziz Saleh azizsa...@gmail.com javascript:; wrote: The best way to handle file uploads is to: 1) Store the filename somewhere in the DB, rename the file to a random string without extension and store the mapping in the DB as well. 2) When sending the file, set the header content to the filename and output the content of the file via PHP (ex: by readfile). Aziz This way even if the file is PHP code, it will be of no issue to you. What you describe it highly inefficient, clunky, and unnecessary. You've managed to get PHP and a database involved in serving a static file, for no reason other than to avoid fixing the web server configuration. A misconfigured web server should be fixed, not worked around. -Stuart -- Stuart Dallas 3ft9 Ltd http://3ft9.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php You can also run a strip_tags() call on the file upload to help prevent this Bastien -- Bastien Cat, the other other white meat
Re: [PHP] PHP Dependency Injector
Jee, that should have been a friday comment...how does your dic standout On Thu, Sep 5, 2013 at 4:06 PM, Sorin Badea sorin.bade...@gmail.com wrote: There are few tutorials about home made dic. How does your dic stand out from the crowd ? Regards. On Thu, Sep 5, 2013 at 10:56 PM, Juan Sebastian Scatularo sebastianscatul...@gmail.com wrote: Hello people, I want to share with you a simple and small Dependency Injector made for me. https://github.com/abloos/Sofia Regards -- Facebook: www.facebook.com/JuanSebastianScatularo Twitter: www.twitter.com/js_scatularo Web: www.sebastianscatularo.com.ar -- Sorin Badea - Software Engineer -- Bastien Cat, the other other white meat
Re: [PHP] PHP vs JAVA
I think the big takeaway there is that JAVA is one of the primary language for larger companies and applications. Start ups tend to use smaller easier to use tools like php / javascript / python / ruby. I saw one figure recently that put php at 75% of websites out there (i think that came out when google decided to support php for the app engine) On Tue, Aug 20, 2013 at 10:19 AM, Tedd Sperling t...@sperling.com wrote: On Aug 20, 2013, at 10:04 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: Is he possibly getting confused with Javascript? Thanks, Ash No, this guy is smarter than that -- he's pretty sharp -- so I listen to what he has to say. Here's an interesting link: http://www.sitepoint.com/best-programming-language-of-2013/ But the link does not divide languages between Web and Other -- other than Android Java, which I do not believe is also included in the above Java number. I think there is more going on here than what I know. For example, my college has numerous (over 3) JAVA classes filled to the max, whereas my PHP class was canceled due to lack of students. Granted the college could have advertised my PHP class more, but still there is an overwhelming demand for Java Programmers. My questions is Why? Cheers, tedd ___ tedd sperling t...@sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Bastien Cat, the other other white meat
Re: [PHP] Split/Group date together.
Normally, what I do here is handle that in the loop to display the records ... so start by adding an order by clause to keep the dates together SELECT * FROM transportdokument WHERE dato = '16/7/2013' AND dato = '18/7/2013' order by dato $prior_date = ; $sHTML = table; while($rows = mysql_fetch_array($result)){ if ($prior_date != $rows['dato']){ if($open_table){ $sHTML .= /tabletable; $prior_date = $rows['dato']; } } $sHTML .= tr; $sHTML .= td. $rows['dato'] . /td; $sHTML .= td. $rows['some_field'] . /td; $sHTML .= td. $rows['another_field'] . /td; $sHTML .= td. $rows['third_field'] . /td; $sHTML .= /tr; } $sHTML .= /table; On Thu, Jul 18, 2013 at 9:43 AM, Karl-Arne Gjersøyen karlar...@gmail.comwrote: Hello again. In my program I have this: mysql SELECT * FROM transportdokument WHERE dato = '16/7/2013' AND dato = '18/7/2013'; This list all reccrds for 3 days. I need a way to split it up for every day even when the requst is as above and don't know in what way I can do it. I like to have all records for day 16 in one table in PHP/HTML and all records for day 17 in another table. i.e, Day 16 have 5 rows and day 17th and 18th have 7 and 8 rows. I hope for your help and advice to do also this correct. Thank you for your time and effort! Karl -- Bastien Cat, the other other white meat
Re: [PHP] Newbie Question - Parse XML with PHP...
I have an app that gets passed in xml and use this code to read that data in // We use php://input to get the raw $_POST results. $xml_post = file_get_contents('php://input'); Maybe it will help Bastien On Sat, Apr 20, 2013 at 7:48 AM, shiplu shiplu@gmail.com wrote: Question: how do you use $mylist when the xml is not as a file but is returned on a web page? I assume It returns as a string from page. Then use simplexml_load_string(). See http://php.net/manual/en/function.simplexml-load-string.php -- Shiplu.Mokadd.im ImgSign.com | A dynamic signature machine Innovation distinguishes between follower and leader -- Bastien Cat, the other other white meat
Re: [PHP] Re: Generating CRUD code for normalized db
On Wed, Mar 13, 2013 at 2:55 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Wed, 2013-03-13 at 19:24 +0100, Marco Behnke wrote: Am 13.03.13 12:57, schrieb Gary: ma...@behnke.biz wrote: Do us all a favor abnd stay away from open source if you do not honor the work us wannabes put into it. As I said before I wasn't aware you would feel that the cap fitted. If you do feel that, then perhaps instead of complaining at me for pointing it out, you would be better off employing that time increasing the quality of what you produce. So you said you tried Yii. But have you wasted some of your precious time trying out the extension that extends Yii in a way, that creating models and views with Gii get proper SELECT Boxes and stuff for relations? If I understood you correct, this is what you were looking for? At this point I don't think he's looking for an actual solution, but merely wants to moan about open source. OSS has flaws, of course, but even someone so narrow minded would have a hard time arguing in earnest that it suffered from too little choice and a lack of solutions to a problem. Thanks, Ash http://www.ashleysheridan.co.uk Two minutes with google got me this: http://www.codegravity.com/programming/orm-object-relational-mapping-frameworks-php It seems that propel ( http://www.propelorm.org/ ) and CoughPHP ( http://coughphp.com/ ) both offer code generation -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] XML to Array
On Sun, Mar 10, 2013 at 6:28 PM, Karl DeSaulniers k...@designdrumm.com wrote: On Mar 10, 2013, at 6:03 AM, richard gray wrote: On 10/03/2013 11:47, Karl DeSaulniers wrote: Hi Guys, I am hoping someone can guide me or help me fix this issue. I have been lost in the code for some time now. I am trying to get the attributes of an xml node. I have this code: [snip] this may help - http://stackoverflow.com/questions/1156957/php-xml-attribute-parsing I do admit I haven't the foggiest idea what I am doing here, so I am noobing out here on how this php function is really working. I got it off php.net and am trying to implement it in my code. Without my addition it works well except it doesn't grab any attributes which I need in order for my script to work properly. Any ideas on what I am doing wrong? TIA, HTH rich Thanks rich, That uses simpleXML. I am using xml_parse_create. Any ideas for xml_parse_create? I really like the way this function puts everything into an array that I can traverse. I only need it to put the attribute values in the array for the corresponding node and I am done. *Sigh Thanks for your help, Best, Karl DeSaulniers Design Drumm http://designdrumm.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I came across this XML to JSON to an array some time ago. It might be something function xmlToArray($xml) { return json_decode(json_encode((array) simplexml_load_string($xml)),1); } -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Newbie is trying to set up OOP With PHP and MySQL or MySQLi database class (using CRUD)
On Thu, Feb 14, 2013 at 1:24 PM, Haluk Karamete halukkaram...@gmail.com wrote: I recommend a third option, that is PDO. Start here please. http://net.tutsplus.com/?s=pdo On Thu, Feb 14, 2013 at 9:49 AM, dealTek deal...@gmail.com wrote: Hi everybody, Newbie is trying to set up OOP With PHP and MySQL or MySQLi database class (using CRUD) Simple story: creating this class database by myself is way over my head. So it be best for me to find something on the Internet that has already been created and working to pro specs (using CRUD with good security etc). In my studying, it seems that there is a difference between MySQL and MySQLi - MySQLi being the preferred choice if I understand correctly. There are lots of examples on the Internet however I don't know enough about it to know a good starting example from a bad starting example, so I would much appreciate any assistance pointing me towards a good starting point This seems a good start to me untrained eye, but it seems to be for mysql - not mysqli... http://net.tutsplus.com/tutorials/php/real-world-oop-with-php-and-mysql/ http://www.dreamincode.net/forums/topic/223360-connect-to-your-database-using-oop-php5-with-mysql-and-mysqli/ http://snipplr.com/view/8417/ http://snipplr.com/view/12535/ any assistance is appreciated! -- Thanks, Dave - DealTek deal...@gmail.com [db-3] -- 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 The DreamInCode one is good. MySQLi is the recommended option over MySQL since the mysql one is deprecated. PDO is also a great option since you can prepare your queries to help sanitize the data -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] storing searching docs
On Thu, Dec 13, 2012 at 12:41 PM, Matijn Woudt tijn...@gmail.com wrote: On Thu, Dec 13, 2012 at 5:13 PM, Jim Giner jim.gi...@albanyhandball.comwrote: On 12/13/2012 10:56 AM, Bastien wrote: Bastien Koert On 2012-12-13, at 9:10 AM, Jim Giner jim.gi...@albanyhandball.com wrote: Thanks for the input gentlemen. Two opposing viewpoints! I understand the concept of using files for the docs and a table to locate them and id them. But I am of the opinion that modern dbs are capable of handling very large objects (of which these docs are NOT!) much easier than years ago, so I am leaning that way still. It will certainly make my search process easier! More comments anyone? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I got away from storing blobs in the db. I noticed significant slowness after the db grew to about 12gb in MySQL. Back ups also get affected as they take longer. This was older MySQL. But it also affected my mssql server the same way. Nowadays it's files into the file system and data into the db. One thing you could consider is reading the contents of the into a db field and just store the text to allow the full text search Bastien A very clever idea! I like it - the best of both worlds. Can you sum up a method for getting the text out of the .doc (or .rtf) files so that I can automate the process for my past and future documents? Is there a single php function that would accomplish this? There's no builtin function for such stuff. doc files are quite tricky to parse, but rtf files can be parsed pretty easily. One project is PHPRtfLite [1], which provides you an API for doing this. - Matijn [1] http://sourceforge.net/projects/phprtf/ There is http://stackoverflow.com/questions/188452/reading-writing-a-ms-word-file-in-php which has some discussion on reading those files with Antiword (http://www.winfield.demon.nl/) -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] cURL issues posting to an end point
Hi All, I have a page that receives third party data into my app, xml data via https post. This works fine and I receive the data as expected. The issue I am facing is around posting XML data back as a synchronous response to the post I receive. I am using the following code: function sendXMLConfirmation($data) { /* * XML Sender/Client. */ // Get our XML. You can declare it here or even load a file. $xml_builder = '?xml version=1.0 encoding=utf-8? Envelope version=01.00 Sender Id/ Credential25412/Credential /Sender Recipient Id/ /Recipient TransactInfo transactType=response TransactId'.$hash.'/TransactId TimeStamp'.date(Y-m-d H:m ).'/TimeStamp Status Code200/Code ShortDescriptionSuccess/ShortDescription LongDescriptionCANDIDATE Data transfer was a success/LongDescription /Status /TransactInfo Packet PacketInfo packetType=response PacketId1/PacketId ActionSET/Action ManifestManifest Data/Manifest Status Code/ ShortDescription/ LongDescription/ /Status /PacketInfo Payload![CDATA[]]/Payload /Packet /Envelope '; // We send XML via CURL using POST with a http header of text/xml. $ch = curl_init(); $url = 'https://staging.somesite.com/Sprocessor/DispatchMessage.asmx'; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // for https curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 4); curl_setopt($ch, CURLOPT_POSTFIELDS, $xml_builder); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml')); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: close')); //Execute the request and also time the transaction ( optional ) $start = array_sum(explode(' ', microtime())); $result = curl_exec($ch); curl_close($ch); // Print CURL result. echo $ch_result; } The endpoint recipient says they are not receiving the data and I am at a loss to figure out why. Any insight would be appreciated. Thanks, -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] cURL issues posting to an end point
On Thu, Oct 4, 2012 at 1:35 PM, Alejandro Michelin Salomon amichel...@hotmail.com wrote: Bastien: -Mensagem original- De: Bastien Koert [mailto:phps...@gmail.com] Enviada em: quinta-feira, 4 de outubro de 2012 11:54 Para: PHP-General Assunto: [PHP] cURL issues posting to an end point Hi All, I have a page that receives third party data into my app, xml data via https post. This works fine and I receive the data as expected. The issue I am facing is around posting XML data back as a synchronous response to the post I receive. I am using the following code: function sendXMLConfirmation($data) { /* * XML Sender/Client. */ // Get our XML. You can declare it here or even load a file. $xml_builder = '?xml version=1.0 encoding=utf-8? Envelope version=01.00 Sender Id/ Credential25412/Credential /Sender Recipient Id/ /Recipient TransactInfo transactType=response TransactId'.$hash.'/TransactId TimeStamp'.date(Y-m-d H:m ).'/TimeStamp Status Code200/Code ShortDescriptionSuccess/ShortDescription LongDescriptionCANDIDATE Data transfer was a success/LongDescription /Status /TransactInfo Packet PacketInfo packetType=response PacketId1/PacketId ActionSET/Action ManifestManifest Data/Manifest Status Code/ ShortDescription/ LongDescription/ /Status /PacketInfo Payload![CDATA[]]/Payload /Packet /Envelope '; // We send XML via CURL using POST with a http header of text/xml. $ch = curl_init(); $url = 'https://staging.somesite.com/Sprocessor/DispatchMessage.asmx'; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); // for https curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 4); curl_setopt($ch, CURLOPT_POSTFIELDS, $xml_builder); - curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml')); - curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: close')); --- NEW $sPost = '/Sprocessor/DispatchMessage.asmx'; $sHost = ' https://staging.somesite.com'; curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'User-Agent: My Program', 'Accept-Encoding: gzip, deflate', 'POST ' . $sPost . ' HTTP/1.1', 'Host: ' . $sHost, 'Content-type: application/soap+xml; charset=utf-8', 'Content-Length: ' . strlen($xml_builder) ); END NEW - //Execute the request and also time the transaction ( optional ) $start = array_sum(explode(' ', microtime())); $result = curl_exec($ch); curl_close($ch); // Print CURL result. echo $ch_result; } The endpoint recipient says they are not receiving the data and I am at a loss to figure out why. Any insight would be appreciated. Thanks, -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Thanks, Alejandro, So much closer that before, however I am getting an error on this. Unexpected ';' on line 151 which is the closing array ); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'User-Agent: My Program', 'Accept-Encoding: gzip, deflate', 'POST ' . $sPost . ' HTTP/1.1', 'Host: ' . $sHost, 'Content-type: application/soap+xml; charset=utf-8', 'Content-Length: ' . strlen($xml_builder) ); -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: building upon the code RE: Differences
On Thu, Oct 4, 2012 at 10:41 PM, Jim Giner jim.gi...@albanyhandball.com wrote: On 10/4/2012 10:15 PM, David McGlone wrote: I hope I'm not being a pest. I've played with the return and echo so much today I've finally realized I'm going in circles. But I can say I understand it more than ever. Now whats on my mind is breaking out of this circle and doing more with this code. What I am trying to do now is instead of having ALL the images display, I want to try and group them by their name. If I were using SQL I'd simply use a where clause and be done with it, but I'm not sure what would acomplish the same thing or similiar to a where clause in php. I dont' see how a where clause in sql provides you with a result that organizes the images by name. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Read the images into an array and then sort the array...glob() gives you that array so use one of the many sort functions as you like to get the order you want -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Responding to an XML data post
Hi All, I am stuck in something where a 3rd party app pushes an XML post to my site. They need me to respond to that push with a synchronous XML post back confirming that the data was received / had issues etc. Those XMLs are defined, but I am not sure how to push that XML back. A simple echo $xml; is not making back to their system. Not sure how I can post back to their site -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Programmers and developers needed
On Thu, Sep 13, 2012 at 8:44 AM, Matijn Woudt tijn...@gmail.com wrote: On Thu, Sep 13, 2012 at 2:12 PM, Steven Staples sstap...@mnsi.net wrote: From: Tim Dunphy [mailto:bluethu...@gmail.com] Sent: September 13, 2012 7:26 AM We are looking for programmers and developers to create a world wide system. Is it bigger than a bread box? Will it blend? Sure, if you find a big enough blender ;) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php meh, World Wide Web has been done... -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] use JSON storage on RAMdisk instead of SQL? (for fast moving sites)
On Thu, Sep 6, 2012 at 2:28 PM, Matijn Woudt tijn...@gmail.com wrote: Op 6 sep. 2012 12:48 schreef rene7705 rene7...@gmail.com het volgende: Hi Folks.. snip I seem to have figured most of this out, but before I embark on weeks of coding, I'd like to give the SQL experts here a chance to convince me to stick to MySQL for my data storage and distribution needs. I'd love to hear of a simple way to efficiently store and operate a forum with tree-structures for both subforums and threads-messages using MySQL, as my live hoster does not support RAMdisks, not without charging me about 70 euro per month instead of the $7 I pay now ;) Ok, thanks for reading and possibly considering all this, Rene Hi Rene, I don't call myself an sql expert, but well.. sql is great, but not the most efficient. There are more people like you that thought about storing data in json. This has proven to be faster in most situations, that's why popular platforms like facebook and Twitter don't use sql anymore. Have a look at MongoDB for example, it uses bson,binary json. That seems to do exactly what you want and you don't have to reinvent the wheel. You can choose to store it's data files on ramdisk to make it even faster, but mongodb has a pretty good cache. - Matijn +1 for mongo... If you want to go crazy I would suggest looking at http://meteor.com or derbyjs.com to build the app. They run on node and manage the real time changes to the dom content between systems -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Searching IDE.
On Wed, Jun 13, 2012 at 9:23 AM, Marc Guay marc.g...@gmail.com wrote: I've used both Netbeans and Aptana w/ WinXP over the past few years and of the two I would recommend Aptana. Netbeans was crippling slow and Aptana often gets it's workspace corrupted, which makes both of them crappy (yet free!), but for day to day use when they're not failing entirely, Aptana is a more efficient tool. Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I'll throw my 2 cents in... Netbeans for projects notepad++ for quick edits editpad pro (free for linux is really good) I've also installed Sublime on my mac, but haven't got enough time with it to have an opinion... -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Simple Email System (SES) Provider
On Fri, Jun 1, 2012 at 8:32 PM, Don Wieland d...@pointmade.net wrote: Hi all, I built a system in PHP/mySQL where a group of users post events, sign-up for events, change their arrival times, remove thier names from events, and post related notes on the events. Each time an action is done, an email is generated to the entire group that their has been a change. Pretty standard stuff... Today I just got an Mail Delivery System email with this error: Domain dwdcweb.info has exceeded the max emails per hour (350/350 (100%)) allowed. Message will be reattempted later I contacted my VPS provider and they just alerted me that there is a limit on how many emails my server can send per hour. They recommended I find a 3rd party service provider with support PHP API connections. My budget is limited. Does anyone have any suggestions of companies that might work for my scenario? Any feedback is appreciated ;-) Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Amazon has an email service you can plug in to with php http://aws.amazon.com/ses/ -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Differences between PHP on LAMP and PHP on Windows Servers
On Thu, May 31, 2012 at 9:38 AM, Matijn Woudt tijn...@gmail.com wrote: On Thu, May 31, 2012 at 3:29 PM, Gates, Jeff gat...@si.edu wrote: From: Matijn Woudt tijn...@gmail.commailto:tijn...@gmail.com Date: Wednesday, May 23, 2012 3:59 PM To: a...@ashleysheridan.co.ukmailto:a...@ashleysheridan.co.uk a...@ashleysheridan.co.ukmailto:a...@ashleysheridan.co.uk Cc: Jeff Gates gat...@si.edumailto:gat...@si.edu, php-general@lists.php.netmailto:php-general@lists.php.net php-general@lists.php.netmailto:php-general@lists.php.net Subject: Re: [PHP] Differences between PHP on LAMP and PHP on Windows Servers On Wed, May 23, 2012 at 9:35 PM, Ashley Sheridan a...@ashleysheridan.co.ukmailto:a...@ashleysheridan.co.uk wrote: On Wed, 2012-05-23 at 20:54 +0200, Matijn Woudt wrote: On Tue, May 22, 2012 at 8:15 PM, Gates, Jeff gat...@si.edumailto:gat...@si.edu wrote: Can anyone tell me what differences I might encounter by working with PHP on a Unix server verses working with PHP on a Windows server. We use Windows production servers here but many of us would like to get more LAMP environments. So, I'm wondering if I can use the hive mind here to get a sense of the pros and cons of each platform. Thanks. Jeff Apart from all other suggestions, one of the most common errors are because of different php.ini settings. If you can keep those settings (mostly) equal, there will not be that many errors. - Matijn I would say that's not limited to the distinction between Windows and Linux but any server. I've seen what appears to be an identical setup (same version of PHP, MySQL, etc) fail only because of a small setting in the php.ini file, just because the default was slightly different on the second system; both were running Linux. Yes, ofcourse, that comment was meant for any two systems. - Matijn Well, let me also add a related question: what types of problems might I encounter if I was trying to set up a Drupal or Wordpress instance on a Windows server running PHP as opposed to a Unix server? Jeff You might need to change a few basic configuration options (paths, database, etc) inside Drupal/Wordpress/.., but otherwise those are perfectly compatible on Windows Linux. - Matijn -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Why not install virtualbox or something similar and install a flavor of linux and use that to do your dev on? It more closely mimics what will be the operating environment and would lead to less hassles -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Uploading large files with HTTP_Request class
On Thu, May 31, 2012 at 12:24 PM, Jim Lucas li...@cmsws.com wrote: On 05/31/2012 03:28 AM, Voß, Marko wrote: Hello, I need to perform uploading of large files using the HTTP_Request class: http://pear.php.net/manual/package.http.http-request.php How am I supposed to do that with this class? Are there any alternatives, which do not force me to add new PHP dependancies/libraries to the project? I am writing a library and do not want to force the users to add dependancies to their projects in order to use this library. You don't want to require additional dependencies yet you require PEAR. Isn't PEAR an addition dependency? I am currently using PHP 5.3.0. Thank you and best regards, Marko -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php If you don't want dependencies, try swfuploader...uses flash but is more robust for large file uploads, -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Uploading and creating an email attachment, WITHOUT a DB on server
On Tue, Mar 27, 2012 at 8:41 AM, Christopher Svanefalk christopher.svanef...@gmail.com wrote: Addendum: what standard functions could I invoke to accomplish the file system view part? On Tue, Mar 27, 2012 at 2:37 PM, Christopher Svanefalk christopher.svanef...@gmail.com wrote: Dear all, I am rather green to PHP and web programming in general, and would just like some pointers how to accomplish the following. I have a webpage on a remote host, which supports PHP but does not have a DB installed. Here, I have a form where the user can input personal credentials, which are then processed and sent as an email message to me from the server. This part work so far. I want to do the following: the user should be able to upload his/her CV. To do so, I need the following: 1) A way for the user to open a conventional file system view to select the file to upload 2) A way to take this file, add it as an attachment to the mail created in the form, and finally send the mail + attachment to my mail. Is this possible to do without intermediary storage in a DB? I.e. is it possible just to pass the attachment directly from working memory to the function for sending email? Or does it have to go intermediare storage? Thanks in advance for any help! -- Best, Christopher Svanefalk -- Best, Christopher Svanefalk Yo don't need a db for this, but you will need to place the CV onto the file system so you can attach it to the email. Its not a hard process if you use something like phpmailer. Show user form with upload field process the form on the server (incl file upload) check the file extension to ensure you're not sending something bad create the email attach the file send log that you received the file and send the email unlink the file -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Nested database loops and completing an unordered list....
On Fri, Mar 2, 2012 at 7:43 AM, Jay Blanchard jay.blanch...@sigmaphinothing.org wrote: My usual approach to a problem like this to to includes a parent column in the table ID (int pk) Parent ( default null ) // no parent Item Itemtype [etc] Parent will then hold either a null if a top level item, or a structured path ( 1/10/24 ) that notes the parents of the item all the way up to the parent. That way, a single query will get you all items in that parent's lineage to whatever depth is needed by using the child's value Select * from table where parent = '1/10' Would retrieve all items that are children of a top level of 1 and a second level of 10 I would do that under normal circumstance but I cannot modify the client's table in any way shape or form. I am considering the COMPANY_ID to be the parent at this point and I can get all who belong to a company. I just need to turn that lineage into a tree. Would they let you make a copy or a join table where you could build what you need? Then maybe add a stored proc to move data as needed -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] number_format
On Mon, Dec 19, 2011 at 9:19 AM, Floyd Resler fres...@adex-intl.com wrote: In the previous version of PHP we were using, I could pass a string to number_format and it would just change it to a 0 without complaint. With 5.3.6 I get an expects double error. I don't suppose there's a way to make it work like it used to??? I'm dealing with really old code that wasn't very well structured. Thanks! Floyd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Could you check it before formatting? Or if the data is coming from the db, force it to 0 if null? $var = (is_double($number_var)) ? $number_var : 0; -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Working on a Subsummary Report
On Fri, Dec 16, 2011 at 1:49 PM, DealTek deal...@gmail.com wrote: I would give consideration to the 'group by' function for your query, and loop through that. Thanks Mike - will do... -- *beginner question* - what would we call this type of query/display: reporting or summary or ? I'm not sure what terms look up? it would be similar to query all categories and their products sold in a year and display like: summary heading1 CAT 1 sub head 1--- Prod 1 --- sales prod data 1 --- sales prod data 2 etc sub head 2--- Prod 2 --- sales prod data 3 --- sales prod data 4 etc summary heading2 CAT 2 sub head 3--- Prod 3 --- sales prod data 5 --- sales prod data 6 etc any other hints will help a lot... -- Thanks, Dave - DealTek deal...@gmail.com [db-11] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php what about creating a master report that has the total summarized by category and then offering a drill thru type structure to dig deeper in certain areas? -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Auto CRUD Generator Xataface
On Tue, Nov 29, 2011 at 4:13 PM, Jim Lucas li...@cmsws.com wrote: On 11/29/2011 12:54 PM, Daevid Vincent wrote: -Original Message- From: Matijn Woudt [mailto:tijn...@gmail.com] Sent: Tuesday, November 29, 2011 12:48 PM To: Daevid Vincent Cc: php-general-h...@lists.php.net; php-general@lists.php.net Subject: Re: [PHP] Auto CRUD Generator Xataface On Tue, Nov 29, 2011 at 9:44 PM, Daevid Vincent dae...@daevid.com wrote: -Original Message- Search Google for Xataface. It's a full frontend which dynamically changes with database structure changes. http://xataface.com/videos is broken and therefore we can't view the demo, and nothing pisses me off more than a site that doesn't have a simple contact email link! UGH! I think your PC is broken.. I can watch the videos just fine ;) I tried it in FF 3.6.24 as well as Chrome 15.0.874.121 m (is that really necessary Google?!) and lastly IE 8.0.7601.17514 (is that really necessary Micro$oft?!). All on Win7 64-bit burley-ass Dell PC. I code in PHP all day long and have no troubles with other websites. Not even other pages on THAT web site. That particular tab / page however only shows the logo top left, search top right, and then these in the tabs: Home Forum Documentation Videos a href=http:// And the rest of the page is white. Garbage. System: Windows XP 32-bit I run FF 5.0.1 w/NoScript and I had allow both xataface.com and weblite.ca then the video popped up. IE 6.0 on the same system works fine too. -- Jim Lucas http://www.cmsws.com/ http://www.cmsws.com/examples/ http://www.bendsource.com/ C - (541) 408-5189 O - (541) 323-9113 H - (541) 323-4219 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Works for me as well in Chrome -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] json_encode confusion
Morning all, I've been having some fun with converting a text data file import into a json object for storage. I have a text file that is pipe delimited coming in via an upload. The first row is the headers and the second row is the data. Using this code: $data = file(inline_Nov_8_2011.txt); if(count($data)==2){ $keys = explode(|, $data[0]); $fields = explode(|, $data[1]); $combine = array_combine($keys, $fields); $json = json_encode($combine); } After the combine, I get an array that looks like this Array ( ['Legal Last Name '] = Andros ['Legal Middle Initial '] = ['Legal First Name '] = Marisa ['Maiden/Other Name '] = ['Social Insurance No. '] = 123456789 ['Date of Birth '] = 2/1/1988 ['Gender '] = Female ) But the json encoded value looks like this (there are way more elements but this should be enough to represent what I need to do). {null:Andros,null:,null:Marisa,null:,null:123456789,null:2\/1\/1988,null:Female} I have been googling for info about allowed values for the json keys, but can't seem to find a clear doc on what is allowed and what isn't. I have tried unquoted keys, replaced the spaced with underscores but nothing I do seems to help. When I echo out the json encoded data, the keys are all nulls. Can someone point me in the correct direction? It may be that I need to manually create the key names as an array first, which I was hoping to avoid since the file format coming from the client is still in some flux. -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] newline and return issues in string
On Tue, Oct 11, 2011 at 7:58 AM, ad...@buskirkgraphics.com wrote: I have come across an issue with my string that I would like to find a faster way to resolve. It seems there are new lines and returns at different positions of the string. First I exploded on the new line explode(“\n”, $ string) This gave me a nice array but when I try to implode I get the new lines again. There is not a consistent position and there seems to be some hidden returns in the array as well. Is there a way, or has someone written a filter that would allow me to remove all the newlines and returns from the array or string. Understand I have resolved this issue but I think I have to be going about this the hard way because it is just too complex . FYI $filter = array(\r\n, \n, \r); str_replace($filter,’’,$string) ß this is useless in this situation I have tried and it does not change the string at all. Understand the newlines and returns do not display in the string as literals. Meaning you do not see /n or /r it is hidden. What about using nl2br() and then stripping out all the BR tags? -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: files outside of documentRoot
On Tue, Oct 11, 2011 at 11:00 AM, Ricardo Martinez harisel...@gmail.com wrote: Hi! i'm was checking, readfile(); and fpassthru(); With easy examples, i can use it for show a pic in the screen and download a file, from outside of documentRoot. It works fine. The problem that i have now, is, i need can work with it, inside of other documents, but i'm getting all time error by the headers. ( already sendt ... ) Anyone knows how to use it for can call the files and work together with other page ¿? Thanks On Sun, Oct 9, 2011 at 6:57 PM, Sean Greenslade zootboys...@gmail.comwrote: On Sun, Oct 9, 2011 at 9:52 AM, Ricardo Martinez harisel...@gmail.comwrote: The files are, png, pdf and flv. Only users login can see or download it. thx ; On Sat, Oct 8, 2011 at 11:16 PM, Shawn McKenzie nos...@mckenzies.net wrote: On 10/08/2011 03:40 PM, Ricardo Martinez wrote: Hi List! I need to access files outside the DocumentRoot. I've been looking for info and documentation, and I've read that it can be done using symbolic links and another way is by using headers. I want to know, what do you think, what is the best way, and if anyone knows a good doc about of it. Thanks!!! It depends on what you mean by files. Are they PHP files that need to be run, or images, or files that need to be downloaded by the user? For PHP, you would add the external dir to your include path. For images you can use a php file as the img src and that file sets the appropriate headers and uses readfile() to get and echo the image data: getimage.php?image=someimage.gif For download files you would do it in the same manner as for images: download.php?file=somefile.zip -- Thanks! -Shawn http://www.spidean.com -- Ricardo ___ IT Architect website: http://www.pulsarinara.com Sounds like the downloader php script would be perfect (what Shawn suggested). Have the script check the login status, then (if valid) send the proper headers for the file and read out the data with the script. -- --Zootboy Sent from my PC. -- Ricardo ___ IT Architect website: http://www.pulsarinara.com For images and the like, I have a separate page that is called that handles the image and the headers needed In the page I have some thing like echo img src='get_image.php?id=$id'; Then in the get-image.php page i have the code that gets the image from the db, outputs the appropriate headers and then outputs the image -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php on my pc, no go, FUBAR, thank you Bill Gates?
On Tue, Oct 4, 2011 at 9:47 AM, Kirk Bailey kbai...@howlermonkey.net wrote: I installed it in a Windows XP PC with a cgi capable server in it. No dice, nothing happens. I also installed python in the same computer. Works perfect. NEITHER language modified the http server. So, what do I have to do to get php to play well with others in a XP environment? Cute remarks about install Linux shall be ignored as line-noise. -- end Very Truly yours, - Kirk Bailey, Largo Florida kniht +-+ | BOX | +-+ think -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Kirk, Are you running this via IIS or Apache? If IIS, download and install the MS Web Platform app. Use that to install drupal or wordpress and it will install PHP and mysql for you running under IIS -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] book quest
On Wed, Sep 28, 2011 at 6:20 PM, Kirk Bailey kbai...@howlermonkey.net wrote: The best book for a beginner? No, don't tell me php.net, I hear that one already, and while it is indeed good, I want something in a dead tree edition I can canny around and smoke as needed. -- end Very Truly yours, - Kirk Bailey, Largo Florida kniht +-+ | BOX | +-+ think -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I had great success with Wrox PHP Programming and PHP Essentials by Julie C. Meloni The latter is dated, but was clearly written. -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP installations, usage, and popularity
On Mon, Sep 19, 2011 at 5:08 PM, Tedd Sperling tedd.sperl...@gmail.com wrote: Hi gang: I need information to convince administrators in management that PHP is a viable subject that should be taught in college with credits going toward a Degree or Certification. You see, I am pushing for a Web Development Certification program that would include PHP/MySQL as well as several other Web Languages (i.e., html, css, javascript, ajax). Currently the college teaches ASP in a regular course toward a IT Certification, but class attendance has dropped considerably -- no one wants to take the course. However, My PHP class has been maxed out. But my class is a special topic class and not part of the regular coursework that would go towards a Degree or Certification -- and that's where I would like this to go. As such, I need information regarding how wide-spread PHP is (i.e., number of installations), who's using it (i.e., companies, organizations), and how it compares with other Web Languages (i.e., ASP, Ruby, etc.). So, what say you? References will work. Thanks, tedd _ t...@sperling.com http://sperling.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Ask them if they've heard of facebook oracle uses php in the web based admin tool ibm has a close association with zend and php microsoft is supporting php natively in win2008 server Usage stats http://php.net/usage.php -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PhpMyAdmin in EasyPHP cannot run DROP DATABASE
On Wed, Aug 24, 2011 at 1:30 PM, Nam Gi VU nam.gi...@gmail.com wrote: Thanks Bastien for your suggestion. Though, I use the `root` account with `All privileges' but it still not allowing me to call `drop database'. What should I do next? On Wed, Aug 24, 2011 at 6:25 PM, Bastien phps...@gmail.com wrote: On 2011-08-23, at 6:44 AM, Nam Gi VU nam.gi...@gmail.com wrote: Hi every one, When trying to run my database script with `drop database` command, the server refuse and said as below screenshot. What should I do to enable this command? Regards, Nam Check that you phpmyadmin user account has the drop privilege. If not, grant that privilege or create another user account that does have more privileges Bastien -- Nam try creating another user account, that isn't root (always a good habit) and giving that account the needed privileges and then configure PMA to use that account. -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Fwd: [PHP] Storing indefinite arrays in database
-- Forwarded message -- From: Bastien Koert phps...@gmail.com Date: Tue, May 10, 2011 at 4:37 PM Subject: Re: [PHP] Storing indefinite arrays in database To: Benedikt Voigt benedikt.vo...@web.de On Tue, May 10, 2011 at 4:16 PM, Benedikt Voigt benedikt.vo...@web.de wrote: Hi, I'am very new to PHP, so please any comment is welcome. I want to write a function in PHP, which takes X arguments and outputs a value. The functioning of this function should be stored in a db (mydb? or better alternatives?) The function would look up the result in the db based on the X arguments. But how can I store X arguments and the corresponding output value? If I limit the X arguments to a specific number like N=10, then I could create N=10 +1 columns in a table. But how should I do it if I don't want to limit myself to a fix number? Thanks for any comment! Ben -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php My bad, copied only the OP not the list. Create the DB to run in a vertical format consider the horizontal style record_id field1 field2 field3 fieldN which is great for fixed designs The vertical format would be record_id attribute argument -- Bastien Cat, the other other white meat -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] File Upload Problem
On Wed, Apr 6, 2011 at 1:10 PM, tedd t...@sperling.com wrote: Hi gang: I wrote a simple script to upload image files from my desktop to a server -- the exact same code works on two servers, but fails on a third. I suspect there is something set different between the servers, but I can't find it. Oddly enough, I can upload image files directly to the database, but not to the file system. What could be wrong? What should I be looking for? Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php check out the max post size -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Help! Made a boo-boo encrypting credit cards
On Tue, Mar 1, 2011 at 12:34 PM, Brian Dunning br...@briandunning.com wrote: I just wanted to ping this, as it's becoming a serious problem. I hope someone can help. On Feb 11, 2011, at 2:42 PM, Brian Dunning wrote: Hey all - I'm using mcrypt to store credit cards into MySQL. About 90% of them decrypt fine, but about 10% decrypt as nonsense (b1�\�JEÚU�A��� is a good example). Maybe there is a character that appears in about 10% of my encryptions that's not being encoded properly??? // Encryption is set up at the top of the script: $crypto = mcrypt_module_open('rijndael-256', '', 'ofb', ''); $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($crypto), MCRYPT_DEV_RANDOM); $ks = mcrypt_enc_get_key_size($crypto); $key = substr(md5('my_funky_term'), 0, $ks); // When the card number is collected by the form, it's encrypted: $cc_number = addslashes($_POST['cc_number']); mcrypt_generic_init($crypto, $key, $iv); $cc_encrypt = mcrypt_generic($crypto, $cc_number); mcrypt_generic_deinit($crypto); // This is written to the database: $query = update accounts set cc_encrypt='$cc_encrypt', encrypt_iv='$iv', other_fields='$other_stuff' where id='$account_id' limit 1; $result = mysql_query($query) or die(mysql_error()); Both the cc_encrypt and encrypt_iv fields are tinytext, latin1_swedish_ci, MyISAM, MySQL 5.0.91 In another script, when I retrieve, I first set it up at the top of the script exactly like step #1 above, then retrieve it like this: mcrypt_generic_init($crypto, $key, $row['encrypt_iv']); $cc_number = trim(mdecrypt_generic($crypto, $row['cc_encrypt'])); mcrypt_generic_deinit($crypto); Most of them are good, a few of them are bad. Can anyone see anything I'm doing wrong or a case I'm not covering? Thanks much. -- 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 Could it be that the addslashes is creating a \0 (null) value? That might screw up the decryption routine. -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Dotnet Remoting
On Thu, Feb 24, 2011 at 3:33 PM, Daevid Vincent dae...@daevid.com wrote: -Original Message- From: Bastien [mailto:phps...@gmail.com] Sent: Thursday, February 24, 2011 4:18 AM To: Gary Cc: php-general@lists.php.net Subject: Re: [PHP] Dotnet Remoting On 2011-02-24, at 5:17 AM, Gary php-gene...@garydjones.name wrote: This is purely of academic interest to me, nothing urgent. I'm just wondering if it's possible to do remoting with PHP's DOTNET class (http://php.net/manual/en/class.dotnet.php) which I didn't even know existed until yesterday. If it is, is there any reason that DOTNET is a Windows only extension? Like I say, it's just something I'm curious about. -- Gary Please do NOT send me 'courtesy' replies off-list. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php How about because dotnet and the dotnet framework is a windows product? Are you sure about that Bastien? ;-) http://www.mono-project.com This is pretty robust and used by many companies, including Fogbugz (I know, we use it here at Panasonic). While .NET started as a Microsoft way to unify their VB and J++ (now C#), it has gone past that. It is a language framework like any other language framework. I know about mono. Wasn't sure if it supported what the OP was after. I know it always lags behind the .net framework. -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] New to list and to PHP
On Mon, Feb 21, 2011 at 9:37 AM, Pete Woodhead pete.woodhea...@gmail.com wrote: On 2/20/2011 6:41 PM, Richard Quadling wrote: On 20 February 2011 23:34, Richard Quadlingrquadl...@gmail.com wrote: On 18 February 2011 19:03, Pete Woodheadpete.woodhea...@gmail.com wrote: Hi I'm Pete Woodhead. Â I'm new to the list and to PHP. Â To be honest I very new to code writing. Thought this would be a good way to learn good habits as well as good code writing. Looking forward to learning and participating. Assume that all the data you get from the user is out to get you. It probably isn't. Most of the time. But when it does, it'll be your fault. Unless you've left the company by then. Also, poka-yoke is a great concept to learn about (thanks to a great article in php|Architect all the way back when). Richard. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY http://www.phparch.com/magazine/2006-2/february/ in case anyone was wondering. Hi Richard, Thanks for the welcome, the advice and the link. I was not aware of PHP | Architect. Truth be told I'm still at the PHP for Dummies level. Regards, Pete -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Consider Head First Object Oriented Analysis and Design http://www.amazon.com/Head-First-Object-Oriented-Analysis-Design/dp/0596008678 -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Google Visualization Chart API
On Thu, Feb 17, 2011 at 2:13 PM, Ashley M. Kirchner ash...@pcraft.com wrote: I'm currently using Google Visualization API[1] to generate both interactive and static charts for a client and they're viewing these online[2]. However they now want to be able to download a PDF containing the charts (static) in it. Does anyone know of a way where I can take the same API and create a PDF document instead? I've worked with fpdf[3] in the past to create PDFs on the fly so that's no problem. The problem is figuring out how to get the charts in such a way that I can shove them into the PDF. [1] http://code.google.com/apis/visualization/ [2] Example: http://www.yeehaw.net/chart.html - feel free to view source [3] http://www.fpdf.org/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Convert the chart to an image and then insert that into the pdf -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] ErrorDocument 500 and PHP
On Mon, Jan 3, 2011 at 2:30 PM, David Lidstone d...@elocal.co.uk wrote: On 03/01/2011 18:38, Nilesh Govindarajan wrote: On 01/03/2011 11:46 PM, David Lidstone wrote: Hi First up, I apologise as this must have been posted before, but the server is so slow I can't search, or even read messages often. I'm using Thunderbird - any tips on how to access news.php.net faster!? In Apache, I can set ErrorDocument 404 /myerrorpage.php and it works. Doing the same but with a 500 error for a PHP script, it doesn't. I just get the PHP error printed on the screen. What I've seen on the net implies to me that PHP does not fully interact with Apache when it generates an error, and therefore this approach will not work. Is this correct? I just want to redirect to a PHP page on 500 error and run a small script. Any suggestions? Many thanks, David Basically, it is not a 500 error. It's an error produced by the php itself. The file which was run by php had some error, so php outputs that error to the client. This is actually a successful request when you see from the apache's eye. That's what I feared, although my server seems to send 500 headers but my local xampp install sends 200 headers. Strange. So what do people do about getting notified about errors? - I have too many sites to look after to manually sift through logs. I can't refactor every script with try / catch (which wouldn't catch compile bugs anyway)? How does Apache know to log the error with ErrorLog but not redirect with ErrorDocument? Is there a way I can piggy-back this behaviour instead? Sorry for so many questions, but the more I look at this the crazier it seems and most of the stuff on the net is just static! Perl interacts fully with Apache from what I can gather. Anyone know whether this is planned for the future? When I had to use IIS and ASP it had this functionality and it was very handy. Thanks again, David -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Check the php.ini file to ensure that error reporting is turned on. This will allow php to show you where/what the error is. For a dev box this is acceptable but should be turned off in production -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: File-Upload per Drag-N-Drop?
On Wed, Dec 29, 2010 at 3:03 PM, Robert Cummings rob...@interjinn.com wrote: On 10-12-29 03:02 PM, Robert Cummings wrote: On 10-12-29 02:54 PM, Michelle Konzack wrote: Hello Tommy Pham, Am 2010-12-29 10:33:30, hacktest Du folgendes herunter: This sounds like RIA = Rich Internet Application. Try google'ing for it. This was the missing keyword. Thanks. Found DHTML and posibility for a flash/gnash app which support the Drag-N-Drop. If has only to create a normal fileupload where the rest is handled as usual by PHP. Now have to check, whether gnash support it. YMMV depends on platform technology supported. Hmmm, if I seehttp://office.freenet.de/ and it woks on Linux the same as on MacOS X as on Windows or BeOS. Regards, Tommy Thanks, Greetings and nice Day/Evening Michelle Konzack You can get a nice multi upload in flash, but you cannot get drag and drop. I should add that I don't know about Silverlight or whatever is the flavour of the week, but I believe you can do drag and drop with Java applets, but they'll require popup acceptance of the security privileges necessary to allow drag and drop. Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Flex has some as well http://www.flex888.com/296/9-flex-file-upload-examples-visited.html -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Server response very poor again
On Wed, Dec 22, 2010 at 1:13 PM, Daniel P. Brown daniel.br...@parasane.net wrote: On Wed, Dec 22, 2010 at 13:07, Steve Staples sstap...@mnsi.net wrote: whoa... wait a sec there... i seem to recall this statement... ;) This seems to be the most likely, and considering how all messages are permanently and independently archived and propagate throughout the Internet, it might be a good reason not to go nuts in sending unrelated and unintelligible messages of this nature in the future. this could be one of those situations ;) Yes, you're right but mine was intelligible. ;-P so now the whole world knows... GREAT! this was supposed to be a secret. As they say, 'tis the season to be jolly. It's up to each individual to determine just *how* jolly. -- /Daniel P. Brown Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting (866-) 725-4321 http://www.parasane.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Geez, and it ins't even Friday yet! -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Problem with Include
On Tue, Dec 21, 2010 at 1:28 PM, a...@ashleysheridan.co.uk a...@ashleysheridan.co.uk wrote: (Apologies for top posting; on my mobile just now.) Not true. Refactoring code is one of the main tasks of a developer. None of us produce perfect code, and some code is less perfect than other code. It's instinct to want to fix bad code when we're maintaining it or having to add new features to it. For the same reason car enthusiasts tinker with and tune their cars, good developers will do the same with code, be it in the form of consolidating common code to include files or other ways. To not do so seems to me to avoid ones nature really! Thanks, Ash http://www.ashleysheridan.co.uk - Reply message - From: Ravi Gehlot r...@ravigehlot.net Date: Tue, Dec 21, 2010 18:12 Subject: [PHP] Problem with Include To: Paul M Foster pa...@quillandmouse.com Cc: php-general@lists.php.net If something is working and you don't know exactly whats under the hood then you are wasting your time in trying to re-invent your own wheel and waste your time and resources to modify something that isn't needed to be touched. Good programmers make good use of their time as well. We need to keep in check with new technology, learn new trends and also master our weakness. If we keep changing this or that or moving that or this then oh well...there goes 1 day worth of work to figure stuff out. Just my take on this. If you think different, then no problems. Regards, Ravi. On Tue, Dec 21, 2010 at 10:23 AM, Paul M Foster pa...@quillandmouse.comwrote: On Tue, Dec 21, 2010 at 02:35:33AM -0500, David Hutto wrote: On Tue, Dec 21, 2010 at 2:29 AM, Ravi Gehlot r...@ravigehlot.net wrote: Why mess with something that is already working? If you are trying to make it pretty then you are not solving a problem. You are creating one. Define working. I've had programs 'work', but more experienced would say it's flawed in some respect. Does it perform the immediate task? Now define pretty. Is it aesthetically pleasing to you, or to someone else with less, or maybe more experience. By defining the two above, you then define whether it's a problem. To you, or to them, or to the original designer? Beware of more experienced programmers. I recently talked to an ex-boss of mine who had a programmer flake out on him. One of his customers threatened to take this flaky code to another company and get their opinion about whether it was good code or not. My ex-boss explained that, of course, they'd shoot it down. Because that's what programmers do-- they complain about other programmers' code. I'd never heard that idea expressed aloud. But when I thought about it, I realized it was true. Hell, look at the content of this list. ;-} Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php +1 -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Error Querying Database
On Wed, Dec 15, 2010 at 3:11 PM, Gary gp...@paulgdesigns.com wrote: Sent: Wednesday, December 15, 2010 2:44 PM Subject: Re: [PHP] Error Querying Database On Wed, 2010-12-15 at 13:42 -0500, Gary wrote: I cant seem to get this to connect. This is to my local testing server, which is on, so we need not worry that I have posted the UN/PW. This is a duplicate of a script I have used countless times and it worked. The error message is 'Error querying database.' Some one point out the error of my ways? Gary form action=?php echo $_SERVER[PHP_SELF]; ? method=post tr td labelName of Beer/label/tdtdinput name=beername type=text / /td /tr tr td labelMaker of Beer/label/tdtdinput name=manu type=text / /td /tr tr td labelType of Beer/label/td tdselect name=type size=1 id=type optionImported/option optionDomestic/option optionCraft/option optionLight/option /select !--select name=avail size=1 id=avail optionAvailable/option optionSold/option /select-- /td /tr tr tdlabelSold in/label /tdtdinput type=checkbox name=singles value=Yes / Singlesbr / input type=checkbox name=six value=Yes / Six Packs br / input type=checkbox name=can value=Yes / Cansbr / input type=checkbox name=bottles value=Yes / Bottles br / input type=checkbox name=tap value=Yes / Draft br / tr td labelSize/label/tdtdinput name=size type=text / /td/tr trtd labelDescription/label/tdtdtextarea name=desc cols=40 rows=5/textarea /td/tr trtd input name=submit type=submit value=Submit //td/tr /form /table /div div id=list ?php $beername = $_POST['beername']; $manu = $_POST['manu']; $type = $_POST['type']; $singles = $_POST['singles']; $six = $_POST['six']; $can = $_POST['can']; $bottles = $_POST['bottles']; $tap = $_POST['tap']; $size = $_POST['size']; $desc = $_POST['desc']; $ip= $_SERVER['REMOTE_ADDR']; $dbc = mysqli_connect('localhost','root','','rr')or die('Error connecting with MySQL Database'); $query = INSERT INTO beer (beername, manu, type, singles, six, can, bottles, tap, size, desc, ip ). VALUES ('$beername', '$manu', '$type', '$singles', '$six', '$can', '$bottles', '$tap', '$size', '$desc', '$ip' ); $result = mysqli_query($dbc, $query) or die('Error querying database.'); mysqli_close($dbc); -- Gary Read Ash's reply... but basically, you're running the query with POST variables, and inserting them on page display as well as on form submit. can you ensure that you can connect from the command line? if you may take some criticism, you should rethink your database design, as well as the page flow/design... you should either post the form to a new page, or if it is back to itself, you should check to see that you have in fact posted it before just blindly inserting into the database (as currently, every time you view the page, you will insert into the database, even if completely empty values). Steve Thank you for your reply. I did not see a reply from Ashley, but I would love to read it. I always welcome criticism, however this form is for the owner of a bar where he will inputing his list of beer that he sells. The rest of the code that is not there is I will have the list then echo to screen below the form. This is an internal list only, no customers will be seeing itif that makes any difference to your suggestion. On your one point (as currently, every time you view the page, you will insert into the database, even if completely empty values). Is this always the case when you process a form onto itself? Or is there a fix? I did just create a new page, inserted the script onto it, and got the same error message. Again, thank you for your help. Gary Gary the line: input name=submit type=submit value=Submit / is the submit part... if you encapsulate the DB part of the code, within: if($_POST['submit'] == 'Submit') { # do db stuff in here and value sanitizing } basically, what that does is the submit button is name $_POST['submit'] and has the value Submit (the 'value' of the button) which will not be set, until you submit the form. Personally, I do it another way, but but is how most people check to see if a form is submitted (i think?) but it seems as if your issue stems from the lack of being able to connect to the database itself, so either your login credentials are wrong, or you dont have the mysqli connector enabled with your php in your development box. check your phpinfo() to ensure it is enabled. Steve Steve Again thank you, here is my phpini information, so it would seem mysqli is enabled MysqlI Support enabled Client API library version 5.1.41 Active Persistent Links 0 Inactive Persistent Links 0 Active Links 13 Client API header version 5.1.41 MYSQLI_SOCKET MySQL
Re: [PHP] Re: Error Querying Database
On Wed, Dec 15, 2010 at 3:41 PM, Gary gp...@paulgdesigns.com wrote: Gary gp...@paulgdesigns.com wrote in message news:81.d1.49824.33c09...@pb1.pair.com... I cant seem to get this to connect. This is to my local testing server, which is on, so we need not worry that I have posted the UN/PW. This is a duplicate of a script I have used countless times and it worked. The error message is 'Error querying database.' Some one point out the error of my ways? Gary form action=?php echo $_SERVER[PHP_SELF]; ? method=post tr td labelName of Beer/label/tdtdinput name=beername type=text / /td /tr tr td labelMaker of Beer/label/tdtdinput name=manu type=text / /td /tr tr td labelType of Beer/label/td tdselect name=type size=1 id=type optionImported/option optionDomestic/option optionCraft/option optionLight/option /select !--select name=avail size=1 id=avail optionAvailable/option optionSold/option /select-- /td /tr tr tdlabelSold in/label /tdtdinput type=checkbox name=singles value=Yes / Singlesbr / input type=checkbox name=six value=Yes / Six Packs br / input type=checkbox name=can value=Yes / Cansbr / input type=checkbox name=bottles value=Yes / Bottles br / input type=checkbox name=tap value=Yes / Draft br / tr td labelSize/label/tdtdinput name=size type=text / /td/tr trtd labelDescription/label/tdtdtextarea name=desc cols=40 rows=5/textarea /td/tr trtd input name=submit type=submit value=Submit //td/tr /form /table /div div id=list ?php $beername = $_POST['beername']; $manu = $_POST['manu']; $type = $_POST['type']; $singles = $_POST['singles']; $six = $_POST['six']; $can = $_POST['can']; $bottles = $_POST['bottles']; $tap = $_POST['tap']; $size = $_POST['size']; $desc = $_POST['desc']; $ip= $_SERVER['REMOTE_ADDR']; $dbc = mysqli_connect('localhost','root','','rr')or die('Error connecting with MySQL Database'); $query = INSERT INTO beer (beername, manu, type, singles, six, can, bottles, tap, size, desc, ip ). VALUES ('$beername', '$manu', '$type', '$singles', '$six', '$can', '$bottles', '$tap', '$size', '$desc', '$ip' ); $result = mysqli_query($dbc, $query) or die('Error querying database.'); mysqli_close($dbc); I have tried something completely different, changed to mysql instead of mysqli and I put it up on my remote server/database, and it is still not behaving... mysql_connect('server','un','pw') or die(mysql_error()); mysql_select_db(db) or die(mysql_error()); mysql_query(INSERT INTO beer (beername, manu, type, singles, six, can, bottles, tap, size, desc, ip).VALUES .('$beername', '$manu', '$type', '$singles', '$six', '$can', '$bottles', '$tap', '$size', '$desc', '$ip' )) or die(mysql_error()); echo Data Inserted!; I am now getting this error message, but it does not make sense You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'desc, ip)VALUES ('', '', 'Imported', '', '', '', '', '', '', '', '68.80.24.11' at line 1 Does this mean I am getting closer to getting some actual work done today? Thanks again gary __ Information from ESET Smart Security, version of virus signature database 5706 (20101215) __ The message was checked by ESET Smart Security. http://www.eset.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php DESC is a reserved word in mysql ( http://dev.mysql.com/doc/refman/5.1/en/reserved-words.html ) Either change the field name or enclose the statement in backticks to prevent this error. Changing the field name is my recommended action -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] empty() in email message
On Mon, Dec 13, 2010 at 12:47 PM, Gary gp...@paulgdesigns.com wrote: I have an email message $msg = 'Name: $fname ' . ' $lname\n' . Phone: $phone\n . Email: $email\n and it works fine, however in this message there are about 30 variables that are being called...as such . Order: beefschnitzel $beefschnitzel\n . Order: beefstrips $beefstrips\n . Order: cheesesausage $cheesesausage\n . Order: crumbedsausage $crumbedsausage\n . Order: chucksteak $chucksteak\n . Order: cornedbeef $cornedbeef\n . Order: dicedsteak $dicedsteak\n . Order: filletmignon $filletmignon\n I want to only send the message if the submitter enters an amount in the form for the corresponding variable, instead of having a bunch of empty messages. So I have been trying to use the empty() function as such: . if empty($beefolives){''} elseif (isset($beefolives)) { 'Order: beefolives $beefolives\n'} But I am getting the error Parse error: syntax error, unexpected T_IF Can someone point me in the right direction? Thank you -- Gary __ Information from ESET Smart Security, version of virus signature database 5699 (20101213) __ The message was checked by ESET Smart Security. http://www.eset.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Less complication is better, reduce the code to the below. The empty portion needs to be inside the parentheses. Also double quotes are needed to make the vairable parse correctly into the value you want to see if (!empty($beefolives)) { echo Order: beefolives $beefolives\n;} -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Can't find existing file
On Thu, Nov 25, 2010 at 9:07 AM, Richard Quadling rquadl...@gmail.com wrote: On 25 November 2010 00:14, Tommy Pham tommy...@gmail.com wrote: -Original Message- From: paras...@gmail.com [mailto:paras...@gmail.com] On Behalf Of Daniel P. Brown Sent: Monday, November 22, 2010 12:08 PM To: Dee Ayy Cc: PHP General Subject: Re: [PHP] Can't find existing file snip so how are we to know?); (h) some other PEBKAC issue; snip It's been almost a decade since I've seen 'PEBKAC' used :) I prefer PICNIC. So you can now have a Senior Picnic or a Kiddies Picnic and it all sounds quite pleasant. -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php i like that. PICNIC -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Suppressing error from displaying
On Wed, Nov 24, 2010 at 2:13 PM, Ron Piggott ron.pigg...@actsministries.org wrote: I am using this syntax to check for a valid e-mail address list($userName, $mailDomain) = split(@, $buyer_email); if (checkdnsrr($mailDomain, MX)) { if no domain is provided ( ie e-mail address is something like “ron” with no @ ) the following error is displayed: Warning: checkdnsrr() [function.checkdnsrr]: Host and type cannot be empty Can I suppress this from displaying so *just* my error message displays? Ron The Verse of the Day “Encouragement from God’s Word” http://www.TheVerseOfTheDay.info if ( @checkdnsrr($mailDomain, MX) ) { might work.. the @ symbol usually suppresses the error -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Securing Use of PHP site
On Wed, Nov 17, 2010 at 8:21 AM, Nicholas Kell n...@monkeyknight.com wrote: On Nov 17, 2010, at 6:51 AM, Don Wieland d...@dwdataconcepts.com wrote: Hello all, I have recently built a site using PHP. I was a little loose with GET and POST methods because I was using it for personal/private use. Now I am thinking of going public and allow different companies to use the site. I want to secure and hide as much data as possible to guard against user abuse. I have several instances where I use the GET method to pass IDS. I can use a POST but even that is visible in the source. How does one allow for processing but never really let the user see that actual ID? Do I use a HASH for IDs? Do I need to get more familiar with SESSION VARS. I am doing some experimenting. Any words of wisdom or resources would be helpful. Thanks! Don Wieland D W D a t a C o n c e p t s ~ d...@dwdataconcepts.com Direct Line - (949) 336-4828 Integrated data solutions to fit your business needs. Need assistance in dialing in your FileMaker solution? Check out our Developer Support Plan at: http://www.dwdataconcepts.com/DevSup.html Appointment 1.0v9 - Powerful Appointment Scheduling for FileMaker Pro 9 or higher http://www.appointment10.com For a quick overview - http://www.appointment10.com/Appt10_Promo/Overview.html A hash is useful, but I think you are on the right track with session vars. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I use both. Hashes to id the record, and session vars to hold the user permission sets. -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] protecting email addresses on a web site
On Tue, Nov 16, 2010 at 3:36 PM, Grega Leskovšek legr...@gmail.com wrote: I tried this: ?php echo span class=\safety\sssa/moc.li...@ood.sulpcoj\moc.li...@ood.sulpcoj:otliam\=ferh a/span; ? and css: .safety { direction:rtl; unicode-bidi: bidi-override; } for the address jocplus@gmail.com but I haven't managed it to display properly Could someone please direct me, I believe if I put the a class=safety href=mailto:jocplus@gmail.com;vicaversa/a... it does not really protect the email address, because in mailto: it has to be as defined jocplus@gmail.com Thanks, -- When the sun rises I receive and when it sets I forgive - http://moj.skavt.net/gleskovs/ Always in Heart, Grega Leskovšek 2010/6/15 Ashley Sheridan a...@ashleysheridan.co.uk: On Tue, 2010-06-15 at 13:02 -0400, HallMarc Websites wrote: -Original Message- From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk] Sent: Monday, June 14, 2010 10:52 AM To: Dotan Cohen Cc: HallMarc Websites; David Mehler; php-general Subject: Re: [PHP] protecting email addresses on a web site On Mon, 2010-06-14 at 17:50 +0300, Dotan Cohen wrote: On 14 June 2010 15:36, HallMarc Websites sa...@hallmarcwebsites.com wrote: Another is a CSS solution where you type the email address backwards and then use the CSS style declaration: style=direction: rtl; unicode-bidi: bidi-override; How does that work with screen readers? How about copy-paste? I don't think there's an accessible way of doing this. Anything that allows a screen reader to speak the email address would also be susceptible to spammers email scrapers. Thanks, Ash http://www.ashleysheridan.co.uk Copy-n-paste just gives you the email address backwards; screen readers, because we are using logical ordering and it is stored in memory the way we expect to read it, will read it correctly. I was not aware that email harvesters used screen readers. Do you have some documentation I could read to get up to speed on this? Marc Hall HallMarc Websites So many spammers, so few bullets... __ Information from ESET Smart Security, version of virus signature database 5199 (20100615) __ The message was checked by ESET Smart Security. http://www.eset.com I didn't say the harvesters used screen readers. I'm saying that if something is in plain text that a screen reader can understand, what's to stop an email address harvester? It's not worth their time to analyse every image (think about where Google is with image searching right now, and they have a lot more resources at their disposal) but it is easy enough to read text in a web page. At a push, it's possible to believe that some might be using rendered CSS to see how an email is rendered. Thing is, it's nigh on impossible to hide an email address. Use it once on a mailing list like this and it's there for the whole world to see on archive listings. I even though that my email wouldn't be found in a .pdf CV I'd made, but thanks to Google it is now! Basically, it might not be worth the effort to hide email addresses, and instead see about setting up spam filtering at the server level. You don't have to download and filter it your end, and it saves on bandwidth. Thanks, Ash http://www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Why not just make a simple contact form and never show the address? -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Retrieving function values
On Sun, Nov 14, 2010 at 10:12 PM, Ron Piggott ron.pigg...@actsministries.org wrote: I am writing a custom function and I need to be able to retrieve 3 values from it. string_parse_tool ( $string_to_parse ) The 3 variables I need to retrieve from the function are: $string_to_parse $string_to_display $continue_parsing I only know how to retrieve 1 variable from a function, not 3. Could someone help me please? Thank you. Ron 2 options Pass them back as an array $data['parse'] = some value; $data['display'] = some value; $data['continue'] = some value; return $data; or send it back as a delimited string $data = $parse .'|'. $display .'|'. $continue; return $data; -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Template engines
On Mon, Nov 8, 2010 at 4:58 PM, Robert Cummings rob...@interjinn.com wrote: On 10-11-08 04:51 PM, Steve Staples wrote: all of my projects now consist of smarty, pear mdb2, phpmailer, jquery, fpdf (if needed), and pchart (again, if needed). these are my personal choices, and I have been happy with them so far ;) pchart... *shudder*. I recently had to add support for variable line types (dots, dashes, combinations thereof)... I did a beautiful hackjob *lol*. Interesting to see others use it... the project seems to be dead. Cheers, Rob. -- E-Mail Disclaimer: Information contained in this message and any attached documents is considered confidential and legally protected. This message is intended solely for the addressee(s). Disclosure, copying, and distribution are prohibited unless authorized. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php We are using some flex components for charting. Very cool with lots of flexibility. Just pass in xml datasets -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Password protected directory
On Tue, Nov 2, 2010 at 1:05 PM, Ben Miller biprel...@gmail.com wrote: I need to access and read the files in a password protected directory with a PHP script using the readdir function. I'm already making users login to a secure area, so I don't want to make them enter a password again to access the files - is there a way to include the password with the readdir/opendir function with PHP? Thanks in advance. Ben assign a session key to the user and just check if that session key is set before using the standard account to access the file. Then the password can be held in the config file and the user never sees it -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP sockets enabled but socket_create() gives an error call to undefined function
On Mon, Nov 1, 2010 at 12:40 PM, crrr errr r.suy...@gmail.com wrote: Hello, I was trying to create a socket connection from a Solaris machine to a Red Hat machine to get the PATH in Red Hat machine remotely on Solaris machine and display it to the user. We have a PHP 5.1.6 installation on a Linux server (Apache) and PHP 5.2.6. on a Unix(Solaris) server(Apache) . The PHP version on Solaris is compiled with --enable sockets and phpinfo() displays that the sockets are enabled. In spite of this we get the following error when using this piece of code from the Solaris machine. The error: PHP Fatal error: Call to undefined function socket_create() in /XXX/ 5server.phphttp://cad.njit.edu/u/d/x/dx8/public_html/clunk/swsearch5server.php on line 21 The code; ?php set_time_limit(0); //ip of the server $addr = 'xxx.xxx.xxx.xxx'; //port of the server $port = 2xxx; //create a socket $sock = socket_create(AF_INET, SOCK_STREAM, SOL_TCP); /* This is line no 21 in the code. i have ommitted a few header comments */ //bind this socket with the above ip and port $ret = socket_bind($sock, $addr, $port); do { $ret = socket_listen($sock, 10); $msgSock = socket_accept($sock); $buf = socket_read($msgSock, 1024); Please let me know if you need any further details I might have missed. Thank you. Suyash Ramineni check phpinfo() to see if the sockets have been activated in the ini file. -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] form post question
On Thu, Oct 28, 2010 at 10:12 AM, Jack jacklistm...@gmail.com wrote: I have a form which has the following: ( quick clip ) form id=form1 name=form1 method=post action=http://www.abc.com/processing/process_form.php; onSubmit=return preSubmit(); label input name=area_interest type=checkbox id=field13 value=Peer Guide / Peer Guide/label br / label input type=submit value=Submit / When the form runs process_form.php it emails the content and has several other fields from the form, but I have some fields like the one above that don't show up in the result. The script that builds the message looks like the below $temp_message .= Area(s) of Interest: . $_POST['area_interest'] .\n; Is there anything obvious that I am missing? Is there a way for me to show all the fields from the form, and their field names which are received by process_form? Thanks! Jack -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Check boxes (assuming you have more than one in the set) are generally coming in as an array. You can see this by running this echo pre; print_r($_POST); echo /pre; to see the entire post array -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reply to an EMAIL get posted in a mySQL TABLE
On Thu, Oct 28, 2010 at 1:24 PM, Don Wieland d...@dwdataconcepts.com wrote: Hi gang, I use a Project Management System (PM) that generates emails to my account. I can REPLY to that email and it will be inserted into the PM. I believe the ID is in the subject. I assume the email is sent to a specified email and there is a CRON JOB that runs a PHP script to query and parse the new emails and insert them in to DB. Obviously a cool feature, that I want to use in a few of my web apps. Anyone have any tips/resource links or a product I can use to do this. Any feedback is appreciated! Don -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This article from evolt is a great place to start http://evolt.org/incoming_mail_and_php?from=50comments_per_page=50 Reading from an email box is not tough. -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Forcing Download - IE Issue
On Wed, Oct 27, 2010 at 4:18 PM, Floyd Resler fres...@adex-intl.com wrote: I'm trying to force a download using the following code: header('Content-type: text/calendar'); header('Content-Disposition: attachment; filename=calendar.ics'); echo $calendar; It works great in all browsers except IE. In IE, the window opens and then closes without ever display the download save window. I'm not sure why it isn't working in IE. Thanks! Floyd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Have a look at the headers page in the manual http://php.net/manual/en/function.header.php There are a number of examples that talk about downloading for IE (it blows as doing that) -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Character encoding hell
On Tue, Oct 26, 2010 at 1:32 PM, Mari Masuda mbmas...@stanford.edu wrote: On Oct 26, 2010, at 10:10 AM, Marc Guay wrote: A windows server, or windows client to the same Linux server? I believe that this issue is starting to get a bit over my head, with the different operating systems involved and such. Windows server. This is over my head, too. I'm guessing that Windows and Linux encode filenames differently and when I transferred the file from one to the other, some kind of adjustment was made. Marc I think one way to do this is something like this (untested): 1. Put all of your files in some directory on the server. 2. Change your a href=http://example.com/encoded-file-name.pdf;my file/a to a href=http://example.com/download-file.php?fileID=xxx;my file/a where xxx is the urlencoded version of encoded-file-name.pdf. (xxx could also be a fileID number if stored in a database.) 3. In download-file.php do something like this: ?php $parent_directory = /path/to/parent/directory/; // can be in or out of web root if (file_exists($parent_directory . encoded-file-name.pdf)) { $data = file_get_contents($parent_directory . encoded-file-name.pdf); $file_name_with_french_chars = rawurldecode(encoded-file-name.pdf); header(Content-type: application/octet-stream); header(Content-disposition: Attachment; filename=\$file_name_with_french_chars\); // this line assigns the nice looking name as the file name echo $data; } ? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This approach is what I wanted to suggest as well. You can simulated a db with an XML file if you wanted to and even assign the IDs as numerical to make life really easy -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reminder On Mailing List Rules
On Fri, Oct 22, 2010 at 9:22 AM, Jay Blanchard jblanch...@pocket.com wrote: [snip] really makes me question remaining a member...it's been a close thing a few times in the last week. [/snip] $door = new door(large, heavy, swift); $door-open(); $door-hitArse(); $door-close(); C'mon, the rudeness out weighs the good of this list? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Maybe its been a stressful week for all. I know mine has been. Its Friday, let's relax, take a breath and get back to what we all love, PHP! -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reminder On Mailing List Rules
On Fri, Oct 22, 2010 at 12:46 PM, Jay Blanchard jblanch...@pocket.com wrote: [snip] I read some place that the first one to mention Nazi's lose the argument. [/snip] Nah, it is just proof of, as mentioned before, Godwin's Law (http://en.wikipedia.org/wiki/Godwin%27s_law) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Watch our previous prime minister explain proof http://www.youtube.com/watch?v=aX6XMIldkRUfeature=related -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Entity 'reg' not defined
On Fri, Oct 22, 2010 at 2:28 PM, Richard Quadling rquadl...@gmail.com wrote: On 22 October 2010 19:01, TR Shaw ts...@oitc.com wrote: On Oct 22, 2010, at 1:56 PM, Ashley Sheridan wrote: On Fri, 2010-10-22 at 12:03 -0400, Adam Richardson wrote: On Fri, Oct 22, 2010 at 11:47 AM, TR Shaw ts...@oitc.com wrote: Anyone have an idea how to work around this? I tried: define ('reg', '®'); define ('reg;', '®'); can't figure how to override the entity table. Errors follw: Warning: simplexml_load_string(): o.cc/46/e53d68e007fd45c2fccb502f2e7ccad5.php?user_id=47amp;sub_id=61862469reg; in checkifup.php on line 5119 Warning: simplexml_load_string(): ^ in checkifup.php on line 5119 Warning: simplexml_load_string(): Entity: line 220: parser error : Entity 'reg' not defined in checkifup.php on line 5119 Warning: simplexml_load_string(): /office/e53d68e007fd45c2fccb502f2e7ccad5.php?user_id=47amp;sub_id=89877485reg; in checkifup.php on line 5119 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Does doing a str_replace and changing it to the corresponding entity number (#174;) before parsing with simple_xml work? Here's a more robust function: http://www.sourcerally.net/Scripts/39-Convert-HTML-Entities-to-XML-Entities Adam This isn't a PHP error, it's an error with your XML. The regular HTML entities which you're used to such as reg; and copy; are not recognised in XML without first being declared as entities. The entities exist in HTML because just outputting those characters won't always work in a web browser (*Internet Explorer* *cough* *cough*) whereas XML was never meant to be displayed in a browser, but transformed and then output to a browser (among many other things) through XSLT. If you use the characters directly in your XML you should be fine with the parser, although you may have to make sure your document is saved in utf-8, as most of the entity characters are above the ascii range. Ash Its not my XML (reg; isn't a www standard anyway) but its the xml provided by the source I have to deal with and I can't change them so I guess I'll just read the xml and then run defensing string replacements. Thanks for everyone's help. Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php My xml file is ... ?xml version=1.0? tagreg;/tag Using different tools the error is always along the lines of ... This page contains the following errors: error on line 1 at column 11: Entity 'reg' not defined Below is a rendering of the page up to the first error. ?xml version=1.0? tag#ae;/tag This page contains the following errors: error on line 2 at column 8: CharRef: invalid decimal value Below is a rendering of the page up to the first error. The only thing I could do was ... ?xml version=1.0? tagamp;reg;/tag -- Richard Quadling Twitter : EE : Zend @RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Couldn't you cdata wrap that value? -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reminder On Mailing List Rules
On Thu, Oct 21, 2010 at 11:30 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Thu, 2010-10-21 at 10:25 -0400, Daniel Brown wrote: Hey, Folks; Just a gentle reminder after watching things get worse by the day: it is one of the rules of this and all official php.net mailing lists that you must not top-post. For anyone wondering just one of the reasons why we have this rule in effect, tab through this thread in the archives: http://www.mail-archive.com/php-general@lists.php.net/msg262390.html See how disastrous and headache-inducing it looks? You wouldn't put code together looking like spaghetti thrown at a wall and smashed into the carpet, especially knowing your clients and peers would see it, would you? It's a very similar situation here: your every word is being recorded in literally hundreds of places simultaneously, preserved as educational and professional reference material for current and future developers --- and not just in the PHP programming language, but in computer programming in general, as theories lend themselves to apply to other situations as well. Many of you take the time out of your busy schedules to voluntarily impart knowledge on people of varying degrees of skills and abilities, which is beyond commendable; so why not take just a couple of extra seconds to show pride in your participation, lead by example, and continue to set the bar high, rather than simply settling for the quickest Twitter-like R/T to a post? ;-P The ultimate goal here isn't to start a flame war (or even any further discussion on the subject for that matter), but to point out that this is a RULE of the official community here, not a PREFERENCE. P.S. - Those of you who have been around for years will likely recall with some fondness the level of respect, participation, and quality of discussions this list once had; the degree of mutual respect and camaraderie was palpable. If you're wondering if those days have really diminished into little more than granular memory, it's not just you --- check the following graph for some rather disturbing evidence: http://dir.gmane.org/gmane.comp.php.general -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ I always bottom post when I'm replying from my computer, but when on the move or at work, I'm only left with my Android, and the default email client doesn't allow reply positioning of any sort, so it's always top-posting :( Does anyone know of any decent email clients for Android that allow bottom posting that you maybe use or have had experience with? Thanks, Ash http://www.ashleysheridan.co.uk iphone has the same problem. Cutting and pasting is the only way that i have of dealing with it...and I do try to accommodate that when i can -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reminder On Mailing List Rules
On Thu, Oct 21, 2010 at 10:47 AM, Daniel Brown danbr...@php.net wrote: On Thu, Oct 21, 2010 at 10:41, Robert Cummings rob...@interjinn.com wrote: I can't speak for everyone here (or who is no longer here)... but my posts have dwindled significantly due to work and family time constraints :| Same here, but isn't it a bit eerie that many of us hit that same point almost simultaneously? Richard Lynch, Lester Caine, Jochem Maas, Jim Lucas, the Nathans (Rixham and Nobbe), yourself, myself - even Tedd Sperling and Jason Pruim, among many others - seemed to all fall off the face of the virtual earth at about the same moment. Then again, I suppose that's how generations work. -- /Daniel P. Brown Network Infrastructure Manager Documentation, Webmaster Teams http://www.php.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Parenting ruins everything ;-) -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Reminder On Mailing List Rules
On Thu, Oct 21, 2010 at 4:33 PM, Michael Shadle mike...@gmail.com wrote: On Thu, Oct 21, 2010 at 1:21 PM, Nathan Nobbe quickshif...@gmail.com wrote: what does syntax highlighting have to do w/ a mess of text that could be sorted out by folks willing to take the extra 2 seconds to put their thoughts at the bottom of a mail? i doubt there are any web-based lists that reorganize top-posted replies, but if you find one, id love to see it :P because it de-dupes or changes colors for the previous replies. and again - it doesn't take 2 seconds to clean up an email and throw a reply at the bottom on something like an iphone. that can take a while. at the end of the day, i don't give a crap how people post. i am able to read anyone's messages just fine. i don't know why anyone is complaining in the modern age. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php oh oh, here we go again...com'on Friday's not until tomorrow! -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Text messaging from the web
On Thu, Oct 14, 2010 at 11:50 AM, Larry Martell la...@software-horizons.com wrote: On Thu, Oct 14, 2010 at 9:45 AM, Paul M Foster pa...@quillandmouse.com wrote: Folks: Being fairly geezerly, I know almost nothing about this, so be gentle. Assuming someone entered information in a form on a website. Normally, you would email the responses to someone. But what if you wanted to send this information to a smartphone via text messaging? Is this possible, given normal programming tools (PHP/Javascript), or would you have to go through some commercial web to text messaging gateway? Does anyone know if this could be done, and how? You can send a text message via email: Verizon: 10digitphonenum...@vtext.com ATT: 10digitphonenum...@txt.att.net Sprint: 10digitphonenum...@messaging.sprintpcs.com T-Mobile: 10digitphonenum...@tmomail.net Nextel: 10digitphonenum...@messaging.nextel.com Cingular: 10digitphonenum...@cingularme.com Virgin Mobile: 10digitphonenum...@vmobl.com Alltel: 10digitphonenum...@message.alltel.com CellularOne: 10digitphonenum...@mobile.celloneusa.com Omnipoint: 10digitphonenum...@omnipointpcs.com Qwest: 10digitphonenum...@qwestmp.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Actually email doesn't work reliably with all providers. I was looking into this for a client project. The main issue is that some providers require the user to have a data plan since the message will arrive as email, as opposed to text. The other is that if there is enough traffic from your site, it may become marked as spam and future connections will be refused. The best is to hook up with an SMS provider who can provide the services at a reasonable cost (cell-trust or click-a-tell) and let them manage the SMS portion. You then need to code against their service, which is usually pretty easy -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Eclipse, Komodo, Netbeans, Zend Studio, PHP Storm, other?
On Wed, Oct 13, 2010 at 1:40 PM, James Diamond djdiam...@gmail.com wrote: Hey Mike, I use zend eclipse, love it. What I love about it is what I love about any IDE, code complete, project configurations, customizable preferences of the editor, etc. I have used Eclipse (Pre-Zend), Zend Eclipse, Zend Studio, Komodo, and Easyclipse. James On Oct 13, 2010, at 12:58 PM, Hansen, Mike wrote: I'm about to do a lot of work on an existing code base and I think I'd like to try an IDE. I currently use VIM for most editing. What IDE are you using? What do you like about the one you are using? Which ones have you tried? Mike -- 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 Netbeans and Notepad++ -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] tedd's Friday Post ($ per line)
On Thu, Oct 7, 2010 at 1:20 PM, tedd tedd.sperl...@gmail.com wrote: Hi gang: Several years ago I was involved in a court case where a programmers work was being evaluated to establish a dollar amount for the work done. The case was a dispute where the client wanted money back from a programmer for a discontinued project. The programmer simply wanted to be paid for the work he had done. This wasn't a case where anyone had done anything wrong, but rather a circumstance where two parties were trying to figure out who was due what. You see, the original client had been taken over by another company who put a halt to the project the programmer was working on. The new company claimed that because the project wasn't finished, then the programmer should pay back all the money he was paid up-front to start the project. However, while the project had not been finished, the programmer had indeed worked on the project for several months. The programmer stated he wanted to paid his hourly rate. But the new client stated that the up-front money paid had been based upon a bid and not an hourly rate. So, they were at odds as to what to do. The solution in this case was to place a dollar amount on the actual lines of code the programmer wrote. In other words, they took all of programmers code and actually counted the lines of code he wrote and then agreed to a specific dollar amount to each line. In this case, the programmer had written over 25,000 lines of code. What do you think he was paid? And with all of that said, what dollar amount would you place on your line of code? Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I bet it wasn't much., $.10 (ten cents) per line? -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] tedd's Friday Post ($ per line)
On Thu, Oct 7, 2010 at 4:51 PM, tedd tedd.sperl...@gmail.com wrote: At 6:50 PM +0100 10/7/10, a...@ashleysheridan.co.uk wrote: Surely it would have been a bit more sensible to work out the time the programmer had spent on the project and then calculate it as a percentage of the total time that programmer would spend on it to complete it (which might not be the whole duration of the project) Also, counting code lines seems unfair. I know it used to be this way, but its a bit like paying firemen based on the number of fires they put out; don't be surprised if arson figures go up! I would guess though that this fellow likely had to pay some of that initial outlay of cash back though, and would further assume the total price attributed to each line was no more than 3 or 4 cents (damb English androids don't have the cent character) Thanks, Ash As I said, this was a case that I worked on several years ago (20+). I was not the programmer, but rather a consultant for an attorney. The programmer wanted to have his payment based upon the hours he put it, but the client wanted proof of the programmers effort. Both were understandable positions. Considering that the programmers effort did not work, and there were no time clocks showing the actual hours the programmer worked, the solution centered on an evaluation of the end-product. That evaluation reduced to the amount of code written, which boiled down to lines of code. Granted, as Rob said, some lines are worth more than others, but overall a case was made to pay a certain amount per line. Now, back to the question at hand -- what price would you sell a line of your code for? Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Dr Evil Laugh One Beelyon Dollars -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Database Administration
On Fri, Sep 24, 2010 at 2:05 PM, tedd tedd.sperl...@gmail.com wrote: At 11:19 AM +0100 9/24/10, Tom Barrett wrote: On 22 September 2010 21:40, Bastien Koert phps...@gmail.com wrote: Not at all. What I would suggest is that you create a separate mysql user that is used exclusively by the script to do the create stuff. The regular application user account should not have those privileges at all. I'm not actually that familiar with DB admin to that extent. I have either app users with lock+crud on specific databases, or root. As a an aside, would you know if there is a level of permissions for a user between app and root that would be 'sensibly secure' (it will be MySQL 5)? Another option, if immediate response is not required, is to save this data into the system for a cron script with another user account to run. This was sort of my first instinct. I ponder writing a small daemon/cron that queries a database table (client list) and does all the 'build' bits. The main issue with cron is that the users would want a fairly immediate response. Seconds is acceptable, but a 5 minute cron might be too slow. Is there a reason for you not to place all the data in one DB and just separate them out based on user id, to ensure they only see their own data For legal reasons. Each client must have separate data. I need to be able to box up all the client data (containing multiple app instances) and be 100% sure that I am giving them all their data and nobody else's. On 23 September 2010 18:04, tedd tedd.sperl...@gmail.com wrote: No, but from what you've said, I don't think the end user must have privileges and the ability to create a database and tables. It sounds more like allowing the user to set up his own admin for acceptable users -- there's a big difference. So, what you need to define is what the client and his users want to do. From that, we can determine what they need. Depending on what you mean by 'the client', all the client side things are fine :) The web front-end I am working on here is for internal use only. To allow non-technical people to set up clients and their apps. The more I look into this, the more I am leaning towards some shell scripts for client management, invoking them by cron. Then if an immediate response is needed someone technical will have to manually run the cron job. It looks like the law of diminishing returns for me to build something really usable. The more I hear, the more confused I get. I still don't understand what your client is going to do? Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php @tedd, He wants not techie users to create new systems for their clients when they sign up. It involves creating a DB and he's wondering about security for that. The main part of the app needs the least priv's to run (select, update, insert [,delete]) while the creating the DB obviously takes more. The OP was asking how to best handle that since the he didn't want to give the main app DB user account more privs than needed. -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Database Administration
On Fri, Sep 24, 2010 at 2:26 PM, tedd tedd.sperl...@gmail.com wrote: At 2:09 PM -0400 9/24/10, Bastien Koert wrote: @tedd, He wants not techie users to create new systems for their clients when they sign up. It involves creating a DB and he's wondering about security for that. The main part of the app needs the least priv's to run (select, update, insert [,delete]) while the creating the DB obviously takes more. The OP was asking how to best handle that since the he didn't want to give the main app DB user account more privs than needed. Okay, what does creating new systems for their clients mean? What I want to know is specifically what these non-techie users intend to do? Please don't answer that they want to set up accounts for their clients because that is meaningless to me. That could mean anything. So, what specifically are these non-techie users going to do? Cheers, tedd -- --- http://sperling.com/ Create a DB schema, create and populate tables. -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Database Administration
On Fri, Sep 24, 2010 at 3:50 PM, Bob McConnell r...@cbord.com wrote: From: tedd At 2:36 PM -0400 9/24/10, Bastien Koert wrote: On Fri, Sep 24, 2010 at 2:26 PM, tedd tedd.sperl...@gmail.com wrote: At 2:09 PM -0400 9/24/10, Bastien Koert wrote: �...@tedd, He wants not techie users to create new systems for their clients when they sign up. It involves creating a DB and he's wondering about security for that. The main part of the app needs the least priv's to run (select, update, insert [,delete]) while the creating the DB obviously takes more. The OP was asking how to best handle that since the he didn't want to give the main app DB user account more privs than needed. Okay, what does creating new systems for their clients mean? What I want to know is specifically what these non-techie users intend to do? Please don't answer that they want to set up accounts for their clients because that is meaningless to me. That could mean anything. So, what specifically are these non-techie users going to do? Create a DB schema, create and populate tables. Creating a DB schema is not for non-techies -- you really need to know what you are doing to do this. But we all live with what we create. I suspect he actually means create a new table using a predefined schema. But unfortunately, he doesn't appear to know enough about the problem to be able to explain it. He is either in way over his depth, or hasn't done a very good job of defining his requirements. Bob McConnell The OP mentioned that each new client needed their own DB so that is how I took it. Having exactly the exact same tables in the structure with different names is just bad practice to. That just screams creating a multi-tenant DB. At work we do create each DB as a clone of a master table, but it is done manually and thankfully not that often. -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Database Administration
On Wed, Sep 22, 2010 at 4:35 PM, Tom Barrett t...@miramedia.co.uk wrote: Hmm.. I am familiar with PMA. I would for the purpose of this project consider it too technical for the target user base. The point is to create a GUI layer that would manage these things. For example, the 'add client' screen would ask for four things; name, description, username and password. Then behind the scenes a database would be created, the user created, permissions granted and a pre-configure set of tables built (and populated). My reservations come from security issues (which, as an aside, are also discussed about PMA), allowing a normal user account CREATE and GRANT on the database. Maybe I'm being too fuddy-duddy cautious. Not at all. What I would suggest is that you create a separate mysql user that is used exclusively by the script to do the create stuff. The regular application user account should not have those privileges at all. Another option, if immediate response is not required, is to save this data into the system for a cron script with another user account to run. Is there a reason for you not to place all the data in one DB and just separate them out based on user id, to ensure they only see their own data? -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] not able to connect to MySQL
On Mon, Sep 20, 2010 at 3:37 PM, MikeB mpbr...@gmail.com wrote: I have defined (just for testing) a user in my SQL named pubuser and granted it access to a database publications. Of course I also created the database and two tables. I can access and manipulate the tables via phpMyAdmin and I can log in to sql using pubuser via the command-line interface. I have the following php code: ?php // login.php $db_hostname = 'localhost'; $db_database = 'publications'; $db_username = 'pubuser'; $db_password = 'abc'; ? also I have a test web page: !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN html head meta http-equiv=Content-Type content=text/html; charset=UTF-8 titleConnect to SQL/title /head body ?php Echo Hello; require_once 'login.php'; echo got require; $db_server = mysql_connect($db_hostname, $db_username, $db_password); if (!$db_server) die(Unable to connect to MySQL: . mysql_error()); echo Congrats, it seems you have connected to the server br / host: $db_hostnamebr / user: $db_usernamebr / password: $db_password br / for database: $db_databasebr /; print_r($db_server); ? /body /html If I try to run this, it briefly says connecting to localhost and then indefinitely it says waiting for localhost... If I comment out the connect statement, the rest runs. What should I look for? Thanks MikeB -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php If you gave the priv through phpmyadmin, you might want to try running FLUSH PRIVILEGES to get those new ones to take effect. -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Invalid chars in XML
On Mon, Sep 20, 2010 at 4:07 PM, robert mena robert.m...@gmail.com wrote: Hi, I am trying to parse a XML file with simplexml_load but it gave me error. While inspecting the contents I found a inside the value of a tag. tagsomething something/tag. After I've removed the everything went fine. So which chars I should not put in my file? Should I use some conversion function like html_entities? Does the receiver of the XML has to do anything to convert is back? The following should not be used inside XML ampersand ' single quote double quote greater than less than you could simply wrap all your data in CDATA tags -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Auto-generating HTML
On Mon, Sep 20, 2010 at 4:52 PM, Andy McKenzie amckenz...@gmail.com wrote: Here's a related question maybe one of you can answer: is there any place in HTML (not PHP, but actually in HTML) where there's a difference between a single quote and a double quote? As nearly as I can tell, it shouldn't ever matter. If that's the case, using double-quotes to enclose an echo gets a lot simpler... -Alex -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php The standard suggests that double quotes are to be used for HTML attributes. It might be easier to use single quotes to wrap the whole set and therefore allow the user of double quotes in your output. My personal preference in what you are talking about is to have a view function that takes an array of data and perhaps errors and then shows the form with no other processing than maybe a loop. That way I can create the HTML as I please, copy and paste it into the function, and then do what ever I need to, to process the data before turning that into an array and passing it into the function function showForm($data, $errors){ ? Name: input type=text value=?php echo $data['name']; ? name=name ?php }//end function ? -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Looking for open source Learning Management System suggestions
On Tue, Aug 31, 2010 at 7:21 PM, Michael Shadle mike...@gmail.com wrote: Yes, there is Moodle. However, upon installing it, I found the admin UI to be extremely gaudy, counter-intuitive, and requires it's own learning system just to get it right (ha ha) Does anyone know of any other options out there? Obviously, open source is best, I'd even take some reasonably priced options though that allow for some extensibility. There should be the following capabilities: - Learning tracks - groups of courses/modules - Modules or courses - pages of content, videos, whatever, with or without quizzes and related test-like activities - Reporting / metrics - scores for individuals, groups - User authentication (obviously) - bonus if external authentication or some way to hook into external user auth - Not extremely hard to theme or customize the look - Users should be able to resume where they left off in courses - Mobile support (or some way it can be themed or made very usable for mobile devices, mainly iDevices) - Questions and answers can be randomized, allow for $x retakes, explain why their answer is wrong (or at least a reference to a URL) - Questions can be multiple choice, single choice, short answer, etc. It should be easy for an end user to take tests and move through courses, the course could just be a test - it doesn't necessarily need to be pages of content and such. It should be easy for teachers or course editors to be able to modify content and test questions and such. I develop web apps for a living (and have taken hundreds of online tests), and Moodle took me a few trial and errors before I figured out how to associate an answer to a question and then a question to a module, etc. - it also has so many options, it's hard to predict how your course will actually come out in the end. I'm open to suggestions about decently developed/supported modules for systems like Drupal as well. Thanks! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Our company built one on top of wordpress. You can easily build most of it with stock plugins and it has UIs for idevices...worth considering -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Storing Social Security Number WAS: Encryption/Decryption Question
On Thu, Aug 12, 2010 at 10:30 AM, tedd t...@sperling.com wrote: At 2:51 PM +0100 8/12/10, Ashley Sheridan wrote: If you are storing the data in a DB, then I'd consider using different levels of access to that via different DB users, which should offer an extra layer of security in protecting the data. Of course, the routines I'm writing provide several levels of access for different functions/job-duties. However, at some point there will be people who will have access to SS# data. The real questions here are: 1. Is it lawful in the USA to store US SS# in an online database? 2. If it is lawful, then what security provisions are required? Cheers, tedd -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php The worst part of that is that is varies by state (check the MA and NY laws as the most restrictive), there are no federal guidelines as yet. However, the data must be stored in an encrypted format and it must be transmitted via SSL. We do it that way (taking both a hash for searching for the ssn and the encrypted form) and haven't had any issues as yet. Some clients are simply refusing to store SSNs for any person in the system where the address is in MA. The other thing to consider is that more and more states are looking to encrypt PII data (name, dob, ssn etc) for more security. You could consider storing just the encrypted ssn and link data in a separate database, that would require a different logon to access when the data is required. -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Encryption/Decryption Question
On Thu, Aug 12, 2010 at 10:00 AM, tedd t...@sperling.com wrote: At 8:09 PM -0400 8/11/10, Bastien Koert wrote: From my experience, I'd have to say that it would be a real tough go to crack that. If there was a weak point in the scheme is that your end result pattern ( the ssn ) is defined with a pair of constants, the hyphens. In our scheme we remove the dashes and just provide a mask for display. We also keep a unique key with each ssn, the record number for extra security. The SS numbers can be stored in any format (with/without hyphens, reversed, transposed, predetermined mixing, whatever). Of course, there can be another field where a unique key is kept, but I'm not sure how that might improve security. Just adds another layer to it. Where to keep it is tougher, OWASP suggests that the keys be stored on another non web facing server, with a locked down filesystem. That would be best if you have the hardware available. So that I understand, you are talking about two web sites where one (domain1.com) would contain/run the scripts and the other (domain2.com) contained the keys. It would work like so: When the script launches in domain1.com, the script would ask (after authorization) domain2.com for the keys, which are kept in a locked directory. After which the Encryption/Decryption scheme would work. Is that it? correct One other option here is to load the keys into ram on server start up and never have them physically on the machine. I'm not sure as to how to make that work. But I assume that it requires a dedicated server, right? Yes, you would need a non web facing machine Cheers, tedd -- --- http://sperling.com/ -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Storing Social Security Number WAS: Encryption/Decryption Question
On Thu, Aug 12, 2010 at 11:32 AM, tedd t...@sperling.com wrote: At 10:56 AM -0400 8/12/10, Bastien Koert wrote: However, the data must be stored in an encrypted format and it must be transmitted via SSL. We do it that way (taking both a hash for searching for the ssn and the encrypted form) and haven't had any issues as yet. The data will be encrypted and only accessible behind an SSL via an authorization process -- that's given. I have given some thought about searching the database for encrypted SS#'s and have been perplexed as how to do that. For searching standard fields, it's a piece of cake to use %LIKE%. For example, let's say the investigator has a piece of paper that has the number 393 on it and want's to search the database for all phone numbers that contain 393 -- he could use %LIKE% and that would produce 517-393-, 393-123-4567, 818-122-4393 and so on. That's neat! However, if the field is encrypted, then how do you preform a partial search on that? You can't encrypt the search string and use that because you need the entire string. So, how do you solve that problem? If you hash the number of store the hash, then you can create a hashed search string and use that. But again it doesn't work for partial %LIKE% searches. For example, I couldn't search for 393 in a SS# -- I would have to search for the complete SS#. So, how do you solve the %LIKE% problem with encryption and hashes? We didn't...in our case the user either has the ssn or doesn't. No direct searching on ssn without the full ssn is supported. We do allow searching on names so its a work around that way. The other thing to consider is that more and more states are looking to encrypt PII data (name, dob, ssn etc) for more security. I'm considering that as well, but that also raises more searching problems as described above. You could consider storing just the encrypted ssn and link data in a separate database, that would require a different logon to access when the data is required. Interesting -- I might also hash the foreign link. But I have to think about that. Cheers, tedd -- --- http://sperling.com/ -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Encryption/Decryption Question
From my experience, I'd have to say that it would be a real tough go to crack that. If there was a weak point in the scheme is that your end result pattern ( the ssn ) is defined with a pair of constants, the hyphens. In our scheme we remove the dashes and just provide a mask for display. We also keep a unique key with each ssn, the record number for extra security. Where to keep it is tougher, OWASP suggests that the keys be stored on another non web facing server, with a locked down filesystem. That would be best if you have the hardware available. One other option here is to load the keys into ram on server start up and never have them physically on the machine. Bastien On 8/11/10, tedd t...@sperling.com wrote: Hi gang: Okay, a question to the Encryption/Decryption gurus out there. If you were given: 1. This encrypted string: p3IVhDBT26i+p4vd7J4fAw== 2. Were told it was a social security number (i.e., in the form of 123-45-6789). 3. And it had been generated from this code: $cipher = mcrypt_module_open(MCRYPT_TRIPLEDES,'','cbc',''); mcrypt_generic_init($cipher, $key1, $key2); $encrypted = mcrypt_generic($cipher,$social_security_number); 4. Where $key1 and $key2 are md5() values calculated from two different security phrases. 5. Where each security phrase contains multiple non-English words. What would it take for you to break the encrypted string and decipher the social security number? Can it be done? If so, how long? And lastly, where would the best place to store these security phrases? (Note: I didn't ask where would be the best place for me to put them.) :-) Cheers, tedd PS: No, the SS number in question is not 123-45-6789. :-) -- --- http://sperling.com/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Sent from my mobile device Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] [ERROR LOG FORMATTER] - any recommendations for web viewable error log formatters?
On Mon, Aug 9, 2010 at 3:12 PM, Tristan sunnrun...@gmail.com wrote: Looking for something that does error logs on the server. Thanks, T On Mon, Aug 9, 2010 at 12:59 PM, Peter Lind peter.e.l...@gmail.com wrote: On 9 August 2010 20:40, Tristan sunnrun...@gmail.com wrote: a client of mine use to have some color coded one but, I can't find it again. anyone using one that they particularly like? similar to this but was hoping for something in PHP http://www.psychogenic.com/en/products/Errorlog.php Thanks, T Xdebug formats errors, try installing that. Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind BeWelcome/Couchsurfing: Fake51 Twitter: http://twitter.com/kafe15 /hype Splunk http://www.splunk.com/ -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Converting HTML to PDF via PHP
On Wed, Aug 4, 2010 at 6:06 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Wed, 2010-08-04 at 17:33 -0700, Michael Calkins wrote: I have found various online tools that do this but nothing that has documented it as a tutorial so I can understand it. I found the html_to_pdf.inc.php script that is entirely undocumented so I am not sure how to use it exactly. I am trying to export generated HTML (an invoice for a customer) to a saveable PDF that is downloaded. Any ideas? From,Michael calkinsmichaelcalk...@live.com360-941-6750 As far as I'm aware, it's not as simple as it seems. Basically, HTML is subject to interpretation by the user agent (browser) so doesn't look consistent on all platforms. A PDF is meant to follow a fairly rigid format that defines exactly how the output should be displayed (as it's a presentational format) What you could do though, if you're already producing the HTML output, is to use the FPDF class to create the PDF you need, with appropriate calls made from within your existing PHP code. Thanks, Ash http://www.ashleysheridan.co.uk You can also look at dompdf from digitaljunkies.ca -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] the state of the PHP community
On Thu, Jul 29, 2010 at 5:19 PM, Nathan Rixham nrix...@gmail.com wrote: Bastien Koert wrote: On Thu, Jul 29, 2010 at 1:36 AM, Nathan Rixham nrix...@gmail.com wrote: Hi All, I find myself wondering about the state of the PHP community (and related community with a PHP focus), so, here's a bunch of questions - feel free to answer none to all of them, on list or off, or add more of your own - this isn't for anything specific, just out of interest and sure I (and everybody who reads the replies) will learn something + doors/options/contacts may come of it. The only thing I can guarantee is that I'm genuinely interested in every reply and will read every one of them + lookup every tech and link mentioned. in no particular order: What other languages and web techs do you currently use other than PHP? - if you include html or css please include version, if js then preferred libs, and whether client or server side. Classic ASP (ugh!) I'll reply in full shortly when I get a chance, but for now - condolences, sincerely - and thanks to the nice dates we currently have I can say: I give myself condolences every day! ;-) wow i remember using classic asp as my primary language a decade ago or: omg I wrote my first news admin system in classic asp at the turn of the century or even: omg I remember being stuck with classic asp in the last millenium! In all seriousness though: 1: how'd you manage to get stuck on classic asp still? maintaining old systems that won't shift? We are stuck for a couple of reasons: - lack of management vision to move on (one choice might be c# because its got the most examples in the msdn pages is the direct quote) - long lifecycle of the app (we just got told that we'll need to support it for the next 3-5 years and they keep selling it! I am pushing big time to move to php with the CodeIgniter framework with jQuery. The real trouble is that if we move this way, the VP won't be in charge because he doesn't have the knowledge to program in php, not that he's got it in c#! 2: has it changed much, if any? (last i used was chillisoft on cobalt raq4's!) Hasn't changed at all in 10 years. MS declared it dead and tried to turn it off in W2K3 server, but so many legacy apps run on it that it can't be shut down. It not supported any more and it sucks big time!!! Best, Nathan -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] the state of the PHP community
On Thu, Jul 29, 2010 at 1:36 AM, Nathan Rixham nrix...@gmail.com wrote: Hi All, I find myself wondering about the state of the PHP community (and related community with a PHP focus), so, here's a bunch of questions - feel free to answer none to all of them, on list or off, or add more of your own - this isn't for anything specific, just out of interest and sure I (and everybody who reads the replies) will learn something + doors/options/contacts may come of it. The only thing I can guarantee is that I'm genuinely interested in every reply and will read every one of them + lookup every tech and link mentioned. in no particular order: What other languages and web techs do you currently use other than PHP? - if you include html or css please include version, if js then preferred libs, and whether client or server side. Classic ASP (ugh!) JS (no libraries, but moving to jquery) What's your previous language/tech trail? see above Are you considering any new languages or techs, and if so which? - names / links Moving to C# (ughH!) Is PHP your hobby/interest, primary development language, just learning or? all of the above How many years have you been using PHP regularly? since 2003 How many years have you been working with web technologies? since 1995 Did you come from a non-web programming background? trained as an accountant Is your primary role web developer or designer? developer In your developer life, are you an employer, and employee, contractor, freelancer, part of a team of equal standing members? employee Do you tend to work on jobs for geo-local clients, clients in the same country, or do you work internationally 'on the web'? North America mainly, but the company is expanding into Europe How do you get your projects? do they come to you, word of mouth, do you hunt and bid for projects, code call, visit clients, target clients individually you think you can help, or? - not looking for trade secrets, just to get enough for an overall picture. word of mouth, lots of client visits Do you have any frustrations with the PHP community, do you find you want to talk shop but can't, or find people to work with but can't, have projects in mind you want to do but can't find people to do them with etc? none! great community Do you network with other PHP'ers in real life - meetups etc, do you tend to shy away, or do you find you circulate in other web related but non PHP focussed communities? wouldn't mind but have little time Are you a member or any other web tech communities, opensource efforts, or standardization bodies - again, if so which? play on a few forums Are there any efforts, projects or initiatives which are floating your boat right now and that your watching eagerly (or getting involved with)? CodeIgniter 2.0 is cool ps: please *do not* flame anybodies answers, that really wouldn't be fair. Best Regards, Nathan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Signing (hand-written signature) pdf document
We use a signature pad and dll from m2sys for something similar to this. It captures the signature, then creates a hash of the signature to store in the db. The only mobile app that I know that uses it is Square which is a mobile payment system. On 7/25/10, Tommy Pham tommy...@gmail.com wrote: -Original Message- From: Aurimas L [mailto:alaci...@gmail.com] Sent: Sunday, July 25, 2010 9:45 AM To: php-general@lists.php.net Subject: Re: [PHP] Signing (hand-written signature) pdf document Hello, have You found a solution for handwriten signature on the document? I am also looking for such solution for one PHP application. :) By the way, the signature must be created on mobile touchscreen as application is for smart phones. Thank You, Aurimas Ashley Sheridan-3 wrote: On Tue, 2009-10-13 at 20:07 -0700, nashrul wrote: Hi... I'm thinking about a document management system that can put user signature on the created digital document. Here's the app-flow I can imagine ... My php application creates a pdf document. The pdf document is displayed to user. Using the digital pen, the user will put his/her signature on this document. or Using the touch screen, the user will put his/her signature. The pdf document with the user signature is saved to the db. Has anyone done this before ?? Thanks -- View this message in context: http://www.nabble.com/Signing-%28hand-written-signature%29-pdf- docume nt-tp25884660p25884660.html Sent from the PHP - General mailing list archive at Nabble.com. A signature in a document is just an image. I've seen plenty of Flash apps which allow a user to draw something which is then saved as an image. You could then use this image file and either re-create the PDF document (easiest) or attempt to edit it and add the image in. Thanks, Ash http://www.ashleysheridan.co.uk -- View this message in context: http://old.nabble.com/Signing-%28hand- written-signature%29-pdf-document-tp25884660p29260834.html Sent from the PHP - General mailing list archive at Nabble.com. Digital copy of signature is recipe for identity theft crisis :) If you're doing ecommerce or related, you may want to look into PCI compliance... Regards, Tommy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Sent from my mobile device Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Image Replication
On Tue, Jul 20, 2010 at 10:35 AM, rehma...@gmail.com wrote: We are doing it with nfs mount which is mounted on all servers -- Shafiq http://shafiq.pk *** This Message Has Been Sent Using BlackBerry Internet Service from Mobilink *** -Original Message- From: Dan Joseph dmjos...@gmail.com Date: Tue, 20 Jul 2010 10:21:55 To: PHP eMail Listphp-general@lists.php.net Subject: [PHP] Image Replication Hi, I'm wondering how you all are doing image replication between servers. I've got some things in mind, but I'd like to see how others have done it. We have a PHP application that accepts an image upload, then we want it to show up on the other 2 web servers. We have 3 in a load balanced cluster. Linux servers. How did you go about it? -- -Dan Joseph http://www.canishosting.com - Unlimited Hosting Plans start @ $3.95/month. Promo Code NEWTHINGS for 10% off initial order -- Reseller Plans also available! http://www.facebook.com/canishosting http://www.facebook.com/originalpoetry -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Our app runs using a piece of SAN / NAS storage common to all servers -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] updating a database
On Wed, Jul 14, 2010 at 9:59 AM, David Mehler dave.meh...@gmail.com wrote: Hello, What i'm trying to do certainly doesn't seem hard conceptually, but coding it has been rough. I'm wondering if anyone has anything similar. I've got a database with records. The first time the page is accessed the submit button won't be selected, so display information about the record with a checkbox for selection. If a user selects a checkbox and hits submit, display only that specific record in a form for editing, once editing is complete feed the edited data back to the database. I'd like all this to be done in a single sticky file. If anyone has any code similar to this i'd appreciate getting a look, mine is nonworking. Thanks. Dave. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Are you passing back the id of the record that you want to see as the value for the checkbox? It should be a simple matter then of pulling just that id ?php //check and set the id $id = ''; if(!empty($_POST['id'])){ $id = (int)$_POST['id']; } $sql = select * from table where 1 ; if(!empty($id)){ $sql = and record_id = $id ; } //run query here ... ? -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Multiple Access Question
On Wed, Jul 7, 2010 at 8:47 PM, Paul M Foster pa...@quillandmouse.com wrote: On Wed, Jul 07, 2010 at 12:59:30PM -0400, tedd wrote: Hi gang: I have *my way* of handling this problem, but I would like to hear how you guys do it. Here's the problem -- let's say you have a database containing names and addresses and you want approved users to be able to access the data. As such, a user must login before accessing an editing script that would allow them to review and edit the data -- nothing complicated about that. However, let's say you have more than one user accessing the editing script at the same time and you want to make sure that any changes made to the database are done in the most efficient manner possible. For example, if two users access the database at the same time and are editing different records, then there's no real problem. When each user finishes editing they simply click submit and their changes are recorded in the database. However, if two (or more) users want to access the same record, then how do you handle that? Use a DBMS? I'm sorry if that seems flippant, but a DBMS handles this by queuing the requests, which is one of the advantages of a client-server DBMS. So maybe I don't understand your question. Paul -- Paul M. Foster -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php @Paul, The OPs question is about concurrency on the record itself. How to avoid two users accessing the same record and potentially damaging each others changes My approach is the same as Rob's. Flag it locked and let the second user gets a read only copy -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Attachment to email from form.
On Mon, Jun 28, 2010 at 12:10 PM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Mon, 2010-06-28 at 12:06 -0400, Paul M Foster wrote: On Mon, Jun 28, 2010 at 09:25:46AM -0400, Paul M Foster wrote: On Mon, Jun 28, 2010 at 01:53:47PM +0100, Richard Quadling wrote: On 28 June 2010 13:44, Brandon Rampersad brandon.add...@gmail.com wrote: fuck no On Mon, Jun 28, 2010 at 8:23 AM, Gary gp...@paulgdesigns.com wrote: Richard Thank you again for your kind help. Gary snip Enlightened criticism aside, why not? Or rather (as I'm willing to adapt) how? The last email from this Rampersad contained only the word no. This is the same person who routinely invites the whole list to chat with him. My evaluation is that Rampersad is a troll at best. He's being invited to my blacklist. I wouldn't pay attention to him. I wondered about something and just went back to check. Back on 13 June, this fellow replied to a similar post with a single word. The word was an incendiary racist insult, rhyming with the word diggers. I was stunned that anyone would do such a thing. And I just confirmed it was this fellow. Paul -- Paul M. Foster Yes, he did this also to me in a personal reply to a message I'd posted to the list. Thanks, Ash http://www.ashleysheridan.co.uk I've gotten a few from him as well. Total PITA! -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Attachment to email from form.
On Fri, Jun 25, 2010 at 9:59 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Fri, 2010-06-25 at 09:51 -0400, Gary wrote: I am trying to have an attachment to an email from a form. Email is working fine, am unable to get attachment. The attachment will be a word.doc. I am getting error message Warning: file_get_contents(attachment.zip) [function.file-get-contents]: failed to open stream: No such file or directory in /home/oneonel1/public_html/emailreminderresult.inc.php on line 24 Mail failed Line 24 reads: $attachment = chunk_split(base64_encode(file_get_contents('attachment.zip'))); here is the all of the code that I have removed the email addresses such. Can someone point me in the right direction? Thank you Gary ?php $fname=stripslashes($_POST['fname']); $lname=stripslashes($_POST['lname']); $email=stripslashes($_POST['email']); $comments=stripslashes($_POST['comments']); $ip= $_SERVER['REMOTE_ADDR']; $attachment = $_POST['attachment']; $attachment = $_FILES['attachment']['name']; $attachment_type = $_FILES['attachment']['type']; $attachment_size = $_FILES['attachment']['size']; //create a boundary string. It must be unique //so we use the MD5 algorithm to generate a random hash $random_hash = md5(date('r', time())); //define the headers we want passed. Note that they are separated with \r\n $headers = From: myemail\r\nReply-To: myemail.com; //add boundary string and mime type specification $headers .= \r\nContent-Type: multipart/mixed; boundary=\PHP-mixed-.$random_hash.\; //read the atachment file contents into a string, //encode it with MIME base64, //and split it into smaller chunks $attachment = chunk_split(base64_encode(file_get_contents('attachment.zip'))); //line 24 //define the body of the message. ob_start(); //Turn on output buffering //--PHP-mixed- echo $random_hash; //Content-Type: multipart/alternative; boundary=PHP-alt- echo $random_hash; //--PHP-alt- echo $random_hash; /* Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit */ //--PHP-alt- echo $random_hash; /* Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: 7bit */ //--PHP-alt- echo $random_hash; //--PHP-mixed- echo $random_hash; /* Content-Type: application/zip; name=attachment.zip Content-Transfer-Encoding: base64 Content-Disposition: attachment */ echo $attachment; //--PHP-mixed- echo $random_hash; //copy current buffer contents into $message variable and delete current output buffer $message = ob_get_clean(); //send the email $mail_sent = @mail( $to, $subject, $message, $headers ); //if the message is sent successfully print Mail sent. Otherwise print Mail failed echo $mail_sent ? Mail sent : Mail failed; echo Thank you for contacting b888!/bbr /br /; echo You have submitted the following information:br /br /; echo Name: $fname $lnamebr /; echo E-Mail Address: $emailbr /; echo Your comments or request: $commentsbr /br /br /; echo We have also sent you an e-mail to $email with the submitted information as well as our contact information for your convienience. br /br / Thank you for the opportunity to serve you!; /*This is the email message to submitter*/ $contact=888\n 888\n 888; $from_d=$email; $to_d=$email; $subject_d='Thank you from 888'; $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 . E-Mail Address: $email\n . Comments: $comments\n ; mail($to_d, $subject_d, $msg_d, 'From:' . $from_d); /*this is to form owner, */ $from=$email; $to=myemail; $subject=Submission from 888; $msg= This is a submission from 888com. \n\n . Clients Name: $fname . $lname \n . Email Address: $email\n . Comments: $comments\n ; mail($to, $subject, $msg, 'From:' .$from); ? __ Information from ESET Smart Security, version of virus signature database 5228 (20100625) __ The message was checked by ESET Smart Security. http://www.eset.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Your script can't find the attachment.zip file. As you're using a relative path to it, it should be in the same directory as your php script, or somewhere directly in the path environment variable. Also, make sure that the file has read properties set to allow Apache to read it. Thanks, Ash http://www.ashleysheridan.co.uk Consider using something like phpmailer to handle the emails. Makes attaching things really simple. http://phpmailer.worxware.com/ -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] How to store encrypted data and how to store the key?
On Wed, Jun 23, 2010 at 6:09 AM, Peter Lind peter.e.l...@gmail.com wrote: On 23 June 2010 10:09, Michael Shadle mike...@gmail.com wrote: On Wed, Jun 23, 2010 at 12:55 AM, Tommy Pham tommy...@gmail.com wrote: I haven't had to implement a scheme like this but for an app I'm working on we've been considering the same issues in order to keep member data safe. I would say your best bet is to keep the decryption key in memory while the This is something I'm very interested in hearing more about since our other discussion about PHP threads and how some list members prefer the 'share nothing' approach. That said, how would you access the memory for every individual sessions that need that decrypting code/key when nothing is shared? (I'm assuming that this would be purely in PHP :) +1. each server stores it locally in APC, or you have to mess with memcached, and since it is plaintext, encrypt that too? :p I -always- design for 'shared nothing' so this is a necessary discussion too, if in memory is the idea. In memory means that any of the php processes spawned by the server would have access to it. Encrypting it in memory really doesn't help you, as the php process would then decrypt it, bringing you back to square one: you just mimic the decrypting behaviour of a working php process to get the plaintext key. Shared nothing also doesn't help you - that just multiplies the amount of places the key is placed because you're still facing the same issue: the scripts need access to the key. You could possibly devise an authentication scheme by which a script could authenticate itself to a server that would then hand out the key ... but that's susceptible to other attacks as well. So I'd probably stick the key in memory, possibly memcached. I'd encrypt it but nothing special, just making sure that you cannot get the plaintext from memcached without digging through working php files to figure out how you decrypt it. Then I'd monitor the solution to see if anything *weird* was going on, wiping memcache if something strange comes up. As should be obvious, this doesn't solve the problems. Your number one priority is blocking access to the server. Number two is making sure that noone can use the data *if* they get access but without working scripts. If someone roots the server with everything up and running, there's really very little you can do. This is getting offtopic, though, if memory serves. I believe PCI has some strict requirements on how security should be implemented. You'll have to follow those and not other schemes that may be more or less secure. Regards Peter -- hype WWW: http://plphp.dk / http://plind.dk LinkedIn: http://www.linkedin.com/in/plind BeWelcome/Couchsurfing: Fake51 Twitter: http://twitter.com/kafe15 /hype -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Here are a couple of things which may help http://www.owasp.org/index.php/Cryptographic_Storage_Cheat_Sheet#Rule_-_Under_PCI_DSS_requirement_3.2C_you_must_protect_cardholder_data http://www.issociate.de/board/post/247319/Encryption_Key_Storage.html The biggest issue with it on web servers is simply time. If the key is too hard to get to, or unavailable due to a machine failure, then you are going to have pissed off customers/clients who won't be able to do much. The best solution is to store the CC data on a DB that is not web facing. That removes the need for the web app to hold the encryption key. You can store a hashed value, with the last 4 digits of the card and expiry on the web facing DB for any transaction processing verification. But those transactions should then move into a queue inside the secured network that is not web facing. This secured network can then take the data from the queue, find the appropriate record in the secured DB, unencrypt it and process it as normal transaction. Get back the verification of successful transaction and then queue that back into the web facing system for messaging the user. -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Invoice Software
On Wed, Jun 23, 2010 at 10:01 AM, Daniel P. Brown daniel.br...@parasane.net wrote: On Wed, Jun 23, 2010 at 09:52, Floyd Resler fres...@adex-intl.com wrote: Now that I'm finally landing some freelance PHP work, I am in need of some software that I can add clients, enter estimates, keep track of hours, and create invoices with. I'd like it to be Web-based. I could write my own, of course, but why do it if it's already done?! Does anyone know of such a package? Tons. I'd personally start by checking SourceForge, finding something that matches closely what you're trying to do, and then modifying it to match entirely. -- /Daniel P. Brown UNADVERTISED DEDICATED SERVER SPECIALS SAME-DAY SETUP Just ask me what we're offering today! daniel.br...@parasane.net || danbr...@php.net http://www.parasane.net/ || http://www.pilotpig.net/ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php freshbooks.com also handles that if you want to use a service -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP and schedules tasks/events
On Fri, Apr 16, 2010 at 4:20 PM, Don Wieland d...@dwdataconcepts.com wrote: Hi all, I am in need to schedule reminder emails and was wonder how to do this via PHP / mySQL For example, I would like to give my user the ability to sign-up for an event and have an email reminder generated X amount of time before the event. I appreciate any feedback on how to do this... Thanks! Don Wieland D W D a t a C o n c e p t s ~ d...@dwdataconcepts.com Direct Line - (949) 305-2771 Integrated data solutions to fit your business needs. Need assistance in dialing in your FileMaker solution? Check out our Developer Support Plan at: http://www.dwdataconcepts.com/DevSup.html Appointment 1.0v9 - Powerful Appointment Scheduling for FileMaker Pro 9 or higher http://www.appointment10.com For a quick overview - http://www.appointment10.com/Appt10_Promo/Overview.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Run a cronjob at midnight and send the email. Track who it got sent to, so you don't duplicate it. Easy peasy! -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Basic switch statement
On Thu, Apr 15, 2010 at 8:55 AM, tedd tedd.sperl...@gmail.com wrote: At 4:13 PM -0400 4/14/10, Al wrote: Incidentally, about formatting scripts, one of the reasons I like phpEdit is that it has a terrific code beautifier. You can set it for phpDoc or Pear rendering. And, it auto indents, etc. as you enter stuff. Al... Unfortunately, there is no phpEdit version for the Mac. Currently, I use GoLive (without all the WYSIWYG bloatware), but it limitations are showing. I like Eclipse, but the learning curve is high and has more features than I need. 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 Sorry, should have copied the list try netbeans http://netbeans.org/kb/articles/mac.html -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Still searching for a bugtracking system
On Tue, Mar 30, 2010 at 1:11 PM, Yousif Masoud yousif.mas...@gmail.com wrote: On Tue, Mar 30, 2010 at 2:13 PM, Andre Polykanine an...@oire.org wrote: Hello everyone, The best of all suggested bugtrackers is JotBug, on my opinion. But it works only with SQLite databases, and I have no access to such one (only MySql). Any solutions? [...] I use Eventum. So far, so good. http://dev.mysql.com/downloads/other/eventum/ Works fine with Maria DB too. http://ca.php.net/manual/en/sqlite.requirements.php shows that sqlite is a part of php as of version 5 -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Database vs. Array
What I usually do is to pull a limited set of records ( like 10 or 50 ) and the do the operations on them, update a column in that table to mark them completed and use JavaScript to reload the page and pull the next set out where that flag field is null. No memory issue, no need to large timeouts and it's self recovering. Bastien On Tuesday, March 16, 2010, Richard S. Crawford rich...@underpope.com wrote: I have a script that connects to an external database to process about 4,000 records. Each record needs to be operated on pretty heavily, and the script overall takes about half an hour to execute. We've hit a wall where the script's memory usage exceeds the amount allocated to PHP. I've increased the allotted memory to 32MB, but that's not ideal for our purposes. So my thought is, would it be more efficient, memory-wise, to read the database entries into an array and process the array records, rather than maintain the database connection for the entire run of the script. This is not an issue I've come across before, so any thoughts would be much appreciated. Thanks in advance. -- Richard S. Crawford (rich...@underpope.com) http://www.underpope.com Publisher and Editor in Chief, Daikaijuzine (http://www.daikaijuzine.com) -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Want to learn to work with Zend Framework?
On Fri, Mar 5, 2010 at 10:38 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Fri, 2010-03-05 at 10:41 -0500, Daniel Brown wrote: On Fri, Mar 5, 2010 at 10:28, Ashley Sheridan a...@ashleysheridan.co.uk wrote: And you get to adopt new ones if you don't like the ones you got? Yes, but you can't put any up for adoption by another family. -- /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! I sometimes wish it were possible. We're still talking about the family here, and not OSS yeah?! Thanks, Ash http://www.ashleysheridan.co.uk And no, you may not marry your first cousin. -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] xoops
On Thu, Mar 4, 2010 at 1:27 PM, Ryan Cunningham constructme...@gmail.com wrote: Hi all I am fairly new to the forum but I have a question that maybe I could get some input on, I have a client that is looking to run a new informational site. The basis of which allows visitors to post up their events or functions for free, the site will be geographically based by area, ie one for New York one for New Jersy etc. End user posts their article for their restaurant or gig bake sale etc, they can post pics and video as well as text all for free. site needs to include advertising areas for the income revenue stream portion of the site so would need rotating banner ads and headers etc. My client has been advised to use Xoops, I have not used xoops before, I am familiar with CMS from using Magento but obviously this is more leaning toward e commerce than informational. The site needs to be self managing as far as content, just with a moderator approving the postings. any feedback or maybe suggestions as to any other OS or PHP driven I could look at using or implementing for this site would be greatly appreciated. I need something stable and also expandable as there are many major corporate sponsors in the wings for this project, ie ATT, Dell etc etc -- -- Regards Ryan Cunningham 1 352 624 3262 constructme...@gmail.com www.constructmedia.com The information contained in this message may be privileged, confidential, and protected from disclosure. If the reader of this message is not the intended recipient, or any employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by replying to the message and deleting it from your computer. Thank you. Construct Media. CMI 2008 Please note all photo images should be sent in the largest highest quality format you have available, you also verify in sending the images they are free from copyright and usage terms and that you are the owner of such art work and are legally allowed to use this material. You agree that in supplying the artwork to Construct Media you shall not hold CMI responsible for any copyright infringement and or violation that may result from the finished article or any part there of. You also agree to allow Construct Media to use the images, and or manipulate them for artistic use in your work. You also agree that your work may be used in the capacity of previous work, Portfolio, or web examples to showcase our clients, in return for this usage all links to your URL will always remain in tact and you shall benefit from the free advertising.Construct Media. © CMI 2006-2010 Drupal, joomla or Wordpress could fit the bill nicely -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] App to put a whole PHP Site in CD/DVD
On Tue, Mar 2, 2010 at 6:11 AM, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Tue, 2010-03-02 at 08:12 -0300, Juan wrote: Hi, I need an application to run mysql/php/apache or similar in one cd, to make a presentation. The presentation itself is a php site that uses mysql to do some queries, to show data, and I would like to know how to embbed php and mysql to one cd for a presentation. I mean; one cd containing the whole site, and when the user inserts it on the cd/dvd reader it's able to use the website like if him/her would be using the http protocol. So, this application should let me put mysql/php/apache in the cd, then it should work from the cd. I would like to use some free software application, I would like to avoid using commercial branches because I need this for a commercial project that isn't able to pay licenses. Also I preffer Free Software. So, if you know some appplication that helps me to develop this, and also if I would be able to make the cd multiplatform for the principal OS ( Gnu/linux, win, mac ) even better. Thanks a lot. Juan If you want this sort of setup, then why not go with a live Linux CD/DVD that has the website on. You can lock the live OS down so that it is in what's called a kiosk mode, which should meet your requirements. Thanks, Ash http://www.ashleysheridan.co.uk Might wanna look at phpdock ( http://www.nusphere.com/products/phpdock.htm ) -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Accessing Windows File Comments
On Thu, Feb 25, 2010 at 9:59 AM, Floyd Resler fres...@adex-intl.com wrote: One of my users has asked if I can display comments with a file list on their site. So I thought I might be able to use the comments from the properties of the file. Is there any way I can access this from PHP? The files are actually stored on a Linux box. Thanks! Floyd -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php If you have access to read the files and the comments are clearly delineated, then its shouldn't be hard to open each file and then pull out the contents with regex or str parsing. You might want to store the data somehow, so that in the future you only have to read in the changed files. -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Advice on maintaining public and private files
On Fri, Feb 19, 2010 at 1:19 PM, Michael Stroh st...@astroh.org wrote: I have a site I'm working on with some data that I want to be readable by anyone, but some files that I want to keep hidden from outside users. Here is an example of my file structure. /products/data1/item_1/data.txt /products/data2/item_2/data.txt I would like everything in data1 to be available by anyone who visits the site, but I want to keep items in the data2 folder to only be accessible through certain web page which I hope to eventually require logins. Some of these items I'd like to not only display but also allow people to download. My main concern is that I don't want people to be able to guess the names of the files and then be able to access the information on them. Every 'item' has an entry in a MySQL database which holds some information. I was thinking I could have randomly generated folder names to take the place of the things like 'item_2' such as /products/data2/kl23j42i/data.txt and then link the folder name through a database entry. But I'm not sure if there are more elegant or easier ways to deal with this. Plus someone could still just try randomly querying the site until they get a match. I'd first like to just create a web page where you can go to access the hidden files but would later like to add more control for other users using logins and passwords. Most of my files are just text files and images. Any suggestions? Thanks in advance! Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Place all those files above the web root, the use php to read in the data from the files when display that data to the user. -- Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Excel Spreadsheets and PHP
You can also create an htnl table and excel will happily handle that as well. The real trick is to get IE to accept the stream as a file download. I find that I need to save the file first and the push the file down. On 2/19/10, Hansen, Mike mike.han...@atmel.com wrote: -Original Message- From: Ian Robertson [mailto:irobert...@americantextile.com] Sent: Friday, February 19, 2010 1:28 PM To: php-general@lists.php.net Subject: [PHP] Excel Spreadsheets and PHP Hello, everyone. Just a quick question. What are you using, if anything, to create Excel spreadsheets with PHP? Thank you in advance. Pear Spreadsheet Excel Writer. http://pear.php.net/package/Spreadsheet_Excel_Writer Mike -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Sent from my mobile device Bastien Cat, the other other white meat -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php