addressalign-toparrow-leftarrow-rightbackbellblockcalendarcameraccwcheckchevron-downchevron-leftchevron-rightchevron-small-downchevron-small-leftchevron-small-rightchevron-small-upchevron-upcircle-with-checkcircle-with-crosscircle-with-pluscontroller-playcredit-cardcrossdots-three-verticaleditemptyheartexporteye-with-lineeyefacebookfolderfullheartglobe--smallglobegmailgooglegroupshelp-with-circleimageimagesinstagramFill 1launch-new-window--smalllight-bulblinklocation-pinm-swarmSearchmailmessagesminusmoremuplabelShape 3 + Rectangle 1ShapeoutlookpersonJoin Group on CardStartprice-ribbonprintShapeShapeShapeShapeImported LayersImported LayersImported Layersshieldstartickettrashtriangle-downtriangle-uptwitteruserwarningyahoo

Boston PHP Message Board Boston PHP Meetup Discussion Forum › Chapter 12: PHP Percolate! Season 5

Chapter 12: PHP Percolate! Season 5

Tom P.
tompsubs
Merrimac, MA
Post #: 553
Moving toward the finish Gary.
Sara L.
user 13146403
Cambridge, MA
Post #: 15
I installed PuTTY and was able to run number.php with no problem.

'php number2.php states.txt' does not recognize the filename. I get the following error message:
Usage: number2.php <filename>
It doesn't matter what I put for the filename - it doesn't read it.

I cannot successfully run temperature.php. It will prompt me for a temperature and then also display
'You failed to use the proper syntax.' immediately after the prompt for temperature.

I also cannot enter interactive mode. When I type 'php -a' Interactive mode enabled is displayed but no php prompt.

Any thoughts as to why? I'm running everything from within my chapter12 directory.
Tom P.
tompsubs
Merrimac, MA
Post #: 561
I don't really know what to say Sara. Is states.txt in the same directory as number2.php? I haven't used PuTTY and don't know much about it. I recently foundout that I can enable limited terminal access to my ISP Account so I may try to do these exercises on my live site.
Sara L.
user 13146403
Cambridge, MA
Post #: 18
Turns out that I cannot enter PHP in interactive mode because I am on a shared server and interactive mode is not allowed unless I upgrade. I am guessing all my issues would disappear if I paid more to my ISP. Too bad because I was looking forward to playing around via PuTTY.
A former member
Post #: 15
Hi Tom,

I've completed Chapter 12 except for the last exercise which requires php5.4.

I ran each exercise on my Mac and just used a screen copy to capture the successful execution of each exercise.

You can see it here:
http://webrigger.com/...­

Wow, only 2 more chapters...

Dennis

Tom P.
tompsubs
Merrimac, MA
Post #: 566
OK Dennis.
Alexander Z.
user 22329501
Boston, MA
Post #: 43
Hello:

For CLI tasks all I can tell is that
a) all examples and modified scripts work
b) next time I need to update , let's say, a backup script that controls the frequency and destination of backups (depends on how critical data are and how much collaborators are willing to pay for a tape) , I'll consider migrating to PHP CLI

-- Alex
Alexander Z.
user 22329501
Boston, MA
Post #: 44
I installed PuTTY and was able to run number.php with no problem.

Any thoughts as to why? I'm running everything from within my chapter12 directory.

I am also using PutTy with Linux Ubuntu and have no issues.

Just incase, Here is my env setting, that work with the examples (I believe the shell flavor matters):
$ env
TERM=xterm
SHELL=/bin/bash
SSH_TTY=/dev/pts/1

Also,
It could be that you have two "new line" characters between the temperature prompt and the error message. One - unix flavor, another - windows flavor. So the PHP script does "enter" the empty string for you. As the result, you see the error message like in the case when you hit "Enter" without typing "20.00 C" for example.
Just try using my (yes, weird, trick) that I described in the last paragraph of my message.

OR, delete (in emacs, pico, or vi) all spaces and new lines between temperature prompt and error message and "enter" the new line again.

RE: New line characters:
Instead of scp-ing, I preferred (on WIndows machine) to open code in Notepad++, Copy to MS Word, and copy-paste from MS Word to pico via PutTy window. That cleared windows-flavor CRs.




-- Alex
Ken H.
Ken_H.
Boston, MA
Post #: 51
Hello -
I just went through Chapter 12. I was able to get the various pieces running on both my local machine (and even the "php -S" local server mode worked on my local machine, using the PHP provided with the xampp package.) On my webhost, I could get everything else working except for the "php -S" mode, because that was not available, and I guess it makes sense for a web hosting provider to not have something that would let you set up another port, etc.

Not going to post anything, although I could take screenshots as I saw someone else had done. But I'll just move along to the next chapter and see how that goes!!

Thanks,
Ken
Tom P.
tompsubs
Merrimac, MA
Post #: 570
Ken and Alex, No need to post anything unless there is a problem you want help with.
Powered by mvnForum

Our Sponsors

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy