I've never before written a PHP script to run on my home Ubuntu
machine (though I've written dozens of PHP cron jobs for my web
server), so I thought I'd start off with a very simple test:
#!/usr/share/php5
<?php
echo "hello";
?>
In a terminal window, I try to execute this, and I get a "bad
interperter" error:
lkrubner@progra mmerpc3:/$ /home/lkrubner/cron_jobs/
dailyBackupSpac eBunny.php
bash: /home/lkrubner/cron_jobs/dailyBackupSpac eBunny.php: /usr/share/
php5: bad interpreter: Permission denied
What does that mean?
The php5 interpreter in /usr/share/ has permissions set to 755. Any
script on the machine should be able to execute. 16 9216
lawrence k schreef:
I've never before written a PHP script to run on my home Ubuntu
machine (though I've written dozens of PHP cron jobs for my web
server), so I thought I'd start off with a very simple test:
#!/usr/share/php5
<?php
echo "hello";
?>
In a terminal window, I try to execute this, and I get a "bad
interperter" error:
lkrubner@progra mmerpc3:/$ /home/lkrubner/cron_jobs/
dailyBackupSpac eBunny.php
bash: /home/lkrubner/cron_jobs/dailyBackupSpac eBunny.php: /usr/share/
php5: bad interpreter: Permission denied
What does that mean?
The php5 interpreter in /usr/share/ has permissions set to 755. Any
script on the machine should be able to execute.
it means you got the wrong interpreter
try:
$ whereis php
php: /usr/bin/php
then replace '/usr/share/php5' with '/usr/bin/php'
--
Luuk
On Feb 9, 3:26 pm, Luuk <L...@invalid.l anwrote:
lawrence k schreef:
I've never before written a PHP script to run on my home Ubuntu
machine (though I've written dozens of PHP cron jobs for my web
server), so I thought I'd start off with a very simple test:
#!/usr/share/php5
<?php
echo "hello";
?>
In a terminal window, I try to execute this, and I get a "bad
interperter" error:
lkrubner@progra mmerpc3:/$ /home/lkrubner/cron_jobs/
dailyBackupSpac eBunny.php
bash: /home/lkrubner/cron_jobs/dailyBackupSpac eBunny.php: /usr/share/
php5: bad interpreter: Permission denied
What does that mean?
The php5 interpreter in /usr/share/ has permissions set to 755. Any
script on the machine should be able to execute.
it means you got the wrong interpreter
try:
$ whereis php
php: /usr/bin/php
then replace '/usr/share/php5' with '/usr/bin/php'
What I get:
lkrubner@progra mmerpc3:/usr/share$ whereis php
php:
lkrubner@progra mmerpc3:/usr/share$
On Feb 9, 3:26 pm, Luuk <L...@invalid.l anwrote:
lawrence k schreef:
I've never before written a PHP script to run on my home Ubuntu
machine (though I've written dozens of PHP cron jobs for my web
server), so I thought I'd start off with a very simple test:
#!/usr/share/php5
<?php
echo "hello";
?>
In a terminal window, I try to execute this, and I get a "bad
interperter" error:
lkrubner@progra mmerpc3:/$ /home/lkrubner/cron_jobs/
dailyBackupSpac eBunny.php
bash: /home/lkrubner/cron_jobs/dailyBackupSpac eBunny.php: /usr/share/
php5: bad interpreter: Permission denied
What does that mean?
The php5 interpreter in /usr/share/ has permissions set to 755. Any
script on the machine should be able to execute.
it means you got the wrong interpreter
try:
$ whereis php
php: /usr/bin/php
then replace '/usr/share/php5' with '/usr/bin/php'
The Synaptic Package Manager also tells me that php5 is in /usr/share/
Mind you, my machine didn't have PHP installed till today. I just used
the Synaptic Package Manager to install it.
The Synaptic Package Manager also tells me that php5 is in /usr/share/
Strange. My Xubuntu machine just has it on /usr/bin/php. Did you try to
set the first line to
#!/usr/bin/php
?
Good luck!
On Feb 9, 6:23 pm, Dikkie Dik <dik...@nospam. orgwrote:
The Synaptic Package Manager also tells me that php5 is in /usr/share/
Strange. My Xubuntu machine just has it on /usr/bin/php. Did you try to
set the first line to
#!/usr/bin/php
Doesn't seem possible that would work if both whereis and the Synaptic
Package Manager are suggesting a different address, but just for the
hell of it, I gave it a try. No dice:
lkrubner@progra mmerpc3:/usr/share$ /home/lkrubner/cron_jobs/
dailyBackupSpac eBunny.php
bash: /home/lkrubner/cron_jobs/dailyBackupSpac eBunny.php: /usr/bin/
php: bad interpreter: No such file or directory
On Feb 9, 3:05 pm, lawrence k <lkrub...@geoci ties.comwrote:
I've never before written a PHP script to run on my home Ubuntu
machine (though I've written dozens of PHP cron jobs for my web
server), so I thought I'd start off with a very simple test:
#!/usr/share/php5
<?php
echo "hello";
?>
In a terminal window, I try to execute this, and I get a "bad
interperter" error:
lkrubner@progra mmerpc3:/$ /home/lkrubner/cron_jobs/
dailyBackupSpac eBunny.php
bash: /home/lkrubner/cron_jobs/dailyBackupSpac eBunny.php: /usr/share/
php5: bad interpreter: Permission denied
What does that mean?
The php5 interpreter in /usr/share/ has permissions set to 755. Any
script on the machine should be able to execute.
Is there just one interpreter? Do shell scripts use the same
interpreter as what runs through an Apace server?
lawrence k wrote:
On Feb 9, 3:05 pm, lawrence k <lkrub...@geoci ties.comwrote:
>I've never before written a PHP script to run on my home Ubuntu machine (though I've written dozens of PHP cron jobs for my web server), so I thought I'd start off with a very simple test:
#!/usr/share/php5 <?php echo "hello"; ?>
In a terminal window, I try to execute this, and I get a "bad interperter" error:
lkrubner@progr ammerpc3:/$ /home/lkrubner/cron_jobs/ dailyBackupSpa ceBunny.php
bash: /home/lkrubner/cron_jobs/dailyBackupSpac eBunny.php: /usr/share/ php5: bad interpreter: Permission denied
What does that mean?
The php5 interpreter in /usr/share/ has permissions set to 755. Any script on the machine should be able to execute.
Is there just one interpreter? Do shell scripts use the same
interpreter as what runs through an Apace server?
No. Shell scripts are not PHP, and do not use the PHP interpreter.
--
=============== ===
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attgl obal.net
=============== ===
lawrence k <lk******@geoci ties.comwrote:
> I've never before written a PHP script to run on my home Ubuntu machine (though I've written dozens of PHP cron jobs for my web server), so I thought I'd start off with a very simple test:
#!/usr/share/php5 <?php echo "hello"; ?>
In a terminal window, I try to execute this, and I get a "bad interperter" error:
lkrubner@progr ammerpc3:/$ /home/lkrubner/cron_jobs/ dailyBackupSpa ceBunny.php
bash: /home/lkrubner/cron_jobs/dailyBackupSpac eBunny.php: /usr/share/ php5: bad interpreter: Permission denied
What does that mean?
The php5 interpreter in /usr/share/ has permissions set to 755. Any script on the machine should be able to execute.
Are you sure php5 is the executable for the interpreter, and not the
directory that contains the interpreter? What does this tell you?
ls -l /usr/share/php5
--
Tim Roberts, ti**@probo.com
Providenza & Boekelheide, Inc.
On Feb 9, 9:53 pm, Tim Roberts <t...@probo.com wrote:
lawrence k <lkrub...@geoci ties.comwrote:
I've never before written a PHP script to run on my home Ubuntu
machine (though I've written dozens of PHP cron jobs for my web
server), so I thought I'd start off with a very simple test:
#!/usr/share/php5
<?php
echo "hello";
?>
In a terminal window, I try to execute this, and I get a "bad
interperter" error:
lkrubner@progra mmerpc3:/$ /home/lkrubner/cron_jobs/
dailyBackupSpac eBunny.php
bash: /home/lkrubner/cron_jobs/dailyBackupSpac eBunny.php: /usr/share/
php5: bad interpreter: Permission denied
What does that mean?
The php5 interpreter in /usr/share/ has permissions set to 755. Any
script on the machine should be able to execute.
Are you sure php5 is the executable for the interpreter, and not the
directory that contains the interpreter? What does this tell you?
ls -l /usr/share/php5
Nice catch. I feel like an idiot:
lkrubner@progra mmerpc3:/usr/share/php5$ ls -al
total 52
drwxr-xr-x 2 root root 4096 2008-02-09 14:24 .
drwxr-xr-x 308 root root 8192 2008-02-09 14:24 ..
-rw-r--r-- 1 root root 40467 2007-11-28 17:33 php.ini-dist
But what the hell is php.ini-dist? This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: lkrubner |
last post by:
I want to give users the power to edit files from an easy interface, so
I create a form and a PHP script called "fileUpdate". It does a
reasonable about of error checking and prints out some errors. It uses
fileperms() to get the permissions of the file, and it includes that
info in any error message. Today I'm getting the following error
message. I've used SmartFtp to go in and set the test file's
permissions to 777, but in this error...
|
by: allenj |
last post by:
DB21085I Instance "md" uses "32" bits and DB2 code release "SQL08012"
with level identifier "02030106".
Informational tokens are "DB2 v8.1.0.16", "s030508", "MI00048", and
FixPak "2". Product is installed at "/opt/IBM/db2/V8.1".
Red Hat AS
--------------------------------
what does this error mean?
SQL Error Code -443, SQL State 38553, Routine "SYSIBM.SQLCOLUMNS"
|
by: Marek Kurowski |
last post by:
Yo!
What mean when program is ALPHA or BETA version?
I suppose it is not release version of program, but I don't know what it
exactly mean.
What it mean in your opinion?
Marek Kurowski
|
by: Dave |
last post by:
Greetings All,
I have never seen this error before, and after an extensive search of
Groups, I cannot find a satisfactory answer to my basic question.
What exactly does "is not a member of 'String'" mean specifically?
I am developing in VB.NET and I was using the Collection datatype to
store property and object values. However, another group where I work
decided to use C#, and they want to use my base library objects. From
|
by: plusk1008 |
last post by:
I have finals next week and I am stuck on one question on my review sheet for excel. So once again I beg: Please, please, please, please, please, please, please, please, please, please someone help me!! What does ### mean in Excel and how do you fix it??? please,please,please help!!
8( I'm totally stressed over this one question!! You can answer here or by email.
| |
by: chandanlinster |
last post by:
hello everybody,
as i was going through the "printf" man page, i came across this
statement.
printf("%*d", width, num);
what does "*" mean?
|
by: david.karr |
last post by:
I'm a CSS newbie, but I was browsing through the css files in the YUI
library, and I noticed the following line:
body {font:13px/1.231 arial,helvetica,clean,sans-serif;*font-
size:small;*font:x-small;}
I understand everything but the "/1.231". Is that something like a
multiplier on the EM size? I can't find an example of that in the CSS
spec.
|
by: Gabriel Genellina |
last post by:
En Thu, 25 Sep 2008 09:49:31 -0300, Almar Klein <almar.klein@gmail.com>
escribió:
Use subprocess.PIPE
Usually the tricky part is to figure out exactly whether there is more
input or not. With Python it's easy, use the ps1 prompt.
--- begin ---
import sys
|
by: erictheone |
last post by:
Ok so what I'm trying to do is create a trans location cipher. For those among us that don't know alot about cryptography it is a method for jumbling up letters to disguise linguistic patterns(words). What it does is takes a string as a parameter, determines length of string, tests if the length is a perfect square, if it is then it makes a 2-d array with its length and height equal to the lengths root. If it isn't then it cuts it down to...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |