Web Hosting Forum | Lunarpages
News: July 14, 2008 - New Contest! - Submit Your WordPress Theme Designs, Win BIG!
August 25, 2008 - Time to Vote for the August 2008 Site of the Month!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
August 30, 2008, 06:41:27 AM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: Usr/bin?  (Read 347 times)
Abstract
Newbie
*
Offline Offline

Posts: 4


« on: May 16, 2008, 05:49:27 PM »

To ask what may be the most basic question ever
where is the usr/bin located?
I don't see any directories with either of those names
in cpanel or in the file manager.

I ask cause I'm trying to get php 5 activated.
It says it is installed but I am still on php 4.4.8.
and I think I need to go to usr/bin/php but I'm not sure.

I just learned xhtml and css so I am about as new to this as you can get.

Thank you for any assistance.
« Last Edit: May 16, 2008, 09:56:44 PM by Abstract » Logged
MrPhil
Quantum Encyclopedia Writer
*****
Offline Offline

Posts: 3237



« Reply #1 on: May 16, 2008, 08:46:20 PM »

The directory is /usr/bin. It is not visible through cPanel > File Manager or any FTP client. It is a public directory containing many executable programs which you can run, but you can't write any files into it.

How have you determined that you are still at PHP 4.4.8 rather than PHP 5? IIRC, if you can switch between the two, it will still say "4.4.8" even though you're on 5. Try some PHP 5-only code and see if it works or fails.
Logged

Abstract
Newbie
*
Offline Offline

Posts: 4


« Reply #2 on: May 16, 2008, 09:13:15 PM »

My reason for thinking I was running php 4.4.8
was because the general server information on the right said so
and because the phpinfo() function came up as it too.

As far as me running a php 5 script to be certain I am very new to php just started today in fact
so I couldn't jump straight to a php 5 script, at least I wouldn't know how.

I'm still not understanding where the /usr/bin is you say it is public does that mean local?
If it isn't local could someone post a U.R.L.?

Sorry I realize that these were probably to basic of questions to post in this forum.
Logged
MrPhil
Quantum Encyclopedia Writer
*****
Offline Offline

Posts: 3237



« Reply #3 on: May 17, 2008, 08:04:40 AM »

You can run the following to see if you're on PHP 5. Put this code in a file named public_html/test5.php and run it http://www.yoursite.com/test5.php:

<?php
if (stripos("Am I on 5?", "i")) {
  echo "Yes it works.";
} else {
  echo "No, it doesn't work.";
}
?>


If you get an error that the function stripos isn't found, then you're still on PHP 4. Otherwise it should say "Yes it works.".

/ is the Unix/Linux "root" of the file system on your server
/home/ACCOUNTNAME/ is the top of your site's files -- this is where cPanel > File Manager or an FTP client dumps you
/home/ACCOUNTNAME/public_html/ is the top of your Web site (where index.html or whatever is found)
/usr is a publicly readable, but not writable directory with various things customers need
/usr/bin/ is a directory below /usr, holding something like the php executable

There is no "URL" for /usr/bin. You can't get to it from the Web. It's on your server.

Edit: forgot closing ?>
« Last Edit: May 17, 2008, 11:33:32 AM by MrPhil » Logged

Abstract
Newbie
*
Offline Offline

Posts: 4


« Reply #4 on: May 17, 2008, 08:36:13 AM »

I put in that script and it came up as
Fatal error: Call to undefined function: stripos()

I think I need to do something with the .htaccess
I tried running that script with "AddHandler application/x-httpd-php5" in .htaccess
and with .htaccess blank, both returned the same result.

So hopefully just one more question on the /usr/bin.
Is it even possible for me to access/view the files in it or is it something that I can't see.
If it is accessible/viewable what would be the process for doing so as I am still unable to figure this out.


« Last Edit: May 17, 2008, 09:27:45 AM by Abstract » Logged
MrPhil
Quantum Encyclopedia Writer
*****
Offline Offline

Posts: 3237



« Reply #5 on: May 17, 2008, 11:40:21 AM »

It sounds like you're still running on PHP 4. How did you enable PHP 5 -- did you click on "Enable PHP 5" on cPanel? That may wipe out your existing .htaccess file, so be sure to save a copy of it. Were you missing ".php" at the end of the AddHandler line?

If you have SSH access (command line access), just do ls -la /usr/bin to get a listing of that directory. If you don't have SSH (you'll know you don't if you didn't pay extra for it), make a one-off cron job. cPanel > Cron Jobs, Advanced method, enter your email and M * * * * in the boxes (M is the current minutes past the hour plus 2 or 3). For the command to enter, again ls -la /usr/bin. Save. The command will be run in a couple of minutes and the listing will be emailed to you. Delete the cron job you just created, so it won't be run every hour.
Logged

Abstract
Newbie
*
Offline Offline

Posts: 4


« Reply #6 on: May 17, 2008, 12:04:04 PM »

Ok I added the .php to the handler and php5 is now working.

And I got the e-mailed list of the /usr/bin directory.

Thank you for your assistance it is greatly appreciated.

Logged
MrPhil
Quantum Encyclopedia Writer
*****
Offline Offline

Posts: 3237



« Reply #7 on: May 17, 2008, 01:08:55 PM »

Sounds good!
Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.3 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks


Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM