RE: [PHP] where php at?

2006-03-28 Thread Ryan A
 Ooops, and lets not forget this one:
 
 curl http://www.yoursite.com/path/to/script/yourscript.php


 Thanks Ryan, but that failed to work as well.

 tedd
 --

Sorry to hear that, you might ask them to install CURL on your system along
with PEAR if you dont already have them, both are very very useful even if
you dont need them right now. Not to be a jackass and repeat what others
have said but you might also want to look into other hosts who are a bit
more helpful and effecient than your current host sounds. If you need a
recommendation for a good host, post another thread and I'm sure you will
get many good leads, some actually have hosting companies...

I hope you solve your problem quick, one way or another, I know how
frustrating it can be to have something simple not work for days, i'm
quite sure someone will find the solution you need on the list as they are
quite a few (famous? :-p ) gurus who have helped me (and others) tons of
times.

Best of luck!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] where php at?

2006-03-28 Thread Jay Blanchard
[snip]
Sorry to hear that, you might ask them to install CURL on your system
along
with PEAR if you dont already have them, both are very very useful even
if
you dont need them right now. Not to be a jackass and repeat what others
have said but you might also want to look into other hosts who are a bit
more helpful and effecient than your current host sounds. If you need a
recommendation for a good host, post another thread and I'm sure you
will
get many good leads, some actually have hosting companies...

I hope you solve your problem quick, one way or another, I know how
frustrating it can be to have something simple not work for days, i'm
quite sure someone will find the solution you need on the list as they
are
quite a few (famous? :-p ) gurus who have helped me (and others) tons of
times.
[/snip]

Tedd,

I know that you have searched Google for cPanel cron jobs and that lot's
of folks here have tried to help.

Where are you on this and can we help?

Jay

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] where php at?

2006-03-28 Thread tedd

Jay said:


I know that you have searched Google for cPanel cron jobs and that lot's
of folks here have tried to help.

Where are you on this and can we help?


You guys have been Great!

At the moment, I sent a trouble ticket to my host -- I'll see what he 
says, if anything.


Please don't think my host is remise in not responding -- it's just 
that he's not making any money off me for I paid less $7 for the 
entire year of hosting. So, I can't expect him to spend a lot of time 
with me. Likewise, what leverage do I have? Am I going to say Look, 
fix this or I'll take my seven bucks elsewhere?


I would like to get better hosting, but simply can't afford it. I 
won't go into the reasons why, but let's just say conditions are 
difficult for me. However, with all of your help, I'm learning and 
doing pretty well, all things considered.


So, I'll let the tread die for now until my host responds. If I solve 
it, then I'll post the solution. If he doesn't respond, then I'll 
start the thread up again. At least I know a lot more about this now.


Thanks again guys, you've been great!

tedd
--

http://sperling.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] where php at?

2006-03-27 Thread tedd

Hi:

Related to my cron problem -- where do you get the path to php? My 
phpinfo() says:


http://www.xn--ovg.com/info.php

reports it as:

/usr/lib/php:/usr/local/lib/php

That can't be right, right? Or am I reading this wrong?

In any event, where's it at?

Thanks.

tedd
--

http://sperling.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] where php at?

2006-03-27 Thread Warren Vail
Looks like you have a unix machine, if you have a shell account you may be 
able to use the command;


which php

to identify it's path.

hope this helps,

Warren Vail

At 10:45 AM 3/27/2006, tedd wrote:

Hi:

Related to my cron problem -- where do you get the path to php? My 
phpinfo() says:


http://www.xn--ovg.com/info.php

reports it as:

/usr/lib/php:/usr/local/lib/php

That can't be right, right? Or am I reading this wrong?

In any event, where's it at?

Thanks.

tedd
--

http://sperling.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php





--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] where php at?

2006-03-27 Thread John Meyer
tedd wrote:
 Hi:
 
 Related to my cron problem -- where do you get the path to php? My
 phpinfo() says:
 
 http://www.xn--ovg.com/info.php
 
 reports it as:
 
 /usr/lib/php:/usr/local/lib/php
 

If you're on a linux box, have you tried which php?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] where php at?

2006-03-27 Thread tedd

