Archive for Perl Tutorials

CGI queries and their solutions.

For some reasons I cannot execute and run my CGI/Perl script. Why do I get a 500 Error Page?Follow the following steps:

1. Make sure the Perl path is set to /usr/bin/Perl
2. Make sure the .cgi/.pl file was uploaded to cgi-bin folder
3. Make sure the .cgi/.pl file was uploaded in ASCII mode.
4. Make sure to CHMOD the script to 755.

If this does not works contact your web hosting company 24×7 technical support.

I edit my CGI script, and then it no longer functions. Why?

Perl CGI scripts must be uploaded to your account via FTP as ASCII files to run properly. Also, all CGI hosting scripts must be executable. This requires setting the permissions on the file using your FTP hosting program and making sure the script is executable globally (CHMOD).

If you are getting an “Internal Server Error” and you have verified the CGI script was uploaded as an ASCII file and it is executable, there may be a syntax error in the code. The easiest way to determine this is to telnet into your web site hosting account, go to the directory that contains the script (cd www/directory), and run the program from the prompt by typing in the name of the script. This will show the error in the program.

Why is it that my CGI script will not write to a file on the dedicated server?

All CGI scripts that are called from the web do not run with your account’s permission by default. This is for security reasons. The CGI scripts run as the user ‘nobody’, which is a fake username with no permissions. Because of this, any file or directory that you want a script to write to must be globally writeable (CHMOD 777); this includes files such as .rdb, .dat, .txt etc.

Related Posts:

  • No Related Posts

What is mod_perl?

Mod-Perl is an add-on for the Apache web server software, which makes it possible to use the Perl language to add new features for the Apache server, and to increase the speed of Perl applications by as much as 30 times. In other words mod_perl is a perl interpreter which is built into the Apache web server. Mod_perl brings together Apache and Perl, two of the most powerful and mature technologies available to the online world today.

Mod_perl gives the Apache server the ability to execute Perl code directly without having to call a CGI which reduces the startup burden associated with running Perl scripts from the web server. It also allows variables to persist across multiple requests, and lets user authentication be extended to anything that can be written in Perl i.e authenticate web access against an SMB or RADIUS server without having to write an Apache module to do the job.

Related Posts:

  • No Related Posts

For CGI/PERL script issues

1. Upload all CGI/Perl files in the ‘cgi-bin’ directory, which is in the ‘public_html’ directory.2. Check Permissions for “cgi-bin” directory. (It should be 755)

3. Check Permissions for all the cgi/perl files. (It should be 755)

4. Make sure that files are uploaded in ASCII format. If uploaded through
File Manager then there is no such issue of upload file format.

5. Check the PERL interpreter path. It should be !#/usr/bin/perl

6. Check the path of sendmail (if used). It should be /usr/sbin/sendmail

For PHP issue :

1. If page is not getting loaded, make sure that the include path is correct in clients code or may be he is using fsockopen() function, which can cause problems.

2. If the issue is with PHP-MySQL, then you can confirm the database name, username and password that client is using in his configuration file. You can confirm that info with the SQL database section in Control Panel.

Related Posts:

  • No Related Posts

CPAN

CPAN stands for Comprehensive Perl Archive Network. It is a canonical location for Perl code and modules & a source for for knowledge, software and documentation for the Perl programming language.

Cpan plays an important role in providing modules & scripts which are not included in the Perl standard distribution.

Cpan Search:
CPAN Search is a search engine for the distributions, modules, docs, and ID’s on CPAN. It was conceived and built by Graham Barr as a way to make things easier to navigate. Originally named TUCS [ The Ultimate CPAN Search ] it was later named CPAN Search or Search DOT CPA .

Site: http://www.cpan.org

Related Posts:

  • No Related Posts

ImageMagick

ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that can be freely used, copied, modified and distributed. Its license is compatible with the GPL. It runs on all major operating systems. The functionality of ImageMagick is typically utilized from the command line or the features can be used from programs written in any programming language.

ImageMagick, version 6.2.9, is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (about 100) including GIF, JPEG, JPEG-2000, PNG, PDF, PhotoCD, TIFF, and DPX. ImageMagick can be use to translate, flip, mirror, rotate, scale, shear and transform images, adjust image colors, apply various special effects, or draw text, lines, polygons, ellipses and Bézier curves.

Features:

  • Format conversion: convert an image from one format to another (e.g. PNG to JPEG).
  • Transform: resize, rotate, crop, flip or trim an image.
  • Transparency: render portions of an image invisible.
  • Draw: add shapes or text to an image.
  • Decorate: add a border or frame to an image.
  • Special effects: blur, sharpen, threshold, or tint an image.
  • Text & comments: insert descriptive or artistic text in an image.
  • Image identification: describe the format and attributes of an image.
  • Animation: create a GIF animation sequence from a group of images.
  • Composite: overlap one image over another.

Site: http://www.imagemagick.org

Related Posts:

  • No Related Posts
« Previous Page« Previous entries « Previous Page · Next Page » Next entries »Next Page »