Re: [PHP] Re: Continuance of the struggle (trying to understand)

2010-10-07 Thread Col Day

Morning all,

Apologies for the delay, I've just become a Dad for the first time so a 
little distracted!


If I explain exactly what I am trying to do then it may become clear as to 
where I'm going wrong.


Needless to say, new baby so want to show him off (Callum, 7lb4oz) so 
decided to buy a webname and pay for hosting, however money is a bit tight, 
so being adventurous (or stupid, not sure which yet) I set up apache on my 
laptop and started writing a website in Serif's WebPlus10. However I wanted 
to have an upload area on the site for friends and family to send their 
pictures of Callum (and the family and anything else they wanted) so there 
was a central "store". However I tried to find some html to handle the 
upload of these files but wasn't able to work it out, google and various 
other bitsx of research on the net showed that I probably needed to run a 
script to do this and PHP seemed the simplest, so I downloaded PHP 5.3.3 and 
installed it.


This is where it started getting tricky as I was using the PHP for dummies 
book from 2006. I typed that piece of code in (direct from the book) but 
added it as an html attachment into my site I was building. Uploaded the 
site to my localhost and had a look. I only got the HTML line from the 
script. This is where I started contacting you bunch of fine programmers!


I have now learned that if I save the script as a .php file and navigate 
direct to it on localhost it works fine, but I think what I am trying to do 
is get it to work in an existing webpage so that I can then get my upload 
working.


Any help you can offer from explanantions to whole bits of code will be 
greatly received!


Many thanks!

"Steve Staples"  wrote in message 
news:1286281586.4703.63.ca...@webdev01...

Col:

If i am reading this correctly, then i think you're looking at this all
wrong.

If you're working within some kind of page, stored outside of the
http://localhost served by apache, like say the .php file is on the
desktop... then yeah, you're not going to get the PHP information
displayed.

(tech people bare with me here...)
PHP pages, are "compiled" when called... so you need apache to call php
and translate the PHP code so that if there is any output, it will
display that output.

If you're trying to show a .php file from teh desktop, then apache isn't
handeling this request, and therefor has no idea that there is php code
that has to be compiled, and therefore it will just ignore it.

I am sure that I am goign to get flamed for that, but i think that it
kinda simplifies what apache does for php.

NOW... you can run a php file from the command line, but you're not
going to get the HTML results as you would had you ran if from the
localhost where apache knows what to do with a .php file.

So... long story short, if you want PHP to display the PHP stuff, then
you will need to have it interpreted by apache (or IIS, or whatever your
web server software is) to have it spit back to a web browser client.