Warren Vail said:

Looks like you have a unix machine, if you have a shell account you 
may be able to use the command;


which php

to identify it's path.


John Meyer said:


If you're on a linux box, have you tried which php?


Where do I type in which php?

I'm dealing with a host account and I'm simply trying to find out 
where php is so I can set up a cron job.


Thanks.

tedd
--

http://sperling.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] where php at?

2006-03-27 Thread Jay Blanchard
[snip]
Where do I type in which php?
[/snip]

At the command line on the host.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] where php at?

2006-03-27 Thread tedd

At 1:19 PM -0600 3/27/06, Jay Blanchard wrote:

[snip]
Where do I type in which php?
[/snip]

At the command line on the host.


Aarrrg -- no disrespect meant.

I'm totally and absolutely clueless and frustrated. It must be my age 
because I haven't seen a command line since my Apple][ days -- let 
alone one while doing web work.


I'm sitting in front of my computer accessing my remote web site via 
ftp (GoLive) writing code and trying to set up a cron job using 
cpanel to run that code.


Now, I have no idea of where I should type in which php  -- I've 
tried putting it in my cpanel cron jobs command to run box, but 
that doesn't do anything.


Does anyone have any reference material of where a command line of 
the host is?


Thanks.

tedd

--

http://sperling.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] where php at?

2006-03-27 Thread Jay Blanchard
[snip]
Aarrrg -- no disrespect meant.

I'm totally and absolutely clueless and frustrated. It must be my age 
because I haven't seen a command line since my Apple][ days -- let 
alone one while doing web work.

I'm sitting in front of my computer accessing my remote web site via 
ftp (GoLive) writing code and trying to set up a cron job using 
cpanel to run that code.

Now, I have no idea of where I should type in which php  -- I've 
tried putting it in my cpanel cron jobs command to run box, but 
that doesn't do anything.

Does anyone have any reference material of where a command line of 
the host is?
[/snip]

Dagnabit! Contact your host provider, they will tell you.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] where php at?

2006-03-27 Thread Dusty Bin
tedd wrote:
 At 1:19 PM -0600 3/27/06, Jay Blanchard wrote:
 [snip]
 Where do I type in which php?
 [/snip]

 At the command line on the host.
 
 Aarrrg -- no disrespect meant.
 
 I'm totally and absolutely clueless and frustrated. It must be my age
 because I haven't seen a command line since my Apple][ days -- let alone
 one while doing web work.
 
 I'm sitting in front of my computer accessing my remote web site via ftp
 (GoLive) writing code and trying to set up a cron job using cpanel to
 run that code.
 
 Now, I have no idea of where I should type in which php  -- I've tried
 putting it in my cpanel cron jobs command to run box, but that doesn't
 do anything.
 
 Does anyone have any reference material of where a command line of the
 host is?
 
 Thanks.
 
 tedd
 
I know nothing of cpanel, but if you can use cpanel to execute your
script, can you not use cpanel to say 'which php'??
HTH...  Dusty

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] where php at?

2006-03-27 Thread Warren Vail
ah, perhaps you don't have a shell account.  With a shell account you would 
telnet to the server and enter the which command on the command line right 
after your prompt, once you were logged on.


try creating a file called which.php

have it contain the following;

?php
$result = exec(which php);
echo $result;
?

Upload it to your website and execute it in your browser.  I uploaded it to 
my RedHat Linux server and it showed the following;


/usr/local/bin/php

good luck,

Warren Vail

At 11:05 AM 3/27/2006, tedd wrote:

Warren Vail said:

Looks like you have a unix machine, if you have a shell account you may 
be able to use the command;


which php

to identify it's path.


John Meyer said:


If you're on a linux box, have you tried which php?


Where do I type in which php?

I'm dealing with a host account and I'm simply trying to find out where 
php is so I can set up a cron job.


Thanks.

tedd
--

http://sperling.com




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] where php at?

2006-03-27 Thread tedd

Dagnabit! Contact your host provider, they will tell you.



10 Been there
20 Done that
30 GOTO 10

Thanks anyway.

tedd
--

http://sperling.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] where php at?

2006-03-27 Thread tedd

