Question:
My rails app can’t connect to the database. I get the error /tmp/mysql.sock not found
Answer:
Edit your config/database.yml file and add:
socket: /var/lib/mysql/mysql.sock
That will solve the problem.
Question:
My rails app can’t connect to the database. I get the error /tmp/mysql.sock not found
Answer:
Edit your config/database.yml file and add:
socket: /var/lib/mysql/mysql.sock
That will solve the problem.
Question:
Do your shells support background processes?
Answer:
Hi,
It depends on what you need to run. In general we do not allow background processes. We do not restrict background processes but we also do not encourage them. The goal is to keep our servers stable and running smoothly.
If you need something to run in the background it will run. We cannot guarantee a process will run forever though. We have a monitor that will kill things off after a certain amount of cpu time has been used up.
Also, no irc bots, bouncers, etc. are allowed at all.
So if you really, really need background processes we are probably not for you. If you just need to spawn things every once in a while or experiment with small servers you’ve wrote it should be ok.
I hope this helps some!
Question:
Hi,
I can not override the php include_path from my .htaccess file. Running my php script gives ‘failure opening xxx.inc’ and still lists the default include path!
I’m sure my syntax is correct – why won’t this work?
Answer:
I noticed you are using one of the cgi-based php versions. When running these you must use your own php.ini file.
.htaccess has no effect. .htaccess only works with the mod_php apache module.
To set php options using the cgi-based php versions, do the following:
1. Create the directory /home/your_username/etc/
2. Put your own custom php.ini file
This will solve the problem.
Question:
I’m currently trying to upgrade the web application “TikiWiki” on my site to the latest, stable version but cannot access the install page: “my_username_here.phpwebhosting.com/tikiwiki-1.9.2/tiki-install.php”.
Every attemt returns “Internal Server Error 500.”
Any idea what is going on?
Answer:
TikiWiki installs sometimes hit against our default mod_security (http://www.modsecurity.org/) rules.
This page:
http://support.phpwebhosting.com/security/how-can-i-turn-off-mod_security-for-my-site
show you how to turn mod_security off on your site. Quick version: add the line :
SecFilterInheritance Off
to a .htaccess file in the directory of your install.
I would suggest your turn it off for the install and then back on afterward. I think TikiWiki may just be tripping on the install code.
Most likely you can turn mod_security back on after the install is complete. In general mod_security causes few if any problems but does a good job of protecting your site against any new exploits that may affect the scripts you run.
Also, you can view the live error and audit (mod_security) log at:
/usr/local/apache/logs/error_log
and
/usr/local/apache/logs/audit_log
Let us know if you continue to have problems.
Question:
I want my mysql full-text indexes to index 3 letter words. The default is 4 letters. Can you fix this?
Answer:
Sure, no problem.
Many of our servers already have this set. If yours does not just send in a support ticket and we’ll update it for you. After the update, you’ll need to rebuild the existing indexes to index the 3 letter words. Any new indexes will use 3 letters by default. The documentation at mysql.com has instructions for updating your indexes.
Question:
Do you allow us to run a web server application i.e a server process (multithreaded). My application is an online pdf generator. My traffic is going to be very less i.e it is for private use.
Answer:
These types of question are hard to answer because it can depend so much from case to case. In general we recommend that
you try the app out and see if you hear from us. If there is a problem we will disable the app and let you know. In most cases it is fine.
There are a few server processes that we do not allow: bnc, bots, etc. – anything IRC related (sorry but cause of many problems) .
Question:
I can login to ssh correctly if I use my password. However attempts to use my key result in:
server refused our public key
Answer:
Make sure you do not have group or other write permissions on your .ssh directory
If in question, issue the command:
chmod 700 ~/.ssh
chmod 600 .ssh/authorized_keys*
sshd is very strict on the permissions for your keys. It will not use them if it believes the permissions are unsafe.
Question:
How can I set php’s include_path?
Answer:
Quck fix for any version
With any version of php you can add this to the top of your script:
ini_set ( “include_path”,”.:/home/your_username/www/:/home/your_username/www/dir/subdir/” );
This is a good fix if for some reason you cannot get other methods to work.
In general though, you should use one of the next two methods:
When using cgi-based php
If you are using one of the cgi-versions of php, you can set this by editing
/home/your_username/etc/php.ini
If this is your first time editing php.ini you may need to create the etc/ dir and upload a default php.ini
When using mod_php php
If you are using the mod_php version, you can set this in a .htaccess file with :
php_value include_path ".:/home/your_username/www/:/home/your_username/www/dir/subdir/"
Still having problems?
If you get a 500 error, then there is a syntax error in your .htaccess file.
If the pages loads but you do not get the intended result, make a page with just:
< ? phpinfo(); ?>
in it. When you load this page it will show you all the php vars for the page. Make sure the path is set how you wanted it. If it is but your scripts still do not work you’ll need to adjust them or your scripts until you get what you want. It can be hard to get the right path since your scripts may be operating differently from what you expect.
Keep in mind:
Your base dir on the filesystem is always:
/home/your_username/
Your web base dir is (unless you’ve customized your base dir):
/home/your_username/www/
Question:
Hi, I came across this page:
http://office.microsoft.com/en-us/assistance/HA011092991033.aspx
which seems to indicate that I can use php with FrontPage. Can you help me out?
Answer:
I checked out that link you sent. According to the link you do not need the frontpage extension at all for php coding.
However you do need to make some changes to the FrontPage editor program on your computer. The page recommends you:
1. Use :
script language="php"> and /script
tags
instead of
< ? php?>
tags.
2. ShowConfigure PHP file extensions to open in Design view
If you are doing php coding it may be best to not use FrontPage at all. The items above that I copied from Microsoft’s page should solve most of the problems. However at times FrontPage may not recognize the php code and try to reformat it.
Question: How do I create a new ruby on rails application and view it on the web?
Answer:
In ssh, type:
rails ~/my_rails_app
to create an app
Be sure to replace :
my_rails_app
with the name for your application
Then type:
ln -s /home/your_username_here/my_rails_app/public/ /home/your_username_here/www/my_rails_app
you can then go to:
http://your_web_site_here.com/my_rails_app/index.html
to see the app on the web.
Note:
Some older phpwebhosting.com servers do not have the latest ruby + gems + rails installed. If typeing rails in ssh does not work for you, enter a support ticket and we’ll get your server updated right away.