Re: [PHP] Re: replying to list (I give up)

2010-04-25 Thread Per Jessen
Michiel Sikma wrote:

> On 24 April 2010 16:14, Per Jessen  wrote:
> 
>> Ashley Sheridan wrote:
>>
>> >>
>> >> Is there an actual WoW client for Linux or you run in Wine like
>> >> environment?
>> >>
>> >> Thanks,
>> >> Tommy
>> >>
>> >
>> > I run it under Wine. Wine has come a long way since my first
>> > encounters with it a few years back and run a surprising amount of
>> > Windows-based software.
>>
>> Doesn't WoW need DirectX and all that?  I have some old Windows games
>> (Diablo, Alpha Centauri, Railroad Tycoon, Wolfenstein) I'd love to
>> play under Wine, but so far I've not managed to make them work.
>>
>>
> The best way to run old games is via DOSBox. http://www.dosbox.com/ 

Yes, I do use that too, but will it also run Windows games?? 



-- 
Per Jessen, Zürich (13.1°C)


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Recommendation for online PHP editor please....

2010-04-25 Thread Angus Mann
HI all. I'm looking for a recommendation for an online PHP editor.

Here's what I mean

I mean a PHP program I can install on my web-server, then log in and use it to 
browse and edit other PHP files on the server.

The idea is that I could make changes and bugfixes to a web app while I'm away 
from home/office.

Ideally it would be more than just a text editor, but also have syntax 
highlighting and formatting for PHP built in.

Any recommendations would be much appreciated.

Thanks,
Angus



Re: [PHP] Recommendation for online PHP editor please....

2010-04-25 Thread Karl DeSaulniers
Here you go. This is labeled a html editor, but thinking you can edit  
php files with it as well.

HTH,

http://phphtmledit.com/

Karl


On Apr 25, 2010, at 3:01 AM, Angus Mann wrote:


HI all. I'm looking for a recommendation for an online PHP editor.

Here's what I mean

I mean a PHP program I can install on my web-server, then log in  
and use it to browse and edit other PHP files on the server.


The idea is that I could make changes and bugfixes to a web app  
while I'm away from home/office.


Ideally it would be more than just a text editor, but also have  
syntax highlighting and formatting for PHP built in.


Any recommendations would be much appreciated.

Thanks,
Angus



Karl DeSaulniers
Design Drumm
http://designdrumm.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: replying to list (I give up)

2010-04-25 Thread Michiel Sikma
On 25 April 2010 09:31, Per Jessen  wrote:

>
> >> Doesn't WoW need DirectX and all that?  I have some old Windows games
> >> (Diablo, Alpha Centauri, Railroad Tycoon, Wolfenstein) I'd love to
> >> play under Wine, but so far I've not managed to make them work.
> >>
> >>
> > The best way to run old games is via DOSBox. http://www.dosbox.com/
>
> Yes, I do use that too, but will it also run Windows games??
>
>
>
Ah, you're right, I misread. But I believe all of those games except Diablo
will run under DOS as well. DOSBox can also run up to Windows 3.11.

Michiel


[PHP] Re: Re: replying to list (I give up)

2010-04-25 Thread Michelle Konzack
Hello Michiel Sikma,

Am 2010-04-25 12:21:40, hacktest Du folgendes herunter:
> Ah, you're right, I misread. But I believe all of those games except Diablo
> will run under DOS as well. DOSBox can also run up to Windows 3.11.

WfW 3.11 in fullscreen?   Hahaha!   LOL!

I can imagine, my AMD Phenom Quad-Core with 16 GByte of memory and  then
WfW 3.11 in fullscreen in DOSBox.  Would be the fastest WfW 3.11 on  our
shady planet...

Thanks, Greetings and nice Day/Evening
Michelle Konzack
Systemadministrator

-- 
# Debian GNU/Linux Consultant ##
   Development of Intranet and Embedded Systems with Debian GNU/Linux

itsyst...@tdnet France   itsyst...@tdnet UG (haftungsbeschränkt)
Gesch. Michelle Konzack  Gesch. Michelle Konzack

Apt. 917 (homeoffice)
50, rue de Soultz   Kinzigstraße 17
67100 Strasbourg/France 77694 Kehl/Germany
Tel: +33-6-61925193 mobil   Tel: +49-177-9351947 mobil
Tel: +33-9-52705884 fix

  
 

Jabber linux4miche...@jabber.ccc.de
ICQ#328449886

Linux-User #280138 with the Linux Counter, http://counter.li.org/


signature.pgp
Description: Digital signature


Re: [PHP] Recommendation for online PHP editor please....

2010-04-25 Thread mrfroasty
SSH + MC i.e http://www.midnight-commander.org, you will get syntax high
lights.

P:S
**Any CLI program will do the job.





On 04/25/2010 10:01 AM, Angus Mann wrote:
> HI all. I'm looking for a recommendation for an online PHP editor.
>
> Here's what I mean
>
> I mean a PHP program I can install on my web-server, then log in and use it 
> to browse and edit other PHP files on the server.
>
> The idea is that I could make changes and bugfixes to a web app while I'm 
> away from home/office.
>
> Ideally it would be more than just a text editor, but also have syntax 
> highlighting and formatting for PHP built in.
>
> Any recommendations would be much appreciated.
>
> Thanks,
> Angus
>
>
>   


-- 
Extra details:
OSS:Gentoo Linux
profile:x86
Hardware:msi geforce 8600GT asus p5k-se
location:/home/muhsin
language(s):C/C++,VB,VHDL,bash,PHP,SQL,HTML,CSS
Typo:40WPM
url:http://www.mzalendo.net
url:http://www.zanbytes.com




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Recommendation for online PHP editor please....

2010-04-25 Thread Ashley Sheridan
On Sun, 2010-04-25 at 13:46 +0200, mrfroasty wrote:

> SSH + MC i.e http://www.midnight-commander.org, you will get syntax high
> lights.
> 
> P:S
> **Any CLI program will do the job.
> 
> 
> 
> 
> 
> On 04/25/2010 10:01 AM, Angus Mann wrote:
> > HI all. I'm looking for a recommendation for an online PHP editor.
> >
> > Here's what I mean
> >
> > I mean a PHP program I can install on my web-server, then log in and use it 
> > to browse and edit other PHP files on the server.
> >
> > The idea is that I could make changes and bugfixes to a web app while I'm 
> > away from home/office.
> >
> > Ideally it would be more than just a text editor, but also have syntax 
> > highlighting and formatting for PHP built in.
> >
> > Any recommendations would be much appreciated.
> >
> > Thanks,
> > Angus
> >
> >
> >   
> 
> 
> -- 
> Extra details:
> OSS:Gentoo Linux
> profile:x86
> Hardware:msi geforce 8600GT asus p5k-se
> location:/home/muhsin
> language(s):C/C++,VB,VHDL,bash,PHP,SQL,HTML,CSS
> Typo:40WPM
> url:http://www.mzalendo.net
> url:http://www.zanbytes.com
> 
> 
> 
> 


I wouldn't recommend editing files actually on the server. I used to do
that, until my hosting changed its cPanel setup in a way that caused
havoc with the KIOslaves in KDE. I tried to save a file, got back an
error that said the file couldn't save. So I closed the editor only to
find that the file I was editing had just been zeroed. I lost a lot of
work that day because I didn't have a backup. It's far safer to edit
local files and FTP them in, even if you just use a web-based FTP system
(and mosting hosting control panels will have one)

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] Re: Re: replying to list (I give up)

