TechHui2024-03-28T17:22:59ZAnže Žnidaršičhttp://www.techhui.com/profile/AnzeZnidarsichttp://storage.ning.com/topology/rest/1.0/file/get/353372610?profile=RESIZE_48X48&width=48&height=48&crop=1%3A1http://www.techhui.com/group/php/forum/topic/listForContributor?user=3oilddznhxba1&feed=yes&xn_auth=noWhy does PHP get such a bad rap?tag:www.techhui.com,2011-04-22:1702911:Topic:800582011-04-22T06:02:54.932ZAnže Žnidaršičhttp://www.techhui.com/profile/AnzeZnidarsic
<p>When I first got into web design, all code seemed impressive (and intimidating!). I remember thinking PHP and MySQL would be good to learn once I got past the basics of HTML and CSS. There's such a large legacy of web projects that use PHP, most notably WordPress and Drupal. Since I wanted to focus on those content management systems, it seemed like the natural next step.</p>
<p> </p>
<p>The first time I took a PHP class, I was amazed at how intuitive it was. I felt like I was finally…</p>
<p>When I first got into web design, all code seemed impressive (and intimidating!). I remember thinking PHP and MySQL would be good to learn once I got past the basics of HTML and CSS. There's such a large legacy of web projects that use PHP, most notably WordPress and Drupal. Since I wanted to focus on those content management systems, it seemed like the natural next step.</p>
<p> </p>
<p>The first time I took a PHP class, I was amazed at how intuitive it was. I felt like I was finally understanding how things work "behind the scenes" on the server side.</p>
<p> </p>
<p>It was only later that I started hearing from programmers who put down PHP. Ruby on Rails is all the rage, and Python gets praise for its clean syntax. </p>
<p> </p>
<p>What prompted me to think about this again was a blog post: <a href="http://codefury.net/2011/04/why-php-was-a-ghetto/" target="_blank">Why PHP was a ghetto</a>. I liked how the author was honest about its shortcomings, while mounting a spirited defense:</p>
<p> </p>
<blockquote><p>When most developers learned Ruby, they were learning Rails and MVC at the same time. PHP was in use for a full 10 years before that. So there really wasn’t a period of time when heinous Ruby was being written by novices. There was an established standard in place for Rails, and the barrier to entry was a much higher, typically keeping less experienced developers out.</p>
</blockquote>
<p> </p>
<p>He makes the argument that frameworks like Zend and CodeIgniter have made PHP much more competitive with rival languages. I'd like to hear what TechHui members think about that.</p>
<p> </p>
<p>One part I found interesting was how a founder's personality permeates the programming language he invents:</p>
<p> </p>
<blockquote><p>Rasmus generally promotes abstention from using frameworks, and the use of PHP as more of a templating language. To him, this translates to raw speed and scalability (load-wise). To everyone else, this translates to piles of procedural spaghetti code, and unmaintainable projects. For roughly 10 years following the birth of PHP in 1995, this was how PHP projects were written.</p>
</blockquote>
<p> </p>
<p>That made me think of David Heinemeier Hansson, the founder of Ruby on Rails. Whatever else you might say about him, he is most definitely opinionated. And it shows in RoR.</p>
<p> </p>
<p>For further reading, here's another post: <a href="http://www.oreillynet.com/ruby/blog/2007/09/7_reasons_i_switched_back_to_p_1.html" target="_blank">7 reasons I switched back to PHP after two years on Rails</a>. Despite how the title sounds, that author doesn't bash Ruby on Rails.</p>
<p> </p>
<p>A programmer friend gave me this advice: "Start with PHP. But don't stop there. Learn as many languages as you can." </p> PHP Chatroom question - Real-time display?tag:www.techhui.com,2010-11-19:1702911:Topic:697982010-11-19T23:44:00.471ZAnže Žnidaršičhttp://www.techhui.com/profile/AnzeZnidarsic
I'm writing a PHP / MySQL chat room from scratch. I'm having trouble. The chat log does not display messages in real time. Each chat message is stored as a record in MySQL.<br></br><br></br>How do I make a PHP page update itself with new chat messages every time one is submitted?<br></br><br style="font-weight: bold;"></br><span style="font-weight: bold;">Here's what I've tried:</span><br></br><br></br><ul>
<li>Updated meta tag to refresh the PHP page -- entire page reloads even if no chat messages have been…</li>
</ul>
I'm writing a PHP / MySQL chat room from scratch. I'm having trouble. The chat log does not display messages in real time. Each chat message is stored as a record in MySQL.<br/><br/>How do I make a PHP page update itself with new chat messages every time one is submitted?<br/><br style="font-weight: bold;"/><span style="font-weight: bold;">Here's what I've tried:</span><br/><br/><ul>
<li>Updated meta tag to refresh the PHP page -- entire page reloads even if no chat messages have been submitted. Wastes too many resources.<br/></li>
</ul>
<br/><span style="font-weight: bold;">Here's what I'm thinking:</span><br/><br/><ul>
<li>Make Javascript monitor changes to the database</li>
<li>Create a trigger in MySQL to monitor changes</li>
</ul>
<br/>Has anyone had experience with this? Can you offer some advice?<br/><br/>David<br/><br/> PHP events in Hawaiitag:www.techhui.com,2010-11-19:1702911:Topic:697782010-11-19T08:50:55.758ZAnže Žnidaršičhttp://www.techhui.com/profile/AnzeZnidarsic
Hey,<br/><br/>are there any PHP events / local php group meetings? I'm new here so I'm searching for people who like to discuss geeky php/web development stuff and drinking beer (|| other alcohol) :)<br/>
Hey,<br/><br/>are there any PHP events / local php group meetings? I'm new here so I'm searching for people who like to discuss geeky php/web development stuff and drinking beer (|| other alcohol) :)<br/> PHP on IIS 5.1tag:www.techhui.com,2010-04-10:1702911:Topic:594222010-04-10T00:09:06.711ZAnže Žnidaršičhttp://www.techhui.com/profile/AnzeZnidarsic
Aloha All,<br/><br/>Recently, I tried to set up new installed XP with IIS and PHP. IIS works great, however I can't make that particular machine to be able to run PHP. every time I go to the site, localhost, it shows the 500 internal server error. Any thought or suggestion where should I go next?<br/><br/>Mahalo,<br/>Kemtis<br/>
Aloha All,<br/><br/>Recently, I tried to set up new installed XP with IIS and PHP. IIS works great, however I can't make that particular machine to be able to run PHP. every time I go to the site, localhost, it shows the 500 internal server error. Any thought or suggestion where should I go next?<br/><br/>Mahalo,<br/>Kemtis<br/> MYSQL injection cheat sheettag:www.techhui.com,2010-03-03:1702911:Topic:575722010-03-03T20:14:25.099ZAnže Žnidaršičhttp://www.techhui.com/profile/AnzeZnidarsic
I've just started working with PHP/MySQL in my Flash apps. As a noob, it's fun to build scripts that work...but now the specter of possible injection attacks has come across my radar and it's freaking me out. I'd welcome a discussion on security tactics, horror stories, or what you would like to do to a hacker if you found one. <br></br><br></br>For my part, I've set up a chron job to backup my data every day , use stripslashes and variable restrictors...but i know that motivated little twits have…
I've just started working with PHP/MySQL in my Flash apps. As a noob, it's fun to build scripts that work...but now the specter of possible injection attacks has come across my radar and it's freaking me out. I'd welcome a discussion on security tactics, horror stories, or what you would like to do to a hacker if you found one. <br/><br/>For my part, I've set up a chron job to backup my data every day , use stripslashes and variable restrictors...but i know that motivated little twits have workarounds to most things.<br/><br/><br/><br/><a href="http://http://ferruh.mavituna.com/sql-injection-cheatsheet-oku/">the injection cheat sheet to defend against attacks<br/></a> Spare some Scripts please ?tag:www.techhui.com,2010-01-12:1702911:Topic:552332010-01-12T09:18:13.617ZAnže Žnidaršičhttp://www.techhui.com/profile/AnzeZnidarsic
Aloha All !<br />
<br />
I need a script and cant seem to find one anywhere that will do the job. I am an ASP programmer (notepad all the way), not too familiar with PHP and still learning. From the research I have done so far, it looks like ASP cant do this, but PHP has built in functionality.<br />
<br />
All I need is to get a script that can look at email accounts (POP or IMAP) and give me some data :<br />
1) number of unread emails ( I had that working... sorta)<br />
2) date / time of last access to the email account (when…
Aloha All !<br />
<br />
I need a script and cant seem to find one anywhere that will do the job. I am an ASP programmer (notepad all the way), not too familiar with PHP and still learning. From the research I have done so far, it looks like ASP cant do this, but PHP has built in functionality.<br />
<br />
All I need is to get a script that can look at email accounts (POP or IMAP) and give me some data :<br />
1) number of unread emails ( I had that working... sorta)<br />
2) date / time of last access to the email account (when mail was last checked (or sent ?) )<br />
<br />
today I was looking through some of our OLD email accounts and found accounts with 20,000 spam messages and accounts that have not been used in over a year. I need to clear these off of our servers, but it will take forever to do them one at a time.<br />
<br />
Anyone have some spare scripts ?<br />
<br />
Thanks ! PHP framework preferencetag:www.techhui.com,2009-03-20:1702911:Topic:358442009-03-20T22:01:46.063ZAnže Žnidaršičhttp://www.techhui.com/profile/AnzeZnidarsic
I'm just wondering if anyone else uses a PHP framework like cakePhp or Zend framework in this group. I've been using Zend's framework for almost a year now. It's been an uphill battle for me since Zend's framework has changed so much just within a year, deprecating and adding APIs constantly. But I still prefer to use a PHP framework over none because a lot of the libraries are well documented; and I don't have to document what a particular class does. And when I create my own libraries, the…
I'm just wondering if anyone else uses a PHP framework like cakePhp or Zend framework in this group. I've been using Zend's framework for almost a year now. It's been an uphill battle for me since Zend's framework has changed so much just within a year, deprecating and adding APIs constantly. But I still prefer to use a PHP framework over none because a lot of the libraries are well documented; and I don't have to document what a particular class does. And when I create my own libraries, the framework's structure forces me to follow suit so it's easy for co-developers to follow and reuse my code.<br />
<br />
If any, what do you use or have used? And what successes or failures have you had? Looking for Helptag:www.techhui.com,2009-03-06:1702911:Topic:343962009-03-06T05:38:04.762ZAnže Žnidaršičhttp://www.techhui.com/profile/AnzeZnidarsic
Apologies if this is the wrong forum or area to post in.. I'm still new to TechHui. I'm looking for someone highly experienced in PHP and mySQL that would be willing to develop five or six pages worth of code. All the ideas are lined up and I've been trying to do it myself, but I'm more of a designer then programmer. Willing to pay if needed
Apologies if this is the wrong forum or area to post in.. I'm still new to TechHui. I'm looking for someone highly experienced in PHP and mySQL that would be willing to develop five or six pages worth of code. All the ideas are lined up and I've been trying to do it myself, but I'm more of a designer then programmer. Willing to pay if needed PHP4 class for S3 - need help with copytag:www.techhui.com,2009-02-24:1702911:Topic:334602009-02-24T07:08:09.392ZAnže Žnidaršičhttp://www.techhui.com/profile/AnzeZnidarsic
I'm working on a PHP4 class to use the REST protocol for <a href="http://docs.amazonwebservices.com/AmazonS3/latest/index.html">Amazon S3</a> that does not require CURL or PEAR HTTP_Request. I hadn't been able to find a PHP4 class that worked for me. I didn't want to use PEAR or CURL.<br />
<br />
So far, I've got putting objects to work. My next task was to work on copying objects. I have been trying for a couple days so far and I can't figure out what I'm doing wrong. I'd really appreciate someone's help…
I'm working on a PHP4 class to use the REST protocol for <a href="http://docs.amazonwebservices.com/AmazonS3/latest/index.html">Amazon S3</a> that does not require CURL or PEAR HTTP_Request. I hadn't been able to find a PHP4 class that worked for me. I didn't want to use PEAR or CURL.<br />
<br />
So far, I've got putting objects to work. My next task was to work on copying objects. I have been trying for a couple days so far and I can't figure out what I'm doing wrong. I'd really appreciate someone's help with getting the class to copy. My problem with copy is that the script times out and doesn't even get a response from Amazon.<br />
<br />
In my webapp, I have a photo album. I wanted to allow users to download original sized versions of photos. To prevent hotlinking, I want to copy a version of the file with private ACL and use content-disposition to prompt a download. Then I wanted to generate a signed GET url to refer to the download version of the image. XML library for phptag:www.techhui.com,2009-02-12:1702911:Topic:322672009-02-12T08:17:18.136ZAnže Žnidaršičhttp://www.techhui.com/profile/AnzeZnidarsic
Please pardon my ignorance here as I'm getting my feet wet again with development. I'm developing a PHP app that's traversing some xml docs, specifically an XML doc which is essentially outputting a few database records.<br />
<br />
I'm playing with the various php XML libs like simplexml, and DOMDocument, and slogging my way through it, having fun. But as I'm doing this I keep thinking that there's got to be a higher level php library that can transform an XML-based doc into a php array. I guess can I…
Please pardon my ignorance here as I'm getting my feet wet again with development. I'm developing a PHP app that's traversing some xml docs, specifically an XML doc which is essentially outputting a few database records.<br />
<br />
I'm playing with the various php XML libs like simplexml, and DOMDocument, and slogging my way through it, having fun. But as I'm doing this I keep thinking that there's got to be a higher level php library that can transform an XML-based doc into a php array. I guess can I code it myself but in my gut I know it's out there.<br />
<br />
My problem is that I don't know what kinds of terms to seach on or look for. Anybody got any ideas? The question is: "What kind of php lib decodes the content similar to the attached XML file, which is essentially the output of a few simple records, into a php array for further processing?"<br />
<br />
Pls let me know. Very much appreciated.<br />
<br />
Sample XML doc attached.