Archive for November, 2007

mod_speling for cPanel – Case sensitive

Thursday, November 29th, 2007

The module’s source code was in:

/home/cpapachebuild/buildapache/apache_1.3.X/src/
modules/standard/

So now we use apxs to compile it and put it where we want (again, one long line):

/usr/local/apache/bin/apxs -c /home/cpapachebuild/buildapache/apache_1.3.X/src/
modules/standard/mod_speling.c -o /usr/local/apache/libexec/mod_speling.so

What that does is compile just the module source code and then places the compiled output in the “libexec” directory so apache can find it when it starts up.

Now edit your httpd.conf file, you must add these lines to the end of their respective sections (where other things like this are listed):

pico -w /etc/httpd/conf/httpd.conf

Add following lines -
LoadModule speling_module libexec/mod_speling.so

AddModule mod_speling.c

(save it then use the command below to check the conf file)

service httpd configtest

If that all works then you can try a httpd restart.

All that and no recompiling of apache! This is a interesting module, now you can type PiCtUrEs.html even though the actual file is pictures.html and it will still find the file.

Don’t forget to add “CheckSpelling On” into your .htaccess file in each site you want this to work in.

If that all works then you can try a httpd restart.

All that and no recompiling of apache! This is a interesting module, now you can type PiCtUrEs.html even though the actual file is pictures.html and it will still find the file.

Don’t forget to add “CheckSpelling On” into your .htaccess file in each site you want this to work in.

NOTE : For new EasyApache3 – mod_speling options is available during Apache/PHP compilation.

:)

SquirrelMail throwing ERROR: Could not complete request.

Tuesday, November 27th, 2007

ERROR: Could not complete request.
Query: CREATE “INBOX.Sent”
Reason Given: Cannot create this folder.

Solution : Mailbox is full – increase email quota or delete some emails from server.

Cheers..

Clipshare – VideoCaptcha not working.

Thursday, November 15th, 2007

Clipshare – VideoCaptcha not working.

Solution – Compile PHP with GD and Freetype.

Clipshare – Not displaying guest error message even if guest limit is reached

Thursday, November 15th, 2007

Sometimes Clipshare do not display the error message for guest watch limit.

The error message should display like –

Sorry but you have exceeded the guest video limit for today. Please sign up to watch unlimited videos. Thank you.

You can add this line to .htaccess

php_value register_globals On

This will display the message if guest limit to watch video is reached.

PHPMOTION HOW TO

Thursday, November 15th, 2007

Change player logo

To change the player logo simply change the file /images_s/playerlogo.png
You can create your own image with the same name but it must be a png file and not gif, jpeg etc

recover admin password (forgot admin password)

If you have forgotten your admin password

1) Unzip and upload the file attached at the end of this post, into your /siteadmin folder (via FTP)

2) Open it in your browser

e.g. www.yourdomain.com/siteadmin/recover.php

No mysql information-error E001

If you have followed all the steps on setting up your mysql information both on your server and also in the /classes/config.inc.php file and you get an error

No mysql information-error E001

The reason for this is that you have open_basedir restrictions on your hosting account which are preventing the contents of the file /classes/config.inc.php from being read by phpmotion

Solution:

You need to disable open_basedir restrictions on your account. If you have a Plesk server this is done in the vhost.conf file for the specific domain name. If you have any other type of control panel, check with the documentation on how to disable openbase_dir restriction

Large video files being cut short

there could be many reasons why this is happening ( server side issues)

1) For a start ensure that you dont have (Process Resource Monitor) installed on your server. This is a tool that basically monitors cpu/resource usage on your server and will disable mencoder if its using too much cpu. If you dont want to uninstall this application then ensure that you have correctly added mencoder to the exclude list.

2) Make sure that you have enough time set for your max_execution_time in your php.ini file ( try something like 300)

Allow full screen on video

open the file templates/inner+play.htm

FIND:

param name=allowFullScreen value=”false”

to

CHANGE IT TO:

param name=allowFullScreen value=”true”

This currently only works with Internet Explorer and not FireFox

Videos or Thumbs not showing

If you can upload videos and they are not showing then there could be a variety of reasons as to why this is the case. The list below is not a complete exhaustive one but will help debug the most common problems.

1) Missing Requirements

If you run the tester.php script and get “fail” on the first 3 items on the list then video will not convert. You should check that you have these requirements installed. If you have a dedicated server or a VPS you can check yourself by logging in as root and running

which ffmpeg

which mencoder

which flvtool2

If you get a path showing then you have the modules installed, if not then you need to set these up. Click here for help with this.

Ensure that the file paths that you get are the same ones as specified in your admin area.

2) NO CLI support

CLI (command line interface) is the means by which the videos are converted in the background so that users don’t have to wait while they are converted. When a video finishes uploading, CLI is used to run convertor.php in the background which goes to work converting the video.

You need to check that you have CLI support. to do this follow the steps below

a) Open convertor.php and edit the two sections below to include your own email address and remove the // (commenting)