2010-04-25 Thread Ashley Sheridan
On Sun, 2010-04-25 at 13:30 +0200, Michelle Konzack wrote:

> Hello Michiel Sikma,
> 
> Am 2010-04-25 12:21:40, hacktest Du folgendes herunter:
> > Ah, you're right, I misread. But I believe all of those games except Diablo
> > will run under DOS as well. DOSBox can also run up to Windows 3.11.
> 
> WfW 3.11 in fullscreen?   Hahaha!   LOL!
> 
> I can imagine, my AMD Phenom Quad-Core with 16 GByte of memory and  then
> WfW 3.11 in fullscreen in DOSBox.  Would be the fastest WfW 3.11 on  our
> shady planet...
> 
> Thanks, Greetings and nice Day/Evening
> Michelle Konzack
> Systemadministrator
> 


Windows 3.11, damn that takes me back a bit! That was my first ever
encounter with Windows (although I did try Windows 2 a little bit after
the first time I played on 3.11)

>From what I remember, it was damn fast, but that might be because it
didn't really have to do much at all. 16-bit with no proper program
switching. I think you can still get a KDE theme to make your Linux
system look like one of those old 3.11 systems! I don't think it reduces
the functionality to that of Windows 3.11 though. That would take some
real special skills :p


Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] Structured PHP studying

2010-04-25 Thread tedd

At 3:01 PM +0100 4/24/10, Ashley Sheridan wrote:

I look at some code I did a while back and shudder. It started off well
enough, but then feature creep set in and now it looks like a creation
of Frankenstein! I think it happens to all of us at some point, it just
depends how well we deal with it. I'd rather have less then stellar code
than have to tell a client it's going to take more time to add a feature
and then have them go elsewhere.

Thanks,
Ash


Ash et al:

Wait until you have 40 years of code to look back at. I'm not ashamed 
of any of any of my code for it was "best" that I could do I with the 
equipment I had.


Of course, reviewing the web sites I did in 1995, and comparing them 
with with I do today gives me pause. However, the tools that were 
available then were not what they are today.


So, when you are reviewing/analyzing your past work, you really have 
two things to consider: 1) What you created; 2) and the technology of 
the time.


Cheers,

tedd


--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] What's your game? (X-PHP)

2010-04-25 Thread tedd

Hi gang:

Considering we recently had several people mention what games they 
play, it might be interesting to see what everyone plays.


As for me, I currently play "Modern Warfare 2" on XBOX. It's the most 
recent in a long line of war games (i.e., Call of Duty, Ghost Recon, 
etc.).


My gamer tag is "special tedd"

What's your game?

Cheers,

tedd


--
---
http://sperling.com  http://ancientstones.com  http://earthstones.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP not being read?

2010-04-25 Thread Gary
But if that's somehow not it, post the entire source code of   your 
file

on
a
site like http://pastie.org/ so we can have a closer look.

Michiel



__ Information from ESET Smart Security, version of virus
signature database 5057 (20100424) __

The message was checked by ESET Smart Security.

http://www.eset.com






__ Information from ESET Smart Security, version of virus
signature database 5057 (20100424) __

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



Karl DeSaulniers
Design Drumm
http://designdrumm.com


__ Information from ESET Smart Security, version of virus
signature database 5057 (20100424) __

The message was checked by ESET Smart Security.

http://www.eset.com







__ Information from ESET Smart Security, version of virus 
signature database 5057 (20100424) __


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



Karl DeSaulniers
Design Drumm
http://designdrumm.com


__ Information from ESET NOD32 Antivirus, version of virus 
signature database 5057 (20100424) __


The message was checked by ESET NOD32 Antivirus.

http://www.eset.com





__ Information from ESET NOD32 Antivirus, version of virus 
signature database 5057 (20100424) __


The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



__ Information from ESET NOD32 Antivirus, version of virus 
signature database 5057 (20100424) __


The message was checked by ESET NOD32 Antivirus.

http://www.eset.com






__ Information from ESET NOD32 Antivirus, version of virus signature 
database 5058 (20100425) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP not being read?

2010-04-25 Thread Gary

Peter

""Check that the php module is loaded by Apache on the 'bad' machine and
that the proper handler is set. Should be a line like:
AddHandler application/x-httpd-php .php .phtml .php3""

I have been looking through some of the files, but frankly it is a 
combination hunt and peek and a guessing game, I'm just not sure which file 
to look in or where to find that file. I have done a few searches for 
"addhandler" and have not found it.


Could you point me in the right direction?

Thank you for your help.

Gary



"Peter Lind"  wrote in message 
news:m2k660eb66f1004242355od8a38bc5h7927d0082900f...@mail.gmail.com...

On 25 April 2010 05:00, Gary  wrote:

Karl

On the laptop, the original machine, it has Vista, Firefox 3.6.3. 
Previewing

on testing server Apache (XAMPP )on the computer, not network

On the tower, it is running XP Pro, Firefox 3.6.3. Previewing on local
testing server.




Check that the php module is loaded by Apache on the 'bad' machine and
that the proper handler is set. Should be a line like:
AddHandler application/x-httpd-php .php .phtml .php3

in the php5.conf file (look in mods-enabled, if you're running Apache2
- I'm hoping the setup is the same under Vista as *nix)

Regards
Peter

--

WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
Flickr: http://www.flickr.com/photos/fake51
BeWelcome: Fake51
Couchsurfing: Fake51


__ Information from ESET NOD32 Antivirus, version of virus 
signature database 5057 (20100424) __


The message was checked by ESET NOD32 Antivirus.

http://www.eset.com






__ Information from ESET NOD32 Antivirus, version of virus signature 
database 5058 (20100425) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: [RCD] [RCU] [bug of pecl pam ] I try to implement the change password plugin

2010-04-25 Thread fakessh
On Sun, 25 Apr 2010 00:38:17 +0200, fakessh  wrote:
> On Sat, 24 Apr 2010 06:00:55 +0200, fakessh  wrote:
>> On Thu, 22 Apr 2010 17:58:43 +0200, fakessh  wrote:
>>> On Thu, 22 Apr 2010 13:15:42 +0200, "A.L.E.C"  wrote:
 fakessh wrote:
 
> [r...@r13151 ~]# diff --text -u 
> /home/ftpchrootshell/fakessh/sasl.txt
>> 
 
 BTW, http://trac.roundcube.net/ticket/1486647 ;)
> 
> 
> pecl pam suffers from a known bug that prevents the proper use of driver
> pam
> that is right
> 
> http://pecl.php.net/bugs/bug.php?id=16995
> 
> 
> ___
> List info: http://lists.roundcube.net/dev/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Re: [RCD] [RCU] [bug of pecl pam ] I try to implement the change password plugin

2010-04-25 Thread fakessh
On Sun, 25 Apr 2010 16:16:00 +0200, fakessh  wrote:
> On Sun, 25 Apr 2010 00:38:17 +0200, fakessh  wrote:
>> On Sat, 24 Apr 2010 06:00:55 +0200, fakessh  wrote:
>>> On Thu, 22 Apr 2010 17:58:43 +0200, fakessh 
wrote:
 On Thu, 22 Apr 2010 13:15:42 +0200, "A.L.E.C"  wrote:
> fakessh wrote:
> 
>> [r...@r13151 ~]# diff --text -u 
>> /home/ftpchrootshell/fakessh/sasl.txt
>>> 
> 
> BTW, http://trac.roundcube.net/ticket/1486647 ;)
>> 
>> 
>> pecl pam suffers from a known bug that prevents the proper use of
driver
>> pam
>> that is right
>> 
>> http://pecl.php.net/bugs/bug.php?id=16995
>> 


after further research it is necessary to type ctrl D.
how to write in this code

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Structured PHP studying

2010-04-25 Thread David McGlone
On Saturday 24 April 2010 10:46:33 Nathan Rixham wrote:
> David McGlone wrote:
> > On Friday 23 April 2010 07:45:16 Michiel Sikma wrote:
> >> On 23 April 2010 13:15, David McGlone  wrote:
> >>> Is there a good strategy to studying PHP?
> >>>
> >>> For instance, is there a way to break everything down into small
> >>> managable topics?
> >>>
> >>> --
> >>> Blessings,
> >>> David M.
> >>
> >> Just build what you want to build and look things up when necessary. The
> >> biggest part of learning any language is becoming able to creatively
> >> solve problems within its realm of possibilities, and that's something
> >> you can't really learn just by reading and solving textbook problems.
> >> Hands-on experience is a very important key to understanding.
> >>
> >> Keep an open mind, ask people for answers if things get difficult,
> >> always assume that there's a better way to do something, and in a while
> >> you'll be able to write perfectly decent programs.
> >
> > This is the route I have been following for the past couple years and I
> > have always assumed there is a better way to do something and that is, in
> > a way what makes me lose confidence.
> >
> > I always feel like my code is crap and sometimes even ashamed to even
> > show any of it.
>
> Hi David,
>
> Really good to see somebody asking for honest advice on a v important
> matter :)

