Latest Post
Tampilkan postingan dengan label error. Tampilkan semua postingan
Tampilkan postingan dengan label error. Tampilkan semua postingan

Media upload error in wordpress after installation of customized plugin

Written By Unknown on Kamis, 03 Oktober 2013 | 06.37

Media upload error in wordpress after installation of customized plugin
 
After installation of custom plugin in wordpress sometimes error occurs while media upload.

The reason is you have may be you have included '$' in js of plugin(replace $ with jQuery)  or might be you have added js in plugin_name.php file. 

      



Media upload error in wordpress after installation of customized plugin



To correct the error include your js of plugin in separate js file and put this file in plugin_name folder with plugin_name.php file.

And to use this js in plugin add the below function in plugin file.

function my_scripts_method() {
    wp_enqueue_script(
        'plugin_name',
        plugins_url() . '/plugin_name/plugin_name.js',
        array( 'jquery' )
    );
}

add_action( 'wp_enqueue_scripts', 'my_scripts_method' );




Hope this will solve your problem :)


Could not create directory. /opt/lampp/htdocs/wordpress-test/wp-content/upgrade(Theme installation problem in wordpress)

Written By Unknown on Selasa, 24 September 2013 | 23.53

Could not create directory. /opt/lampp/htdocs/wordpress-test/wp-content/upgrade

 Could not create directory. /opt/lampp/htdocs/wordpress-test/wp-content/upgrade

This error occur when you try to install some new theme on wordpress .
And your wp-content is not writable.





To correct this error

Change permissions on the /wp-content directory to 0775
 

if not work Change permissions on the /wp-content directory to 0777.

And dont forget to restore your permission after work is done as security measure.

Fatal error : Call to undefined function add_menu_page()

Written By Unknown on Senin, 23 September 2013 | 23.58

Fatal error : Call to undefined function add_menu_page()

If you want to add menu to admin section of wordpress through custom plugin and you got
"Fatal error : Call to undefined function add_menu_page() " error.

Then reason for error might be there is no add_action function found in plugin

Try this code to solve this error in your plugin file.

<?php

/*
Plugin Name: Myplugin

Description:
Version: 2.5.324
Author: Amit kumar


*/
add_action('admin_menu', 'test');

function test(){
    add_menu_page(__('My Menu Page'), __('My Menu'), 'edit_themes', 'my_new_menu', 'my_test_function', '', 7);
}

function my_test_function(){
    echo "hello world .. !!";
}

Email Error Logs with PHP

Written By Unknown on Minggu, 12 Agustus 2012 | 08.35

In today’s video quick tip, we’ll review the process of setting custom error handlers with PHP. Along the way, we’ll also learn how to log and email those potential errors to ourselves. That way, even when your web application has been deployed, you’ll be the first to know when an error is encountered. 


To read more about this article Click Here

Click Here to download files



 

GoDaddy, cURL, HTTP, and 403 Errors

Written By Unknown on Jumat, 28 Mei 2010 | 22.38

I was recently coding PHP cURL functionality for a GoDaddy-hosted website and I kept running into an annoying 403 error. Essentially, GoDaddy’s proxy server (which they force you to use for cURL) was giving me a “Forbidden” error and wasn’t trying to hit the necessary server. Here’s the code that GoDaddy tells you to use for cURL transactions:



$URL='https://www.paypal.com';
$ch = curl_init();
echo 'URL = $URL <br>n';
curl_setopt($ch, CURLOPT_VERBOSE, 1);
curl_setopt ($ch, CURLOPT_HTTPPROXYTUNNEL, TRUE);
curl_setopt ($ch, CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
curl_setopt ($ch, CURLOPT_PROXY,'http://proxy.shr.secureserver.net:3128');
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt ($ch, CURLOPT_URL, $URL);
curl_setopt ($ch, CURLOPT_TIMEOUT, 120);
$result = curl_exec ($ch);
echo '<hr><br>n';
echo 'Errors: ' . curl_errno($ch) . ' ' . curl_error($ch) . '<br><br>';
echo '<hr><br>n';
curl_close ($ch);
print 'result - $result';
echo '<hr><br>n';

The problem is that since I’m not using SSL in this instance, I don’t need to use the following cURL option:

curl_setopt($ch,CURLOPT_HTTPPROXYTUNNEL, true);

Remember that if you receive this error from GoDaddy’s server. Hopefully I save someone a bunch of time with this
 
Support : Creating Website | Johny Template | Mas Template
Copyright © 2011. Kumpulan Kata Broadcast Blackberry - All Rights Reserved
Template Created by Creating Website Published by Mas Template
Proudly powered by Blogger