I know nothing of cpanel, but if you can use cpanel to execute your
script, can you not use cpanel to say 'which php'??
HTH...  Dusty


Dusty:

Nope, it doesn't appear to work that way.

Everything I've read thus far is that you must somehow enter the 
exact command you would via a command line -- very similar to how you 
reset your MySQL db by injecting text directly into phpMySQLAdmin.


It should look something like:

/usr/local/lib/php -q -f /home/tedd/www/email_me.php

But, like a monkey typing all possible combinations, I've been 
unsuccessful in typing the right combination.


Thanks anyway.

tedd
--

http://sperling.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] where php at?

2006-03-27 Thread Joe Henry
On Monday 27 March 2006 12:31 pm, tedd wrote:
 At 1:19 PM -0600 3/27/06, Jay Blanchard wrote:
 [snip]
 Where do I type in which php?
 [/snip]
 
 At the command line on the host.

 Aarrrg -- no disrespect meant.

 I'm totally and absolutely clueless and frustrated. It must be my age
 because I haven't seen a command line since my Apple][ days -- let
 alone one while doing web work.

 I'm sitting in front of my computer accessing my remote web site via
 ftp (GoLive) writing code and trying to set up a cron job using
 cpanel to run that code.

 Now, I have no idea of where I should type in which php  -- I've
 tried putting it in my cpanel cron jobs command to run box, but
 that doesn't do anything.

 Does anyone have any reference material of where a command line of
 the host is?

 Thanks.

 tedd

 --
 ---
- http://sperling.com


Hey Tedd,

Do you have ssh access to your remote server from your local machine? If you 
do, then that would be where you'd run the command which php.

On Linux/Mac OS X, you can ssh via a terminal. On Windows, a program like 
PuTTY will do the trick.

Link for PuTTY download (just in case):
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

Syntax for ssh:
ssh user account@hostname/IP

Once you have an ssh session open to your remote server, running which php 
will return the remote path for php.

Hope that helps.
--
Joe Henry
www.celebrityaccess.com
[EMAIL PROTECTED]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] where php at?

2006-03-27 Thread Jim Moseby
 
 Dagnabit! Contact your host provider, they will tell you.
 
 
 10 Been there
 20 Done that
 30 GOTO 10
 
 Thanks anyway.

?PHP
  if(!$host_provider_instructions){
echo If your host provider can't tell you how to connect to _their_
server, what makes you think someone in php_general will be able to?;
  }else{
echo Follow host provider instructions;
  }
?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] where php at?

2006-03-27 Thread Kevin Kinsey

tedd wrote:


Warren Vail said:


Looks like you have a unix machine, if you have a
shell account you may be able to use the command;

which php

to identify it's path.



John Meyer said:


If you're on a linux box, have you tried which php?



Where do I type in which php?

I'm dealing with a host account and I'm
simply trying to find out where php is so
I can set up a cron job.

Thanks.

tedd




If you don't have a shell, you might get away with
a page using system(), backticks, escapeshellcmd(),
and the like (though on a shared host I'd think them
to be wise to disable a shell for www/nobody/apache):

?php

$foo=`which php`;
echo $foo;

?

Now, you may want to use whereis(1) instead, since
which is a shell-built in . . . but it sounds like a catch22:
no shell, no which; no shell, no shell, so whereis(1) can't
work either ... hmm, OTOH, which is only a shell builtin
in some shells, in which case ... ah, nevermind.

If you're guessing?  typical places include : /usr/local/bin/php,
/usr/bin/php, /usr/etc/php . . . .

HTH,

Kevin Kinsey

--
The devil finds work for idle glands.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] where php at?

2006-03-27 Thread Richard Davey

On 27 Mar 2006, at 20:47, tedd wrote:


Dagnabit! Contact your host provider, they will tell you.



10 Been there
20 Done that
30 GOTO 10


40 Gosub 'get decent web host'

Cheers,

Rich
--
http://www.corephp.co.uk
Zend Certified Engineer
PHP Development Services

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] where php at?

2006-03-27 Thread tedd



try creating a file called which.php

have it contain the following;

?php
$result = exec(which php);
echo $result;
?

