Salesforce Toolkit for PHP

Author posted by Jitendra on Posted on under category Categories Force.com, Salesforce, Web Technology and tagged as Tags , with 15 Comments on Salesforce Toolkit for PHP

Example of using PHP toolkit in Salesforce with Sample code

In a web development PHP has prooved itself as one of the major contributor in the world. There are lots of websites which are built over the PHP and the best example is facebook. PHP is very powerfull, easy to learn and the best thing is that it is open source.

Following the popularity of PHP, salesforce has also started providing support to PHP and delivered the Toolkit for it. Using this toolkit we can connect with salesforce and perform all API operations supported like Insert, update, delete, retrieve etc.

Download Salesforce PHP Toolkit Example – Zip Continue reading “Salesforce Toolkit for PHP”

Cpanel – FileZilla FTP – All code converted in single line

Author posted by Jitendra on Posted on under category Categories Web Technology and tagged as Tags , , with Leave a comment on Cpanel – FileZilla FTP – All code converted in single line

While transferring the php, html or javascript file using filezilla ftp client to the cpanel – all the codes converted into single line

Problem detail :

I used the FileZilla FTP client to transfer the source code in cpanel environment. I normally use the Notepad++ editor to edit the code. While transferring the code from local to cpanel using filezilla – sourcecode of PHP, HTML, Java Script … all the code converted to the single line.

Lets discuss in detail , if my code is like :

<?php
 if(isset($_POST['YourName']))
 {
   //Check Name have special character or not
   $isValid = true;
 }
?>

then it gets converted to

<?php if(isset($_POST['YourName'])) {   //Check Name have special character or not $isValid = true; } ?>

Continue reading “Cpanel – FileZilla FTP – All code converted in single line”

CPanel – PHP – 500 internal server error

Author posted by Jitendra on Posted on under category Categories Web Technology and tagged as Tags , , with Leave a comment on CPanel – PHP – 500 internal server error

Error Resolved – CPanel – PHP – 500 internal server error

Hello Reader,
Before one day everything on my blog was working great however suddenly i got error “500 internal server error” for my wordpress blog.
After 1-2 hour digging i got to know that my hosting provider has enabled “SU-PHP“.

If The server is having SU-PHP enabled :
You can create a custom php.ini file to customize your php configurations. If you are getting 500 internal server error, please create a file php.ini in your public_html folder and enter the following line:

“suhosin.Simulation On”

If you are getting same error under wp-admin login page then copy your php.ini file under wp-admin/ directory and check once again.

Create Cron job to run PHP Script in Cpanel

Author posted by Jitendra on Posted on under category Categories Linux and tagged as Tags , , with 1 Comment on Create Cron job to run PHP Script in Cpanel

Hi All,

Today i just want to share that how to create  a cron job in Cpanel to run the PHP script.

I hope everyone knows that what is Cron job : it is the task schedule in Linux which will run on predefined time interval. its same concept like schedule tasks in Windows OS.

To create the cron job, open the Cpanel and select “cron jobs”.

Select Cron job in Cpanel

You can see that in drop down list there are lots of common schedules of crone job, you can select it, or create your own schedules.

Common settings in Cpanel

In Command text box, write the PHP program path and file to be executed like:

/usr/local/bin/php -q /home/<username>/script.php


to find the path to php,
log on to the server with SSH, then run this command:
“”””””””””””-
which php
or
whereis php
“”””””””””””””-
This will give you the path to the php executable, probably:
/usr/local/bin/php

WordPress Error: “missing A Temporary Folder.” After Uploading A File

Recently i got the error

“missing A Temporary Folder.” After Uploading A File

After digging lots of sites, i was unable to fix the problem.

Maximum sites offer solution like change php.ini etc. but changing configuration file and using shell command can be avoided by a simple trick.

Go to Plugins Tab in wordpress after Login.

Then click on Install, you will get below Screen.

click on Add New and search FCKEditor, Install It -> Activate.


And thus your problem solved.

you want to use that editor then use or Simply Deactivate but don’t uninstall.


Display author name in wordpress

Author posted by Jitendra on Posted on under category Categories Tech Tips and tagged as Tags , with 1 Comment on Display author name in wordpress

Look in the default theme’s index.php file for the proper template tag:


<code><?php the_author() ?></code>

and a good place to put it.

Display Author’s ‘Public’ Name

Displays the value in the user’s Display name publicly as field.

<p>This post was written by <?php the_author(); ?></p>

Get Author link


<p>Written by:
<?php echo get_the_author_link(); ?></p>

The Author’s Post

<p><?php the_author(); ?> has blogged <?php the_author_posts(); ?></pre>
</div>
<pre>posts</p>

The Author’s Post Link

<p>Other posts by <?php the_author_posts_link(); ?></p>

for more info check below URL
http://codex.wordpress.org/Template_Tags/the_author

How to change the Meta Tag link in WordPress

Author posted by Jitendra on Posted on under category Categories Tech Tips and tagged as Tags , with Leave a comment on How to change the Meta Tag link in WordPress

How to change the Meta Tag link in Wordpress

Edit /wp-includes/default-widgets.php file at line 296

Old code:

<?php wp_register(); ?>

<li><?php wp_loginout(); ?></li>

<li><a href=”<?php bloginfo(‘rss2_url’); ?>” title=”<?php echo esc_attr(__(‘Syndicate this site using RSS 2.0’)); ?>”><?php _e(‘Entries <abbr title=”Really Simple Syndication”>RSS</abbr>’); ?></a></li>

<li><a href=”<?php bloginfo(‘comments_rss2_url’); ?>” title=”<?php echo esc_attr(__(‘The latest comments to all posts in RSS’)); ?>”><?php _e(‘Comments <abbr title=”Really Simple Syndication”>RSS</abbr>’); ?></a></li>

<li><a href=”http://wordpress.org/” title=”<?php echo esc_attr(__(‘Powered by WordPress, state-of-the-art semantic personal publishing platform.’)); ?>”>WordPress.org</a></li>

<?php wp_meta(); ?>

New Code:

<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
<li><a href=”<?php bloginfo(‘rss2_url’); ?>” title=”<?php echo esc_attr(__(‘Syndicate this site using RSS 2.0’)); ?>”><?php _e(‘Entries <abbr title=”Really Simple Syndication”>RSS</abbr>’); ?></a></li>
<li><a href=”<?php bloginfo(‘comments_rss2_url’); ?>” title=”<?php echo esc_attr(__(‘The latest comments to all posts in RSS’)); ?>”><?php _e(‘Comments <abbr title=”Really Simple Syndication”>RSS</abbr>’); ?></a></li>
<li><a href=”http://www.JitendraZaa.com” title=”<?php echo esc_attr(__(‘Powered by Shiva, the supreme solution.’)); ?>”>ShivaSoft</a></li>

Change the Login Image of WordPress in Simple steps

Author posted by Jitendra on Posted on under category Categories Tech Tips and tagged as Tags , , , with Leave a comment on Change the Login Image of WordPress in Simple steps

Change the Login Image of WordPress in Simple steps

Hi,

Follow below steps to change the login image and tooltip of the wordpress.

for this hack, you will require following Two files :

/wp-login.php
/wp-admin/login.css

in wp-login.php page search for the “powered by” and replace that tooltip as per your convenience / requirement.

Now open login.css and search for the logo image. normally its in tag h1 a.

So you can change image like :

h1 a{background:url(../images/ShivaLogo.png)

where “ShivaLogo.png” is your new image name.