Thank you.

>
> First, if I may, I'd like to suggest that being ashamed to show your
> code is never going to be a productive way to work, rather the more code
> you show, the more feedback you will get on your code, and often with
> examples of alternative ways to do it - posting snippets and
> opensourcing are great ways of crowd sourcing solid feedback.

This is very true!

>
> Next, saying your code is crap, we all feel like that sometimes, but
> it's critical to note that if your code does the job it's supposed to,
> then it's a success! A few months ago I was questioning myself again and
> wrote this: http://webr3.org/blog/general/the-wall/ - the point is it's
> a good thing to question yourself, it's a good thing to take everything
> in to consideration, and often I (used to) find myself looking at very
> short procedural ways of doing things and think.. "why am i making all
> these classes"; it's our job as programmers to know when to implement
> something in 10 quick lines that are easy to maintain, and when to
> create an all singing and dancing framework type affair, pros and cons
> to each, and there is no "One True Way" TM of doing things - each bit of
> code is very much dependent on context, scenario and maintenance costs.
>
> Okay, on to your specific questions!
>
> We can break this down in to small(~ish) common junks, and which you
> study, take further and in what order is entirely up to you:
>
> General Coding
> This is the stuff that translates to almost every language, for loops,
> echo'ing, simple code optimisation and basically just how to script and
> program - I'll assume that after two years you've got this nailed better
> than any book can teach you, from here it's just experience and picking
> up tricks on the way, so generally no need to worry!
>
> PHP
> As you know php is a specific language, and the best way to learn
> everything php specific, is literally to read the manual, from start to
> finish, a few times, and keep referring back to it, if you see something
> you haven't actually used before then give it a quick go in a short 5-10
> line script and have a play, the 2 minutes it takes will be more than
> worth it (by doing it, it'll get engrained in you).

Wow, I've done this and didn't even realize it. Just a few weeks ago, I was 
trying to understand about how $this -> worked. 

I think I posted that over on php-db. I learned it was related to classes, so 
I dug into classes in the php manual and just wrote code and played with it. I 
did get a better understanding of the whole picture, but probably not enough 
to fully feel comfortable.

>
> Aside: in every project i do, and at all times i have a test.php where I
> literally just try out ways of doing things and snippets of code, once
> I'm done i stick an exit; before it then do the next snippet above it,
> this way i always have one nice file of snippets in every project to
> refer back to - they often come in handy for helping on this list
> actually, and in fact sometimes are from peoples code on this list!

Great Idea! I probably would have never thought of this. How do you include 
these snippets into your actual work to see if they work? Do you just run the 
file or make functions and just include the function in the code you are 
working on?

>
> Coding Standards
> One of the biggest factors of feeling your code isn't good enough, is by
> not using any coding standards,

This is absolutely what I have learned in the past couple months. I bought 2 
books called Beginning PHP and MySQL E-Commerce From Novice to Professional 
1st and 2nd edition by Cristian Darie and thes

Re: [PHP] Structured PHP studying

2010-04-25 Thread paragasu
> Just build what you want to build and look things up when necessary.
I did exactly like this. My first application is a forum. It never made it
to production,
but i learn a lot. And i am glad i learn it this way. It is a bit costly but
fun.


On Sun, Apr 25, 2010 at 11:01 PM, David McGlone  wrote:

> On Saturday 24 April 2010 10:46:33 Nathan Rixham wrote:
> > David McGlone wrote:
> > > On Friday 23 April 2010 07:45:16 Michiel Sikma wrote:
> > >> On 23 April 2010 13:15, David McGlone  wrote:
> > >>> Is there a good strategy to studying PHP?
> > >>>
> > >>> For instance, is there a way to break everything down into small
> > >>> managable topics?
> > >>>
> > >>> --
> > >>> Blessings,
> > >>> David M.
> > >>
> > >> Just build what you want to build and look things up when necessary.
> The
> > >> biggest part of learning any language is becoming able to creatively
> > >> solve problems within its realm of possibilities, and that's something
> > >> you can't really learn just by reading and solving textbook problems.
> > >> Hands-on experience is a very important key to understanding.
> > >>
> > >> Keep an open mind, ask people for answers if things get difficult,
> > >> always assume that there's a better way to do something, and in a
> while
> > >> you'll be able to write perfectly decent programs.
> > >
> > > This is the route I have been following for the past couple years and I
> > > have always assumed there is a better way to do something and that is,
> in
> > > a way what makes me lose confidence.
> > >
> > > I always feel like my code is crap and sometimes even ashamed to even
> > > show any of it.
> >
> > Hi David,
> >
> > Really good to see somebody asking for honest advice on a v important
> > matter :)
>
> Thank you.
>
> >
> > First, if I may, I'd like to suggest that being ashamed to show your
> > code is never going to be a productive way to work, rather the more code
> > you show, the more feedback you will get on your code, and often with
> > examples of alternative ways to do it - posting snippets and
> > opensourcing are great ways of crowd sourcing solid feedback.
>
> This is very true!
>
> >
> > Next, saying your code is crap, we all feel like that sometimes, but
> > it's critical to note that if your code does the job it's supposed to,
> > then it's a success! A few months ago I was questioning myself again and
> > wrote this: http://webr3.org/blog/general/the-wall/ - the point is it's
> > a good thing to question yourself, it's a good thing to take everything
> > in to consideration, and often I (used to) find myself looking at very
> > short procedural ways of doing things and think.. "why am i making all
> > these classes"; it's our job as programmers to know when to implement
> > something in 10 quick lines that are easy to maintain, and when to
> > create an all singing and dancing framework type affair, pros and cons
> > to each, and there is no "One True Way" TM of doing things - each bit of
> > code is very much dependent on context, scenario and maintenance costs.
> >
> > Okay, on to your specific questions!
> >
> > We can break this down in to small(~ish) common junks, and which you
> > study, take further and in what order is entirely up to you:
> >
> > General Coding
> > This is the stuff that translates to almost every language, for loops,
> > echo'ing, simple code optimisation and basically just how to script and
> > program - I'll assume that after two years you've got this nailed better
> > than any book can teach you, from here it's just experience and picking
> > up tricks on the way, so generally no need to worry!
> >
> > PHP
> > As you know php is a specific language, and the best way to learn
> > everything php specific, is literally to read the manual, from start to
> > finish, a few times, and keep referring back to it, if you see something
> > you haven't actually used before then give it a quick go in a short 5-10
> > line script and have a play, the 2 minutes it takes will be more than
> > worth it (by doing it, it'll get engrained in you).
>
> Wow, I've done this and didn't even realize it. Just a few weeks ago, I was
> trying to understand about how $this -> worked.
>
> I think I posted that over on php-db. I learned it was related to classes,
> so
> I dug into classes in the php manual and just wrote code and played with
> it. I
> did get a better understanding of the whole picture, but probably not
> enough
> to fully feel comfortable.
>
> >
> > Aside: in every project i do, and at all times i have a test.php where I
> > literally just try out ways of doing things and snippets of code, once
> > I'm done i stick an exit; before it then do the next snippet above it,
> > this way i always have one nice file of snippets in every project to
> > refer back to - they often come in handy for helping on this list
> > actually, and in fact sometimes are from peoples code on this list!
>
> Great Idea! I probably would have never thought of this. How do you include
> th

Re: [PHP] Structured PHP studying

2010-04-25 Thread David McGlone
On Saturday 24 April 2010 10:01:03 Ashley Sheridan wrote:
> On Sat, 2010-04-24 at 07:14 -0400, David McGlone wrote:
> > On Friday 23 April 2010 07:45:16 Michiel Sikma wrote:
> > > On 23 April 2010 13:15, David McGlone  wrote:
> > > > Is there a good strategy to studying PHP?
> > > >
> > > > For instance, is there a way to break everything down into small
> > > > managable topics?
> > > >
> > > > --
> > > > Blessings,
> > > > David M.
> > >
> > > Just build what you want to build and look things up when necessary.
> > > The biggest part of learning any language is becoming able to
> > > creatively solve problems within its realm of possibilities, and that's
> > > something you can't really learn just by reading and solving textbook
> > > problems. Hands-on experience is a very important key to understanding.
> > >
> > > Keep an open mind, ask people for answers if things get difficult,
> > > always assume that there's a better way to do something, and in a while
> > > you'll be able to write perfectly decent programs.
> >
> > This is the route I have been following for the past couple years and I
> > have always assumed there is a better way to do something and that is, in
> > a way what makes me lose confidence.
> >
> > I always feel like my code is crap and sometimes even ashamed to even
> > show any of it.
> >
> > --
> > Blessings,
> > David M.
>
> For personal sites, I think as long as the code works, and doesn't have
> any glaringly obvious security holes in, then it should be fine.
> Personal sites tend not to have a huge amount of traffic, so speed
> doesn't really become an issue unless you're doing something totally
> crazy (like generating all of your header images on the fly with PHP for
> example without any caching)
>
> For commercial sites, more time should be spent on security and testing,
> and working over things in your head about how the site is going to get
> used. If an area of the site that you feel is going to be very popular
> will be busy, then is creating a lot of large objects and making many DB
> calls such a great idea?

In a sense it seems to me that this is the bridge I'm trying to cross. 
Developing personal sites aren't all that hard, because they don't require 
much functionality and most of the complexity shouldn't be too hard to solve 
with a little PHP. 

But when it comes to commercial sites, the complexity is even greater and also 
more intimidating to me.

>
> I look at some code I did a while back and shudder. It started off well
> enough, but then feature creep set in and now it looks like a creation
> of Frankenstein! I think it happens to all of us at some point, it just
> depends how well we deal with it. I'd rather have less then stellar code
> than have to tell a client it's going to take more time to add a feature
> and then have them go elsewhere.

To me my code is more like a bunch of kiddie scripts thrown together with an 
occasional thing I like to call "smart block" (a block of code that I 
concocted and wrote, that works and actually makes me feel proud of) LOL

here's a snippet of code I wrote:

$directories = array('gemstone', 'bella', 'passage', 'sedona', 'deepstar', 
'crystalline');


foreach ($directories as $directory){
echo "$directory";



$mydir2=opendir("images/laminate/Wilsonart_Laminate_Colors/$directory");
$cats2=array();

while(($cat2=readdir($mydir2)) !==false){
if ($cat2 != "." && $cat2 != ".." && 
strpos(strtolower($cat2),"-thumb.jpg") 
!== false){
array_push($cats2, $cat2);

echo " ";
}
}
closedir($mydir2);

} 

To tell you the truth, I have absolutely no clue how I did it. There's 
probably a much much better way to do it, but at my current level, I was 
surprised I even wrote this.

There is only 1 thing I don't particularly like about it. That is, the fact I 
used some HTML, but it doesn't bother me too much because it was way before I 
knew much about separating the presentation from the logic, but now days I 
have come to love SMARTY.

SMARTY forces me to separate things and to work in tiers and in turn forces me 
into standards and organization of my code. (I hope I explained that 
correctly).

-- 
Blessings,
David M.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's your game? (X-PHP)

2010-04-25 Thread David McGlone
On Sunday 25 April 2010 09:16:23 tedd wrote:
> Hi gang:
>
> Considering we recently had several people mention what games they
> play, it might be interesting to see what everyone plays.
>
> As for me, I currently play "Modern Warfare 2" on XBOX. It's the most
> recent in a long line of war games (i.e., Call of Duty, Ghost Recon,
> etc.).
>
> My gamer tag is "special tedd"
>
> What's your game?

Command and Conquer Yuri's Revenge, Diablo II and occasionally Starcraft.

-- 
Blessings,
David M.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: Recommendation for online PHP editor please....

2010-04-25 Thread Al



On 4/25/2010 4:01 AM, Angus Mann wrote:

HI all. I'm looking for a recommendation for an online PHP editor.

Here's what I mean

I mean a PHP program I can install on my web-server, then log in and use it to 
browse and edit other PHP files on the server.

The idea is that I could make changes and bugfixes to a web app while I'm away 
from home/office.

Ideally it would be more than just a text editor, but also have syntax 
highlighting and formatting for PHP built in.

Any recommendations would be much appreciated.

Thanks,
Angus




Windows 7 RemoteApp and Desktop Connections feature may do it for you. I think 
it will let you run a good editor on one PC from any other one.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Re: What's your game? (X-PHP)

2010-04-25 Thread Nathan Rixham
tedd wrote:
> Hi gang:
> 
> Considering we recently had several people mention what games they play,
> it might be interesting to see what everyone plays.
> 
> As for me, I currently play "Modern Warfare 2" on XBOX. It's the most
> recent in a long line of war games (i.e., Call of Duty, Ghost Recon, etc.).
> 
> My gamer tag is "special tedd"
> 
> What's your game?

Honestly, I'm some kind of freak that refuses to play games on my "pc",
keep it for work, learning and inventing only - however, there is one
caveat which is Civilization 4 (which i haven't played for about 2 years
now), and occasionally I'll play mario kart on the wii, the other
occasional is Bejewelled on the mrs's iphone 3gs.

stupid thing is I have all the games consoles apart from a PS3!


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Recommendation for online PHP editor please....

2010-04-25 Thread Jim Lucas

Angus Mann wrote:

HI all. I'm looking for a recommendation for an online PHP editor.

Here's what I mean

I mean a PHP program I can install on my web-server, then log in and use it to 
browse and edit other PHP files on the server.

The idea is that I could make changes and bugfixes to a web app while I'm away 
from home/office.

Ideally it would be more than just a text editor, but also have syntax 
highlighting and formatting for PHP built in.

Any recommendations would be much appreciated.

Thanks,
Angus




I found this one a few months ago.

http://www.gerd-tentler.de/tools/filemanager/

Put it in a password protected area on your server and you have it made.

It comes with syntax highlighting that has worked for me so far.

--
Jim Lucas

A: Maybe because some people are too annoyed by top-posting.
Q: Why do I not get an answer to my question(s)?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's your game? (X-PHP)

2010-04-25 Thread Jim Lucas

tedd wrote:

Hi gang:

Considering we recently had several people mention what games they play, 
it might be interesting to see what everyone plays.


As for me, I currently play "Modern Warfare 2" on XBOX. It's the most 
recent in a long line of war games (i.e., Call of Duty, Ghost Recon, etc.).


My gamer tag is "special tedd"

What's your game?

Cheers,

tedd




Battlefield 2142  Call Sign: ChefLord

--
Jim Lucas

A: Maybe because some people are too annoyed by top-posting.
Q: Why do I not get an answer to my question(s)?
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's your game? (X-PHP)

2010-04-25 Thread Robert Cummings

tedd wrote:

Hi gang:

Considering we recently had several people mention what games they 
play, it might be interesting to see what everyone plays.


As for me, I currently play "Modern Warfare 2" on XBOX. It's the most 
recent in a long line of war games (i.e., Call of Duty, Ghost Recon, 
etc.).


My gamer tag is "special tedd"

What's your game?


My games tend to focus on something the kids can have fun with too:

Mario Kart Wii (I love the kart franchise)
Super Mario Bros Wii (8 star coins to go in world 9)
Battle for Wesnoth
The Wii lego games (Indiana Jones, Batman, etc),

The last couple of days I've been giving Lord of Ultima a try since it's 
completely browser based (Javascript/HTML) and that piqued my interest. 
While it's well done as a web game, it's a bit too dependent on waiting 
for stuff to complete so it gets tedious. Still... it's an example of 
what can be done.


Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Structured PHP studying

2010-04-25 Thread Nathan Rixham
David McGlone wrote:
> On Saturday 24 April 2010 10:46:33 Nathan Rixham wrote:
>> Aside: in every project i do, and at all times i have a test.php where I
>> literally just try out ways of doing things and snippets of code, once
>> I'm done i stick an exit; before it then do the next snippet above it,
>> this way i always have one nice file of snippets in every project to
>> refer back to - they often come in handy for helping on this list
>> actually, and in fact sometimes are from peoples code on this list!
> 
> Great Idea! I probably would have never thought of this. How do you include 
> these snippets into your actual work to see if they work? Do you just run the 
> file or make functions and just include the function in the code you are 
> working on?

typically I use it for handling little scenarios, will try out a couple
of approaches and then whichever is best I'll incorporate in to my
script/class/method/function and just leave the test code in the
test.php file for future reference.

each little snippet of code we make has one task to do, normally given
the values (x,y,z) create something new, perform some calculation or
take some action and return the status - regardless of how we wrap that
up in the end, and where we get our values from, the code "in the
middle" will typically be the same; so if I write:

$tests = array( 'nathan', 'nath.an', 'nat:@han$%^&' );
foreach( $tests as $test ) {
   echo trim( preg_replace( '/[^a-z.]/im' , '' , $test ));
}

in my test.php to figure out how to strip all non alpha chars, then when
I'm happy with the results, I'll simply write a function/method to do
that task in my real app.

function( $string )
{
  return trim( preg_replace( '/[^a-z.]/im' , '' , $string ));
}

to run the test.php I just use my IDE, but you could easily just php -f
test.php

the main point of doing this is that after I've tried one approach and
am ready to try the next i stick and exit; before it, this way it won't
run, but its catalogued there - kinda like taking notes back when we
were in school and "show how you worked it out", always useful to look
back on.

>> Coding Standards
>> One of the biggest factors of feeling your code isn't good enough, is by
>> not using any coding standards,
> 
> This is absolutely what I have learned in the past couple months. I bought 2 
> books called Beginning PHP and MySQL E-Commerce From Novice to Professional 
> 1st and 2nd edition by Cristian Darie and these 2 books build a T-Shirt web 
> site from start to finish, and I realized with these books just how important 
> organizing your code and following standards is.
> 
>> this is pretty simple stuff but makes
>> your life a lot easier, and code a lot cleaner - even crap broken code
>> comes across a lot better when it's nicely formatted lol. A good IDE can
>> help you here, as for which coding standards that's up to you, but you
>> can check you are adhering to them by using "php code sniffer" -
>> personally I opt for a slightly modified version of zend coding
>> standards with the odd bit of extra spacing around params etc.
> 
> It's sad as long as I've been pushing myself to learn PHP, and studying 
> anything I can get my hands on, I've never heard of "php code sniffer".

http://framework.zend.com/manual/en/coding-standard.html
http://pear.php.net/package/PHP_CodeSniffer/redirected

netbeans also has support and this for eclipse http://www.phpsrc.org/
(which i haven't used yet) - personally I use phpUnderControl for
automated building and have ant tasks set up to run all my code through
php lint check, php code sniffer, php doc and to run all unit tests,
then if it's okay it is automatically deployed out to my tests sites,
and if not informs me that the build (code) is broken.

> On a side note: the trick is to make the code look so darn gibberish, that it 
> makes whoever had written it look like a genius ;-)

actually mate that the complete opposite of what you want, and a sign of
very very poor coding indeed ;) you want the code to be as simple and as
clean as possible, minimal whilst crystal clear - small short clean
functions that do one task properly and only do that one task - that's
the sign of a good coder and one who has mastered (or is mastering) the
art of programming.

