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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-02-2004, 06: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, 06:49 PM
|
#2
|
LQ Guru
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,337
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, 07: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, 08: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, 01: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
|
|
|
All times are GMT -5. The time now is 04:38 AM.
|
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
|
|