Hopefully this makes sense, it is early here, i am just getting into
work :(, and it made sense while i was typing it... but my coffee intake
has not had time to work it's wonderful magic with me yet, so my
thoughts may be scattered.

Steve



On Tue, 2010-10-05 at 12:57 +0100, Col Day wrote:

LOL!

This is WITH xammp!!



"Gary"  wrote in message
news:i8f26m$j4...@dough.gmane.org...
> Col Day wrote:
>> ""Col Day""  wrote in message
>> news:23.81.45586.2820b...@pb1.pair.com...
>>>
>>>
>>>PHP Test
>>>
>>>
>>>This is an HTML line
>   
>>>>>   echo "This is a PHP line";
>>>   phpinfo();
>>>?>
>>>
>>>
>
>> If I paste this into a webpage I only get the "HTML" line as before.
>
> What do you mean, "webpage"? foo.php, for example, or foo.html? If the
> latter then I am guessing your Apache will serve the page purely as
> html, and it will never be processed by php. If the former then check
> that Apache is configured to run php files through php before serving
> them (must admit, I'm not sure how to do that, it depends on your 
> Apache

> and PHP). Or, really, just install xampp, it's by far the easiest way
> and will avoid all the problems associated with configuring two rather
> complex pieces of software.
>








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



Re: [PHP] daemon

2010-10-07 Thread Per Jessen
Tommy Pham wrote:

> Hi,
> 
> Does anyone have a script running as daemon on Linux/Unix (variants)
> as part of your PHP application?  

Yeah, several. 

> If so, what are you using to schedule the script to run? cron?

sysVinit and startproc



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


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



Re: [PHP] Re: Continuance of the struggle (trying to understand)

2010-10-07 Thread a...@ashleysheridan.co.uk
It will only work if your listing supports php, but you should just be able to 
put the whole sure up on your hosting, give the upload directory the correct 
permissions ( its most likely a more secure Linux hosting than insecure windows 
hosting) 

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

- Reply message -
From: "Col Day" 
Date: Thu, Oct 7, 2010 08:33
Subject: [PHP] Re: Continuance of the struggle (trying to understand)
To: 

Morning all,

Apologies for the delay, I've just become a Dad for the first time so a 
little distracted!

If I explain exactly what I am trying to do then it may become clear as to 
where I'm going wrong.

Needless to say, new baby so want to show him off (Callum, 7lb4oz) so 
decided to buy a webname and pay for hosting, however money is a bit tight, 
so being adventurous (or stupid, not sure which yet) I set up apache on my 
laptop and started writing a website in Serif's WebPlus10. However I wanted 
to have an upload area on the site for friends and family to send their 
pictures of Callum (and the family and anything else they wanted) so there 
was a central "store". However I tried to find some html to handle the 
upload of these files but wasn't able to work it out, google and various 
other bitsx of research on the net showed that I probably needed to run a 
script to do this and PHP seemed the simplest, so I downloaded PHP 5.3.3 and 
installed it.

This is where it started getting tricky as I was using the PHP for dummies 
book from 2006. I typed that piece of code in (direct from the book) but 
added it as an html attachment into my site I was building. Uploaded the 
site to my localhost and had a look. I only got the HTML line from the 
script. This is where I started contacting you bunch of fine programmers!

I have now learned that if I save the script as a .php file and navigate 
direct to it on localhost it works fine, but I think what I am trying to do 
is get it to work in an existing webpage so that I can then get my upload 
working.

Any help you can offer from explanantions to whole bits of code will be 
greatly received!

Many thanks!

"Steve Staples"  wrote in message 
news:1286281586.4703.63.ca...@webdev01...
> Col:
>
> If i am reading this correctly, then i think you're looking at this all
> wrong.
>
> If you're working within some kind of page, stored outside of the
> http://localhost served by apache, like say the .php file is on the
> desktop... then yeah, you're not going to get the PHP information
> displayed.
>
> (tech people bare with me here...)
> PHP pages, are "compiled" when called... so you need apache to call php
> and translate the PHP code so that if there is any output, it will
> display that output.
>
> If you're trying to show a .php file from teh desktop, then apache isn't
> handeling this request, and therefor has no idea that there is php code
> that has to be compiled, and therefore it will just ignore it.
>
> I am sure that I am goign to get flamed for that, but i think that it
> kinda simplifies what apache does for php.
>
> NOW... you can run a php file from the command line, but you're not
> going to get the HTML results as you would had you ran if from the
> localhost where apache knows what to do with a .php file.
>
> So... long story short, if you want PHP to display the PHP stuff, then
> you will need to have it interpreted by apache (or IIS, or whatever your
> web server software is) to have it spit back to a web browser client.
>
> Hopefully this makes sense, it is early here, i am just getting into
> work :(, and it made sense while i was typing it... but my coffee intake
> has not had time to work it's wonderful magic with me yet, so my
> thoughts may be scattered.
>
> Steve
>
>
>
> On Tue, 2010-10-05 at 12:57 +0100, Col Day wrote:
>> LOL!
>>
>> This is WITH xammp!!
>>
>>
>>
>> "Gary"  wrote in message
>> news:i8f26m$j4...@dough.gmane.org...
>> > Col Day wrote:
>> >> ""Col Day""  wrote in message
>> >> news:23.81.45586.2820b...@pb1.pair.com...
>> >>>
>> >>>
>> >>>PHP Test
>> >>>
>> >>>
>> >>>This is an HTML line
>> >   
>> >>>> >>>   echo "This is a PHP line";
>> >>>   phpinfo();
>> >>>?>
>> >>>
>> >>>
>> >
>> >> If I paste this into a webpage I only get the "HTML" line as before.
>> >
>> > What do you mean, "webpage"? foo.php, for example, or foo.html? If the
>> > latter then I am guessing your Apache will serve the page purely as
>> > html, and it will never be processed by php. If the former then check
>> > that Apache is configured to run php files through php before serving
>> > them (must admit, I'm not sure how to do that, it depends on your 
>> > Apache
>> > and PHP). Or, really, just install xampp, it's by far the easiest way
>> > and will avoid all the problems associated with configuring two rather
>> > complex pieces of software.
>> >
>>
>>
>
> 


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



[PHP] Re: daemon

2010-10-07 Thread Colin Guthrie
'Twas brillig, and Nathan Nobbe at 07/10/10 06:46 did gyre and gimble:
> On Wed, Oct 6, 2010 at 11:21 PM, Tommy Pham  wrote:
> 
>> Hi,
>>
>> Does anyone have a script running as daemon on Linux/Unix (variants) as
>> part
>> of your PHP application?  If so, what are you using to schedule the script
>> to run? cron?
>>
> 
> cron is one way to do it for scripts you schedule.  for real daemon
> processes though ive recently deployed a php script on gentoo by leveraging
> the init scripts.  essentially my program runs a while(true) and uses
> pcntl_fork() to create worker children.  the parent process listens for
> signals which are sent by an init script.  theres also a really nice
> start-stop-daemon function in the init script library which backgrounds the
> process for me and creates a pid lockfile.  really slick.
> 
> now i have an interface to my script like
> 
> /etc/init.d/php-service start
> 
> etc.  plus it ties right into the runlevel scripts, i just run
> 
> rc-update add php-service default
> 
> and the script will start when the box hits runlevel 3!

Yeah that's what I do too. Of course systemd will change everything
"initscript" related, but I don't expect it to hit production servers
for a while.

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited [http://www.tribalogic.net/]
Open Source:
  Mageia Contributor [http://www.mageia.org/]
  PulseAudio Hacker [http://www.pulseaudio.org/]
  Trac Hacker [http://trac.edgewall.org/]


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



Re: [PHP] Re: daemon

2010-10-07 Thread Per Jessen
Colin Guthrie wrote:

> Yeah that's what I do too. Of course systemd will change everything
> "initscript" related, but I don't expect it to hit production servers
> for a while.

Could easily be years - the init-sequence is only interesting at
boot-time, and server runs for years (wel, mine certainly do).


/Per

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


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



Re: [PHP] Re: Continuance of the struggle (trying to understand)

2010-10-07 Thread Steve Staples
Col:

Congratulations on becoming a father!!   As a father of 3 myself, I know
the joys that infants bring :)

As for your scripting issues, I would suggest that you save your files
with the .php extension, and not the .html.   The .php extension will
tell the php compliler/parser/whatever and spit back the "compiled" php
script.

If you're looking to just have a "photo gallery", there are many
free/opensource gallery scripts out there that you can use.  Mind you,
there is no "sense of accomplishment" when you do it this way, but if
you're unsure about security, and file injection/sql injection, then you
may be better off using one of those, until you're further along in your
book :)

http://www.google.ca/#sclient=psy&hl=en&q=opesource+php
+gallery&aq=f&aqi=g-sx1g-o1&aql=&oq=&gs_rfai=&pbx=1&fp=f85a0cf66583c3ac

in the past, I set up coppermine for a friend of mine, and he said it
works ok... but like I said, there are lots out there, and maybe
consider using one of them for now, so you can spend more time with your
new baby :)

Steve.



On Thu, 2010-10-07 at 09:00 +0100, a...@ashleysheridan.co.uk wrote:
> It will only work if your listing supports php, but you should just be able 
> to put the whole sure up on your hosting, give the upload directory the 
> correct permissions ( its most likely a more secure Linux hosting than 
> insecure windows hosting) 
> 
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
> 
> - Reply message -
> From: "Col Day" 
> Date: Thu, Oct 7, 2010 08:33
> Subject: [PHP] Re: Continuance of the struggle (trying to understand)
> To: 
> 
> Morning all,
> 
> Apologies for the delay, I've just become a Dad for the first time so a 
> little distracted!
> 
> If I explain exactly what I am trying to do then it may become clear as to 
> where I'm going wrong.
> 
> Needless to say, new baby so want to show him off (Callum, 7lb4oz) so 
> decided to buy a webname and pay for hosting, however money is a bit tight, 
> so being adventurous (or stupid, not sure which yet) I set up apache on my 
> laptop and started writing a website in Serif's WebPlus10. However I wanted 
> to have an upload area on the site for friends and family to send their 
> pictures of Callum (and the family and anything else they wanted) so there 
> was a central "store". However I tried to find some html to handle the 
> upload of these files but wasn't able to work it out, google and various 
> other bitsx of research on the net showed that I probably needed to run a 
> script to do this and PHP seemed the simplest, so I downloaded PHP 5.3.3 and 
> installed it.
> 
> This is where it started getting tricky as I was using the PHP for dummies 
> book from 2006. I typed that piece of code in (direct from the book) but 
> added it as an html attachment into my site I was building. Uploaded the 
> site to my localhost and had a look. I only got the HTML line from the 
> script. This is where I started contacting you bunch of fine programmers!
> 
> I have now learned that if I save the script as a .php file and navigate 
> direct to it on localhost it works fine, but I think what I am trying to do 
> is get it to work in an existing webpage so that I can then get my upload 
> working.
> 
> Any help you can offer from explanantions to whole bits of code will be 
> greatly received!
> 
> Many thanks!
> 
> "Steve Staples"  wrote in message 
> news:1286281586.4703.63.ca...@webdev01...
> > Col:
> >
> > If i am reading this correctly, then i think you're looking at this all
> > wrong.
> >
> > If you're working within some kind of page, stored outside of the
> > http://localhost served by apache, like say the .php file is on the
> > desktop... then yeah, you're not going to get the PHP information
> > displayed.
> >
> > (tech people bare with me here...)
> > PHP pages, are "compiled" when called... so you need apache to call php
> > and translate the PHP code so that if there is any output, it will
> > display that output.
> >
> > If you're trying to show a .php file from teh desktop, then apache isn't
> > handeling this request, and therefor has no idea that there is php code
> > that has to be compiled, and therefore it will just ignore it.
> >
> > I am sure that I am goign to get flamed for that, but i think that it
> > kinda simplifies what apache does for php.
> >
> > NOW... you can run a php file from the command line, but you're not
> > going to get the HTML results as you would had you ran if from the
> > localhost where apache knows what to do with a .php file.
> >
> > So... long story short, if you want PHP to display the PHP stuff, then
> > you will need to have it interpreted by apache (or IIS, or whatever your
> > web server software is) to have it spit back to a web browser client.
> >
> > Hopefully this makes sense, it is early here, i am just getting into
> > work :(, and it made sense while i was typing it... but my coffee intake
> > has not had time to work it's wonderful magic with me yet, so my
> > though

[PHP] tedd's Friday Post ($ per line)

2010-10-07 Thread tedd

Hi gang:

Several years ago I was involved in a court case where a programmers 
work was being evaluated to establish a dollar amount for the work 
done.


The case was a dispute where the client wanted money back from a 
programmer for a discontinued project. The programmer simply wanted 
to be paid for the work he had done. This wasn't a case where anyone 
had done anything wrong, but rather a circumstance where two parties 
were trying to figure out who was due what.


You see, the original client had been taken over by another company 
who put a halt to the project the programmer was working on. The new 
company claimed that because the project wasn't finished, then the 
programmer should pay back all the money he was paid up-front to 
start the project. However, while the project had not been finished, 
the programmer had indeed worked on the project for several months.


The programmer stated he wanted to paid his hourly rate. But the new 
client stated that the up-front money paid had been based upon a bid 
and not an hourly rate. So, they were at odds as to what to do.


The solution in this case was to place a dollar amount on the actual 
"lines of code" the programmer wrote. In other words, they took all 
of programmers code and actually counted the lines of code he wrote 
and then agreed to a specific dollar amount to each line. In this 
case, the programmer had written over 25,000 lines of code. What do 
you think he was paid?


And with all of that said, what dollar amount would you place on your 
"line of code"?


Cheers,

tedd

--
---
http://sperling.com/

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



Re: [PHP] tedd's Friday Post ($ per line)

2010-10-07 Thread Bastien Koert
On Thu, Oct 7, 2010 at 1:20 PM, tedd  wrote:
> Hi gang:
>
> Several years ago I was involved in a court case where a programmers work
> was being evaluated to establish a dollar amount for the work done.
>
> The case was a dispute where the client wanted money back from a programmer
> for a discontinued project. The programmer simply wanted to be paid for the
> work he had done. This wasn't a case where anyone had done anything wrong,
> but rather a circumstance where two parties were trying to figure out who
> was due what.
>
> You see, the original client had been taken over by another company who put
> a halt to the project the programmer was working on. The new company claimed
> that because the project wasn't finished, then the programmer should pay
> back all the money he was paid up-front to start the project. However, while
> the project had not been finished, the programmer had indeed worked on the
> project for several months.
>
> The programmer stated he wanted to paid his hourly rate. But the new client
> stated that the up-front money paid had been based upon a bid and not an
> hourly rate. So, they were at odds as to what to do.
>
> The solution in this case was to place a dollar amount on the actual "lines
> of code" the programmer wrote. In other words, they took all of programmers
> code and actually counted the lines of code he wrote and then agreed to a
> specific dollar amount to each line. In this case, the programmer had
> written over 25,000 lines of code. What do you think he was paid?
>
> And with all of that said, what dollar amount would you place on your "line
> of code"?
>
> Cheers,
>
> tedd
>
> --
> ---
> http://sperling.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

I bet it wasn't much., $.10 (ten cents) per line?



-- 

Bastien

Cat, the other other white meat

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



Re: [PHP] tedd's Friday Post ($ per line)

2010-10-07 Thread Robert Cummings

On 10-10-07 01:20 PM, tedd wrote:

Hi gang:

Several years ago I was involved in a court case where a programmers
work was being evaluated to establish a dollar amount for the work
done.

The case was a dispute where the client wanted money back from a
programmer for a discontinued project. The programmer simply wanted
to be paid for the work he had done. This wasn't a case where anyone
had done anything wrong, but rather a circumstance where two parties
were trying to figure out who was due what.

You see, the original client had been taken over by another company
who put a halt to the project the programmer was working on. The new
company claimed that because the project wasn't finished, then the
programmer should pay back all the money he was paid up-front to
start the project. However, while the project had not been finished,
the programmer had indeed worked on the project for several months.

The programmer stated he wanted to paid his hourly rate. But the new
client stated that the up-front money paid had been based upon a bid
and not an hourly rate. So, they were at odds as to what to do.

The solution in this case was to place a dollar amount on the actual
"lines of code" the programmer wrote. In other words, they took all
of programmers code and actually counted the lines of code he wrote
and then agreed to a specific dollar amount to each line. In this
case, the programmer had written over 25,000 lines of code. What do
you think he was paid?

And with all of that said, what dollar amount would you place on your
"line of code"?


This is a poor system for evaluation. Some lines are worth MUCH, MUCH 
more than others.


Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

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



Re: [PHP] tedd's Friday Post ($ per line)

2010-10-07 Thread Joshua Kehn
I'm not sure this is even worth answering.

The question isn't how many lines of code were written but percentage of the 
project completed. If he estimated 8 months, worked for 4 months, and was 50% 
done, he should get half his estimate. Hourly rates wouldn't come into it 
unless the client thought it would be cheaper to simply pay him for his time 
rather then the bid. 

Subject the following to my poor legal knowledge:

I would also guess that if he was under contract with a company to provide a 
product for a set dollar amount then wouldn't the company be forced to complete 
it's half so to speak?

Regards,

-Josh

Joshua Kehn | josh.k...@gmail.com
http://joshuakehn.com

On Oct 7, 2010, at 1:20 PM, tedd wrote:

> Hi gang:
> 
> Several years ago I was involved in a court case where a programmers work was 
> being evaluated to establish a dollar amount for the work done.
> 
> The case was a dispute where the client wanted money back from a programmer 
> for a discontinued project. The programmer simply wanted to be paid for the 
> work he had done. This wasn't a case where anyone had done anything wrong, 
> but rather a circumstance where two parties were trying to figure out who was 
> due what.
> 
> You see, the original client had been taken over by another company who put a 
> halt to the project the programmer was working on. The new company claimed 
> that because the project wasn't finished, then the programmer should pay back 
> all the money he was paid up-front to start the project. However, while the 
> project had not been finished, the programmer had indeed worked on the 
> project for several months.
> 
> The programmer stated he wanted to paid his hourly rate. But the new client 
> stated that the up-front money paid had been based upon a bid and not an 
> hourly rate. So, they were at odds as to what to do.
> 
> The solution in this case was to place a dollar amount on the actual "lines 
> of code" the programmer wrote. In other words, they took all of programmers 
> code and actually counted the lines of code he wrote and then agreed to a 
> specific dollar amount to each line. In this case, the programmer had written 
> over 25,000 lines of code. What do you think he was paid?
> 
> And with all of that said, what dollar amount would you place on your "line 
> of code"?
> 
> Cheers,
> 
> tedd
> 
> -- 
> ---
> http://sperling.com/
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 



Re: [PHP] tedd's Friday Post ($ per line)

2010-10-07 Thread Daniel P. Brown
On Thu, Oct 7, 2010 at 13:20, tedd  wrote:
> Hi gang:

Hi, Tedd!

What's it like over there in Australia, where it's already Friday?  ;-P

-- 

Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/

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



Re: [PHP] tedd's Friday Post ($ per line)

2010-10-07 Thread tedd

At 1:30 PM -0400 10/7/10, Daniel P. Brown wrote:

On Thu, Oct 7, 2010 at 13:20, tedd  wrote:

 Hi gang:


Hi, Tedd!

What's it like over there in Australia, where it's already Friday?  ;-P

--




LOL

I'm sorry -- I seldom know what day it is. I honestly thought it was 
Friday. So much for me knowing what's going on, huh? That's one of 
the dangers of working for yourself, you seldom realize what day 
today is.


When I used to visit the mall (I don't now), some days I would say 
"Gee, it's really crowded today" and my wife would answer "Certainly, 
it's Saturday."


Cheers,

tedd

--
---
http://sperling.com/

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



Re: [PHP] Re: SEO Experts?

2010-10-07 Thread Zareef Ahmed
A good thread and really good answers/posts are coming but in my humble
opinion this topic does not suit php-general list or atleast we should focus
on the points where php can play a role :)

On M, buton, Sep 27, 2010 at 12:54 PM,  wrote:

>
> > On 9/26/2010 8:09 AM, David Mehler wrote:
> >> Hello,
> >> Do we have any SEO experts on this list? I'm not one, learning only,
> >> reading a book and a few articles/tutorials from webmasters, and I'm
> >> wanting to optimize an existing site to get the best search rank
> >> possible. Some techniques, dos and don'ts would be appreciated.
> >> Thanks.
> >> Dave.
>
> Sure, it's what I do.
>
> Well first you need to work out which keyphrases to optimise for, and
> that's not obvious. Search Google for "keyword tool external" to find a
> Google tool that tells you something about the demand for a phrase and the
> competition for it.
>
> What you are trying to find are phrases that a) are very very relevant to
> your client, b) have lots of demand traffic, and c) don't have too much
> competition.
>
> The other thing to check is whether anyone else is making money at your
> selected phrases, so search for them in Google and see if people are
> advertising.
>
> Then group your phrases: so "wet dog" becomes a keyphrase group that
> includes phrases like "getting rid of wet dog smell", "avoiding wet dog
> shake" and so on.
>
> You are building a site to satisfy the keyphrase groups you've identified,
> so then one way or another you want a "wet dog" page that's optimised for
> that phrase, which means you mention "wet dog" a few times especially in
> the headline and page title and don't mention lots of other things.
>
> Then you want some links from other people's pages, Twitter, Delicious,
> YouTube and so on to your wet dog page, preferably text links that include
> the phrase "wet dog".
>
> Then you watch your Analytics data to check that people who arrive on your
> site are satisfied and covert into sales (or signups or whatever you are
> doing). If not, you run a Google Website Optimizer test to improve things
> like your headline, photos and so on.
>
> If you like, run through http://www.flowmarketing.co.uk and fill in the
> form where you get stuck. It's obviously a work in progress :-) and I'll
> complete the page that you end up at.
>
> By all means email me the website and I can be more specific.
>
> Good luck :-)
>
> Cheers
> J
> http://www.johnallsopp.co.uk
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
Zareef Ahmed
http://www.zareef.net