incidentally "the art of computer programming" is exceptionally good if
you have the time and money:
http://en.wikipedia.org/wiki/The_Art_of_Computer_Programming
http://www.amazon.com/Art-Computer-Programming-Volumes-Boxed/dp/0201485419


> Thank you Nathan! I have bookmarked all the sites and will be reading all of 
> them. Your words have inspired me to give it my all once again.

brilliant! :D

Best,

Nathan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] creating a PHP wrapper script?

2010-04-25 Thread Nathan Rixham
Peter Lind wrote:
> php.net/curl should be able to do what you want.

+1

> file_get_contents with a proper stream context should also work (have
> a look at functions like http://dk.php.net/manual/en/context.http.php
> )

very important to note that file_get_contents uses HTTP 1.0 not 1.1 by
default.

99% of web servers use HTTP 1.1 nowadays.

ps: please don't hook up on the 99%, i don't know the exact figure :p

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's your game? (X-PHP)

2010-04-25 Thread Nathan Rixham
Robert Cummings wrote:
> tedd wrote:
>> Hi gang:
>>
>> Considering we recently had several people mention what games they
>> play, it might be interesting to see what everyone plays.
>>
>> As for me, I currently play "Modern Warfare 2" on XBOX. It's the most
>> recent in a long line of war games (i.e., Call of Duty, Ghost Recon,
>> etc.).
>>
>> My gamer tag is "special tedd"
>>
>> What's your game?
> 
> My games tend to focus on something the kids can have fun with too:
> 
> Mario Kart Wii (I love the kart franchise)

