https does not work for my domain

Question:

I tried to go to https://my-domain.com/ (notice the ‘s’ in https) to view a secure, SSL-encrypted version of my page. My page did not come up. How do I enable SSL?

Answer:

SSL requires a dedicated IP. By default https will go to the generic server page (the control panel).

A dedicated IP is $2 per month and would allow https to work on one domain. Each domain needs its own IP (this is how SSL works and is not a rule of ours).

SSL also requires an SSL certificate. We can create an un-signed cert for you for free. An un-signed cert will encrypt your pages but show a warning in most browsers the first time you load the page because the cert is unsigned.

For a yearly fee we can provide you with an official signed cert which does not show any warning message. Contact support to buy a certificate.

You may have used this:

https://your-server-here.phpwebhosting.com/~your-user-name-here/

in the past for SSL. This still works but is not guaranteed to always work in the future. There are several issues with providing ~username dirs that have caused some discussion about discontinuing them in the future.

If disk space is un-metered, why do I have a disk quota?

Question:

If disk space is un-metered, why do I have a disk quota?

Answer:

Clients sometimes ask why there is a quota if space is un-metered. Disk space is un-metered but we still do keep (very high) quota’s in place to stop any out of control processes, etc. from mistakenly consuming the whole disk. Running a server without any quota’s at all is not a good idea because it is very possible for a single user to consume all the disk space if they have either logs or processes that get out of control.

Keeping a minimal level of disk quotas in place ensures that your server runs smoothly. If you ever reach your quota, contact support and we will promptly raise your quota higher.

How are docroot’s for multiple domain hosting configured (document roots)

Question:

How are the domains on a phpwebhosting.com hosting account configured? Am I free to set the docroot / document root to whatever I like?

Answer:

The way our system works is that you sign up with a username and then add your first domain.

By default the first domain goes in:

/home/your_username/www

however you can change this if you would like.

Other domains you add can go pretty much wherever you like. Some people use things off their www like:

/home/your_username/www/site1
/home/your_username/www/site2

(this is not the best method to do things as your extra domains are then viewable as directories on your primary domain)

Other clients organize their domains like:

/home/your_username/site1
/home/your_username/site2
/home/your_username/site3

or

/home/your_username/sites/this.com
/home/your_username/sites/that.com
/home/your_username/sites/etc.com

It is open-ended and should work with just about any method you prefer.

My access_log is filled with requests for scripts I don’t have. What’s going on?

Question:

I noticed that my access log has requests for things like wp-admin, phpmyadmin, phpbb, etc. – scripts that I do not have installed. The requests seem to come from all over the world and sometimes one right after another. What is going on? Do I need to be worried about this?

Answer:

This is, unfortunately, normal. The entries may resemble:

"GET //phpmyadmin1/scripts/setup.php HTTP/1.1" 404 877 "-" "-"

These entries are attackers scanning to find servers they can exploit. You’ll see them scanning for most common web apps and scripts. As long as you don’t have a copy of the script they are looking for installed you are fine. Even if you do, you are good as long as your install is current.

Hackers know that popular scripts like WordPress, phpMyAdmin, phpBB, etc. have millions of installed instances. They also know that many users may install one of these scripts to test and then never use it again and worse, never update it. Once a security vulnerability is found in a particular version of a script, hackers use lists of randomly compiled domain names and start checking if each domain has the hackable version of the script installed.

You do not need to worry about these types of “scans” as long as you do not have old versions of scripts installed. We highly recommend that you remove or disable scripts that you no longer use and keep all scripts you do use up-to-date.

Fixing silverstripe warnings during install

Silverstripe magic_quotes asp_tags warnings screenshot

Question:

I get warnings about asp_tags and magic_quotes during my install of silverstripe.

Answer:

You need to edit your php.ini and set the asp_tags and magic_quotes options to off.

However be aware that there is the potential to break your other scripts if your scripts depend on those options. You should change them and then test your other scripts. If anything breaks, you’ll need to leave them set to on or set up a separate php configuration for each part of your site.

Best regards,

Quickly install WordPress from the command line (7 easy steps)

Install wordpress from the command line:

Here’s the quickest way to install wordpress from the command line:

1. Get wordpress:
wget --quiet http://wordpress.org/latest.zip ; unzip -q latest.zip

2. Get rid of your old site and mv wordpress to your document root (or put it where-ever it is you want it)
mv www www-old ; mv wordpress www

3. Change to the wordpress directory
cd www

4. Rename the config file

mv wp-config-sample.php wp-config.php

5. Edit the config file, be sure to put in your db name, username and password in the code below

sed -i -e 's/database_name_here/YOUR_DB_NAME_HERE/' wp-config.php
sed -i -e 's/username_here/YOUR_USER_NAME_HERE/' wp-config.php
sed -i -e 's/password_here/YOUR_PASSWORD_HERE/' wp-config.php

