Category: Troubleshooting

  • Can’t add any ‘classic ads’. Internal Error 500.

    If creating or saving ads in PHP Melody returns an ‘Internal Error 500’ message, your hosting provider has a restrictive ‘mod_security’ configuration.

    There are several things which you can do to fix circumvent this problem.

    Option 1

    Call or live chat with your hosting provider and ask them to disable ‘mod_security’ for your hosting account. GoDaddy is known not to help in this case and simply play dumb. You’ll be wasting your time with them on this issue. Other hosting providers are more helpful and cooperative.

    Option 2

    Try disabling ‘mod_security’ yourself via .htaccess.

    Open .htaccess and add these lines at the end of the file:

    <IfModule mod_security.c>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </IfModule>

    Or in some cases this might also work:

    <IfModule mod_env.c>
    SetEnv MODSEC_ENABLE Off
    PassEnv MODSEC_ENABLE
    </IfModule>

    Note: this method will not work with mod_security2 or on GoDaddy accounts.

    Option 3

    If you have your own server you can edit your ‘mod_security’ config file and white-list some PHP Melody files.

    Locate and open your mod_security config file. In this case, the config file was found at: /usr/local/apache/conf/modsec2/whitelist.conf

    Add the following lines:

    <LocationMatch "/admin/ad_manager.php">
    SecRuleRemoveById 300015 300016 300017
    </LocationMatch>
    <LocationMatch "/admin/admin-ajax.php">
    SecRuleRemoveById 300015 300016 300017
    </LocationMatch>
    <LocationMatch "/admin/prerollstatic_ad_manager.php">
    SecRuleRemoveById 300015 300016 300017
    </LocationMatch>

    Option 4

    If everything fails, you can quickly insert the ads code via phpMyAdmin. Browse to your PHP Melody database, select the ‘pm_ads’ table and in the ‘code’ field of your desired ad zone add the HTML code provided by your ad partner.

    You can also add banners manually by editing your theme files.

    Good luck!

  • How to import from Youtube.com users with Russian characters.

    Unfortunately, the open Youtube.com API doesn’t permit searching by username if that username has Russian characters. Luckily, PHP Melody allows you to enter the User ID in such cases and circumvent the restriction.

    Below is a video on how to do this but here are the main steps, but it’s best to watch the video too:

    1. While on www.youtube.com, click on the Youtube username which should take you to the user’s Channel or Profile.
    2. Notice that the user’s Channel URL will look something like:
      https://youtube.com/channel/UC-fv_EW0shYu1rK4NTYd8hw
    3. Copy the User ID from the URL, in this case UC-fv_EW0shYu1rK4NTYd8hw and paste it into the PHP Melody’s “Import from Youtube User” page.
  • How to fix the video uploading process

    upload-problemDepending on the hosting company you choose for your PHP Melody based site, you may encounter some problems when it comes to uploading video files from the Admin Area.

    Since there are several problems that may occur, we’re providing several solutions:

    Increasing the default limits to uploading

    This is by far the most common problem. Webhosts set a low limit to how much the uploaded files can have. Usually you should be able to solve this problem in one of the following three ways:

    a) Edit /config.php and add the following lines of code:

    @ini_set( 'upload_max_size' , '128M' );
    @ini_set( 'post_max_size', '128M');
    @ini_set( 'max_execution_time', '300' );

    b) Create a new file named php.ini (on GoDaddy it might be php5.ini) with the following lines and upload it to your installation:

    upload_max_filesize = 128M
    post_max_size = 128M
    max_execution_time = 300

    c) Add the following lines to your already existing .htaccess:

    php_value upload_max_filesize 128M
    php_value post_max_size 128M
    php_value max_execution_time 300
    php_value max_input_time 300

    If none of the previously listed examples works, contact your hosting provider and ask them to increase the limit for you. The examples will raise the upload limit to 128 MB per file. If you need more than that, adjust the examples by editing the ‘128’ value.

    Removing the unwanted security

    Create a php.ini file and add the following two lines to it before uploading it to your PHP Melody installation (root folder):

    SecFilterEngine = Off
    SecFilterScanPOST = Off

    You may be on a restrictive shared hosting account and these tips might not work for you.
    In this case you can always contact the hosting provider and ask them to do it for you. Some of them might refuse to do so and if that’s the case, you might consider looking for a new hosting provider.

  • Youtube Import Error (Failed to connect to 2607:f8b0:4000:801::1013)

    Youtube Error with IPv6You’re trying to import/add videos from Youtube but you receive the following error:

    Failed to connect to 2607:f8b0:4000:801::1013: Network is unreachable

    If that’s the case, all you have to do is rename the following two PHP Melody files from your installation(s):

    /admin/src/youtube.php into /admin/src/youtube.php-bk
    /admin/src/youtube.ipv6.php into /admin/src/youtube.php

    Now try importing Youtube videos and enjoy PHP Melody!

    Note: this applies to PHP Melody v1.8.1 or newer