^^ do you play online? I'll kick your ass :p lol-ol-ol

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's your game? (X-PHP)

2010-04-25 Thread Hans Åhlin
Lineage II
Comanche 4
Unreal Tournament
Blood Rayne 1 and 2
Battlefield 2, 2142
Warhammer 40k
Fallout 1, 2 and 3

My game list at CheatHappens.com
http://www.cheathappens.com/show_user.asp?userID=553587

**
 Hans Åhlin
   Tel: +46761488019
   http://www.kronan-net.com/
   irc://irc.freenode.net:6667 - TheCoin
**



2010/4/25 tedd :
> Hi gang:
>
> Considering we recently had several people mention what games they play, it
> might be interesting to see what everyone plays.
>
> As for me, I currently play "Modern Warfare 2" on XBOX. It's the most recent
> in a long line of war games (i.e., Call of Duty, Ghost Recon, etc.).
>
> My gamer tag is "special tedd"
>
> What's your game?
>
> Cheers,
>
> tedd
>
>
> --
> ---
> http://sperling.com  http://ancientstones.com  http://earthstones.com
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's your game? (X-PHP)

2010-04-25 Thread Robert Cummings
I do, though I can't find the disc right now... Keiran (19 months) was 
last seen toddling around with it about 2 weeks ago :/