6. Set your unique keys and salts

wget -q -O - https://api.wordpress.org/secret-key/1.1/salt/

you’ll get something like:

define('AUTH_KEY', 'Jcie-e]vC6!^;JHf5}ikA]k){#RWr&Sl6/Z-M,F=Y+4{G?dFc`=!E+bl^Mu!,c e');
define('SECURE_AUTH_KEY', '.o5oBJC|p[X4');
define('LOGGED_IN_KEY', 'TR_Nc m|w;5@e2EgA55$5:1U -NWd|tC_^M;oYt^3{j-4;P~oU#&bBBMvXH=m6i(');
define('NONCE_KEY', 'c}c E?V$C*T({;lm:(1K?+~AP`vM4< !rnounx~Qydz:n]7V< *98 6[+!d='); define('LOGGED_IN_SALT', 'pG}6d}~l3nbEHPD9$@?eSp

Do not copy the above into your wp-config.php - it is an example only and not safe to use

paste the output of this into wp-config.php

7. Load the install page into your browser, follow the steps and you are done!

Wordpress install screenshot

or as a near one-liner :

DB_USER=put_the_db_username_here ; DB_PASS=put_the_db_user_password_here ; DB_NAME=put_the_db_name_here ; wget --quiet http://wordpress.org/latest.zip ; unzip -q latest.zip ; mv www www-old ; mv wordpress www ; mv www/wp-config-sample.php www/wp-config.php ; sed -i -e "s/database_name_here/$DB_NAME/" www/wp-config.php ; sed -i -e "s/username_here/$DB_USER/" www/wp-config.php ; sed -i -e "s/password_here/$DB_PASS/" www/wp-config.php ; rm -f latest.zip ; wget -q -O - https://api.wordpress.org/secret-key/1.1/salt/

Fixing Silverlight install error : date.timezone set and valid

Silverlight date.timezone Error screenshot

Question:

I get the an error when installing Silverlight regarding date.timezone. How can I fix this?

Answer:

With newer versions of php (PHP 5.3.0 and above), the date.timezone must be explicitly set. You can fix this by going into your etc/php.ini directory (create if does not exist) and add the line for date.timezone. An example is:

date.timezone = 'America/New_York'

Be certain to only use timezone’s listed at:

http://www.php.net/manual/en/timezones.php

Timezones like ‘US/Eastern’ no longer work.

It can be very frustrating because php will not complain if you use ‘US/Eastern’ and phpinfo() will show the value as set but Silverlight will not work with those settings. ‘US/Eastern’ and others are only included in php for backwards compatibility.

browser tries to download php

Browser tries to download php pages screenshot

Question:

Sometimes my browser tries to download or save php files from my website. What causes this? How can it fix it?

Answer:

This can happen for a variety of reasons. However we frequently see it when a page is timing out. If you are connecting to a remote database make sure that the database is up and that dns is resolving correctly for it.

Delete mysql user example and tutorial

Note: deleting mysql users will not work on most types of shared accounts. You will likely need to enter a support request unless you have a VPS.

Here’s how to delete a user mysql from.

In the example the test user is called “jdoe”

This step is not necessary but you can use it to verify you are removing the intended username :


mysql> show grants for jdoe;
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Grants for jdoe@% |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'jdoe'@'%' IDENTIFIED BY PASSWORD '*4CB51346C69F4302F0371CB61DE7076D14837C48' |
| GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE ON `jdoedb`.* TO 'jdoe'@'%' |
+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

Next, perform the actual removal of the user:

mysql> drop user jdoe;
Query OK, 0 rows affected (0.08 sec)

Next run flush privileges – this is likely not needed. However lacking time to look up the correct answer I’m going to call it anyway. When in doubt, remember that flushing privileges never hurts anything. It simply reloads all the privileges currently assigned (thus “unloading” any that are deleted and should be removed).

mysql> flush privileges;
Query OK, 0 rows affected (0.02 sec)

If you want to verify the user was deleted, run the show grants command again:

mysql> show grants for jdoe;
ERROR 1141 (42000): There is no such grant defined for user 'jdoe' on host '%'

It should come back empty now.

Joomla errors when uploading picture JFTP::login: Unable to login · JFTP::mkdir: Bad response · JFTP::chmod: Bad response · JFTP::mkdir: Bad response · JFTP::chmod: Bad response · JFTP::write: Unable to use passive mode)

Question: When trying to upload an image in Joomla, I get the errors:

· JFTP::login: Unable to login
· JFTP::mkdir: Bad response
· JFTP::chmod: Bad response
· JFTP::mkdir: Bad response
· JFTP::chmod: Bad response
· JFTP::write: Unable to use passive mode

Answer:

You need to go to the Global configuration:

Joomla Global configuration screenshot

and then change the FTP information:

Joomla FTP settings screenshot

Make sure you press apply/save to save your changes.