General Questions


Q: Is OptiPerl a language for making forms on web pages?

A: OptiPerl is not a language. It is a Integrated Developing Environment (IDE) that helps programming in Perl which is a language. It just happens that it is also good for making cgi scripts, those used for web pages. Actually often when there is some kind of interaction between you and the browser, a perl script is being used, from input boxes to search engines.


Q: Can OptiPerl help me learn Perl?

A: It can help you, especially if you want to deepen in CGI programming, because you can do that offline in windows. However you will not be able to magically create programs, you must still learn Perl.


Q: Why isn't it easy to make windows run CGI scripts?

A: Windows was not made to do this. For script to run from the web browser offline, a small server must be loaded when we want to in windows, that actually only serves itself, the user of the same computer. OptiPerl does this internally so you don't have to bother with this. However running an external server like Apache is also supported.


Q: I just started learning perl, I spent some money for a nice book, but I'm not sure yet if I need OptiPerl.

A: As noted above, OptiPerl can help you learn perl easier and faster. And not only that - you are welcomed to use the unregistered version for 30 days. Even with the limitation it has on the size of the scripts, it can load most examples and small scripts. Whenever you feel you need OptiPerl, please go ahead and register.


Q: OptiPerl can run my script in many different ways - Which is the best?

A: The best is using the internal server, as you can also load html pages and see how your script works when the pages load it, just like the real thing. Running without a server at all, is good when you just want to run something you just thought of quickly without even saving, or for non-CGI perl. For a complete test of your entire web page, you can use Apache (even though in most cases just having OptiPerl loaded with do as fine!).


Q: If OptiPerl's internal server is so great, why so much support for running with apache too?

A: OptiPerl is also used by professionals for web authoring. Using apache is the closest possible thing to a real server that serves the internet (most use apache also). You may be able to test other aspects of web authoring that do not have to do with perl scripts like apache mod's, .htaccess files etc.


Q: When I press "check for update", I can see there is a new version out. How do I download?

A: If you are using the trial version, then just download again and install. If you are a registered customer, go to the password protected page sent to you when you registered (you will be notified via e-mail when a new version is out).



Working with OptiPerl


Q: How do I add items to the Code Explorer?

A: Code explorer is a navigational tool. It lists elements in your code and is built automatically whenever you edit your script. To go to one of it's elements, double click the line. You can however edit the names of variables in code explorer by left - clicking and pausing on them. Doing so is like performing a search and replace in your script.


Q: I closed the editor window and now I can't open it!

A: Select "Show Editor" from the Editor Menu, or press ESC.


Q: Can I find an opening/closing bracket in the editor?

A: Hold down Control while moving the mouse. You can also press Ctrl-\ while on a bracket, this will move the cursor to the corresponding bracket.


Q: Pressing enter does not move to the next line when typing in text areas in the web browser

A: Use Ctrl-M instead of enter.


Q: How can I dock and undock windows?

A: Dock it to the main editor window by dragging it. If you want to place it over the main editor without it being docked, hold down the ctrl key while dragging it. Undock it by double clicking on its title bar.


Q: I have an old computer under 300 MHz and OptiPerl is very slow what can I do?

A: Read the section in the help file Options / Other settings / Improving Performance.



Setting Up


Q: What do I need to run OptiPerl?

A: You need Perl!. See OptiPerl's homepage under support for a perl distribution we recommend.


Q: Do I also need a web server?

A: No, as OptiPerl can turn on it's internal web server whenever you need it. You can also run scripts without a server at. But if you ever need it, you can use an external server like Apache instead of the internal server.





Q: Can I load the debugger passing a command line (my script is not a CGI)

A: Enter the arguments you want under menu Run / Arguments.



Running Scripts


Q: When I press run, the first line in the browser is "Content-type: text/html". This shouldn't happen!

A: You have unchecked "Run with server" in the Server Menu. When this checked, then the script is run through the web server and loaded as a http address. If it isn't then the scripts output is sent to a temporary file, and the file is loaded in the web browser as a file url. Note that this sometimes can be useful. For example, try running a script that creates a cookie without the internal server loaded. The cookie is not created, instead the request that would be sent to the client is shown as the first line. This way you can easily debug cookies. For the cookie to be created of course, load the internal server and select "Run with Server".


Q: What is "Run / Set Starting Path"?

A: In special cases you may need to set the starting paths of scripts, mostly for console applications. This selection also affects when running with the console.


Q: When I run in the console, the screen flashes first.

A: To fix this, open from the start menu a dos command prompt. You will find it full screen; press alt-tab to make it a window and then exit.



Internal or External Severs


Q: When I run a script pressing F9, I am prompted to connect to the internet!

