PHP

  • NO INPUT FILE SPECIFIED CODEIGNITER PROBLEM

    AUTHOR: // CATEGORY: Codeigniter, PHP

    No Comments

    If you are facing problem/error “no input file specified.” in Codeigniter, here is a quick fix for that:
    Open .htaccess file in your favorite code editor and add ? (question Mark) after index.php in line which says:

    RewriteRule ^(.*)$ /index.php/$1 [L]
    

    your file should look like/similar as below after changes:

    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php?/$1 [L]
    

    It is a well known issue with some of web hosting servers for example Hostgator India and GoDaddy

    LinkedInShare
  • NON WELL FORMED NUMERIC VALUE ENCOUNTERED IN PHP DATE

    AUTHOR: // CATEGORY: Codeigniter, PHP

    No Comments

    If you get “non well formed numeric value encountered” error in PHP while using date() function to save into MYSQL database, use strtotime() function to correct this:

    $my_date = '20-12-2015';
    echo date('Y-m-d', strtotime($my_date));
    

    will output:
    2015-12-20
    which can be saved into MYSQL.

    LinkedInShare
  • HOW TO CONFIGURE (SETUP) APTANA STUDIO FOR WORDPRESS DEVELOPMENT

    AUTHOR: // CATEGORY: Aptana Studio, PHP, WordPress, WordPress Plugin Development, WordPress Theme Development

    No Comments

    Sometimes Aptana Studio doesn’t give code hinting for WordPress Development, if you face this problem, try this:
    1. go to File -> New -> Other -> or just click ctrl+N.
    2. New dialog window will open, from there choose Project under General Category, click next.
    3. On Project Screen type a name for your project e.g. ‘WordPress Development’ and uncheck ‘Use Default Location’.
    4. Click browse button on the right for location and select your WordPress installation folder e.g. c:\xampp\htdocs\wordpress_development. Click Finish.
    5. Now right click on your WordPress Development (your project created above) in Project Explorer and select Properties.
    6. ‘Properties for WordPress Development’ window will pop up, from there click on ‘Project Natures’.
    Check ‘PHP’ and ‘Web’ from the right panel, make sure PHP is highlighted as Primary.
    Then click OK to close Properties Dialog window.
    Now Aptana Studio will reconfigure your project accorinding to PHP as Project Nature and will ask you to close and reopen the project, click Yes to accept so.
    Now you may see your porject as closed project on Project Manager, if so double click to open your newly created project and you are done.
    Try creating a test plugin under wp-content/plugins directory and you will get code hinting for WordPress.

    LinkedInShare
  • CODEIGNITER AND ECLIPSE AUTOCOMPLETE

    AUTHOR: // CATEGORY: Aptana Studio, Codeigniter, Eclipse, PHP

    No Comments

    Today I was struggling to configure CodeIgniter in Eclipse PDT to support auto-complete and I ended up with a solution after searching a lot on the web. Here it is: CodeIgniter and Eclipse Autocomplete.  It’s really awesome.

    LinkedInShare
  • LOVEDHARMA.ORG

    AUTHOR: // CATEGORY: Joomla, PHP, Projects

    No Comments

    My new poject LoveDharma is now online.  Love Dharma is a social movement lead by Shashank Anand in New Delhi, India. It is built upon Joomla Open Source. Visit this site at http://www.lovedharma.org.

    LinkedInShare