When I find it I'll send you my player code.




Nathan Rixham wrote:

Robert Cummings wrote:

tedd wrote:

Hi gang:

Considering we recently had several people mention what games they
play, it might be interesting to see what everyone plays.

As for me, I currently play "Modern Warfare 2" on XBOX. It's the most
recent in a long line of war games (i.e., Call of Duty, Ghost Recon,
etc.).

My gamer tag is "special tedd"

What's your game?

My games tend to focus on something the kids can have fun with too:

Mario Kart Wii (I love the kart franchise)


^^ do you play online? I'll kick your ass :p lol-ol-ol



--
http://www.interjinn.com
Application and Templating Framework for PHP

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's your game? (X-PHP)

2010-04-25 Thread shiplu
King Of Fighters (Series),
Tom Raider (Series),
Grand Theft Auto (Series),
Max Payne, Max Payne II,
Prince Of Persia (Series),
&
Sudoku

Shiplu Mokaddim
My talks, http://talk.cmyweb.net
Follow me, http://twitter.com/shiplu
SUST Programmers, http://groups.google.com/group/p2psust
Innovation distinguishes bet ... ... (ask Steve Jobs the rest)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's your game? (X-PHP)

2010-04-25 Thread Ashley Sheridan
On Sun, 2010-04-25 at 13:56 -0400, Robert Cummings wrote:

> tedd wrote:
> > Hi gang:
> > 
> > Considering we recently had several people mention what games they 
> > play, it might be interesting to see what everyone plays.
> > 
> > As for me, I currently play "Modern Warfare 2" on XBOX. It's the most 
> > recent in a long line of war games (i.e., Call of Duty, Ghost Recon, 
> > etc.).
> > 
> > My gamer tag is "special tedd"
> > 
> > What's your game?
> 
> My games tend to focus on something the kids can have fun with too:
> 
> Mario Kart Wii (I love the kart franchise)
> Super Mario Bros Wii (8 star coins to go in world 9)
> Battle for Wesnoth
> The Wii lego games (Indiana Jones, Batman, etc),
> 
> The last couple of days I've been giving Lord of Ultima a try since it's 
> completely browser based (Javascript/HTML) and that piqued my interest. 
> While it's well done as a web game, it's a bit too dependent on waiting 
> for stuff to complete so it gets tedious. Still... it's an example of 
> what can be done.
> 
> Cheers,
> Rob.
> -- 
> http://www.interjinn.com
> Application and Templating Framework for PHP
> 


Hehe, I love the Mario Kart genre too! Got that on the Wii and the Super
Mario Bros. Also go Lego Star Wars, because who doesn't like Lego or
Star Wars?!

On the PC, I used to play all the typical ones. Diablo 1 & 2, Baldurs
Gate 1 & 2, Icewind Dale 1 & 2, Might & Magic 7-9 (7 is still my
favourite despite 9 going fully 3D) Nowadays though it's just World of
Warcraft. I figure I pay the subscription, so if I'm gonna play a game,
I may as well get my moneys worth!

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] PHP not being read?

2010-04-25 Thread Kevin Kinsey

Gary wrote:

Peter

""Check that the php module is loaded by Apache on the 'bad' machine and
that the proper handler is set. Should be a line like:
AddHandler application/x-httpd-php .php .phtml .php3""

I have been looking through some of the files, but frankly it is a 
combination hunt and peek and a guessing game, I'm just not sure which 
file to look in or where to find that file. I have done a few searches 
for "addhandler" and have not found it.


Could you point me in the right direction?


Find the file "httpd.conf".  I've no idea what OS you're on;
a classical location might be something like:

{/usr/local}/etc/apache/httpd.conf

HTH,

Kevin Kinsey

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] What's your game? (X-PHP)

2010-04-25 Thread Jason Pruim


On Apr 25, 2010, at 9:16 AM, tedd wrote:


Hi gang:

Considering we recently had several people mention what games they  
play, it might be interesting to see what everyone plays.


As for me, I currently play "Modern Warfare 2" on XBOX. It's the  
most recent in a long line of war games (i.e., Call of Duty, Ghost  
Recon, etc.).


My gamer tag is "special tedd"

What's your game?


Personally I've played everything from those little mini facebook app  
games (Farmville, Mafia Wars) to the grand theft auto series on my  
ps2, but for christmas my wife surprised me with a wii... So now on my  
brand new game console I am playing Mario Brother 1 & 3 (Still need to  
get 2) :P But I'm also playing Mario Cart on it, and lego star wars  
plus a ton of kids games that my oldest loves for me to play with him  
on :)




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Weird problem with is_file()

2010-04-25 Thread Michelle Konzack
Hi,

I have a code sniplet which does not work and I do not know why:

