473,412 Members | 2,054 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

Run PHP script from bash

I'm trying to run a PHP file as a shell script (with the regular
/usr/bin/php interpreter). It looks like this:

#!/usr/bin/php -q -d html_errors=0
<? echo "This is a test\n"; ?>

This is the result of the execution:

$ ./cibervivienda.php
Error in argument 1, char 3: option not found
Error in argument 1, char 4: option not found -
Error in argument 1, char 3: option not found

I can solve it removing the "-d html_errors=0" part but then I get
HTML-formated errors. I can't find the logic because the option is
definitively accepted if I type it myself:

$ /usr/bin/php -q -d html_errors=0
<? echo "This is a test\n"; ?>
This is a test

I'm not sure whether it's a PHP or a bash issue. Thank you in advance,
--
-- Álvaro G. Vicario - Burgos, Spain
-- Questions sent to my mailbox will be billed ;-)
--
Jul 17 '05 #1
0 9545

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: gmuldoon | last post by:
Help please. Setup: RH EL3, PHP 4.3.5, Apache 1.3.29 running as user "nobody". Have a bash script named shell_script. Telnet to server as user "nobody" ("nobody" having been given /bin/bash...
5
by: Phil Powell | last post by:
I'm sorry but I can't figure out how to explain this any better than this. In PHP we have a command "require()" that obtains a file and logically places it into another file. I cannot figure...
3
by: melih.onvural | last post by:
Group, I want to get into a remote server, tail a file, and see if the last line is an error or not. I think that I've figured out how to shell over and tail the file. I have the specific server...
9
by: Synapse Syndrome | last post by:
Hi I've been given what I am told is a PHP script to be used on my server. I do not know any PHP. I am trying to use a feature of a program called ArchiCAD. This feauture allows CAD drawing...
1
by: nkjp | last post by:
Hi I've found that my script to start sybase isn't working at all. Infact, with some debugging, I've found that it's dying here at the first variable defenition (I found this by logging messages...
3
by: uzzi | last post by:
I don't know how to make a php script to work via cron...I want to make it run daily...My server API is CGI/Fast CGI.I have hosting from godaddy and in the help section i found that i have to specify...
1
by: Gros Bedo | last post by:
Yes I've seen that each python script calls its own instance of Python. Buthow to know which is the good one in bash ? Is there a command that gets the parameters of process, so I could use grep to...
0
by: norseman | last post by:
Gros Bedo wrote: ============================== Yes. man ps explains try ps -AFL | grep then kill -9 found (check it more than twice) 1) If your script is known to hang use what...
0
by: kidko | last post by:
I've written a Zenity frontend for ffmpeg using a Bash script. However, if the user hits "cancel" in the progress dialog (incurring the --auto-kill option), the bash script is killed. Unfortunately,...
3
by: bollweevil | last post by:
Hello Everyone, I do Django web development on my Mac at home, and then I rsync the files with the Ubuntu web server. I want to write one single bash shell script that rsyncs the files and...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.