Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
05-02-2004, 05:44 PM
|
#1
|
|
Member
Registered: Jun 2003
Location: Virginia, USA
Distribution: Slackware
Posts: 252
Rep:
|
php from command line
I compiled php with apxs for apache support. I cannot however get it to run from the command line. I had hoped I could use it for some basic shell scripting as well. If I create a simple:
#! /usr/bin/php -q
<?php echo "test"; ?>
and execute it I get no output. Keep in mind that this is my first experience with a scripting language from the command line. Am I doing something wrong?
Thanks
Tom
|
|
|
|
05-02-2004, 05:49 PM
|
#2
|
|
Guru
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339
Rep:
|
I don't think php can run outside a web server? You've to upload the homepage with the php code to your Apache directory, then run it from a browser for that to work. Or have I been dreaming again...
|
|
|
|
05-02-2004, 06:27 PM
|
#3
|
|
Member
Registered: Mar 2004
Location: bursa
Posts: 110
Rep:
|
odious1, it works fine for me on Slackware 9.1, php version 4.3.6 (not my own pack, just an official Slackware one, ie. I didn't build it myself as I normally do). When you compiled it, did you use --enable-cli?
|
|
|
|
05-02-2004, 07:11 PM
|
#4
|
|
Member
Registered: Jun 2003
Location: Virginia, USA
Distribution: Slackware
Posts: 252
Original Poster
Rep:
|
No I did not, if I recompile with that option I wonder if module function will remain intact. I do see that as one of the options of configure --help I will give it a try; thanks.
|
|
|
|
05-03-2004, 12:31 AM
|
#5
|
|
Member
Registered: Oct 2003
Location: Ireland
Distribution: Slackware 9.1, Ubuntu
Posts: 192
Rep:
|
you can run a php script from the command line by using
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 03:17 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|