8<--
  $isfile=shell_exec("ls /tmp/tdphp-vserver/SESSION_" . $_SERVER['REMOTE_ADDR'] 
. "_" . $_COOKIE['VSERVER_AUTHUSER'] . "_* |head -n1");

  if (is_file($isfile)) {

8<--

nothing special, and the file  is there, but the stuff with

is_file($isfile)

is not working...  If I enter the file in place of $isfile, then  it  is
working.   Quoting of $isfile does not work too.

What have a overseen?

Oh, if you think, it is an array, no it is not, because otherwise

  if (is_array($isfile)) {

would work.

Thanks, Greetings and nice Day/Evening
Michelle Konzack


signature.pgp
Description: Digital signature


Re: [PHP] Weird problem with is_file()

2010-04-25 Thread Karl DeSaulniers

Hi Michelle,
Maybe try adding an error catch to see what you get.

if(is_file($isFile)) or die(mysql_error());

On Apr 25, 2010, at 3:14 PM, Michelle Konzack wrote:


 if (is_file($isfile)) {


Karl DeSaulniers
Design Drumm
http://designdrumm.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Weird problem with is_file()

2010-04-25 Thread Karl DeSaulniers

Oops, my apologies. That is a PHP MySQL solution. Wrong list.
Please disregard that solution.
Maybe find a way to get an error response from your session to see  
what the problem is.


Karl


On Apr 25, 2010, at 3:24 PM, Karl DeSaulniers wrote:


Hi Michelle,
Maybe try adding an error catch to see what you get.

if(is_file($isFile)) or die(mysql_error());

On Apr 25, 2010, at 3:14 PM, Michelle Konzack wrote:


 if (is_file($isfile)) {


Karl DeSaulniers
Design Drumm
http://designdrumm.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Karl DeSaulniers
Design Drumm
http://designdrumm.com


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] creating a PHP wrapper script?

2010-04-25 Thread Danilo Moncastro Sabbagh
Even tho most of the servers uses 1.1 they have compliant configurations. 


or at least they should. 

things like mod_gzip and deflate are usually only used if the request is 1.1

to be honest.. if i understood you correctly the curl solution or even a 
wrapper for another downloader like wget or aria is possible...
but id guess that a more fast and simple solution could be archived with a 
javascript chamging the image srcs or an ajax request with jquery or other 
popular yet simple js lib.


Dan


Danilo Moncastro Sabbagh
cel: +55 31 88613128
gtalk: torea...@gmail.com


Em 25/04/2010, às 15:06, Nathan Rixham escreveu:

> Peter Lind wrote:
>> php.net/curl should be able to do what you want.
> 
> +1
> 
>> file_get_contents with a proper stream context should also work (have
>> a look at functions like http://dk.php.net/manual/en/context.http.php
>> )
> 
> very important to note that file_get_contents uses HTTP 1.0 not 1.1 by
> default.
> 
> 99% of web servers use HTTP 1.1 nowadays.
> 
> ps: please don't hook up on the 99%, i don't know the exact figure :p
> 
> -- 
> 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] What's your game? (X-PHP)

2010-04-25 Thread Danilo Moncastro Sabbagh
Is anyone up for a vgaplanets match? 

Danilo Moncastro Sabbagh
cel: +55 31 88613128
gtalk: torea...@gmail.com


Em 25/04/2010, às 17:13, Jason Pruim escreveu:

> 
> On Apr 25, 2010, at 9:16 AM, tedd wrote:
> 
>> Hi gang:
>> 
>> Considering we recently had several people mention what games they play, it 
>> might be interesting to see what everyone plays.
>> 
>> As for me, I currently play "Modern Warfare 2" on XBOX. It's the most recent 
>> in a long line of war games (i.e., Call of Duty, Ghost Recon, etc.).
>> 
>> My gamer tag is "special tedd"
>> 
>> What's your game?
> 
> Personally I've played everything from those little mini facebook app games 
> (Farmville, Mafia Wars) to the grand theft auto series on my ps2, but for 
> christmas my wife surprised me with a wii... So now on my brand new game 
> console I am playing Mario Brother 1 & 3 (Still need to get 2) :P But I'm 
> also playing Mario Cart on it, and lego star wars plus a ton of kids games 
> that my oldest loves for me to play with him on :)
> 
> 
> 
> -- 
> 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] What's your game? (X-PHP)

2010-04-25 Thread sean greenslade
On Sun, Apr 25, 2010 at 4:13 PM, Jason Pruim wrote:

>
> On Apr 25, 2010, at 9:16 AM, tedd wrote:
>
>  Hi gang:
>>
>> Considering we recently had several people mention what games they play,
>> it might be interesting to see what everyone plays.
>>
>> As for me, I currently play "Modern Warfare 2" on XBOX. It's the most
>> recent in a long line of war games (i.e., Call of Duty, Ghost Recon, etc.).
>>
>> My gamer tag is "special tedd"
>>
>> What's your game?
>>
>
> Personally I've played everything from those little mini facebook app games
> (Farmville, Mafia Wars) to the grand theft auto series on my ps2, but for
> christmas my wife surprised me with a wii... So now on my brand new game
> console I am playing Mario Brother 1 & 3 (Still need to get 2) :P But I'm
> also playing Mario Cart on it, and lego star wars plus a ton of kids games
> that my oldest loves for me to play with him on :)
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
Warsow is my game. I love it.

http://www.warsow.net

I play as radonWarrior.



-- 
--Zootboy


[PHP] CURL cannot connect to URL - IP address - after successful connection

2010-04-25 Thread ioan...@btinternet.com
I can return a target page - once, but then on refresh within a few 
hours the script curl_error is that it cannot connect to the host and 
return is empty.  The target URL is an ip address, not a named url, so 
maybe it has something to do with DNS.  I am on a shared server.  Any 
ideas on why this happens?


John

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] CURL cannot connect to URL - IP address - after successful connection

2010-04-25 Thread Ashley Sheridan
On Sun, 2010-04-25 at 22:17 +0900, ioan...@btinternet.com wrote:

> I can return a target page - once, but then on refresh within a few 
> hours the script curl_error is that it cannot connect to the host and 
> return is empty.  The target URL is an ip address, not a named url, so 
> maybe it has something to do with DNS.  I am on a shared server.  Any 
> ideas on why this happens?
> 
> John
> 


No, DNS is a Domain Named Server used to turn a domain name into an IP
address. As you say you're using an IP address directly, it won't go
near DNS.

Are there any messages in the logs that would give more specific
information?

Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] What's your game? (X-PHP)

2010-04-25 Thread David McGlone
On Sunday 25 April 2010 09:16:23 tedd wrote:

apologies if this made it to the list earlier this morning when I initially 
sent it. I didn't see my reply so I'm going to try again here.

> Hi gang:
>
> Considering we recently had several people mention what games they
> play, it might be interesting to see what everyone plays.
>
> As for me, I currently play "Modern Warfare 2" on XBOX. It's the most
> recent in a long line of war games (i.e., Call of Duty, Ghost Recon,
> etc.).
>
> My gamer tag is "special tedd"
>
> What's your game?

Command and Conquer Yuri's Revenge, Diablo II and occasionally Starcraft.

-- 
Blessings,
David M.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Structured PHP studying

2010-04-25 Thread David McGlone

Another one from this morning that didn't seem to make it to the list.

>>On Saturday 24 April 2010 10:01:03 Ashley Sheridan wrote:
> On Sat, 2010-04-24 at 07:14 -0400, David McGlone wrote:
> > On Friday 23 April 2010 07:45:16 Michiel Sikma wrote:
> > > On 23 April 2010 13:15, David McGlone  wrote:
> > > > Is there a good strategy to studying PHP?
> > > >
> > > > For instance, is there a way to break everything down into small
> > > > managable topics?
> > > >
> > > > --
> > > > Blessings,
> > > > David M.
> > >
> > > Just build what you want to build and look things up when necessary.
> > > The biggest part of learning any language is becoming able to
> > > creatively solve problems within its realm of possibilities, and that's
> > > something you can't really learn just by reading and solving textbook
> > > problems. Hands-on experience is a very important key to understanding.
> > >
> > > Keep an open mind, ask people for answers if things get difficult,
> > > always assume that there's a better way to do something, and in a while
> > > you'll be able to write perfectly decent programs.
> >
> > This is the route I have been following for the past couple years and I
> > have always assumed there is a better way to do something and that is, in
> > a way what makes me lose confidence.
> >
> > I always feel like my code is crap and sometimes even ashamed to even
> > show any of it.
> >
> > --
> > Blessings,
> > David M.
>
> For personal sites, I think as long as the code works, and doesn't have
> any glaringly obvious security holes in, then it should be fine.
> Personal sites tend not to have a huge amount of traffic, so speed
> doesn't really become an issue unless you're doing something totally
> crazy (like generating all of your header images on the fly with PHP for
> example without any caching)
>
> For commercial sites, more time should be spent on security and testing,
> and working over things in your head about how the site is going to get
> used. If an area of the site that you feel is going to be very popular
> will be busy, then is creating a lot of large objects and making many DB
> calls such a great idea?