//CHECK POINT 1\\
//mail("you@yourdomain.com", "PHPmotion - Check Point 1", "Loaded OK", "From: Server ");

and also


//CHECK POINT 6\\
//mail("you@yourdomain.com", "PHPmotion - Check Point 6", "SCRIPT LOADED TO THE END", "From: Server ");

b) upload a video and when uploading is completed you should get 2 emails from your server, if you get both emails it means that you have CLI support and the convertor.php was loaded correctly and as such this is not your current problem. If you dont get the emails then you don’t have CLI for PHP and you should:

1) try and change the path to php in the file /classes/config.inc.php to /usr/local/bin/php

2) if step (1) does not resolve the problem try this alternative solution. http://phpmotion.com/forum/index.php?topic=954.0

3) Check your logs

You can also check your log file which is created in the folder /logs. To enable logging do the following

a) Edit the file classes/config.inc.php and change logging to yes as shown below

$log_encoder = "yes"; //change to "yes" to create a log file of encoding (created in /logs)

b) upload a video and then download the log file. If you are getting errors and you decide to post a question in the forum, remember to include your log file.

MySQL error – DEFAULT CHARSET=latin1

If you are getting a mysql error on (DEFAULT CHARSET=latin1).

1) download the file attached at the end of this post and unzip it

2) Delete the mysql.sql file thats inside your SQL folder in you downloaded version of PHPmotion replace the one downloaded.

3) Upload new SQL folder to your FTP

4) Try and follow setup steps as normal

mysql download

Taken from PHPMOTION FORUMS

ERROR: Failed to mkdir “/path/tp/templates c/: No such file or directory

Wednesday, November 14th, 2007

Reason for this error is wrong path in cgi-bin/uu_default_config.pm

Check the value of temp_dir and upload_dir.

Flength File Help “Failed To Find Flength File”

Wednesday, November 14th, 2007

Flength File Help “Failed To Find Flength File”

Assuming the script is set up properly, you are probably dealing with some kind of write-caching. Some servers perform write-caching which prevents writing out the flength file or the entire CGITemp file during the upload. The flength file or the CGITemp file do not actually hit the disk until the upload is complete, making it worthless for reporting on progress during the upload. This may be fixed using a .htaccess file assuming your host supports them. Here is a link to an excellent tutorial on using .htaccess files. I strongly recommend giving it a quick read before attempting to install your own .htaccess file.

www.freewebmasterhelp.com/tutorials/htaccess

1. A mod_security module for Apache.

To fix it just create a file called .htaccess (that’s a period followed by “htaccess”) and put the following lines in that file. Upload the file into the directory where the Uber-Uploader CGI “.pl” scripts resides, or in some directory above it (like your server’s DOCUMENT_ROOT, i.e. the top-level of your webspace). htaccess files must be uploaded as ASCII mode, not BINARY. You may need to CHMOD the htaccess file to 644 or (RW-R–R–).


# Turn off mod_security filtering.
SecFilterEngine Off

# The below probably isn’t needed,
# but better safe than sorry.
SecFilterScanPOST Off

If the above method does not work, try putting the following lines into the file


SetEnvIfNoCase Content-Type \
“^multipart/form-data;” “MODSEC_NOPOSTBUFFERING=Do not buffer file uploads”


mod_gzip_on No

2. “Performance Cache” enabled on OS X SERVER.

If you’re running OS X Server and the progress bar isn’t working, it could be because of “performance caching.” Apparently if ANY of your hosted sites are using performance caching, then by default, all sites (domains) will attempt to. The fix then is to disable the performance cache on all hosted sites.

Couldn’t open stream {localhost:143}INBOX

Wednesday, November 14th, 2007

Q) All my other IMAP clients can connect to my server, but TWIG says:
Warning: Couldn’t open stream {localhost:143}INBOX in
/var/www/html/twig/lib/mail/php-imap.inc.php3

A) Your server probably has Transport Layer Security turned on, but
PHP does not support TLS. You’ll need to edit config.inc.php3:
$config["imap_port"] = “143/notls”;

Good read…

Joomla Error: “RG_Emulation is On” warning in my admin area.

Monday, November 5th, 2007

Joomla Error: “RG_Emulation is On” warning in my admin area.

Edit the file, globals.php, found in the root directory of your Joomla

then find this code:

define( ‘RG_EMULATION’, 1 );

And change the line to:
define( ‘RG_EMULATION’, 0 );

Notice the value change from 1 to 0.

OSCommerce error – Fatal error: Cannot re-assign $this in … /upload.php on line..

Monday, November 5th, 2007

OSCommerce Error – Fatal error: Cannot re-assign $this in … /upload.php on line ..

To fix this, edit the ‘upload.php’ file mentioned in the error message. Open the file and find the line that says:

// self destruct
$this = null;

Now edit it to:

// self destruct
// $this = null;
unset($this);

Basically comment out with // the $this = null; line and add the unset($this); line

Your admin panel should work fine.