Adding iOS Icons for Bookmarks

Since newer PHP Melody themes such as the Echo theme are responsive you might want to add your own app-like icon for iOS devices.

That’s because when bookmarked, your site will have a nice little icon on the user’s screen; just like a native app.

Pro tip: You can create the required icons from your own logo: https://iconifier.net/

Your default icon should be 57x57px. But iPad and Retina devices need to provide more sizes. iPad requires icons with the size of 72x72px, while Retina devices need icons with 114x114px size.

Once you have the icons you need to edit your PHP Melody theme header.

Open:
/templates/[current theme]/header.tpl

Find:

<link rel="shortcut icon" href="{$smarty.const._URL}/templates/{$smarty.const._TPLFOLDER}/img/favicon.ico">

After, add:

<link rel="apple-touch-icon" href="https://your-site-com/icon.png"/>
<link rel="apple-touch-icon" sizes="72x72" href="https://your-site-com/icon.png"/>
<link rel="apple-touch-icon" sizes="114x114" href="https://your-site-com/icon.png"/>

How can I change the header background color?

Updating the header background color in the Echo theme is quite easy.

Open your /templates/Echo/css/echo.css file:

Find:

/*-----------------------------------------------------------------------------------*/
/*    3.Header (Navigation, Search, etc.)
/*-----------------------------------------------------------------------------------*/
header.pm-top-head {
  display: table;
  position: fixed;
  background: #FFF;
  border-bottom: 1px solid #e8e8e8;

 

Replace both #FFF and #e8e8e8 with your desired color code.

XML error: syntax error at line 1

PHP Melody sites running versions older than v2.3.1 might give the following error while working/importing YouTube videos:

XML error: syntax error at line 1

In case your site is running a PHP Melody version earlier than v2.3.1, you will have to update it to the latest release because the YouTube API used before PHP Melody v2.3.1 is now deprecated (no longer working). Such sites cannot be fixed as the entire API code was replaced throughout the codep/product.

Check our update guide to update your PHP Melody site today.

How to Fix: Warning: session_start() [function.session-start]: open(/tmp/sess_…O_RDWR) failed.

So, you’ve just installed or moved your PHP Melody installation to a new server and you’re greeted with this message:

Warning: session_start() [function.session-start]: open(/tmp/sess_e0725de9954b..2c14904, O_RDWR) failed: Permission denied (13) in /home/melody/public_html/stuff.php on line 42

This error basically indicates that the server’s PHP installation is not really configured that well. Note: We’re not referring to the PHP Melody installation, but the actual PHP runtime.

As a result, the first thing you should do is report this error to your hosting provider. They should have a ‘live chat’ available for such things and you could solve this problem in a matter of minutes.

If for some reason you don’t or can’t report the problem to someone who will address it, you may be able to solve this problem yourself.

How to change the sessions folder

Most hosting providers will allow you to either create your custom php.ini file or modify an existing php.ini file via your cPanel or Plesk account.

See if your hosting provider allows you to update your “PHP Configuration” from your account management panel (cPanel, Plesk, etc.).

Once you’ve found your PHP configuration file (php.ini), search for the following line:

session.save_path =

If you don’t have root access to the server in order to set the correct permissions to the /tmp folder, create a new folder which you can control and use it as the default folder for your PHP session files.

For example, if your hosting’s account path is:

/home/videos34/public_html/

Create a new folder for your sessions (outside the public_html folder would be best) as such:

/home/videos34/tmp/

Next, change the permissions for your tmp folder to 0777 (fully writable).
Now you can specify this new folder in your php.ini as such:

session.save_path = '/home/videos34/tmp/'

 

Error #2035 Explained and Solved

What causes the #2035 Error?

Most likely this error occurs only in Mozilla Firefox. If you’re using Firefox as the default browser, check your videos with another browser (e.g. Chrome) to see if you get the same error.

The error is caused by several things:

  • A bug in the Mozilla Firefox browser
  • The video you’re trying to play is a missing/removed YouTube video.

How can I fix the #2035 Error?

First things first. Check that the video(s) returning this error actually work on YouTube.com.

Secondly, we recommend updating your Firefox version to the latest release. After updating your browser, also check that Adobe Flash is updated to the latest release as well. You can update Adobe Flash here.

If nothing works, you can always change the default player for YouTube in PHP Melody to either the “Original Player“, another version of JW Player or Video JS.

500 Internal Server Error – Explained and Solved

internal_errorWhat is the 500 Error?

Put simply, the 500 error is what we call a “server-side” error. That means that there is something wrong with the server who is hosting the website. It is an extremely general error usually caused by configuration issues with the websites programming, PHP or system permissions.

What causes 500 Internal Server Errors?

500 errors can frequently occur with incorrectly configured rewrite rules contained in your .htaccess file.

Fixing the 500 Internal Server Errror

If you’ve recently made changes to your PHP Melody file structure or applied an update package, please review your current .htaccess file.

If this file was overwritten recently, please review your previous .htaccess file for any extra lines. Perhaps your server requires those additional lines.

How to find out if .htaccess is the problem?

Simple. Rename your existing .htaccess file into .htaccess-bk and see if that removes the 500 internal error.

This may not be the only problem so, if renaming the .htaccess file doesn’t get rid of the error, here a few other options:

  • Review your error_log file for any errors. Those error messages usually include more details about what exactly is wrong with the server.
  • Make sure that your Smarty/templates_c/ directory’s permissions are set to 777 (chmod 0777).
  • Report the problem to your hosting provider. Most likely the hosting company can easily sort such problems for you
  • Contact our support team. We’re ready to help with any problems (even server issues). To speed things up, include FTP credentials to your installation.

Crontab generates many empty files

Our crontab syntax already includes an option which prevents files form being generated each time the crontab runs.

However, some hosting providers may require an different crontab command.

If your default crontab command looks something like:

wget -q "https://demo.phpmelody.com/cron.php?cron-key=68afdf2c980faf60924dc188b9ab583a"

You will have to use the -O option as illustrated below:

wget -O /dev/null "https://demo.phpmelody.com/cron.php?cron-key=68afdf2c980faf60924dc188b9ab583a"

Featured Categories on Homepage

Starting with PHP Melody v2.5 you can show videos from selected categories on your homepage. We call those “featured categories”. To show a featured category on your homepage simply browse to your PHP Melody back-end and follow the instructions as illustrated below.

Clicking on the home icon will mark any category as “featured”.

How to remove the “Powered by…” footer link

These instructions are for PHP Melody licenses which include the rights to remove the “Powered by” footer link (e.g. Brand-Free and Unlimited licenses).

To remove the “Powered by …” link form the footer of your site follow these steps:

Open the /config.php file with a plain text editor and locate the following line:

define('_POWEREDBY', 1);

Replace line with:

define('_POWEREDBY', 0);

Save the changes and upload to your installation.

Note: PHP Melody “Standard” license holders do not have permissions to remove the “Powered by” footer link. Removing the “powered by” link form a “Standard” license will invalidate the license.