In a sense it seems to me that this is the bridge I'm trying to cross. 
Developing personal sites aren't all that hard, because they don't require 
much functionality and most of the complexity shouldn't be too hard to solve 
with a little PHP. 

But when it comes to commercial sites, the complexity is even greater and also 
more intimidating to me.

>
> I look at some code I did a while back and shudder. It started off well
> enough, but then feature creep set in and now it looks like a creation
> of Frankenstein! I think it happens to all of us at some point, it just
> depends how well we deal with it. I'd rather have less then stellar code
> than have to tell a client it's going to take more time to add a feature
> and then have them go elsewhere.

To me my code is more like a bunch of kiddie scripts thrown together with an 
occasional thing I like to call "smart block" (a block of code that I 
concocted and wrote, that works and actually makes me feel proud of) LOL

here's a snippet of code I wrote:

$directories = array('gemstone', 'bella', 'passage', 'sedona', 'deepstar', 
'crystalline');


foreach ($directories as $directory){
echo "$directory";



$mydir2=opendir("images/laminate/Wilsonart_Laminate_Colors/$directory");
$cats2=array();

while(($cat2=readdir($mydir2)) !==false){
if ($cat2 != "." && $cat2 != ".." && 
strpos(strtolower($cat2),"-thumb.jpg") 
!== false){
array_push($cats2, $cat2);

echo " ";
}
}
closedir($mydir2);

} 

To tell you the truth, I have absolutely no clue how I did it. There's 
probably a much much better way to do it, but at my current level, I was 
surprised I even wrote this.

There is only 1 thing I don't particularly like about it. That is, the fact I 
used some HTML, but it doesn't bother me too much because it was way before I 
knew much about separating the presentation from the logic, but now days I 
have come to love SMARTY.

SMARTY forces me to separate things and to work in tiers and in turn forces me 
into standards and organization of my code. (I hope I explained that 
correctly).

-- 
Blessings,
David M.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] CURL cannot connect to URL - IP address - after successful connection

2010-04-25 Thread ioan...@btinternet.com


This is all I see in the error log:

SUEXEC error_log:


[2010-04-25 16:45:42]: uid: (1116/myname) gid: (1118/myname) cmd: 
fcgiwrapper



John

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] PHP not being read?

2010-04-25 Thread Gary

Kevin

Thanks for your reply, I had that file open and was looking around in it.

In a funny twist of things, I had created a phpinfo() page, and it did not 
show in the browser.  Then I switched root folders in DW, and the phpinfo() 
page showed. I copied the original experiment file and the numbers and 
calculations showed properly.  So it would seem the plot is thickening. 
Trouble is that I am unsure if I can trust this computer the way it is.


Thanks again for your help.


Gary


"Kevin Kinsey"  wrote in message 
news:4bd4a110.7040...@daleco.biz...

Gary wrote:

Peter

""Check that the php module is loaded by Apache on the 'bad' machine and
that the proper handler is set. Should be a line like:
AddHandler application/x-httpd-php .php .phtml .php3""

I have been looking through some of the files, but frankly it is a 
combination hunt and peek and a guessing game, I'm just not sure which 
file to look in or where to find that file. I have done a few searches 
for "addhandler" and have not found it.


Could you point me in the right direction?


Find the file "httpd.conf".  I've no idea what OS you're on;
a classical location might be something like:

{/usr/local}/etc/apache/httpd.conf

HTH,

Kevin Kinsey

__ Information from ESET NOD32 Antivirus, version of virus 
signature database 5059 (20100425) __


The message was checked by ESET NOD32 Antivirus.

http://www.eset.com






__ Information from ESET NOD32 Antivirus, version of virus signature 
database 5059 (20100425) __

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] copy() method on objects

2010-04-25 Thread Paul M Foster
Here is some code:

$a = new my_object;
$b = $a;

My understanding of this operation under PHP 5+ is that $b will now be
essentially a "reference" to $a, *not* a *copy* of the $a object. Is
this correct?

There are cases where I strictly want a *copy* of $a stored in $b. In
cases like this, I supply $a's class with a copy() method, and call it
like this:

$b = $a->copy();

Is this reasonable, or do people have a better/more correct way to do
this?

Paul

-- 
Paul M. Foster

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] copy() method on objects

2010-04-25 Thread Andrew Ballard
On Mon, Apr 26, 2010 at 12:24 AM, Paul M Foster  wrote:
> Here is some code:
>
> $a = new my_object;
> $b = $a;
>
> My understanding of this operation under PHP 5+ is that $b will now be
> essentially a "reference" to $a, *not* a *copy* of the $a object. Is
> this correct?
>
> There are cases where I strictly want a *copy* of $a stored in $b. In
> cases like this, I supply $a's class with a copy() method, and call it
> like this:
>
> $b = $a->copy();
>
> Is this reasonable, or do people have a better/more correct way to do
> this?
>
> Paul
>
> --
> Paul M. Foster
>

I've not used it, but isn't that what clone() is for?

Andrew

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] FPDF passing values into header and footer?

2010-04-25 Thread Angus Mann
Hi all. Whilst this question relates to fpdf (www.fpdf.org) I think it really 
is a PHP question, because it involves passing values into classes and 
functions. 

Here's the problem .. I need to pass a PHP variable like $number into the 
header of a PDF.
I have extended the FPDF class as follows

class PDF extends FPDF{
function Header(){
$this->SetFont('Arial','BU',12);
$this->Cell(0,5,'User notes for invoice number '.$number,0,'1','L');
}
}

The problem is, I can't figure out how to pass a value from the rest of the PHP 
script so it can be seen within the function above.

I'm sure the problem is one of the scope of the variable but this sort of thing 
is new to me and I can't figure out the syntax to make it work.

Before anybody suggests something like ...
function Header($number){}
Please recognize that the Header function is called automatically by FPDF and 
not by my code, so unless I totally hack the FPDF class I can't do this easily.

Any suggestions please?

 

Re: [PHP] copy() method on objects

2010-04-25 Thread richard gray

Paul M Foster wrote:

[snip]
  



There are cases where I strictly want a *copy* of $a stored in $b. In
cases like this, I supply $a's class with a copy() method, and call it
like this:

$b = $a->copy();

Is this reasonable, or do people have a better/more correct way to do
this?

Paul

  

http://fr.php.net/clone

hth
rich

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] FPDF passing values into header and footer?

2010-04-25 Thread Angus Mann


- Original Message - 
From: "Angus Mann" 

To: "php-general" 
Sent: Monday, April 26, 2010 2:46 PM
Subject: [PHP] FPDF passing values into header and footer?


Hi all. Whilst this question relates to fpdf (www.fpdf.org) I think it 
really is a PHP question, because it involves passing values into classes 
and functions.


Here's the problem .. I need to pass a PHP variable like $number into the 
header of a PDF.

I have extended the FPDF class as follows

class PDF extends FPDF{
   function Header(){
   $this->SetFont('Arial','BU',12);
   $this->Cell(0,5,'User notes for invoice number '.$number,0,'1','L');
   }
}


I hate it when I ask a question prematurely, because I could have figured it 
out myself. Getter and Setter functions are the answer.


function setNumber($number){
   $this->number = $number;
}

$pdf->setNumber('12345');




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php