php-general Digest 3 Aug 2011 12:16:50 -0000 Issue 7426
php-general Digest 3 Aug 2011 12:16:50 - Issue 7426 Topics (messages 314288 through 314291): Re: testing 314288 by: Jim Giner 314289 by: admin.buskirkgraphics.com 314290 by: Jim Giner 314291 by: Al Administrivia: To subscribe to the digest, e-mail: php-general-digest-subscr...@lists.php.net To unsubscribe from the digest, e-mail: php-general-digest-unsubscr...@lists.php.net To post to the list, e-mail: php-gene...@lists.php.net -- ---BeginMessage--- Jim Giner jim.gi...@albanyhandball.com wrote in message news:6d.60.30104.5b968...@pb1.pair.com... Don't seem to be getting any feeds thru the newsgroup mirror(?). Ok - this showed up in my OE newsgroup, but OE still shows 36 more messages in php.general that I haven't/can't seem to retrieve. Is something wrong with the list-to-newgroup interface? ---End Message--- ---BeginMessage--- -Original Message- From: Jim Giner [mailto:jim.gi...@albanyhandball.com] Sent: Tuesday, August 02, 2011 5:25 PM To: php-gene...@lists.php.net Subject: [PHP] Re: testing Jim Giner jim.gi...@albanyhandball.com wrote in message news:6d.60.30104.5b968...@pb1.pair.com... Don't seem to be getting any feeds thru the newsgroup mirror(?). Ok - this showed up in my OE newsgroup, but OE still shows 36 more messages in php.general that I haven't/can't seem to retrieve. Is something wrong with the list-to-newgroup interface? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php I was thinking the same thing I have none myself. ---End Message--- ---BeginMessage--- - Original Message - From: ad...@buskirkgraphics.com To: 'Jim Giner' jim.gi...@albanyhandball.com; php-gene...@lists.php.net Sent: Tuesday, August 02, 2011 6:01 PM Subject: RE: [PHP] Re: testing I was thinking the same thing I have none myself. Your response did show up in my newsgroup. But that's the first since the 26th. ---End Message--- ---BeginMessage--- On 8/2/2011 5:18 PM, Jim Giner wrote: Don't seem to be getting any feeds thru the newsgroup mirror(?). This newsgroup has been a mess for almost a year now. One big problem is that the server only accepts a small number of connections, for just some mail clients, eg Thunderbird; but works for others. My Thunderbird works flawlessly for numerous other newsgroups. I've posted 2 or 3 bug reports, no response! ---End Message---
[PHP] Re: testing
On 8/2/2011 5:18 PM, Jim Giner wrote: Don't seem to be getting any feeds thru the newsgroup mirror(?). This newsgroup has been a mess for almost a year now. One big problem is that the server only accepts a small number of connections, for just some mail clients, eg Thunderbird; but works for others. My Thunderbird works flawlessly for numerous other newsgroups. I've posted 2 or 3 bug reports, no response! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: testing
Al n...@ridersite.org wrote: On 8/2/2011 5:18 PM, Jim Giner wrote: Don't seem to be getting any feeds thru the newsgroup mirror(?). This newsgroup has been a mess for almost a year now. One big problem is that the server only accepts a small number of connections, for just some mail clients, eg Thunderbird; but works for others. My Thunderbird works flawlessly for numerous other newsgroups. I've posted 2 or 3 bug reports, no response! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This newsgroup is actually a mailing list. Thanks, Ash http://www.ashleysheridan.co.uk -- Sent from my Android phone with K-9 Mail. Please excuse my brevity. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Best editor?
Hey everyone, I am a super newbie just beginning to learn PHP. Awhile ago, I had used aptana for dabbling with php and was amazed to find out that it had a built in php interpreter so I could do some minor testing without having to upload everything to a web server, or have a web server locally. Flash forward to now, and it looks like that functionality doesn't exist anymore (at least not by default). So, I'm curious what editors are out there? Are there any out there which will let me test PHP files without having to upload everything every time I edit it? Any help would be greatly appreciated. Thanks! -Matty -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best editor?
On Wed, 2011-08-03 at 09:22 -0400, Matty Sarro wrote: Hey everyone, I am a super newbie just beginning to learn PHP. Awhile ago, I had used aptana for dabbling with php and was amazed to find out that it had a built in php interpreter so I could do some minor testing without having to upload everything to a web server, or have a web server locally. Flash forward to now, and it looks like that functionality doesn't exist anymore (at least not by default). So, I'm curious what editors are out there? Are there any out there which will let me test PHP files without having to upload everything every time I edit it? Any help would be greatly appreciated. Thanks! -Matty I personally use Komodo IDE, but there are lots out there. There is the Eclipse with PHP, or there was the way I learned, NotePad (then switched to EditPlus+) Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Best editor?
I'm using PSPad since one year, and I'm very happy with it. With your description, I think it is the most simple way with it: Connect it with a webserver, and then you can edit all files right on the server, so if you save, they are live. PSPad is actually even a portable program, and there are lots of syntax highlighters, so this program is very nice! Date: Wed, 3 Aug 2011 09:32:34 -0400 From: msa...@gmail.com To: sstap...@mnsi.net CC: php-general@lists.php.net Subject: Re: [PHP] Best editor? Let me clarify a bit... I don't own my own machine - I'm using my work computer. I can install an editor, but installing a full fledged server would be verboten (like WAMP). And while its not hard to set up a VM in virtualbox, I'd prefer not to if I don't have to. I know the functionality of testing inside the editor used to be there, I'd just like to see if I can find it again :) If I have to, i'll just go the VM route. On Wed, Aug 3, 2011 at 9:26 AM, Steve Staples sstap...@mnsi.net wrote: On Wed, 2011-08-03 at 09:22 -0400, Matty Sarro wrote: Hey everyone, I am a super newbie just beginning to learn PHP. Awhile ago, I had used aptana for dabbling with php and was amazed to find out that it had a built in php interpreter so I could do some minor testing without having to upload everything to a web server, or have a web server locally. Flash forward to now, and it looks like that functionality doesn't exist anymore (at least not by default). So, I'm curious what editors are out there? Are there any out there which will let me test PHP files without having to upload everything every time I edit it? Any help would be greatly appreciated. Thanks! -Matty I personally use Komodo IDE, but there are lots out there. There is the Eclipse with PHP, or there was the way I learned, NotePad (then switched to EditPlus+) Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best editor?
I recommend Coda for Mac (about $100) as editor. And MAMP as a web server for testing PHP files locally. Jud Sent from my iPad Jud at bizville.com Phone 703-303-4271 On Aug 3, 2011, at 9:26 AM, Steve Staples sstap...@mnsi.net wrote: On Wed, 2011-08-03 at 09:22 -0400, Matty Sarro wrote: Hey everyone, I am a super newbie just beginning to learn PHP. Awhile ago, I had used aptana for dabbling with php and was amazed to find out that it had a built in php interpreter so I could do some minor testing without having to upload everything to a web server, or have a web server locally. Flash forward to now, and it looks like that functionality doesn't exist anymore (at least not by default). So, I'm curious what editors are out there? Are there any out there which will let me test PHP files without having to upload everything every time I edit it? Any help would be greatly appreciated. Thanks! -Matty I personally use Komodo IDE, but there are lots out there. There is the Eclipse with PHP, or there was the way I learned, NotePad (then switched to EditPlus+) Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Best editor?
Maybe an adittional information: PSPad is completely freeware and portable. You can download it right here: http://pspad.en.softonic.com/ This would be the best idea if you can't run a local server, because if there is an editor with this functionality built in, he'd have to bring a little local server with it, and I really don't know an editor which is able to do that without an external software. Regards and much fun ;) Flo From: florip...@hotmail.com To: msa...@gmail.com; sstap...@mnsi.net CC: php-general@lists.php.net Date: Wed, 3 Aug 2011 15:40:12 +0200 Subject: RE: [PHP] Best editor? I'm using PSPad since one year, and I'm very happy with it. With your description, I think it is the most simple way with it: Connect it with a webserver, and then you can edit all files right on the server, so if you save, they are live. PSPad is actually even a portable program, and there are lots of syntax highlighters, so this program is very nice! Date: Wed, 3 Aug 2011 09:32:34 -0400 From: msa...@gmail.com To: sstap...@mnsi.net CC: php-general@lists.php.net Subject: Re: [PHP] Best editor? Let me clarify a bit... I don't own my own machine - I'm using my work computer. I can install an editor, but installing a full fledged server would be verboten (like WAMP). And while its not hard to set up a VM in virtualbox, I'd prefer not to if I don't have to. I know the functionality of testing inside the editor used to be there, I'd just like to see if I can find it again :) If I have to, i'll just go the VM route. On Wed, Aug 3, 2011 at 9:26 AM, Steve Staples sstap...@mnsi.net wrote: On Wed, 2011-08-03 at 09:22 -0400, Matty Sarro wrote: Hey everyone, I am a super newbie just beginning to learn PHP. Awhile ago, I had used aptana for dabbling with php and was amazed to find out that it had a built in php interpreter so I could do some minor testing without having to upload everything to a web server, or have a web server locally. Flash forward to now, and it looks like that functionality doesn't exist anymore (at least not by default). So, I'm curious what editors are out there? Are there any out there which will let me test PHP files without having to upload everything every time I edit it? Any help would be greatly appreciated. Thanks! -Matty I personally use Komodo IDE, but there are lots out there. There is the Eclipse with PHP, or there was the way I learned, NotePad (then switched to EditPlus+) Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Syntax Question
I, too, am a super newbie. I have a beginning knowledge of being able to read php and understand its syntax but I can¹t write it. This is a bit complicated but here¹s my problem: I want to create a variable in PHP that I can use to link to an image in our museum's image website. We have done it with ColdFusion here but I need the same thing for PHP because I¹m building a site using a php-based CMS called Omeka. In ColdFusion the variable is written: cfset tmpImageDirectory = getToken(artwork.accessionNumber, 1, .) Basically, it¹s saying find the image on our server by looking for its accession number within the year directory. Since the first part of the accession number is the year we got the artwork this variable is saying look for the accession number in the year directory by first looking at the first part of that accession number (the year), look in that year directory and then use the entire accession number to find the image within that directory. An example of an accession number is 2011.15. That¹s saying that artwork was the 15th artwork brought into our collection in 2011. On our image server it will be found in a directory called 2011. (Am I making sense?) Then the Coldfusion call is: a href=http://ids.si.edu/ids/dynamic?container.fullpageid=http://americanart .si.edu/images/#tmpImageDirectory#/#artwork.accessionNumber#_1a.jpg (the 1a.jpg is simply the size image we want to call). I need to be able to do the same thing with PHP but have no idea how. More information: within my site I¹m housing the accession number in a mySQL database. I¹ve gotten a bit of help on this already (but not enough, that¹s why I¹m turning to you). I was told I need to create two variables [('Dublin Core','Identifier') is the name of the field that houses the accession number): $accessionNumber = item('Dublin Core','Identifier'); $tmpImageDirectory = strtok($accessionNumber,.); And then create a third variable to create a url variable $url = http://ids.si.edu/ids/dynamic?container.fullpageid=http://americanart.si.e du/images/ http://ids.si.edu/ids/dynamic?container.fullpageid=http://americanart.si.e du/images/$tmpImageDirectory/$artwork.accessionNumber_1a.jpg + $tmpImageDirectory + / + $accessionNumber + _1ajpg; That's as far as I've gotten. I don't know how to put all of these together using proper PHP syntax. Can someone help me with this? Thanks. Best, Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Syntax Question
-Original Message- From: Gates, Jeff [mailto:gat...@si.edu] Sent: Wednesday, August 03, 2011 10:23 AM To: php-general@lists.php.net Subject: [PHP] Syntax Question I, too, am a super newbie. I have a beginning knowledge of being able to read php and understand its syntax but I can¹t write it. This is a bit complicated but here¹s my problem: I want to create a variable in PHP that I can use to link to an image in our museum's image website. We have done it with ColdFusion here but I need the same thing for PHP because I¹m building a site using a php-based CMS called Omeka. In ColdFusion the variable is written: cfset tmpImageDirectory = getToken(artwork.accessionNumber, 1, .) Basically, it¹s saying find the image on our server by looking for its accession number within the year directory. Since the first part of the accession number is the year we got the artwork this variable is saying look for the accession number in the year directory by first looking at the first part of that accession number (the year), look in that year directory and then use the entire accession number to find the image within that directory. An example of an accession number is 2011.15. That¹s saying that artwork was the 15th artwork brought into our collection in 2011. On our image server it will be found in a directory called 2011. (Am I making sense?) Then the Coldfusion call is: a href=http://ids.si.edu/ids/dynamic?container.fullpageid=http://americ anart .si.edu/images/#tmpImageDirectory#/#artwork.accessionNumber#_1a.jpg (the 1a.jpg is simply the size image we want to call). I need to be able to do the same thing with PHP but have no idea how. More information: within my site I¹m housing the accession number in a mySQL database. I¹ve gotten a bit of help on this already (but not enough, that¹s why I¹m turning to you). I was told I need to create two variables [('Dublin Core','Identifier') is the name of the field that houses the accession number): $accessionNumber = item('Dublin Core','Identifier'); $tmpImageDirectory = strtok($accessionNumber,.); And then create a third variable to create a url variable $url = http://ids.si.edu/ids/dynamic?container.fullpageid=http://americanart .si.e du/images/ http://ids.si.edu/ids/dynamic?container.fullpageid=http://americanart .si.e du/images/$tmpImageDirectory/$artwork.accessionNumber_1a.jpg + $tmpImageDirectory + / + $accessionNumber + _1ajpg; That's as far as I've gotten. I don't know how to put all of these together using proper PHP syntax. Can someone help me with this? Thanks. Best, Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php $url = http://ids.si.edu/ids/dynamic?container.fullpageid=http://americanart.si.e du/images/ http://ids.si.edu/ids/dynamic?container.fullpageid=http://americanart.si.e du/images/. $tmpImageDirectory ./. $artwork .accessionNumber_1a.jpg . $tmpImageDirectory ./. $accessionNumber ._1ajpg; I am not sure I agree with the way you are setting the $url it looks like you have mashed and a url hyperlink partially into 1. Like you are trying to set the $url as a image with a link are you trying to set a link or an image as the $url? If you are trying to set a image as the $url do this. $url = image src=http://ids.si.edu/ids/dynamic?container.fullpageid=http://americanart.s i.edu/images/. $tmpImageDirectory ./. $accessionNumber ._1ajpg ALT=''; Sorry if this is not correct for what you are trying to do. I just do not understand the intent. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best editor?
Notepad!!! LOL.. I use netbeans but eclipse is nice. A lot of it is personal opinion. On Wed, Aug 3, 2011 at 9:46 AM, Florian Müller florip...@hotmail.comwrote: Maybe an adittional information: PSPad is completely freeware and portable. You can download it right here: http://pspad.en.softonic.com/ This would be the best idea if you can't run a local server, because if there is an editor with this functionality built in, he'd have to bring a little local server with it, and I really don't know an editor which is able to do that without an external software. Regards and much fun ;) Flo From: florip...@hotmail.com To: msa...@gmail.com; sstap...@mnsi.net CC: php-general@lists.php.net Date: Wed, 3 Aug 2011 15:40:12 +0200 Subject: RE: [PHP] Best editor? I'm using PSPad since one year, and I'm very happy with it. With your description, I think it is the most simple way with it: Connect it with a webserver, and then you can edit all files right on the server, so if you save, they are live. PSPad is actually even a portable program, and there are lots of syntax highlighters, so this program is very nice! Date: Wed, 3 Aug 2011 09:32:34 -0400 From: msa...@gmail.com To: sstap...@mnsi.net CC: php-general@lists.php.net Subject: Re: [PHP] Best editor? Let me clarify a bit... I don't own my own machine - I'm using my work computer. I can install an editor, but installing a full fledged server would be verboten (like WAMP). And while its not hard to set up a VM in virtualbox, I'd prefer not to if I don't have to. I know the functionality of testing inside the editor used to be there, I'd just like to see if I can find it again :) If I have to, i'll just go the VM route. On Wed, Aug 3, 2011 at 9:26 AM, Steve Staples sstap...@mnsi.net wrote: On Wed, 2011-08-03 at 09:22 -0400, Matty Sarro wrote: Hey everyone, I am a super newbie just beginning to learn PHP. Awhile ago, I had used aptana for dabbling with php and was amazed to find out that it had a built in php interpreter so I could do some minor testing without having to upload everything to a web server, or have a web server locally. Flash forward to now, and it looks like that functionality doesn't exist anymore (at least not by default). So, I'm curious what editors are out there? Are there any out there which will let me test PHP files without having to upload everything every time I edit it? Any help would be greatly appreciated. Thanks! -Matty I personally use Komodo IDE, but there are lots out there. There is the Eclipse with PHP, or there was the way I learned, NotePad (then switched to EditPlus+) Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best editor?
Hi, On Windows I used UltraEdit. On Linux Kate is simple and comfortable app. Actually I prefer NetBeans too. Eclipse could be faster but I think less comfortable... *Valentine* On Wed, Aug 3, 2011 at 4:45 PM, Matt Giddings mcgid...@gmail.com wrote: Notepad!!! LOL.. I use netbeans but eclipse is nice. A lot of it is personal opinion. On Wed, Aug 3, 2011 at 9:46 AM, Florian Müller florip...@hotmail.com wrote: Maybe an adittional information: PSPad is completely freeware and portable. You can download it right here: http://pspad.en.softonic.com/ This would be the best idea if you can't run a local server, because if there is an editor with this functionality built in, he'd have to bring a little local server with it, and I really don't know an editor which is able to do that without an external software. Regards and much fun ;) Flo From: florip...@hotmail.com To: msa...@gmail.com; sstap...@mnsi.net CC: php-general@lists.php.net Date: Wed, 3 Aug 2011 15:40:12 +0200 Subject: RE: [PHP] Best editor? I'm using PSPad since one year, and I'm very happy with it. With your description, I think it is the most simple way with it: Connect it with a webserver, and then you can edit all files right on the server, so if you save, they are live. PSPad is actually even a portable program, and there are lots of syntax highlighters, so this program is very nice! Date: Wed, 3 Aug 2011 09:32:34 -0400 From: msa...@gmail.com To: sstap...@mnsi.net CC: php-general@lists.php.net Subject: Re: [PHP] Best editor? Let me clarify a bit... I don't own my own machine - I'm using my work computer. I can install an editor, but installing a full fledged server would be verboten (like WAMP). And while its not hard to set up a VM in virtualbox, I'd prefer not to if I don't have to. I know the functionality of testing inside the editor used to be there, I'd just like to see if I can find it again :) If I have to, i'll just go the VM route. On Wed, Aug 3, 2011 at 9:26 AM, Steve Staples sstap...@mnsi.net wrote: On Wed, 2011-08-03 at 09:22 -0400, Matty Sarro wrote: Hey everyone, I am a super newbie just beginning to learn PHP. Awhile ago, I had used aptana for dabbling with php and was amazed to find out that it had a built in php interpreter so I could do some minor testing without having to upload everything to a web server, or have a web server locally. Flash forward to now, and it looks like that functionality doesn't exist anymore (at least not by default). So, I'm curious what editors are out there? Are there any out there which will let me test PHP files without having to upload everything every time I edit it? Any help would be greatly appreciated. Thanks! -Matty I personally use Komodo IDE, but there are lots out there. There is the Eclipse with PHP, or there was the way I learned, NotePad (then switched to EditPlus+) Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Syntax Question
On 8/3/11 10:41 AM, ad...@buskirkgraphics.com ad...@buskirkgraphics.com wrote: -Original Message- From: Gates, Jeff [mailto:gat...@si.edu] Sent: Wednesday, August 03, 2011 10:23 AM To: php-general@lists.php.net Subject: [PHP] Syntax Question I, too, am a super newbie. I have a beginning knowledge of being able to read php and understand its syntax but I can¹t write it. This is a bit complicated but here¹s my problem: I want to create a variable in PHP that I can use to link to an image in our museum's image website. We have done it with ColdFusion here but I need the same thing for PHP because I¹m building a site using a php-based CMS called Omeka. In ColdFusion the variable is written: cfset tmpImageDirectory = getToken(artwork.accessionNumber, 1, .) Basically, it¹s saying find the image on our server by looking for its accession number within the year directory. Since the first part of the accession number is the year we got the artwork this variable is saying look for the accession number in the year directory by first looking at the first part of that accession number (the year), look in that year directory and then use the entire accession number to find the image within that directory. An example of an accession number is 2011.15. That¹s saying that artwork was the 15th artwork brought into our collection in 2011. On our image server it will be found in a directory called 2011. (Am I making sense?) Then the Coldfusion call is: a href=http://ids.si.edu/ids/dynamic?container.fullpageid=http://americ anart .si.edu/images/#tmpImageDirectory#/#artwork.accessionNumber#_1a.jpg (the 1a.jpg is simply the size image we want to call). I need to be able to do the same thing with PHP but have no idea how. More information: within my site I¹m housing the accession number in a mySQL database. I¹ve gotten a bit of help on this already (but not enough, that¹s why I¹m turning to you). I was told I need to create two variables [('Dublin Core','Identifier') is the name of the field that houses the accession number): $accessionNumber = item('Dublin Core','Identifier'); $tmpImageDirectory = strtok($accessionNumber,.); And then create a third variable to create a url variable $url = http://ids.si.edu/ids/dynamic?container.fullpageid=http://americanart .si.e du/images/ http://ids.si.edu/ids/dynamic?container.fullpageid=http://americanart .si.e du/images/$tmpImageDirectory/$artwork.accessionNumber_1a.jpg + $tmpImageDirectory + / + $accessionNumber + _1ajpg; That's as far as I've gotten. I don't know how to put all of these together using proper PHP syntax. Can someone help me with this? Thanks. Best, Jeff -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php $url = http://ids.si.edu/ids/dynamic?container.fullpageid=http://americanart.si.e du/images/ http://ids.si.edu/ids/dynamic?container.fullpageid=http://americanart.si.e du/images/. $tmpImageDirectory ./. $artwork .accessionNumber_1a.jpg . $tmpImageDirectory ./. $accessionNumber ._1ajpg; I am not sure I agree with the way you are setting the $url it looks like you have mashed and a url hyperlink partially into 1. Like you are trying to set the $url as a image with a link are you trying to set a link or an image as the $url? If you are trying to set a image as the $url do this. $url = image src=http://ids.si.edu/ids/dynamic?container.fullpageid=http://americanart.s i.edu/images/. $tmpImageDirectory ./. $accessionNumber ._1ajpg ALT=''; Sorry if this is not correct for what you are trying to do. I just do not understand the intent. To be honest with you, I'm not sure what that $url is supposed to do. This is the info (albeit without any explanation) someone told me to use. But he didn't tell me how to use it. Basically, I need to be able to link to an image on our web server dynamically. The structure of the web server is as I described: each image has an accession number and each image is housed in a directory on that server that is named the year that artwork was accessioned. We can retrieve the accession number that is stored in the data field ('Dublin Core','Identifier') An example of an actual (non-dynamic) link to the image server might look like this: http://ids.si.edu/ids/dynamic?container.fullpageid=http://americanart.si.ed u/images/2011/2011.15_1a.jpg I just need to be able to build that link dynamically for each artwork on the site. (Personally, I'm not wedded to the code I posted earlier if someone can find a better way of doing it. This is just what I was told to use. Again, I'm a newbie.) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best editor?
Hi, Notepad!!! LOL.. I use netbeans but eclipse is nice. A lot of it is personal opinion. I have been using Notepad since... oh, since 2007, I believe). And it's my editor of choice :-). Actually now I'm using AkelPad because of the unicode issues (I need to save without a bit order mark). -- With best regards from Ukraine, Andre Skype: Francophile My blog: http://oire.org/menelion (mostly in Russian) Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: testing
On 8/3/2011 9:16 AM, Ashley Sheridan wrote: Aln...@ridersite.org wrote: On 8/2/2011 5:18 PM, Jim Giner wrote: Don't seem to be getting any feeds thru the newsgroup mirror(?). This newsgroup has been a mess for almost a year now. One big problem is that the server only accepts a small number of connections, for just some mail clients, eg Thunderbird; but works for others. My Thunderbird works flawlessly for numerous other newsgroups. I've posted 2 or 3 bug reports, no response! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php This newsgroup is actually a mailing list. Thanks, Ash http://www.ashleysheridan.co.uk Oh, I thought news.php.net was a NNTP news server. And, news://news.php.net:119/php.general was a newsgroup on the server. My mistake. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best editor?
On Aug 3, 2011, at 8:40 AM, Florian Müller wrote: With your description, I think it is the most simple way with it: Connect it with a webserver, and then you can edit all files right on the server, so if you save, they are live. Not to hijack the thread, but I really, *really* hope you are not suggesting that someone do live edits on a production server -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best editor?
On Wed, Aug 3, 2011 at 9:36 AM, Tamara Temple tamouse.li...@gmail.comwrote: Not to hijack the thread, but I really, *really* hope you are not suggesting that someone do live edits on a production server I would never consider tinkering on test pages while learning PHP a production server. :)
[PHP] Studying mcrypt
Hello Php, It's my first time I use mcrypt. I've done everything like it's written in the php manuals, here is the code: ?php $d=mcrypt_module_open(rijndael-256, , ofb, ); $iv=mcrypt_create_iv(mcrypt_enc_get_iv_size($d), MCRYPT_DEV_RANDOM); $ks=mcrypt_enc_get_key_size($d); $key=substr(md5(Secret key), 0, $ks); mcrypt_generic_init($d, $key, $iv); $cpass=mcrypt_generic($d, $_POST['opass']); mcrypt_generic_deinit($d); mcrypt_module_close($d); ? And here's what I get: Original password: asdfasdfasdf Encrypted password: Q�j�* Question: Is it normal to have such strange characters in the encrypted string? I'm hosted at http://godaddy.com/, shared hosting, if it does matter. Thanks! -- With best regards from Ukraine, Andre Skype: Francophile Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best editor?
On Aug 3, 2011, at 11:39 AM, David Harkness wrote: On Wed, Aug 3, 2011 at 9:36 AM, Tamara Temple tamouse.li...@gmail.com wrote: Not to hijack the thread, but I really, *really* hope you are not suggesting that someone do live edits on a production server I would never consider tinkering on test pages while learning PHP a production server. :) I think you missed my point -- that wasn't to the OP, that was to the respondent talking about how PSPad lets you edit files directly on the webserver
Re: [PHP] Best editor?
Dne středa 03 srpna 2011 15:22:44 Matty Sarro napsal(a): Hey everyone, I am a super newbie just beginning to learn PHP. Awhile ago, I had used aptana for dabbling with php and was amazed to find out that it had a built in php interpreter so I could do some minor testing without having to upload everything to a web server, or have a web server locally. Flash forward to now, and it looks like that functionality doesn't exist anymore (at least not by default). So, I'm curious what editors are out there? Are there any out there which will let me test PHP files without having to upload everything every time I edit it? Any help would be greatly appreciated. Thanks! -Matty The best editor for PHP is Zend Studio cca $300 or open source products like Kate(linux), Kwrite(linux), Vim(linux, windows), BlueFish(linux), Emacs(Linux, Windows). I'm using the Bluefish for PHP with (XHTML) and NetBeans for others programming languages. Good look. I'm sorry for my english. -- Leonardo -- „Teoretické znalosti dnes už nestačí. Člověk musí překročit jejich hranice a umění se stane neumělým uměním, které vyrústá z nevědomí“ Daitsu Suzuki ( 1870 – 1966 ) - Feder ajsi romňi, so buter manušňi sar džuvli. Cikánské přísloví -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Studying mcrypt
Yes, since it's trying to represent in characters some purely binary data, it is not unlikely that you will get VERY weird characters (and you do). Also you shouldn't actually encrypt passwords, the proper way to store them is hashed, so that if someone grabs your database, they dont have your passwords, even if they have the key. Best way to check is to decrypt it and verify... -- The trouble with programmers is that you can never tell what a programmer is doing until it’s too late. ~Seymour Cray On Wed, Aug 3, 2011 at 12:40 PM, Andre Polykanine an...@oire.org wrote: Hello Php, It's my first time I use mcrypt. I've done everything like it's written in the php manuals, here is the code: ?php $d=mcrypt_module_open(rijndael-256, , ofb, ); $iv=mcrypt_create_iv(mcrypt_enc_get_iv_size($d), MCRYPT_DEV_RANDOM); $ks=mcrypt_enc_get_key_size($d); $key=substr(md5(Secret key), 0, $ks); mcrypt_generic_init($d, $key, $iv); $cpass=mcrypt_generic($d, $_POST['opass']); mcrypt_generic_deinit($d); mcrypt_module_close($d); ? And here's what I get: Original password: asdfasdfasdf Encrypted password: Q� j�* Question: Is it normal to have such strange characters in the encrypted string? I'm hosted at http://godaddy.com/, shared hosting, if it does matter. Thanks! -- With best regards from Ukraine, Andre Skype: Francophile Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best editor?
NetBeans for PHP is definitely a GREAT choice! (it is now made to work specially for PHP) And if you don't have access to everything on your computer just install a VMWare player and have a virtual server ;-) (ok it would take time but once you have it, you have it) On 3 August 2011 18:07, Leonardo l...@matrix-leo.cz wrote: Dne středa 03 srpna 2011 15:22:44 Matty Sarro napsal(a): Hey everyone, I am a super newbie just beginning to learn PHP. Awhile ago, I had used aptana for dabbling with php and was amazed to find out that it had a built in php interpreter so I could do some minor testing without having to upload everything to a web server, or have a web server locally. Flash forward to now, and it looks like that functionality doesn't exist anymore (at least not by default). So, I'm curious what editors are out there? Are there any out there which will let me test PHP files without having to upload everything every time I edit it? Any help would be greatly appreciated. Thanks! -Matty The best editor for PHP is Zend Studio cca $300 or open source products like Kate(linux), Kwrite(linux), Vim(linux, windows), BlueFish(linux), Emacs(Linux, Windows). I'm using the Bluefish for PHP with (XHTML) and NetBeans for others programming languages. Good look. I'm sorry for my english. -- Leonardo -- Teoretické znalosti dnes už nestačí. Člověk musí překročit jejich hranice a umění se stane neumělým uměním, které vyrústá z nevědomí Daitsu Suzuki ( 1870 - 1966 ) - Feder ajsi romňi, so buter manušňi sar džuvli. Cikánské přísloví -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best editor?
Leonardo wrote: Dne stÅtrade;eda 03 srpna 2011 15:22:44 Matty Sarro napsal(a): Hey everyone, I am a super newbie just beginning to learn PHP. Awhile ago, I had used aptana for dabbling with php and was amazed to find out that it had a built in php interpreter so I could do some minor testing without having to upload everything to a web server, or have a web server locally. Flash forward to now, and it looks like that functionality doesn't exist anymore (at least not by default). So, I'm curious what editors are out there? Are there any out there which will let me test PHP files without having to upload everything every time I edit it? Any help would be greatly appreciated. Thanks! -Matty The best editor for PHP is Zend Studio cca $300 or open source products like Kate(linux), Kwrite(linux), Vim(linux, windows), BlueFish(linux), Emacs(Linux, Windows). I'm using the Bluefish for PHP with (XHTML) and NetBeans for others programming languages. Good look. I'm sorry for my english. Bluefish also runs on Windows.
Re: [PHP] Studying mcrypt
Hello Alex, Thanks for the tip. I'm not storing it in the database (you see, it's asdfasdf and the key string is secret key), I'm just studying mcrypt's possibilities :-). -- With best regards from Ukraine, Andre Skype: Francophile My blog: http://oire.org/menelion (mostly in Russian) Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion Original message From: Alex Nikitin niks...@gmail.com To: Andre Polykanine Date created: , 9:27:42 PM Subject: [PHP] Studying mcrypt Yes, since it's trying to represent in characters some purely binary data, it is not unlikely that you will get VERY weird characters (and you do). Also you shouldn't actually encrypt passwords, the proper way to store them is hashed, so that if someone grabs your database, they dont have your passwords, even if they have the key. Best way to check is to decrypt it and verify... -- The trouble with programmers is that you can never tell what a programmer is doing until it’s too late. ~Seymour Cray On Wed, Aug 3, 2011 at 12:40 PM, Andre Polykanine an...@oire.org wrote: Hello Php, It's my first time I use mcrypt. I've done everything like it's written in the php manuals, here is the code: ?php $d=mcrypt_module_open(rijndael-256, , ofb, ); $iv=mcrypt_create_iv(mcrypt_enc_get_iv_size($d), MCRYPT_DEV_RANDOM); $ks=mcrypt_enc_get_key_size($d); $key=substr(md5(Secret key), 0, $ks); mcrypt_generic_init($d, $key, $iv); $cpass=mcrypt_generic($d, $_POST['opass']); mcrypt_generic_deinit($d); mcrypt_module_close($d); ? And here's what I get: Original password: asdfasdfasdf Encrypted password: Q� j�* Question: Is it normal to have such strange characters in the encrypted string? I'm hosted at http://godaddy.com/, shared hosting, if it does matter. Thanks! -- With best regards from Ukraine, Andre Skype: Francophile Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Studying mcrypt
On Wed, 2011-08-03 at 22:02 +0300, Andre Polykanine wrote: Hello Alex, Thanks for the tip. I'm not storing it in the database (you see, it's asdfasdf and the key string is secret key), I'm just studying mcrypt's possibilities :-). -- With best regards from Ukraine, Andre Skype: Francophile My blog: http://oire.org/menelion (mostly in Russian) Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion Original message From: Alex Nikitin niks...@gmail.com To: Andre Polykanine Date created: , 9:27:42 PM Subject: [PHP] Studying mcrypt Yes, since it's trying to represent in characters some purely binary data, it is not unlikely that you will get VERY weird characters (and you do). Also you shouldn't actually encrypt passwords, the proper way to store them is hashed, so that if someone grabs your database, they dont have your passwords, even if they have the key. Best way to check is to decrypt it and verify... -- The trouble with programmers is that you can never tell what a programmer is doing until it’s too late. ~Seymour Cray On Wed, Aug 3, 2011 at 12:40 PM, Andre Polykanine an...@oire.org wrote: Hello Php, It's my first time I use mcrypt. I've done everything like it's written in the php manuals, here is the code: ?php $d=mcrypt_module_open(rijndael-256, , ofb, ); $iv=mcrypt_create_iv(mcrypt_enc_get_iv_size($d), MCRYPT_DEV_RANDOM); $ks=mcrypt_enc_get_key_size($d); $key=substr(md5(Secret key), 0, $ks); mcrypt_generic_init($d, $key, $iv); $cpass=mcrypt_generic($d, $_POST['opass']); mcrypt_generic_deinit($d); mcrypt_module_close($d); ? And here's what I get: Original password: asdfasdfasdf Encrypted password: Q� j�* Question: Is it normal to have such strange characters in the encrypted string? I'm hosted at http://godaddy.com/, shared hosting, if it does matter. Thanks! -- With best regards from Ukraine, Andre Skype: Francophile Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Please don't top-post :) You can use base64_encode() on it to convert it into something that's printable and storable in the DB without having to resort to a binary blob -- Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Studying mcrypt
I have a neat class you can play with... -- The trouble with programmers is that you can never tell what a programmer is doing until it’s too late. ~Seymour Cray On Wed, Aug 3, 2011 at 2:27 PM, Alex Nikitin niks...@gmail.com wrote: Yes, since it's trying to represent in characters some purely binary data, it is not unlikely that you will get VERY weird characters (and you do). Also you shouldn't actually encrypt passwords, the proper way to store them is hashed, so that if someone grabs your database, they dont have your passwords, even if they have the key. Best way to check is to decrypt it and verify... -- The trouble with programmers is that you can never tell what a programmer is doing until it’s too late. ~Seymour Cray On Wed, Aug 3, 2011 at 12:40 PM, Andre Polykanine an...@oire.org wrote: Hello Php, It's my first time I use mcrypt. I've done everything like it's written in the php manuals, here is the code: ?php $d=mcrypt_module_open(rijndael-256, , ofb, ); $iv=mcrypt_create_iv(mcrypt_enc_get_iv_size($d), MCRYPT_DEV_RANDOM); $ks=mcrypt_enc_get_key_size($d); $key=substr(md5(Secret key), 0, $ks); mcrypt_generic_init($d, $key, $iv); $cpass=mcrypt_generic($d, $_POST['opass']); mcrypt_generic_deinit($d); mcrypt_module_close($d); ? And here's what I get: Original password: asdfasdfasdf Encrypted password: Q� j�* Question: Is it normal to have such strange characters in the encrypted string? I'm hosted at http://godaddy.com/, shared hosting, if it does matter. Thanks! -- With best regards from Ukraine, Andre Skype: Francophile Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Studying mcrypt
Hi Ash, Please don't top-post :) *Huge sigh* OK, OK! But still it's too uncomfortable to read bottom-posting! :P You can use base64_encode() on it to convert it into something that's printable and storable in the DB without having to resort to a binary blob Thanks, will try!) -- With best regards from Ukraine, Andre Skype: Francophile My blog: http://oire.org/menelion (mostly in Russian) Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Studying mcrypt
Hello Alex, I have a neat class you can play with... Could you give me the link, please?) -- With best regards from Ukraine, Andre Skype: Francophile My blog: http://oire.org/menelion (mostly in Russian) Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Studying mcrypt
On Wed, Aug 3, 2011 at 3:08 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: ** On Wed, 2011-08-03 at 22:02 +0300, Andre Polykanine wrote: Hello Alex, Thanks for the tip. I'm not storing it in the database (you see, it's asdfasdf and the key string is secret key), I'm just studying mcrypt's possibilities :-). -- With best regards from Ukraine, Andre Skype: Francophile My blog: http://oire.org/menelion (mostly in Russian) Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion Original message From: Alex Nikitin niks...@gmail.com To: Andre Polykanine Date created: , 9:27:42 PM Subject: [PHP] Studying mcrypt Yes, since it's trying to represent in characters some purely binary data, it is not unlikely that you will get VERY weird characters (and you do). Also you shouldn't actually encrypt passwords, the proper way to store them is hashed, so that if someone grabs your database, they dont have your passwords, even if they have the key. Best way to check is to decrypt it and verify... -- The trouble with programmers is that you can never tell what a programmer is doing until it’s too late. ~Seymour Cray On Wed, Aug 3, 2011 at 12:40 PM, Andre Polykanine an...@oire.org wrote: Hello Php, It's my first time I use mcrypt. I've done everything like it's written in the php manuals, here is the code: ?php $d=mcrypt_module_open(rijndael-256, , ofb, ); $iv=mcrypt_create_iv(mcrypt_enc_get_iv_size($d), MCRYPT_DEV_RANDOM); $ks=mcrypt_enc_get_key_size($d); $key=substr(md5(Secret key), 0, $ks); mcrypt_generic_init($d, $key, $iv); $cpass=mcrypt_generic($d, $_POST['opass']); mcrypt_generic_deinit($d); mcrypt_module_close($d); ? And here's what I get: Original password: asdfasdfasdf Encrypted password: Q� j�* Question: Is it normal to have such strange characters in the encrypted string? I'm hosted at http://godaddy.com/, shared hosting, if it does matter. Thanks! -- With best regards from Ukraine, Andre Skype: Francophile Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Please don't top-post :) You can use base64_encode() on it to convert it into something that's printable and storable in the DB without having to resort to a binary blob -- Thanks, Ash http://www.ashleysheridan.co.uk Isn't that a bit counterproductive though, storing it in binary? Purely storage-related: Say we are storing a 128byte result of encryption. Storing it in a varbin would mean that you would use up 128+1 bytes of storage, where as if you were to base64 encode it, data length would be 170 or so bytes, +1byte or 171bytes... 42 bytes difference... This was a crypto class i wrote for something, i cant even recall exactly what project it was for, it is making it's way into the framework, but for now, i've changed it to be normal again Hopefully it should be pretty straight forward: http://pastebin.com/TFn468dM -- The trouble with programmers is that you can never tell what a programmer is doing until it’s too late. ~Seymour Cray
Re: [PHP] Studying mcrypt
On Wed, 2011-08-03 at 15:35 -0400, Alex Nikitin wrote: On Wed, Aug 3, 2011 at 3:08 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: ** On Wed, 2011-08-03 at 22:02 +0300, Andre Polykanine wrote: Hello Alex, Thanks for the tip. I'm not storing it in the database (you see, it's asdfasdf and the key string is secret key), I'm just studying mcrypt's possibilities :-). -- With best regards from Ukraine, Andre Skype: Francophile My blog: http://oire.org/menelion (mostly in Russian) Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion Original message From: Alex Nikitin niks...@gmail.com To: Andre Polykanine Date created: , 9:27:42 PM Subject: [PHP] Studying mcrypt Yes, since it's trying to represent in characters some purely binary data, it is not unlikely that you will get VERY weird characters (and you do). Also you shouldn't actually encrypt passwords, the proper way to store them is hashed, so that if someone grabs your database, they dont have your passwords, even if they have the key. Best way to check is to decrypt it and verify... -- The trouble with programmers is that you can never tell what a programmer is doing until it’s too late. ~Seymour Cray On Wed, Aug 3, 2011 at 12:40 PM, Andre Polykanine an...@oire.org wrote: Hello Php, It's my first time I use mcrypt. I've done everything like it's written in the php manuals, here is the code: ?php $d=mcrypt_module_open(rijndael-256, , ofb, ); $iv=mcrypt_create_iv(mcrypt_enc_get_iv_size($d), MCRYPT_DEV_RANDOM); $ks=mcrypt_enc_get_key_size($d); $key=substr(md5(Secret key), 0, $ks); mcrypt_generic_init($d, $key, $iv); $cpass=mcrypt_generic($d, $_POST['opass']); mcrypt_generic_deinit($d); mcrypt_module_close($d); ? And here's what I get: Original password: asdfasdfasdf Encrypted password: Q� j�* Question: Is it normal to have such strange characters in the encrypted string? I'm hosted at http://godaddy.com/, shared hosting, if it does matter. Thanks! -- With best regards from Ukraine, Andre Skype: Francophile Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Please don't top-post :) You can use base64_encode() on it to convert it into something that's printable and storable in the DB without having to resort to a binary blob -- Thanks, Ash http://www.ashleysheridan.co.uk Isn't that a bit counterproductive though, storing it in binary? Purely storage-related: Say we are storing a 128byte result of encryption. Storing it in a varbin would mean that you would use up 128+1 bytes of storage, where as if you were to base64 encode it, data length would be 170 or so bytes, +1byte or 171bytes... 42 bytes difference... This was a crypto class i wrote for something, i cant even recall exactly what project it was for, it is making it's way into the framework, but for now, i've changed it to be normal again Hopefully it should be pretty straight forward: http://pastebin.com/TFn468dM -- The trouble with programmers is that you can never tell what a programmer is doing until it’s too late. ~Seymour Cray The beauty of encoding something into base64 is that you can then easily move that data around to systems that can't handle binary. You can pass a base64 image down to the browser to display, without requiring a second script to create the image used in the img tag. Javascript can manipulate base64 data making it an alternative to json where json won't work. Command line environments won't be able to deal with binary arguments, but base64 is fine. It all depends on what you want to do with it at the end of the day. -- Thanks, Ash http://www.ashleysheridan.co.uk
[PHP] How do I enable $_SERVER['HTTP_X_WAP_PROFILE'] or $_SERVER['HTTP_PROFILE']
I'm working on a mobile site and from the various searches and reading (and even code fragments I've inherited for the project), they make reference to: $_SERVER['HTTP_X_WAP_PROFILE'] and a fallback $_SERVER['HTTP_PROFILE'] However, when I hit a phpinfo(); page using both an Android MyTouch 3G (2.2) and an Apple iPhone 3G, there are nothing even close to those. All of the 'HTTP_X_*' headers are absent and there is no HTTP_PROFILE either. http://www.dpinyc.com/literature/resources/code-bank/php-lightweight-device- detection/ http://mobiforge.com/developing/blog/useful-x-headers http://blog.svnlabs.com/tag/_serverhttp_x_wap_profile/ Do I need to enable something in Apache or PHP?? PHP Version 5.3.6 Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies with Xdebug v2.0.5, Copyright (c) 2002-2008, by Derick Rethans and $ httpd -v Server version: Apache/2.2.17 (FreeBSD) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best editor?
On 8/3/2011 7:22 AM, Matty Sarro wrote: Hey everyone, I am a super newbie just beginning to learn PHP. Awhile ago, I had used aptana for dabbling with php and was amazed to find out that it had a built in php interpreter so I could do some minor testing without having to upload everything to a web server, or have a web server locally. Flash forward to now, and it looks like that functionality doesn't exist anymore (at least not by default). So, I'm curious what editors are out there? Are there any out there which will let me test PHP files without having to upload everything every time I edit it? Any help would be greatly appreciated. Thanks! -Matty I mostly use VIM. However, I did play with PHP Storm, and it's pretty nice. It also has a plug-in that emulate vi/vim. I've used Komodo in the past. It's also good. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best editor?
A Quarta, 3 de Agosto de 2011 21:16:52 Mike Hansen você escreveu: On 8/3/2011 7:22 AM, Matty Sarro wrote: Hey everyone, I am a super newbie just beginning to learn PHP. Awhile ago, I had used aptana for dabbling with php and was amazed to find out that it had a built in php interpreter so I could do some minor testing without having to upload everything to a web server, or have a web server locally. Flash forward to now, and it looks like that functionality doesn't exist anymore (at least not by default). So, I'm curious what editors are out there? Are there any out there which will let me test PHP files without having to upload everything every time I edit it? Any help would be greatly appreciated. Thanks! -Matty I mostly use VIM. However, I did play with PHP Storm, and it's pretty nice. It also has a plug-in that emulate vi/vim. I've used Komodo in the past. It's also good. (X)emacs is also a nice option. Geany is an IDE but small and very nice and easy to use. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Studying mcrypt
On Wed, Aug 3, 2011 at 4:05 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: ** On Wed, 2011-08-03 at 15:35 -0400, Alex Nikitin wrote: On Wed, Aug 3, 2011 at 3:08 PM, Ashley Sheridan a...@ashleysheridan.co.ukwrote: ** On Wed, 2011-08-03 at 22:02 +0300, Andre Polykanine wrote: Hello Alex, Thanks for the tip. I'm not storing it in the database (you see, it's asdfasdf and the key string is secret key), I'm just studying mcrypt's possibilities :-). -- With best regards from Ukraine, Andre Skype: Francophile My blog: http://oire.org/menelion (mostly in Russian) Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion Original message From: Alex Nikitin niks...@gmail.com To: Andre Polykanine Date created: , 9:27:42 PM Subject: [PHP] Studying mcrypt Yes, since it's trying to represent in characters some purely binary data, it is not unlikely that you will get VERY weird characters (and you do). Also you shouldn't actually encrypt passwords, the proper way to store them is hashed, so that if someone grabs your database, they dont have your passwords, even if they have the key. Best way to check is to decrypt it and verify... -- The trouble with programmers is that you can never tell what a programmer is doing until it’s too late. ~Seymour Cray On Wed, Aug 3, 2011 at 12:40 PM, Andre Polykanine an...@oire.org wrote: Hello Php, It's my first time I use mcrypt. I've done everything like it's written in the php manuals, here is the code: ?php $d=mcrypt_module_open(rijndael-256, , ofb, ); $iv=mcrypt_create_iv(mcrypt_enc_get_iv_size($d), MCRYPT_DEV_RANDOM); $ks=mcrypt_enc_get_key_size($d); $key=substr(md5(Secret key), 0, $ks); mcrypt_generic_init($d, $key, $iv); $cpass=mcrypt_generic($d, $_POST['opass']); mcrypt_generic_deinit($d); mcrypt_module_close($d); ? And here's what I get: Original password: asdfasdfasdf Encrypted password: Q� j�* Question: Is it normal to have such strange characters in the encrypted string? I'm hosted at http://godaddy.com/, shared hosting, if it does matter. Thanks! -- With best regards from Ukraine, Andre Skype: Francophile Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Please don't top-post :) You can use base64_encode() on it to convert it into something that's printable and storable in the DB without having to resort to a binary blob -- Thanks, Ash http://www.ashleysheridan.co.uk Isn't that a bit counterproductive though, storing it in binary? Purely storage-related: Say we are storing a 128byte result of encryption. Storing it in a varbin would mean that you would use up 128+1 bytes of storage, where as if you were to base64 encode it, data length would be 170 or so bytes, +1byte or 171bytes... 42 bytes difference... This was a crypto class i wrote for something, i cant even recall exactly what project it was for, it is making it's way into the framework, but for now, i've changed it to be normal again Hopefully it should be pretty straight forward: http://pastebin.com/TFn468dM -- The trouble with programmers is that you can never tell what a programmer is doing until it’s too late. ~Seymour Cray The beauty of encoding something into base64 is that you can then easily move that data around to systems that can't handle binary. You can pass a base64 image down to the browser to display, without requiring a second script to create the image used in the img tag. Javascript can manipulate base64 data making it an alternative to json where json won't work. Command line environments won't be able to deal with binary arguments, but base64 is fine. It all depends on what you want to do with it at the end of the day. -- Thanks, Ash http://www.ashleysheridan.co.uk That's why i prefaced it with purely storage-related. base64 is awesome, i use it as a hack to get around xss and sql injection, it works beautifully :) -- The trouble with programmers is that you can never tell what a programmer is doing until it’s too late. ~Seymour Cray
Re: [PHP] Best editor?
Mike Hansen wrote: I mostly use VIM. However, I did play with PHP Storm, and it's pretty nice. It also has a plug-in that emulate vi/vim. I've used Komodo in the past. It's also good. I've used and like Quanta Plus (KDE on Linux). I've used Bluefish on Windows and Linux, Notepad++ on Windows, UltraEdit on Windows, NetBeans on windows. Zend Studio on Windows NuSphere PHPEdI have Komodo, but haven't really played with it much. I like UltraEdit, Netbeans, Zend Studio and NuSphere PHP. I've use NuSphere the most. I use Quanta Plus on Linux the most.
Re: [PHP] Best editor?
On Wed, 2011-08-03 at 16:53 -0400, Curtis Maurand wrote: Mike Hansen wrote: I mostly use VIM. However, I did play with PHP Storm, and it's pretty nice. It also has a plug-in that emulate vi/vim. I've used Komodo in the past. It's also good. I've used and like Quanta Plus (KDE on Linux). I've used Bluefish on Windows and Linux, Notepad++ on Windows, UltraEdit on Windows, NetBeans on windows. Zend Studio on Windows NuSphere PHPEdI have Komodo, but haven't really played with it much. I like UltraEdit, Netbeans, Zend Studio and NuSphere PHP. I've use NuSphere the most. I use Quanta Plus on Linux the most. This is a bit of recurring thread every few weeks, but here's my answers again this time around: Kate (Linux and Windows) for simple editing, where you only need syntax highlighting and not a full blown auto-suggest IDE Netbeans for an IDE, as it has good SVN integration and is cross-platform (so I can use the same environment at home (Linux) and work (Windows)) -- Thanks, Ash http://www.ashleysheridan.co.uk
Re: [PHP] Best editor?
hi! Notepad!!! LOL.. I use netbeans but eclipse is nice. A lot of it is personal opinion. i was using notepad a lot of years, nowdays i use gedit (@linux ) i think that gedit is avaible for windows too. Greetings!!! On Wed, Aug 3, 2011 at 5:43 PM, Andre Polykanine an...@oire.org wrote: Hi, Notepad!!! LOL.. I use netbeans but eclipse is nice. A lot of it is personal opinion. I have been using Notepad since... oh, since 2007, I believe). And it's my editor of choice :-). Actually now I'm using AkelPad because of the unicode issues (I need to save without a bit order mark). -- With best regards from Ukraine, Andre Skype: Francophile My blog: http://oire.org/menelion (mostly in Russian) Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Ricardo ___ IT Architect website: http://www.pulsarinara.com
Re: [PHP] Best editor?
Hello Ricardo, RM i was using notepad a lot of years, nowdays i use gedit (@linux ) i think RM that gedit is avaible for windows too. Unfortunately, it isn't accessible for visually impaired users. -- With best regards from Ukraine, Andre Skype: Francophile My blog: http://oire.org/menelion (mostly in Russian) Twitter: http://twitter.com/m_elensule Facebook: http://facebook.com/menelion -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Best editor?
在 2011-08-03三的 09:40 -0400,Judson Vaughn写道: I recommend Coda for Mac (about $100) as editor. And MAMP as a web server for testing PHP files locally. Jud Sent from my iPad Jud at bizville.com Phone 703-303-4271 On Aug 3, 2011, at 9:26 AM, Steve Staples sstap...@mnsi.net wrote: On Wed, 2011-08-03 at 09:22 -0400, Matty Sarro wrote: Hey everyone, I am a super newbie just beginning to learn PHP. Awhile ago, I had used aptana for dabbling with php and was amazed to find out that it had a built in php interpreter so I could do some minor testing without having to upload everything to a web server, or have a web server locally. Flash forward to now, and it looks like that functionality doesn't exist anymore (at least not by default). So, I'm curious what editors are out there? Are there any out there which will let me test PHP files without having to upload everything every time I edit it? Any help would be greatly appreciated. Thanks! -Matty I personally use Komodo IDE, but there are lots out there. There is the Eclipse with PHP, or there was the way I learned, NotePad (then switched to EditPlus+) Steve -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php To me,i usually use NetBeans for PHP project, not Eclipse-based Zend Studio duo to non-free. -- Best regards, Sharl.Jimh.Tsin (From China **Obviously Taiwan INCLUDED**) Using Gmail? Please read this important notice: http://www.fsf.org/campaigns/jstrap/gmail?10073. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Form Already Filled Out
Hello, S i created a simple login system, and I am using sessions Everything seems to work fine, however; when I upload my files to my server and type my domain name my index.php page comes up and the form is automatically filled out with a username and password. How do i make it empty when I initially enter the site, and yes I did create a logout.php file that destroys a session. Please help, it is hard to explain this when I cant show it in person. Thanks in advance!Here is the login.php code, i didn't md5() the password yet: ?phpif ($_SESSION['user']){ header("Location: error.php"); exit();}include('connect.php');if ($_POST['login']){ $user=$_POST['user'];$pass=$_POST['pass'];$sql="SELECT * FROM members WHERE username='$_POST[user]' and password='$_POST[pass]'";$result=mysql_query($sql, $con);$count=mysql_num_rows($result);if ($count==1){ $_SESSION['user'] = $user; header('location: home.php');}else echo "p style='color:red'Wrong Username or Password/p";}?html head title/title link href="" rel="stylesheet" type="text/css" / /head body div id="main" div id="menu" ul li a href=""Home/a /li li a href=""Topix/a /li li a href=""Mission/a /li /ul /div div id='content' form method='post' action='' Username: br/ input type='text' name='user' maxlength='30'/br/ Password: br/ input type="password" name='pass' maxlength='30'/br/ input type="submit" value="Log In!" name="login"/ /form a href="" Register? /a /div /body/html
Re: [PHP] Form Already Filled Out
Hmmm looks like you saved the password and your browser or OS may be filling it for you. Em 04/08/2011 01:42, wil prim wilp...@me.com escreveu: Hello, S i created a simple login system, and I am using sessions. Everything seems to work fine, however; when I upload my files to my server and type my domain name my index.php page comes up and the form is automatically filled out with a username and password. How do i make it empty when I initially enter the site, and yes I did create a logout.php file that destroys a session. Please help, it is hard to explain this when I cant show it in person. Thanks in advance! Here is the login.php code, i didn't md5() the password yet: ?php if ($_SESSION['user']) { header(Location: error.php); exit(); } include('connect.php'); if ($_POST['login']){ $user=$_POST['user']; $pass=$_POST['pass']; $sql=SELECT * FROM members WHERE username='$_POST[user]' and password='$_POST[pass]'; $result=mysql_query($sql, $con); $count=mysql_num_rows($result); if ($count==1){ $_SESSION['user'] = $user; header('location: home.php'); } else echo p style='color:red'Wrong Username or Password/p; } ? html head title/title link href=style.css rel=stylesheet type=text/css / /head body div id=main div id=menu ul li a href=#Home/a /li li a href=#Topix/a /li li a href=#Mission/a /li /ul /div div id='content' form method='post' action='index.php' Username: br/ input type='text' name='user' maxlength='30'/br/ Password: br/ input type=password name='pass' maxlength='30'/br/ input type=submit value=Log In! name=login/ /form a href=register.html Register? /a /div /body /html