Showing posts with label Errors. Show all posts
Showing posts with label Errors. Show all posts

Thursday, May 1, 2014

Err: Client denied by server configuration after Apache upgrade

From Apache 2.4, syntax of user directive options were changed. So that Apache configuration from old version to new 2.4 or later will cause this error due the incorrect syntax.

# Apache version 2.2 or lower configuration:
<Directory /docroot>
Order allow,deny
Allow from all
</Directory>

# Apacheversion 2.4 or later configuration:
<Directory /docroot>
Require all granted
</Directory>

For more information on new syntax visit Apache Access Directive in Details.

So use latest directory access directives syntax to avoid the same type of errors.



Tuesday, March 25, 2014

PDOException: Invalid text representation

Error:
The website encountered an unexpected error. Please try again later. [PDOException: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "as" LINE 5: WHERE (base.nid IN ('as')) ^: ..... (line 191 of/var/www/html/drupal/includes/entity.inc).]

Solution: 
Drupal throws PDO exception error like above while giving url patterns like,
localhost/drupal/node/abc
localhost/drupal/node/1.
localhost/drupal/node/1.23
localhost/drupal/node/<any special characters like *&^%$#@!>
This because of invalid input for select query while it is expecting integer. This is core level bug and the wrong input needs to be filtered in entity.inc of core module.
//add the below lines inside function load() in entity.inc.
//Patch to avoid non numeric node id's which causes pdo exceptions
if (is_array($ids)) {
        // Remove all non numeric ids.
        $ids = array_filter($ids, function($x){
                return preg_match('/^[0-9]+$/', $x);
        });
}

Friday, December 27, 2013

Port 80 is already used by another program in windows

This may happens in Windows machines while installing Apache.

This because of the port may be used by some other program like Skype or default os service. To resolve this try the below ways:
  • Disable HTTP.sys driver that was started by some of the Windows inbuilt applications
  • Disable the HTTP in registry under the path "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HTTP"


Thursday, August 8, 2013

Drupal PDO error : Invalid input syntax for integer

Error:

        PDOException: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer:

Reason:

Drupal will not recognize the node URL when the node id is not an integer. This will happens when URL like node/abc instead of node/12. It fails to get the desired node URL location from the database. It's bug of Drupal Core.

Solution:

To filter out the non numeric node id's from the URL from executing use the below patch in Drupal core file called includes/entity.inc. Add the lines as first in function called load().

    public function load($ids = array(), $conditions = array()) {
        //Add the below code patch

        //-----Patch Start----

        if (is_array($ids)) {
        // Removes all non numeric ids.
        $ids = array_filter($ids, function($x){
                return preg_match('/^[0-9]+$/', $x);
                });
        }

        //-----Patch End----
        $entities = array();


Tuesday, July 3, 2012

Postgresql 9.x to 8.x restore issue with bytea field contains hex values

Error:
  • Warning: Invalid argument supplied for foreach() in list_themes() (line 780 of /var/www/html/drupal/includes/theme.inc).
  • Warning: Invalid argument supplied for foreach() in system_region_list() (line 2709 of /var/www/html/drupal/modules/system/system.module).
  • PHP Notice:  unserialize(): Error at offset 0 of 1009 bytes in /var/www/html/drupal/includes/cache.inc on line 447
  • PHP Notice:  unserialize(): Error at offset 0 of 296805 bytes in /var/www/html/drupal/includes/cache.inc on line 447
  • PHP Warning:  Invalid argument supplied for foreach() in /var/www/html/drupal/includes/module.inc on line 185
  • PHP Warning:  array_keys() expects parameter 1 to be array, null given in /var/www/html/drupal/includes/module.inc on line 89
  • PHP Notice:  unserialize(): Error at offset 0 of 296805 bytes in /var/www/html/drupal/includes/cache.inc on line 447
  • PHP Warning:  Invalid argument supplied for foreach() in /var/www/html/drupal/includes/module.inc on line 185
  • PHP Warning:  array_keys() expects parameter 1 to be array, null given in /var/www/html/drupal/includes/module.inc on line 89
  • PHP Fatal error:  Call to undefined function system_run_automated_cron() in /var/www/html/drupal/includes/common.inc on line 2614
Reason:
This will occurs when we try to host our project in a new location.  In that time, we take backup of code and database to relocate. This makes the problem.

In the case of PostgreSQL, version 9.x has two output formats called 'hex' and 'escape'. This is the setting to decide the output format of our raw data's stored in database. In case of bytea, the values are in binary format and that should be exported properly to understand by others (either it may be PHP or PostgreSQL server).

Restoring in same PostgreSQL version is not a problem. If it is lower version compared to source, then it makes issue. Because the 'hex' format used by 9.x can't understand by lower versions some time. So these should be exported properly.

Solution:
Note : Do this in server machine from where you going to take PostgreSQL backup.


The output format can be set by editing "postgresql.conf" file located in PostgreSQL installation directory. In that, add the line like,
bytea_output = 'escape'
 and restart the PostgreSQL service once.

This will give us the escaped output of bytea data's while backing up as well as querying from programming languages like PHP.

Now take the backup and restore it in lower version as follows

For plain backup use console import using the command '\i' and 
for tar backup user higher version of PG ADMIN to restore it.

For Drupal applications,
Clear the cache tables to remove the existing cached values by executing the following,
truncate cache;
truncate cache_block;
truncate cache_bootstrap;
truncate cache_field;
truncate cache_filter;
truncate cache_form;
truncate cache_image;
truncate cache_menu;
truncate cache_page;
truncate cache_path;
truncate cache_update;
truncate cache_views;
truncate cache_views_data;
Additional workaround:
Even if it is not working then do the following. This is optional only not mandatory one.
Edit the sites/default/settings.php and make the setting as 
$update_free_access = TRUE;
and then run following the commands in console like
$ cd /var/www/drupal/
$ php update.php
$ php cron.php
and run the application again. Still error persist, then repeat the steps from scratch once.

Note: This is tested under Ubuntu 10.04 and Cent OS 6.

Friday, December 16, 2011

Err: WebGL not worked with Chrome 15 in Ubuntu 11.10

Error:
              WebGL is not enabled for your browser.

Common Reasons & Solutions
:

              This will occur in some sites that contains rich contents like 3D web graphics. In Google Chrome build (15.xx) after updating the Ubuntu 11.10 makes this error due to many reasons. Some of them are,


Chrome extensions that blocks webGL
              Adblock extension for Chrome may cause the error. For that,
  • Remove or disable the extension for while and restart the browser once.
By default not Enabled by the Browser 
              If it is not enabled by default, pass it as argument at run time.
  • In Windows,
    • chrome.exe --enable-webgl
  • In Linux
    • ./chromium-browser --enable-webgl
Graphics card not detected or not configured well 
              In this case, we need to use different parameter as an argument. This is only for Linux.
  • Using terminal,
    • ./chromium-browser --ignore-gpu-blacklist
  • Using main menu,
    • Edit "Main Menu -> Internet -> chrome" link. Then click the properties on right side and add the parameter as argument in the application input box after the program name like "/usr/bin/chromium-browser %U --ignore-gpu-blacklist".

Note: This is tested under Ubuntu 11.10.

Monday, December 12, 2011

Err: unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in

Error:
              Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /var/www/captcha/captcha.php on line 80

Common Reasons & Solutions
:

              This error will occur for many reasons in PHP. Some of them are,

PHP5 Syntax incompatible with older versions of PHP like 4.x
              Some of the declaration methods used in latest versions of PHP doesn't works with older versions. This will occurs in the environment where the running version of PHP is older than the  development one. In that case, any on of the listed solution may work.

  • Remove the access specifiers like public, private and protected from in-front of the variable or function declarations. 
  • Put 'var' in-front of variable declaration instead of normal declarations
    • var $x = 10;  instead of $x = 10;

Tuesday, November 22, 2011

Err: Unlock Login Keyring in Ubuntu 11.10 problem

Error:
Unlock login keyring password.

Reason:
Most of the Ubuntu users could faced this problem. This is occurred due to the following reasons.

  1. While using of autologin facility
  2. Frequent password change
Keyrnig password is the authentication key to execute what ever thing is done with mouse in Gnome screen. Each thing what we have done in GUI is converted into system commands and then shell only executes that and returns the result to Gnome.

Du to any one of the mentioned above reasons, the keyring password got collapsed and it asks us at every boot for the password that is just previous to the current logged in password we have changed (ie. last changed password.).

Solution:
This can be solved by following two ways. 
  1. Passing last changed password
    By providing last changed password for once. Then it will be automatically changed to current password we are using.
  2. By setting empty password to the keyring.

    This can be done by changing the password to empty using 'Passwords and Encryption Keys' tool that exist in Ubuntu by default. 
    1. To get this window in Ubuntu 11.10, click on 'Activities' and then type 'password'. The result window shows that application on that and click on that. 
    2. Right click the 'Passwords : login' and select 'Change password'.
    3. Give the current or last changed password in the column 'old password' and leave the new and confirm password as empty.
    4. Save it.

Note: This is tested under Ubuntu 11.10

Thursday, November 17, 2011

quicktime demuxer not found in Ubuntu 11.10

Error:
While try to play .mp4 files in Ubuntu 11.10, it will search for the missing plugin and tries to find in repository. After taking a quit time it shows the error like 'quicktime demuxer not found'.

Reason:
qtdemux plugin is moved from bad to good in this update and renamed to isomp4 according to changelogs, but it looks like the relevant mapping were not updated. So that it is trying to open files with that muxer in Ubuntu 11.10 (gst-plugins-good0.10 version 0.10.30-1ubuntu7) and fails with the message "quicktime demuxer" plugin can not be found.
Solution:
To remove the existing plugin mapping from the system,
Remove the configuration file by,
$ rm ~/.gstreamer-0.10/registry*.bin
otherwise rename it like,
$ mv ~/.gstreamer-0.10/registry*.bin ~/.gstreamer-0.10/registry*.bin.org
Now play the same video again and see it will works.


Note : This is tested under Ubuntu 11.10.
Ref   :  https://bugs.launchpad.net/ubuntu/+source/gst-plugins-good0.10/+bug/869564

Tuesday, November 15, 2011

Err: HipHop checkSystemGVOrder: Assertion `false' failed

Error:
While compiling PHP applications using hiphop,
running hphp...
parsing inputs...
parsing inputs took 0'07" (7204 ms) wall time
pre-optimizing...
pre-optimizing took 0'02" (2224 ms) wall time
inferring types...
inferring types took 0'00" (663 ms) wall time
post-optimizing...
post-optimizing took 0'00" (509 ms) wall time
creating CPP files...
hphp: /home/ubuntu/Desktop/dev/hiphop-php/src/compiler/analysis/variable_table.cpp:818: void HPHP::VariableTable::checkSystemGVOrder(HPHP::SymbolSet&, unsigned int): Assertion `false' failed.
Core dumped: Aborted
hphp failed
running hphp took 0'12" (12662 ms) wall time

Reason:
This error occurs when the path for HPHP compiler is not set or incorrect path were set.
Solution:
To get the rid of it, run the following command under "hiphop" base directory not from other directory.

$:~/Desktop/dev/hiphop-php# export CMAKE_PREFIX_PATH=`/bin/pwd`/../

$:~/Desktop/dev/hiphop-php# export HPHP_HOME=`/bin/pwd`
$:~/Desktop/dev/hiphop-php# export HPHP_LIB=`/bin/pwd`/bin

or else set the exact path in /etc/environment file if you know.

Note : This is tested under Ubuntu 11.10.

Friday, October 21, 2011

Configured IP v4 settings got resetted at each reboot in Windows vista


Error:
         Windows resets the IP v4 settings what we have configured for our local network (IP, Gateway, DNS server and all) after each restart. This may differs machine to machine like,
  1. Some m/c resets the gateway only.
  2. Some m/c resets the entire settings (IP, Gateway, DNS).
Reason:
          Moment after updating the security patches from microsoft, Windows (Vista/7 or later) machines got updated with new things that is provided by the respective vendor. Likewise, NIC (network interface card) driver also got updated during that. This is the problem in my case. 

Solution:
          For that, you can uninstall the driver which is newly updated along with the security patches from Microsoft to get the rid of it.
To do that,
  1. Go to device manager. (press Win+Break and then select device manager)
  2. In that, Under Network adapters, right click the device listed and click uninstall.
  3. Then select the 'Scan for hardware changes' from action menu. This will shows the net work device once and tries to install basic driver available. Leave as it is.
  4. Now its finished the installation with basic driver. This will works fine.



Note : This is tested under Windows vista.

Thursday, September 22, 2011

Google or gmail account not connected via Pidgin in Ubuntu

Error:
         Some new version of Pidgin messenger under Linux Operating Systems (like Ubuntu 11.04 or older) doesn't connect with the Google server after adding new gmail account on it and shows one of the following,
  1. Nothing will be displayed and it tries to re connect always.
  2. It shows the error like 'Unable to connect'
Reason:

          This caused because of the connection parameters for the Google server is not got updated in new versions of Pidgin.

Solution:

          To get the rid of it, 
  1. Open 'Manage Accounts' from Accounts menu or Press Ctrl+A.
  2. From that list displayed, select the gmail account has to be changed and press 'modify'.
  3. Select 'Advanced tab' on the modify window and fill the settings as given in the screen shot given.
  4. In 'Proxy' tab select 'no proxy' option.
  5. Then disable and enable the account once to get the fresh settings entered.





    That's it. Enjoy the chatting here on.



Wednesday, September 21, 2011

Err: Symbolic link doesn't shows or lists the files from given path in Apache

Error:
          No files are listed/shown in browser from the path given as symbolic link in Apache.

Reasons:
  1. The remote file path may not contains minimum permission required to list the contents.
  2. .htaccess file may not allows the server to list the contents for security purpose.
Solution:
     For reason 1,
           Make sure the permission given to the remote file path to be displayed. Minimum required permission to display (indexing) files on a path is (read, execute) for internet users (otherwise its called as others in Linux systems). This also should be given from the root upto the path you mentioned.
           For example, if you want to list the files from the path '/home/user/Desktop', the permission for each folder in a given path should contains minimum of (read, execute) like,
           /home  (r-x)
                    |_user  (r-x)
                            |_Desktop (r-x)

            Other wise none will be displayed even if you gave 777 to owner and group.


     For reason 2,
           For security purposes, System administrator may wrote this .htaccess file inside the folder they want. Some time this also caused the problem we faced. If it is, remove or comment the following line in the file located on our remote folder path,

           deny from all

            or else remove it it is not required. Make sure importance of  the file on that path before remove.

            If it is required then restart the Apache server once or give 'force-reload' to take effect.


Note: This is tested under Ubuntu 11.04. In Windows systems, you have use 'Security tab' from the folder properties of the remote path to change the user permission.


Friday, September 16, 2011

Err: Major problems have been detected and must be fixed before continuing while installing Symfony 2

While:

     During the installation of Symfony2 in Linux systems (for myself, Ubuntu 11.04).
     This will throws the error while try to run the url, http://localhost/symfony2/web/config.php
     This occurs for me, when i renamed the folder after once i ran the page from different folder name.

Err:

2 Major problems
Major problems have been detected and must be fixed before continuing :
    Change the permissions of the "app/cache/" directory so that the web server can write into it.
    Change the permissions of the "app/logs/" directory so that the web server can write into it.

Solution:
    For instance,
           Restart or force-reload the Apache server once to get the rid of this problem.

    Still searching for another valid solution.

Err: Call to a member function get_cellmap() on a non-object by sfDomPDFPlugin in Symfony


Error:
PHP Fatal error:  Call to a member function get_cellmap() on a non-object in /var/www/pdftest/plugins/sfDomPDFPlugin/lib/dompdf/include/table_cell_frame_reflower.cls.php on line 64, referer: http://localhost/pdftest/dc/printlist

Reason:
DomPDF throws this error when any HTML tag error found in the content supplied. (ie. Any  unclosed tag or closed tag without open tag).

Solution:
Make sure the HTML content to be supplied that not contains any missing or unwanted tags.

For example, in the following code, error parts which are all highlighted will throws this errors mentioned.

<html>
<table>
 <tr>
   <td>
        </table>
   </td>
 </tr>
<tr>
   <td>...</td>

</table>
</html>


Thursday, August 4, 2011

Err: gateway.php not found while executing Flex application for PHP


Here is the reason,


Adobe Flash Builder 4.5 uses Zend PHP Framework for connecting and retrieving the database data's by default. Library files of Zend framework normally placed under webroot or inside the Flash builder application directory. This makes the path confusion and throws that error while we try to bind the data with any of our controls like Data Grid or something else.


Solution:


Try to use PHP (runtime) instead of Zend for PHP connection method to get the exact result. Use menu "Data-> Connect to PHP (Runtime)" instead of using the link given in the tool bar called "Data/Services". You may say, both are there for do the same task. But the interface given for each option is differed from each other.

Wednesday, August 3, 2011

Permission denied error while restoring the .sql files in PostgreSQL under Windows

All of us may faced the error called "Permission denied" while restoring the .sql files in Windows. This is because the logged in user of PostgreSQL is not having the enough permission to read/execute the file we mentioned.


To bypass this use the following syntax to restore with out any issue.


         $ bin> psql -d sampledb -U dbuser -f c:\Temp\backup.sql 


Still you faced the same error then, give 'Full control' permission to that backup file by right clicking that and add everyone user group into permission list for that.



Thursday, July 7, 2011

Err: Rewrite url not working in Ubuntu

    The problem may occur due to that module is not enabled yet.


    To enable the module in Ubuntu
          $ a2moden rewrite
          $ /etc/init.d/apache2 restart

    And do the following changes in 'default' file under /etc/apache/sites-available
          Change the line 'Allowoverride None' to 'Allowoverride All' inside the respective folder directory.


Ref : http://ubuntuforums.org/showthread.php?t=252778
        http://rudyegenias.wordpress.com/2006/08/21/enabling-mod-rewrite-in-xampp/

Tuesday, June 21, 2011

Err: No entry for terminal type "unknown"; using dumb terminal settings.

        Run Eclipse from the terminal with or wothout root permission. (With root permission is recommended)

Tuesday, March 8, 2011

Err: Java script not gives any error and not executed as well in IE

While :     Javascript fails during display in IE
Error
       Java script gives no error also not executed.

Reasons
       Object oriented JavaScript codes are not executed by IE7 or lower versions.

Solution
       Convert the object oriented codes into normal one. (ie. class variables are converted as associative array to get work)