Upload it to your website and execute it in your browser.  I 
uploaded it to my RedHat Linux server and it showed the following;


/usr/local/bin/php


 Warren:

Bingo -- that did it -- mine is:

/usr/local/bin/php

as well.

Now, to figure out what command I need to run a php script from there.

Thanks -- one step closer.

tedd
--

http://sperling.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] where php at?

2006-03-27 Thread Kevin Kinsey

Jay Blanchard wrote:


[snip]
Aarrrg -- no disrespect meant.

I'm totally and absolutely clueless and frustrated. It must be my age 
because I haven't seen a command line since my Apple][ days -- let 
alone one while doing web work.


I'm sitting in front of my computer accessing my remote web site via 
ftp (GoLive) writing code and trying to set up a cron job using 
cpanel to run that code.


Now, I have no idea of where I should type in which php  -- I've 
tried putting it in my cpanel cron jobs command to run box, but 
that doesn't do anything.


Does anyone have any reference material of where a command line of 
the host is?

[/snip]

Dagnabit! Contact your host provider, they will tell you.
 



If they offer a shell account.  I *shudder* to think that as recently
as 1999 I was administering a remote mail/webserver in the Pac
NW from the center of the country via telnet.

Possibly they offer access via ssh (Secure Shell), but a lot of hosts
don't any longer --- many customers wouldn't know what to do with
it anyway (heh, their loss), and some customers who *do* know how
to use it are a tad too curious sometimes, I expect.  I know I've seen
more than one big hosting company act like such things didn't
exist

Kevin Kinsey

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] where php at?

2006-03-27 Thread tedd

At 2:50 PM -0500 3/27/06, Jim Moseby wrote:

 

 Dagnabit! Contact your host provider, they will tell you.


 10 Been there
 20 Done that
 30 GOTO 10

 Thanks anyway.


?PHP
  if(!$host_provider_instructions){
echo If your host provider can't tell you how to connect to _their_
server, what makes you think someone in php_general will be able to?;
  }else{
echo Follow host provider instructions;
  }
?


Sorry to have bothered you.

tedd
--

http://sperling.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] where php at?

2006-03-27 Thread Jay Blanchard
[snip]
/usr/local/bin/php


Now, to figure out what command I need to run a php script from there.
[/snip]

http://www.unixgeeks.org/security/newbie/unix/cron-1.html

Now, you can do this one of two ways

17 8 * * * /usr/local/bin/php /path/to/your/script.php 

Or you can add a bash line to the top of your file and then make sure to
have one blank line after the bash line

#!/usr/local/bin/php

/* start your script here */

The bash line may not work depending on how the host is set up.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] where php at?

2006-03-27 Thread tedd

At 2:50 PM -0500 3/27/06, Jim Moseby wrote:

 

 Dagnabit! Contact your host provider, they will tell you.


 10 Been there
 20 Done that
 30 GOTO 10

 Thanks anyway.


?PHP
  if(!$host_provider_instructions){
echo If your host provider can't tell you how to connect to _their_
server, what makes you think someone in php_general will be able to?;
  }else{
echo Follow host provider instructions;
  }
?


Jim Moseby:

On second thought, I'm really not sorry to have brother you -- you 
don't have to reply to any request for help on this list.


Furthermore, I'm not asking you to provide me with how to connect to 
my host's server -- I've done that and that's not the problem. What 
I was asking for was some help, which Warren was capable of both 
understanding and providing.


Now maybe you didn't mean to come off as you did, but if positions 
were reversed, I like to think I wouldn't.


tedd
--

http://sperling.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] where php at?

2006-03-27 Thread Jay Blanchard
[snip]

http://www.unixgeeks.org/security/newbie/unix/cron-1.html

Now, you can do this one of two ways

17 8 * * * /usr/local/bin/php /path/to/your/script.php 

Or you can add a bash line to the top of your file and then make sure to
have one blank line after the bash line

#!/usr/local/bin/php

/* start your script here */

The bash line may not work depending on how the host is set up.
[/snip]

And the cron line should then read (with a bash);

17 8 * * * /path/to/your/script.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] where php at?

