My crontab has extra comments at the top that I did not add!

Question:

My crontab file has lines similiar to :

# DO NOT EDIT THIS FILE – edit the master and reinstall.
# (/tmp/crontab.31994 installed on Fri Apr 16 09:43:07 2004)
# (Cron version — $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)

at the top. I did not add these. How did they get there?

Answer:

Those lines are added automatically by the crontab system when you update your crontab. You can ignore them. They are comment lines and do not affect the running of your crontab.

How can I turn off php’s register_globals option?

Question:

How can I turn off register_globals ?

Answer:

The method of turning of register_globals depends upon how you are running php. If you are using the default mod_php create a .htaccess file in your www directory and add the line :

php_flag register_globals off

You can also create multiple .htaccess files inside of different directories
and change the status of register_globals for different parts of your site.

If you are using one of the php-cgi versions, .htaccess will not work. Instead, create a directory called :

etc

in your home directory

and place a custom php.ini file in it. Inside the php.ini file, set register_globals to off.

My site is showing a list of all my files! How do I control directory indexes?

Question:

My site is showing a listing of all my files. Anyone who comes to my website can see everything! Help!

Answer:

The directory index is showing because you have no index.html file. Anytime there is no index.html (or index.php, index.htm, etc.) the server will show the default index that it creates on the fly.

You can also control the automatic creation of indexes by performing the following steps :

Create (or edit your existing) .htaccess file and put it in the topmost directory that you want to control. To enable / disable for your whole site, put it in your www directory.

To disable directory listings, add the line :

Options -Indexes

To enable them, add the line :

Options +Indexes

If your site still does not list the directory after enabling and you get the error :

“Forbidden You don’t have permission to access / on this server.”

make sure the read privilege is set for the directory you have the .htaccess file in.

My CGI script is not working! It worked fine until I uploaded a new copy. What’s going on?

Question:

I have a perl cgi script that is not working. I’m sure I have the chmod settings correct and their are no syntax errors.

Answer:

Unfortunatly there can be many different reasons why a script stops working. The most common is that you made a recent edit to the file that broke it. If you are sure that you did not make any syntax (aka programming) errors in the script, the following may help:

When you upload a script (cgi, perl files, etc.) from a windows computer to a unix-based server, you need to upload them in ascii mode. If not, windows adds some extra control characters at the end of each line that cause the script to not run correctly. Normally your FTP program will switch the mode in the background for you. Sometimes it does not though.

In the future, you can just manually hit the ascii mode switch in your FTP program to make it upload the script in ascii mode. The best mode to keep your FTP program in is usally labeld as “auto”. Keep in mind that in your particular FTP program it may be labeled differently. Each FTP program uses their own terminology.

Most ftp programs in auto mode will do the right thing for each file you upload.

How do I make a web-based archive for my mailing list?

Question:

I would like to create a web page with the archived messages on our website. Is there another way to access the mailing list messages at phpwebhosting in order to set up a dynamically generated mail archive page?

Answer:

Currently there is no automatic way to create a web archive of messages for your mailing list.

However you can try installing Dada Mail from :

http://mojo.skazat.com/

and use that as your Mailing list software. It has a nice built-in web interface. We have a lot of clients who use it and like it.

I hope this helps!

I am trying to delete a folder, but I keep getting the error “Can’t remove directory: Directory not empty”

By default, most ftp clients will not allow you to delete a folder unless it is empty. Most ftp clients do have an option that will allow you to “force remove” a directory though. If you cannot find this option, you will have to first delete the contents of the directory and then try deleting it again.

If you are using SSH, put -R in front of your rm command.

If you continue to experience problems, please submit a help desk request and specify the path to the directory you would like removed and support will remove it for you. Please put “delete directory” in the subject line of your request.

I have forgot my database password. How can I change it?

Question:

I’ve forgot my database password. What are my options?

Answer:

If you have forgot your database password and do not have any scripts that depend on it, you can change your password via the database section of your control panel. Just click on the link that says “Change Database Password”. Do not log-in to phpmyadmin to change your password.

However things become much more complicated if you have scripts (wordpress, joomla, drupal, etc.) that rely on the password. If you change your password it will break those scripts. Unfortunately, even server admins not have access to your existing database password (the passwords are encrypted and not easily decrypted).

The best option if your scripts depend on your password is to search the scripts for the password. If you know the location of the password this is easy. For example, wordpress stores your password in wp-config.php.

If you do not know where the password is stored, use something like the following to find it:

find . -name "*.php" -exec grep "localhost" {} ; -print
find . -name "*.inc" -exec grep "localhost" {} ; -print
find . -name "*.php" -exec grep "3306" {} ; -print
find . -name "*.inc" -exec grep "3306" {} ; -print

These search through common php file extensions and search for the strings “localhost” and “3306” which are usually close to the location of your password. You can also search for the term “password” or “pass” but will likely get a lot of false positives.

If you are not comfortable doing the above, our support staff can find your password for a one-time fee of $25. Contact support with your request.

Can I change my username?

Unfortunately, it is not possible to change your username. Usernames are very deep rooted in the system and cannot be changed.

If it is absolutely necessary that you change the username associated with your account, you can open a new account (via our homepage), transfer your files, then cancel your current account. We can make any necessary billing adjustments to make sure you do not have over lapped payments in the process.