Command prompt pops and closes when using PHPThumb library

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Command prompt pops and closes when using PHPThumb library

Postby jsaleiro » 22. September 2006 14:54

Hi,

i am having a strange behaviour with XAMPP. I use PHPThumb ( http://phpthumb.sourceforge.net/ ) to manipulate images via the GD extension. Everytime i use PHPThumb lib under XAMPP, a command prompt window pops up, and closes very fast (i can't see what's in it). Before XAMPP, i was using IIS with PHP and this behaviour didn't occur.
I am using the zip version (without the need of an installer) of XAMPP.

Another strange thing, is that i can't start mysql from the xampp-control.exe, but using the command prompt and calling the mysql_start.bat works fine.

Congratulations for your work on XAMPP, i am very impressed! :)
jsaleiro
 
Posts: 2
Joined: 22. September 2006 14:07

Postby Izzy » 22. September 2006 22:00

Make sure that you don't still have the old mySQL still running.
Ctrl-Alt-Delete - Click the Processes Tab - check for any instances of mysqld.exe or mysqld-nt.exe

Make sure IIS and the previous PHP is completely disabled as the XAMPP modules won't run if there is already another instance running.

Check your ports, after stopping all XAMPP processes, using:
xampp\xampp-portcheck.exe
This will also tell you if you have mysql running on port 3306

Also check the mysql error log in:
xampp\mysql\data\yourcomputername.err
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06

Postby jsaleiro » 22. September 2006 23:38

I didn't mention, but i'm using XAMPP on a fresh windows install. I never had none of the services running before.
I tried the portcheck, and they are all free. I've opened the mysql error log, as you adviced, and i have the following:

060921 15:44:00 [Note] mysql\bin\mysqld.exe: ready for connections.
Version: '5.0.24a-community' socket: '' port: 3306 MySQL Community Edition (GPL)


It doesn't seem an error to me... :o).

But what bothers me most is seing the command prompt being opened and closed everytime PHPThumb is called..... :|
jsaleiro
 
Posts: 2
Joined: 22. September 2006 14:07

Postby Izzy » 23. September 2006 00:16

jsaleiro wrote:...But what bothers me most is seing the command prompt being opened and closed everytime PHPThumb is called..... :|

I can only assume you configured the script correctly. I just check their site and did some recommended reading.
How are you calling the script?
Are your paths set correctly in the configuration file?
Is the script compatible with php5? (php is not backward compatible)
Etc.etc.

It might also be trying to tell you that it can't find ImagMagik if it is not installed:
Code: Select all
// ImageMagick configuration
$PHPTHUMB_CONFIG['prefer_imagemagick'] = true;  // If true, use ImageMagick to resize thumbnails if possible, since it is usually faster than GD functions; if false only use ImageMagick if PHP memory limit is too low.
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
    // Windows: set absolute pathname
    $PHPTHUMB_CONFIG['imagemagick_path'] = 'C:/ImageMagick/convert.exe';
} else {
    // *nix: set absolute pathname to "convert", or leave as null if "convert" is in the path (location detected with `which`)
    //$PHPTHUMB_CONFIG['imagemagick_path'] = '/usr/local/bin/convert';
    $PHPTHUMB_CONFIG['imagemagick_path'] = null;
}


If the default XAMPP Welcome Page and it's content work then your XAMPP installation is correct and working as it should (there are demos of most things available).

The popup is telling you that a script error may be occuring and your script should be investigated more thoroughly. IIS might be more error tollerant than is the Windows ported Apache and it's XAMPP modules.

Error handling can be set in the xampp\apache\bin\php.ini file. See the section headed:
Code: Select all
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Error handling and logging ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


You can include the error handling code in your scripts and useful reading about that can be found here:
http://www.zend.com/zend/spotlight/error.php

http://au3.php.net/error_reporting


If you can call the script from the command line then do so by Changing Directory to the script (CD your:\path\to\the\script\thecommmand) then issuing the command. The console window will stay open in this case.

XAMPP Control Panel should be checked for correct configuration of the modules.
A service will not start from the control panel if it is already started manually.
My advise on the XAMPP Control Panel is to set it up to start everything as a service. Then reboot so it can be initialised. Then check again all your services are indeed configured and running (green). You can then stop/deactivate the services you don't require.
Izzy
 
Posts: 3344
Joined: 25. April 2006 17:06


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 77 guests