Re: [PHP] tedd's Friday Post ($ per line)

2010-10-07 Thread a...@ashleysheridan.co.uk
Surely it would have been a bit more sensible to work out the time the 
programmer had spent on the project and then calculate it as a percentage of 
the total time that programmer would spend on it to complete it (which might 
not be the whole duration of the project)

Also, counting code lines seems unfair. I know it used to be this way, but its 
a bit like paying firemen based on the number of fires they put out; don't be 
surprised if arson figures go up!

I would guess though that this fellow likely had to pay some of that initial 
outlay of cash back though, and would further assume the total price attributed 
to each line was no more than 3 or 4 cents (damb English androids don't have 
the cent character)

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

- Reply message -
From: "tedd" 
Date: Thu, Oct 7, 2010 18:20
Subject: [PHP] tedd's Friday Post ($ per line)
To: 

Hi gang:

Several years ago I was involved in a court case where a programmers 
work was being evaluated to establish a dollar amount for the work 
done.

The case was a dispute where the client wanted money back from a 
programmer for a discontinued project. The programmer simply wanted 
to be paid for the work he had done. This wasn't a case where anyone 
had done anything wrong, but rather a circumstance where two parties 
were trying to figure out who was due what.

You see, the original client had been taken over by another company 
who put a halt to the project the programmer was working on. The new 
company claimed that because the project wasn't finished, then the 
programmer should pay back all the money he was paid up-front to 
start the project. However, while the project had not been finished, 
the programmer had indeed worked on the project for several months.

