The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > OS X (Apple)
Google UNIX.COM
Home Forums Register Rules & FAQ Members List Arcade Search Today's Posts Mark Forums Read


OS X (Apple) OS X is a line of Unix-based graphical operating systems developed, marketed, and sold by Apple.


Other UNIX.COM Threads You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Shell Script Error jazz8146 UNIX for Dummies Questions & Answers 0 04-23-2008 04:38 AM
awk Shell Script error : "Syntax Error : `Split' unexpected Herry UNIX for Dummies Questions & Answers 2 03-17-2008 07:16 AM
Shell - a small error! :( abrox Shell Programming and Scripting 8 07-19-2007 01:32 AM
error in shell script jalpan.pota UNIX for Dummies Questions & Answers 2 05-18-2007 06:14 AM
no shell connection closed error giulianob UNIX for Dummies Questions & Answers 2 10-07-2003 10:08 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-12-2004
Registered User
 

Join Date: Nov 2003
Location: Las Vegas, NV
Posts: 22
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
Unhappy Error when trying to use PHP shell.

Hi,

Now that I'm going to be using my Mac as a web host, I decided to use the PHP shell.
However, when I type php straight in the terminal, the session freezes.

Is there anything wrong that I'm doing?
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 07-15-2004
Registered User
 

Join Date: Sep 2002
Location: San Fran
Posts: 105
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
What happens if you type "php -v" ?


Does it really freeze, or can you type and see carriage returns. If so, typing "control+c" will return the prompt.

What happens if you type "man php" ?
Or "which php" ?
Reply With Quote
  #3 (permalink)  
Old 07-16-2004
Registered User
 

Join Date: Nov 2003
Location: Las Vegas, NV
Posts: 22
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
When I type "php -v", I get this:
Quote:
PHP 4.3.2 (cli) (built: Sep 13 2003 22:04:20)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
And then I go back to the BASH prompt (I'm using BASH as my default shell).
When I type "which php", I get the directory which the php Unix application is installed (/usr/bin/php).
And although I did this before I asked the question, I get a manual on the PHP program when I type "man php."

Here's the whole terminal session:
Code:
Last login: Fri Jul 16 21:12:56 on console
Welcome to Darwin!
iMac:~ danny$ php -v
PHP 4.3.2 (cli) (built: Sep 13 2003 22:04:20)
Copyright (c) 1997-2003 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2003 Zend Technologies
iMac:~ danny$ which php
/usr/bin/php
iMac:~ danny$ man php
iMac:~ danny$ logout
[Process completed]
Reply With Quote
  #4 (permalink)  
Old 07-16-2004
Registered User
 

Join Date: Sep 2002
Location: San Fran
Posts: 105
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiReddit! Stumble this Post!Spurl this Post!
so, if you only type:
Code:
php
followed by a carriage return,
the cursor moves down one line without a prompt?

If so, this is normal. It means php is waiting for the code to execute.

In that case, enter:
Code:
<? phpinfo() ?>
followed by a cariage return and then "control+d".

If you get a long list of settings, then php command line is working as it should.

It just needs to be started, then script/command entered, and told when to process the script/command.
Reply With Quote
Google UNIX.COM
Reply



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 02:21 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger

Search Engine Optimization by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102