2006-03-27 Thread Ryan A
 [/clip]

 http://www.unixgeeks.org/security/newbie/unix/cron-1.html

 Now, you can do this one of two ways

 17 8 * * * /usr/local/bin/php /path/to/your/script.php

[/clip]

Now, I might be coming in a bit late here...but I have worked with cpanel
and using their simplified version of setting cron its pretty easy plus to
call the script you dont have to give the path the php like in the clip
above

Just
 17 8 * * *  /path/to/your/script.php

would do fine... at least it worked for me.

HTH.

Cheers,
Ryan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] where php at?

2006-03-27 Thread Rory Browne


 Jim Moseby:

 On second thought, I'm really not sorry to have brother you -- you
 don't have to reply to any request for help on this list.



Two-Faced SOB - One minute you're sorry, the next you're not. Make up your
gd Mind.


Furthermore, I'm not asking you to provide me with how to connect to
 my host's server -- I've done that and that's not the problem. What
 I was asking for was some help, which Warren was capable of both
 understanding and providing.

That's being pedantic. Da monsewers point still stands. If your host can't
give you details of its host, we would have difficulty given that we don't
have access to them. It would probably fall on the point that Warren managed
to write a script to extract the details - but that wasn't the point you
made.



Now maybe you didn't mean to come off as you did, but if positions
 were reversed, I like to think I wouldn't.


How would you like to come across? As an ungrateful SOB who can't take some
constructive critisism? You have some growing up to do before entering el
big bad world. Babies these days...

I'll add more to this tomorrow morning when I'm sober.



tedd
 --

 
 http://sperling.com

 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] where php at?

2006-03-27 Thread Anthony Ettinger
On 3/27/06, Rory Browne [EMAIL PROTECTED] wrote:
 
 
  Jim Moseby:
 
  On second thought, I'm really not sorry to have brother you -- you
  don't have to reply to any request for help on this list.



 Two-Faced SOB - One minute you're sorry, the next you're not. Make up your
 gd Mind.


 Furthermore, I'm not asking you to provide me with how to connect to
  my host's server -- I've done that and that's not the problem. What
  I was asking for was some help, which Warren was capable of both
  understanding and providing.

 That's being pedantic. Da monsewers point still stands. If your host can't
 give you details of its host, we would have difficulty given that we don't
 have access to them. It would probably fall on the point that Warren managed
 to write a script to extract the details - but that wasn't the point you
 made.



 Now maybe you didn't mean to come off as you did, but if positions
  were reversed, I like to think I wouldn't.


 How would you like to come across? As an ungrateful SOB who can't take some
 constructive critisism? You have some growing up to do before entering el
 big bad world. Babies these days...

 I'll add more to this tomorrow morning when I'm sober.



 tedd
  --

In a related question, I have php5 installed on my box (works fine
with Apache2)...but I can't seem to find php5 on the command line.

Is there a separate package I need (fyi: I'm using Gentoo).



--
Anthony Ettinger
Signature: http://chovy.dyndns.org/hcard.html

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] where php at?

2006-03-27 Thread Ryan A
 Two-Faced SOB - One minute you're sorry, the next you're not. Make up
 your
 gd Mind.



 I'll add more to this tomorrow morning when I'm sober.




DAMN! I love this listother than two people on the list I think everyone
else is gonna have a smile on their faces.

My $0.2

:-p

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] where php at?

2006-03-27 Thread Ryan A
Ooops, and lets not forget this one:

curl http://www.yoursite.com/path/to/script/yourscript.php

you can put that in your cron job by going to cpanel its a long way
round but sometimes it can be usefulyou should have CURL installed of
course.
The good thing about the above is it does not matter where the heck your php
is installed or if you have the shebang or not...

HTH again.

Cheers,
Ryan

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] where php at?

2006-03-27 Thread Jon Anderson

Anthony Ettinger wrote:

In a related question, I have php5 installed on my box (works fine
with Apache2)...but I can't seem to find php5 on the command line.

Is there a separate package I need (fyi: I'm using Gentoo).
Enable the cli USE flag in either /etc/make.conf or 
/etc/portage/package.use and re-emerge dev-lang/php


Cheers,

jon

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] where php at?