A: If you get this, press OK. The connection will not be made, but the script will be loaded.


Q: When I load OptiPerl's internal server, I get an error message.

A: Make sure that in only one instance of OptiPerl you have loaded the internal server. Or select in the option dialog "allow only one instance". Another possibility is that you might have an external server loaded like apache and Optiperl didn't find it. If you use apache, read more in the corresponding section. If you have Windows 2000 or XP, you may have Internet Information Server enabled that causes this problem with the internal server. Again there is more in the rest of the help file.


Q: I have done the above, but I still get an error.

A: If you are using a firewall, allow "pass through" for OptiPerl in the firewall program.


Q: Sometimes I get in the status line of the web server "Timeout Occurred", and the output of the webbrowser is wrong.

A: When this happens, it is because the script entered an endless loop or some error prevents it from exiting, so OptiPerl will try to close it. A script that does this has a bug and is not a correct program for CGI use. Try debugging it. One common cause is when the script tries to load an external program that does not exist, causing it to wait endlessly. For example if you use the date command like this:


$date_command = "/bin/date";

$date = `$date_command +"%m/%d/%Y %T %Z"`;


In windows, this would cause the above error. OptiPerl can help you however if you are using date or sendmail, see the help file.


If this is not the case, because your script is just slow and needs a lot of time until it sends out results, then increase the timeout value in the Options Dialog.


Q: When I first load OptiPerl, load the internal server and run a script, I have to wait 50-60 seconds until it shows (but afterwards the scripts work fine)!

A: Go to the Control Panel / Internet Options / Connections tab / Lan Settings button / Automatic configuration and remove the check mark "Automatically detect settings".


Q: My command line is not passed to the script.

A: It doesn't make sense to send a command line to a CGI script. CGI's only accept queries using a GET or POST method.


Q: I get the output "Forbidden".

A: Make sure that the script you are trying to run is located under the folder set in the "Internal Server" root path.


Q: When I try to run a script I am prompted to download, or see it's text.

A: Make sure that the path to perl is correct in the Options/Perl, and the associations are OK in Options / Internal Server. Press the "Default" button to make sure. If you are using an external server, you will need to read it's documentation on how to run CGI scripts.





Q: When I first load OptiPerl, I get an error message and the program terminates. What's wrong?

A: You probably have an old version of Windows 95 without Internet Explorer 5 or above. Try installing a newer version of Internet Explorer, or installing Windows 98 and above.


Q: When I load OptiPerl, I get a Dr. Watson application error (windows NT)

A: The same applies as above. Windows NT 4 ships with IE 2 and this will not work. You must upgrade to IE 5.


Q: Why is the "Perl documentation" and "Search for declaration" grayed out?

A: Either you have not installed the documentation (if you are a registered user) or you need to upgrade Windows Html Help to version 1.1 or newer. Get the update at:


Q: When I right click on a module in Code Explorer, the module does not open in the editor.

A: Make sure the search path (%INC) is correct in Options/Perl. Press the default button to make sure. You can also set the %INC path per project under project options. See also the section "How OptiPerl finds module" in the help file.


Q: I am using Windows 98, and the digital signiture of optiperl.exe is not valid.

A: For older versions of Windows it is highly recommended that the latest root update is installed. Install the latest Microsoft root certificate patch here:



Using Apache as an External Web Server (Advanced)


Q: Why must I enter the exe name of the server program I am using (for example "apache.exe") in the Options Dialog?

A: From this name, OptiPerl searches often in the memory of the computer to see if the server is loaded. If it senses that it is loaded, then it will turn off it's internal server automatically and also gray out the menu item to load it. You cannot have two servers loaded at the same time. After OptiPerl senses that an external server is loaded, it will use the paths selected in the Options Dialog under external server. Read more in the section "Using an External Server"


Q: But I have not loaded apache, and still the internal server option is grayed out.

A: Probably you installed apache in a windows NT/2000/XP/2003 system, and apache is running as a service. If you need to turn it off, go to the computer management and press Stop on the apache service.


Q: How do I load Apache?

A: Run in from OptiPerl's Tool menu, or select from the start menu the item "Start Apache".


Q: I get "External Server Loaded" even though apache is not loaded.

A: If you have Windows NT/2000/XP/2003, apache could be loaded as a service.


Q: I am getting a 500 error when running.

A: First make sure your shebang line (the first line) points correctly to perl. For example, it could be #!c:\perl\bin\perl.exe


Q: When I load Apache, the window opens and then closes immediately, and I don't get a chance to read what it says. What can I do?

A: Apache must be giving an error message. To be able to see it, load to command prompt to go to dos and load from there. The window will not close, so check what the error message is. Also check the last line of the error log.



Top  Previous  Next