Hines

Active Member
Apr 23, 2010
44
0
56
I need to access the root of my server. Specifically, I need to modify the php.ini file in my virtual apache server.

I don't know much aboout SSH but i gather I need to use it to gain root access. I downloaded "putty" but kept getting "access denied" messages and gave up. (Luckily--I had the help of the most gracious guy in these forums: Spiral!!!)

However, I'm done with my old taks and now I need root access so I can get to this php.ini file. Perhaps I need to go ahead and get putty working? Any suggestions from you folks as to the easy way to accomplish this? :D
 

Shrex

Member
Apr 28, 2010
5
0
51
Mangalore
Hello pal

I am not sure that you can edit php.ini in shared hosting. And i am using SSH to access my account without using keys and i can access as root. Try SSH using account user name and pass disabling key for your account.

Shrex!:)
 

Hines

Active Member
Apr 23, 2010
44
0
56
I got it working. thanx. so now ssh works. but now what do ido? what do i need to type in to see the directory. i guess i need to know a command line?
 

thewebhostingdi

Well-Known Member
Jan 10, 2008
141
0
66
Old Tappen
cPanel Access Level
DataCenter Provider
Twitter
To edit the php.ini you will have to type below mentioned command in your command prompt:

[[email protected]] : pico /usr/local/lib/php.ini

Generally, php.ini file is located inside the /usr/local/lib. You can edit the file using the above command and save the file.
 

Hines

Active Member
Apr 23, 2010
44
0
56
Thanx a lot. I typed exactly what you wrote:
pico /usr/local/lib/php.ini

also

usr/local/lib/php.ini


also

(my usernam)/usr/local/lib/php.ini


All I got was: "No such file or directory."

Is there no way to get a directory tree of the root?
 

Hines

Active Member
Apr 23, 2010
44
0
56
I need to change the value of max_execution_time. I am trying to upload packages to my site and they keep timing out. The default "max_execution_time" is 30 seconds, I think. I need to increase this to 60 or 120.

I did the research and found out this is what i need to do to solve the problem. I had a hosting account but now have a virtual server and am trying to learn more complex functions.
 

Spiral

BANNED
Jun 24, 2005
2,018
8
193
You said that "pico /usr/local/lib/php.ini" is not working ....

Systems that have nano usually have pico aliased but maybe not yours .....

However just type "edit /usr/local/lib/php.ini"

(This should invoke whatever is the 'default' editor on your server)

You should know that the script timeout can and often are set from the scripts themselves and I've seen scripts complain they only have 30 seconds and the system actually have 5 minutes and turned out the script that was complaining was overriding the longer time with a shorter one in what is somewhat amusing irony.

PS: something else you need to know is that you **MUST** be logged into SSH as 'root' in order for that to work so if you are logged in using some other username then that would also explain why you are unable to access the php.ini file.
 

ChrisRHS

Well-Known Member
Jul 12, 2006
292
5
168
I need to change the value of max_execution_time. I am trying to upload packages to my site and they keep timing out. The default "max_execution_time" is 30 seconds, I think. I need to increase this to 60 or 120.

I did the research and found out this is what i need to do to solve the problem. I had a hosting account but now have a virtual server and am trying to learn more complex functions.

That setting can be found in WHM's advanced PHP editor. If you are not familiar with SSH commands, then I would not recommend fooling around with a live server trying to learn. If down time does not matter, then by all means, play, as it is a great way to learn what not to do :).

Chris