2006-03-27 Thread Anthony Ettinger
On 3/27/06, Ryan A [EMAIL PROTECTED] wrote:
 Ooops, and lets not forget this one:

 curl http://www.yoursite.com/path/to/script/yourscript.php

 you can put that in your cron job by going to cpanel its a long way
 round but sometimes it can be usefulyou should have CURL installed of
 course.
 The good thing about the above is it does not matter where the heck your php
 is installed or if you have the shebang or not...

 HTH again.

 Cheers,
 Ryan


$which php
returns nothing

$whereis php
php: /etc/ph
$ ls /etc/php
apache2-php4  apache2-php5  cli-php4

I don't think the binary php exists on my system.
The only php* binary matches I have are:
$ php
php-config  phpize


I think cli-php4 is the command-line-interface php.ini file for php4,
but the binary is no longer on my system.

If anyone knows...otherwise, I'll redirect to #gentoo


--
Anthony Ettinger
Signature: http://chovy.dyndns.org/hcard.html

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] where php at?

2006-03-27 Thread Warren Vail
I believe the command portion of your chron entry is /usr/local/bin/php 
/full/path/to/myscript.php (separated by a space)


My Cpanel allows two methods scheduling (updating cron.tab file), if you 
are using the unix option, you have the ability to schedule the execution 
at a certain time of day, etc.  Soneone else on this thread gave you a 
pretty good description of how that works, and there are other tutorials 
out there that will help.  I prefer the unix option from my cpanel.


make sure that the full path name is provided to your script, usually this 
will point to home/user or something like that.  Also your script will need 
to use full path names to files, you can use the pwd command (as we did 
with which) to find out what the current directory is for your script, but 
it is safest to use nothing but full directory names, because it is almost 
guaranteed to not be what you would expect, so relative path names will 
give you problems.


hope this helps,

Warren Vail
At 11:59 AM 3/27/2006, tedd wrote:


try creating a file called which.php

have it contain the following;

?php
$result = exec(which php);
echo $result;
?

Upload it to your website and execute it in your browser.  I uploaded it 
to my RedHat Linux server and it showed the following;


/usr/local/bin/php

 Warren:

Bingo -- that did it -- mine is:

/usr/local/bin/php

as well.

Now, to figure out what command I need to run a php script from there.

Thanks -- one step closer.

tedd
--

http://sperling.com




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] where php at?

2006-03-27 Thread Anthony Ettinger
On 3/27/06, Anthony Ettinger [EMAIL PROTECTED] wrote:
 On 3/27/06, Ryan A [EMAIL PROTECTED] wrote:
  Ooops, and lets not forget this one:
 
  curl http://www.yoursite.com/path/to/script/yourscript.php
 
  you can put that in your cron job by going to cpanel its a long way
  round but sometimes it can be usefulyou should have CURL installed of
  course.
  The good thing about the above is it does not matter where the heck your php
  is installed or if you have the shebang or not...
 
  HTH again.
 
  Cheers,
  Ryan
 

 $which php
 returns nothing

 $whereis php
 php: /etc/ph
 $ ls /etc/php
 apache2-php4  apache2-php5  cli-php4

 I don't think the binary php exists on my system.
 The only php* binary matches I have are:
 $ php
 php-config  phpize


 I think cli-php4 is the command-line-interface php.ini file for php4,
 but the binary is no longer on my system.

 If anyone knows...otherwise, I'll redirect to #gentoo


fyi: i didn't have the cli use flag set when I installed php5.

--
Anthony Ettinger
Signature: http://chovy.dyndns.org/hcard.html

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] where php at?

2006-03-27 Thread tedd

At 11:26 PM +0200 3/27/06, Ryan A wrote:

Ooops, and lets not forget this one:

curl http://www.yoursite.com/path/to/script/yourscript.php

you can put that in your cron job by going to cpanel its a long way
round but sometimes it can be usefulyou should have CURL installed of
course.
The good thing about the above is it does not matter where the heck your php
is installed or if you have the shebang or not...

HTH again.

Cheers,
Ryan



Thanks Ryan, but that failed to work as well.

tedd
--

http://sperling.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] where php at?

2006-03-27 Thread Chris

tedd wrote:

At 11:26 PM +0200 3/27/06, Ryan A wrote:


Ooops, and lets not forget this one:

curl http://www.yoursite.com/path/to/script/yourscript.php

you can put that in your cron job by going to cpanel its a long way
round but sometimes it can be usefulyou should have CURL installed of
course.
The good thing about the above is it does not matter where the heck 
your php

is installed or if you have the shebang or not...

HTH again.

Cheers,
Ryan




Thanks Ryan, but that failed to work as well.


Are you getting errors emailed to you? What are they? If you're not, 
make sure you set the email address appropriately and then let us know 
what errors you get.


If you use the shebang method:

#!/path/to/php

make sure you set the file to executable - it should be 755.

--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] where php at?

2006-03-27 Thread tedd

At 12:45 PM +1100 3/28/06, Chris wrote:

tedd wrote:

At 11:26 PM +0200 3/27/06, Ryan A wrote:


Ooops, and lets not forget this one:

curl http://www.yoursite.com/path/to/script/yourscript.php

you can put that in your cron job by going to cpanel its a long way
round but sometimes it can be usefulyou should have CURL installed of
course.
The good thing about the above is it does not matter where the heck your php
is installed or if you have the shebang or not...

HTH again.

Cheers,
Ryan




Thanks Ryan, but that failed to work as well.


Are you getting errors emailed to you? What are they? If you're not, 
make sure you set the email address appropriately and then let us 
know what errors you get.


If you use the shebang method:

#!/path/to/php

make sure you set the file to executable - it should be 755.


Chris:

No, I'm not getting anything emailed to me -- and I'm using this email address.

The file is executable and is set at 755.

Last night I was able to access a file, but the errors I received 
were first a permission thing, which I changed. Then I received a 
bunch of emails back as I tried to get the thing to work -- can't 
find directory and such.


But, I was not using anything like:

/usr/local/bin/php /full/path/to/myscript.php

but rather something like:

/home/tedd/public_html/e1.sh

where in the e1.sh file was php code.

However, after reading so much about doing the usr/local/... thing, I 
now can't get the /home/tedd/... thing to do anything.


I'm quilting for the night -- over 24 hours of fighting this nonsense 
-- but I thank everyone for their help (even the drunk). :-)


tedd
--

http://sperling.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] where php at?

2006-03-27 Thread Chris

tedd wrote:

At 12:45 PM +1100 3/28/06, Chris wrote:


tedd wrote:


At 11:26 PM +0200 3/27/06, Ryan A wrote:


Ooops, and lets not forget this one:

curl http://www.yoursite.com/path/to/script/yourscript.php

you can put that in your cron job by going to cpanel its a long way
round but sometimes it can be usefulyou should have CURL 
installed of

course.
The good thing about the above is it does not matter where the heck 
your php

is installed or if you have the shebang or not...

HTH again.

Cheers,
Ryan





Thanks Ryan, but that failed to work as well.



Are you getting errors emailed to you? What are they? If you're not, 
make sure you set the email address appropriately and then let us know 
what errors you get.


If you use the shebang method:

#!/path/to/php

make sure you set the file to executable - it should be 755.



Chris:

No, I'm not getting anything emailed to me -- and I'm using this email 
address.


The file is executable and is set at 755.

Last night I was able to access a file, but the errors I received were 
first a permission thing, which I changed. Then I received a bunch of 
emails back as I tried to get the thing to work -- can't find directory 
and such.


But, I was not using anything like:

/usr/local/bin/php /full/path/to/myscript.php

but rather something like:

/home/tedd/public_html/e1.sh

where in the e1.sh file was php code.

However, after reading so much about doing the usr/local/... thing, I 
now can't get the /home/tedd/... thing to do anything.


Last thought.. add something like this:

echo I am in file  . __FILE__ .  at line  . __LINE__ .  at time  . 
date('r') . \n;


to the top of the script that is meant to be running.

Every time it runs it will email you.

If you don't get an email, get your host to check their logs to make 
sure it's being triggered properly.


--
Postgresql  php tutorials
http://www.designmagick.com/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php