The programmer stated he wanted to paid his hourly rate. But the new 
client stated that the up-front money paid had been based upon a bid 
and not an hourly rate. So, they were at odds as to what to do.

The solution in this case was to place a dollar amount on the actual 
"lines of code" the programmer wrote. In other words, they took all 
of programmers code and actually counted the lines of code he wrote 
and then agreed to a specific dollar amount to each line. In this 
case, the programmer had written over 25,000 lines of code. What do 
you think he was paid?

And with all of that said, what dollar amount would you place on your 
"line of code"?

Cheers,

tedd

-- 
---
http://sperling.com/

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



Re: [PHP] tedd's Friday Post ($ per line)

2010-10-07 Thread Joshua Kehn
In the case payment does come down to lines of code written I'm already covered.

if( count > 5)
{
/* Bracing Style
}

Regards,

-Josh

Joshua Kehn | josh.k...@gmail.com
http://joshuakehn.com

On Oct 7, 2010, at 1:50 PM, a...@ashleysheridan.co.uk wrote:

> Surely it would have been a bit more sensible to work out the time the 
> programmer had spent on the project and then calculate it as a percentage of 
> the total time that programmer would spend on it to complete it (which might 
> not be the whole duration of the project)
> 
> Also, counting code lines seems unfair. I know it used to be this way, but 
> its a bit like paying firemen based on the number of fires they put out; 
> don't be surprised if arson figures go up!
> 
> I would guess though that this fellow likely had to pay some of that initial 
> outlay of cash back though, and would further assume the total price 
> attributed to each line was no more than 3 or 4 cents (damb English androids 
> don't have the cent character)
> 
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
> 
> - Reply message -
> From: "tedd" 
> Date: Thu, Oct 7, 2010 18:20
> Subject: [PHP] tedd's Friday Post ($ per line)
> To: 
> 
> Hi gang:
> 
> Several years ago I was involved in a court case where a programmers 
> work was being evaluated to establish a dollar amount for the work 
> done.
> 
> The case was a dispute where the client wanted money back from a 
> programmer for a discontinued project. The programmer simply wanted 
> to be paid for the work he had done. This wasn't a case where anyone 
> had done anything wrong, but rather a circumstance where two parties 
> were trying to figure out who was due what.
> 
> You see, the original client had been taken over by another company 
> who put a halt to the project the programmer was working on. The new 
> company claimed that because the project wasn't finished, then the 
> programmer should pay back all the money he was paid up-front to 
> start the project. However, while the project had not been finished, 
> the programmer had indeed worked on the project for several months.
> 
> The programmer stated he wanted to paid his hourly rate. But the new 
> client stated that the up-front money paid had been based upon a bid 
> and not an hourly rate. So, they were at odds as to what to do.
> 
> The solution in this case was to place a dollar amount on the actual 
> "lines of code" the programmer wrote. In other words, they took all 
> of programmers code and actually counted the lines of code he wrote 
> and then agreed to a specific dollar amount to each line. In this 
> case, the programmer had written over 25,000 lines of code. What do 
> you think he was paid?
> 
> And with all of that said, what dollar amount would you place on your 
> "line of code"?
> 
> Cheers,
> 
> tedd
> 
> -- 
> ---
> http://sperling.com/
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 



Re: [PHP] tedd's Friday Post ($ per line)

2010-10-07 Thread Daniel P. Brown
On Thu, Oct 7, 2010 at 14:04, Joshua Kehn  wrote:
> In the case payment does come down to lines of code written I'm already 
> covered.
>
> if( count > 5)
> {
>    /* Bracing Style
> }

PHP Notice:  Use of undefined constant count - assumed 'count' on line 1
PHP Warning:  Unterminated comment starting line 3 on line 3
PHP Parse error:  syntax error, unexpected $end on line 4

-- 

Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/

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



Re: [PHP] tedd's Friday Post ($ per line)

2010-10-07 Thread Joshua Kehn
I guess that's what I get for spending the last four weeks developing with 
JavaScript and Node.js.

Regards,

-Josh

Joshua Kehn | josh.k...@gmail.com
http://joshuakehn.com

On Oct 7, 2010, at 2:09 PM, Daniel P. Brown wrote:

> On Thu, Oct 7, 2010 at 14:04, Joshua Kehn  wrote:
>> In the case payment does come down to lines of code written I'm already 
>> covered.
>> 
>> if( count > 5)
>> {
>>/* Bracing Style
>> }
> 
>PHP Notice:  Use of undefined constant count - assumed 'count' on line 1
>PHP Warning:  Unterminated comment starting line 3 on line 3
>PHP Parse error:  syntax error, unexpected $end on line 4
> 
> -- 
> 
> Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
> (866-) 725-4321
> http://www.parasane.net/


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



Re: [PHP] tedd's Friday Post ($ per line)

2010-10-07 Thread Robert Cummings

On 10-10-07 02:04 PM, Joshua Kehn wrote:

In the case payment does come down to lines of code written I'm already covered.

if( count>  5)
{
 /* Bracing Style
}


I hope your $count var is being incremented properly under this model:



Just think how much money could be made if you need to support large 
datasets!!! CHAA-CHING!


Cheers,
Rob.
--
E-Mail Disclaimer: Information contained in this message and any
attached documents is considered confidential and legally protected.
This message is intended solely for the addressee(s). Disclosure,
copying, and distribution are prohibited unless authorized.

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



[PHP] Array / form processing

2010-10-07 Thread Ron Piggott

I am writing a custom shopping cart that eventually the "cart" will be
uploaded to PayPal for payment.  I need to be able to include the option
that the purchase is a gift certificate.



At present my "add to cart" function goes like this:

===
# Gift Certificate: 1 is a gift; 2 is personal use

if ( $gift_certificate == "yes" ) {
$gift = 1;
} else {
$gift = 2;
}

$_SESSION['life_coaching_order'][$product][$gift]['quantity'] = 
$_SESSION['life_coaching_order'][$product][$gift]['quantity'] + 1;
===

Now I need to display the shopping cart contents.  I want to do this
through an array as the contents of the shopping cart are in a session
variable.  I start displaying the shopping cart contents by a "FOREACH"
loop:

===
foreach ($_SESSION['life_coaching_order'] AS $coaching_fee_theme_reference
=> $value ) {
===

What I need help with is that I don't know how to test the value of $gift
in the above array if it is a 1 or 2 (which symbolizes this is a gift
certificate).

I have something like this in mind:
if ( $_SESSION['life_coaching_order'] == 2 ) {

But I don't know how to access all the components of the array while I am
going through the FOREACH loop.

By using a "1" or "2" I have made gift certificates their own product.  If
you a better method I could use please provide me with this feedback.

Ron

The Verse of the Day
Encouragement from God's Word
www.TheVerseOfTheDay.info


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



Re: [PHP] Array / form processing

2010-10-07 Thread chris h
$_SESSION['life_coaching_order'][$product][$gift]['quantity'] =
$_SESSION['life_coaching_order'][$product][$gift]['quantity'] + 1;
===

...

===
foreach ($_SESSION['life_coaching_order'] AS $coaching_fee_theme_reference
=> $value ) {
===


In this example $value would be an array. To test if it is a gift or not you
would do this from within the foreach loop:

//gift
if ( isset($value[1]) && isset($value[1]['quantity']) )
{
  $gift_quantity = $value[1]['quantity'];
}

//personal use
if ( isset($value[2]) && isset($value[2]['quantity']) )
{
  $personal_quantity = $value[2]['quantity'];
}


Technically the above IF's are optional, but they are proper syntax.

I don't know how you are with OOP, but you may have more luck using objects
instead of a complex array.

Chris H.


On Thu, Oct 7, 2010 at 3:35 PM, Ron Piggott
wrote:

>
> I am writing a custom shopping cart that eventually the "cart" will be
> uploaded to PayPal for payment.  I need to be able to include the option
> that the purchase is a gift certificate.
>
>
>
> At present my "add to cart" function goes like this:
>
> ===
> # Gift Certificate: 1 is a gift; 2 is personal use
>
> if ( $gift_certificate == "yes" ) {
>$gift = 1;
> } else {
>$gift = 2;
> }
>
> $_SESSION['life_coaching_order'][$product][$gift]['quantity'] =
> $_SESSION['life_coaching_order'][$product][$gift]['quantity'] + 1;
> ===
>
> Now I need to display the shopping cart contents.  I want to do this
> through an array as the contents of the shopping cart are in a session
> variable.  I start displaying the shopping cart contents by a "FOREACH"
> loop:
>
> ===
> foreach ($_SESSION['life_coaching_order'] AS $coaching_fee_theme_reference
> => $value ) {
> ===
>
> What I need help with is that I don't know how to test the value of $gift
> in the above array if it is a 1 or 2 (which symbolizes this is a gift
> certificate).
>
> I have something like this in mind:
> if ( $_SESSION['life_coaching_order'] == 2 ) {
>
> But I don't know how to access all the components of the array while I am
> going through the FOREACH loop.
>
> By using a "1" or "2" I have made gift certificates their own product.  If
> you a better method I could use please provide me with this feedback.
>
> Ron
>
> The Verse of the Day
> Encouragement from God's Word
> www.TheVerseOfTheDay.info
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


Re: [PHP] Array / form processing

2010-10-07 Thread Ron Piggott

Many thanks, Chris.

I have one additional question about this shopping cart project.  I need
to make a submit button for the purpose of removing an item from the
shopping cart.



What I am struggling with is to find an effective method for passing the
product serial number (auto_increment in the table it is stored in) so I
know which product the user is removing from their purchase.  Then I will
just unset the session variable that matches.

What are your suggestion(s)?

Thank you your help with my original question Chris.

Ron

> $_SESSION['life_coaching_order'][$product][$gift]['quantity'] =
> $_SESSION['life_coaching_order'][$product][$gift]['quantity'] + 1;
> ===
>
> ...
>
> ===
> foreach ($_SESSION['life_coaching_order'] AS $coaching_fee_theme_reference
> => $value ) {
> ===
>
>
> In this example $value would be an array. To test if it is a gift or not
> you
> would do this from within the foreach loop:
>
> //gift
> if ( isset($value[1]) && isset($value[1]['quantity']) )
> {
>   $gift_quantity = $value[1]['quantity'];
> }
>
> //personal use
> if ( isset($value[2]) && isset($value[2]['quantity']) )
> {
>   $personal_quantity = $value[2]['quantity'];
> }
>
>
> Technically the above IF's are optional, but they are proper syntax.
>
> I don't know how you are with OOP, but you may have more luck using
> objects
> instead of a complex array.
>
> Chris H.
>
>
> On Thu, Oct 7, 2010 at 3:35 PM, Ron Piggott
> wrote:
>
>>
>> I am writing a custom shopping cart that eventually the "cart" will be
>> uploaded to PayPal for payment.  I need to be able to include the option
>> that the purchase is a gift certificate.
>>
>>
>>
>> At present my "add to cart" function goes like this:
>>
>> ===
>> # Gift Certificate: 1 is a gift; 2 is personal use
>>
>> if ( $gift_certificate == "yes" ) {
>>$gift = 1;
>> } else {
>>$gift = 2;
>> }
>>
>> $_SESSION['life_coaching_order'][$product][$gift]['quantity'] =
>> $_SESSION['life_coaching_order'][$product][$gift]['quantity'] + 1;
>> ===
>>
>> Now I need to display the shopping cart contents.  I want to do this
>> through an array as the contents of the shopping cart are in a session
>> variable.  I start displaying the shopping cart contents by a "FOREACH"
>> loop:
>>
>> ===
>> foreach ($_SESSION['life_coaching_order'] AS
>> $coaching_fee_theme_reference
>> => $value ) {
>> ===
>>
>> What I need help with is that I don't know how to test the value of
>> $gift
>> in the above array if it is a 1 or 2 (which symbolizes this is a gift
>> certificate).
>>
>> I have something like this in mind:
>> if ( $_SESSION['life_coaching_order'] == 2 ) {
>>
>> But I don't know how to access all the components of the array while I
>> am
>> going through the FOREACH loop.
>>
>> By using a "1" or "2" I have made gift certificates their own product.
>> If
>> you a better method I could use please provide me with this feedback.
>>
>> Ron
>>
>> The Verse of the Day
>> Encouragement from God's Word
>> www.TheVerseOfTheDay.info
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>



The Verse of the Day
Encouragement from God's Word
www.TheVerseOfTheDay.info


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



Re: [PHP] Array / form processing

2010-10-07 Thread chris h


I don't know what the context is like, but you may be better off just using
an entire form here with hidden fields. i.e.


 
 
 



Without knowing what else is going on in your page, and how the request is
being handled on the server, it's kind of hard to give exact advice. :)

Chris H.


Re: [PHP] tedd's Friday Post ($ per line)

2010-10-07 Thread tedd

At 6:50 PM +0100 10/7/10, a...@ashleysheridan.co.uk wrote:
Surely it would have been a bit more sensible to work out the time 
the programmer had spent on the project and then calculate it as a 
percentage of the total time that programmer would spend on it to 
complete it (which might not be the whole duration of the project)


Also, counting code lines seems unfair. I know it used to be this 
way, but its a bit like paying firemen based on the number of fires 
they put out; don't be surprised if arson figures go up!


I would guess though that this fellow likely had to pay some of that 
initial outlay of cash back though, and would further assume the 
total price attributed to each line was no more than 3 or 4 cents 
(damb English androids don't have the cent character)


Thanks,
Ash


As I said, this was a case that I worked on several years ago (20+). 
I was not the programmer, but rather a consultant for an attorney.


The programmer wanted to have his payment based upon the hours he put 
it, but the client wanted proof of the programmers effort. Both were 
understandable positions.


Considering that the programmers effort did not work, and there were 
no time clocks showing the actual hours the programmer worked, the 
solution centered on an evaluation of the end-product. That 
evaluation reduced to the amount of code written, which boiled down 
to lines of code.


Granted, as Rob said, some lines are worth more than others, but 
overall a case was made to pay a certain amount per line.


Now, back to the question at hand -- what price would you sell a line 
of your code for?


Cheers,

tedd


--
---
http://sperling.com/

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



Re: [PHP] tedd's Friday Post ($ per line)

2010-10-07 Thread Joshua Kehn
$100 a line.

If you want more then one line let's meet and go over the project. I might give 
a significant discount.

Regards,

-Josh

Joshua Kehn | josh.k...@gmail.com
http://joshuakehn.com

On Oct 7, 2010, at 4:51 PM, tedd wrote:

> At 6:50 PM +0100 10/7/10, a...@ashleysheridan.co.uk wrote:
>> Surely it would have been a bit more sensible to work out the time the 
>> programmer had spent on the project and then calculate it as a percentage of 
>> the total time that programmer would spend on it to complete it (which might 
>> not be the whole duration of the project)
>> 
>> Also, counting code lines seems unfair. I know it used to be this way, but 
>> its a bit like paying firemen based on the number of fires they put out; 
>> don't be surprised if arson figures go up!
>> 
>> I would guess though that this fellow likely had to pay some of that initial 
>> outlay of cash back though, and would further assume the total price 
>> attributed to each line was no more than 3 or 4 cents (damb English androids 
>> don't have the cent character)
>> 
>> Thanks,
>> Ash
> 
> As I said, this was a case that I worked on several years ago (20+). I was 
> not the programmer, but rather a consultant for an attorney.
> 
> The programmer wanted to have his payment based upon the hours he put it, but 
> the client wanted proof of the programmers effort. Both were understandable 
> positions.
> 
> Considering that the programmers effort did not work, and there were no time 
> clocks showing the actual hours the programmer worked, the solution centered 
> on an evaluation of the end-product. That evaluation reduced to the amount of 
> code written, which boiled down to lines of code.
> 
> Granted, as Rob said, some lines are worth more than others, but overall a 
> case was made to pay a certain amount per line.
> 
> Now, back to the question at hand -- what price would you sell a line of your 
> code for?
> 
> Cheers,
> 
> tedd
> 
> 
> -- 
> ---
> http://sperling.com/
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 


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



Re: [PHP] tedd's Friday Post ($ per line)

2010-10-07 Thread Bastien Koert
On Thu, Oct 7, 2010 at 4:51 PM, tedd  wrote:
> At 6:50 PM +0100 10/7/10, a...@ashleysheridan.co.uk wrote:
>>
>> Surely it would have been a bit more sensible to work out the time the
>> programmer had spent on the project and then calculate it as a percentage of
>> the total time that programmer would spend on it to complete it (which might
>> not be the whole duration of the project)
>>
>> Also, counting code lines seems unfair. I know it used to be this way, but
>> its a bit like paying firemen based on the number of fires they put out;
>> don't be surprised if arson figures go up!
>>
>> I would guess though that this fellow likely had to pay some of that
>> initial outlay of cash back though, and would further assume the total price
>> attributed to each line was no more than 3 or 4 cents (damb English androids
>> don't have the cent character)
>>
>> Thanks,
>> Ash
>
> As I said, this was a case that I worked on several years ago (20+). I was
> not the programmer, but rather a consultant for an attorney.
>
> The programmer wanted to have his payment based upon the hours he put it,
> but the client wanted proof of the programmers effort. Both were
> understandable positions.
>
> Considering that the programmers effort did not work, and there were no time
> clocks showing the actual hours the programmer worked, the solution centered
> on an evaluation of the end-product. That evaluation reduced to the amount
> of code written, which boiled down to lines of code.
>
> Granted, as Rob said, some lines are worth more than others, but overall a
> case was made to pay a certain amount per line.
>
> Now, back to the question at hand -- what price would you sell a line of
> your code for?
>
> Cheers,
>
> tedd
>
>
> --
> ---
> http://sperling.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

One Beelyon Dollars

-- 

Bastien

Cat, the other other white meat

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



Re: [PHP] Class mysqli not found

2010-10-07 Thread sueandant

Hi Steve

I've uninstalled PHP5.3.3 and re-installed PHP5.2.14.   Everything now 
works!


Best wishes and thanks to everyone for their help and input.

tholland
- Original Message - 
From: "Steve Staples" 

To: "sueandant" 
Cc: "PHP" 
Sent: Wednesday, October 06, 2010 9:09 PM
Subject: Re: [PHP] Class mysqli not found



On Wed, 2010-10-06 at 21:00 +0100, sueandant wrote:
I'm still fighting a losing battle in my attempts to get PHP speak to 
mysqli.   I can access MySql via the prompt. Apache and PHP are installed 
and working.   In Apache's config file PHPIniDir is set to "C:\php", 
which is where I unzipped the binary download files, and set LoadModule 
php5_module C:\php\php5apache2_2.dll.   In php.ini I have uncommented the 
mysql.dll and mysqli.dll extensions and set extension_dir = 
"C:\php\ext\".   I have edited the environment variables to include 
C:\php  and C:php\ext.


I am running Vista Home Premium 32 bit with SP2, Apache 2.2, PHP 5.3.3 
and MySql Server 5.1.


What have I missed?


How are you connecting to the mysql?  What does your connection string
look like from your php file?  Can you cut and paste it here for us to
trouble shoot (if it is the apache->php->mysql connection problem)


Steve




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



[PHP] zip and mac safari

2010-10-07 Thread M. Reuter
Hi,

does anyone know how to use a php script to zip a folder (with a
subfolder) so that safari can open it and not decompresses forever?

Thanks, Martin


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