View previous topic :: View next topic |
Author |
Message |
olly86 -
Joined: 25 Apr 2003 Posts: 993 Location: Wiltshire, UK
|
Posted: Fri Sep 17, 2004 9:32 pm Post subject: CGI / FastCGI crash |
|
|
when I run the following code php (CGI / FastCGI) crashes:
Code: | //generate password
function makeRandomPassword() {
$salt = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
srand((double)microtime()*10);
$i = 0;
//setno to required password length
while ($i <= 10) {
$num = rand() % 62;
$tmp = substr($salt, $num, 1);
$pass = $pass . $tmp;
$i++;
}
return $pass;
}
$random_password = makeRandomPassword();
echo "Your randomly generated password is <b>$random_password</b>"; |
can anyone see the problem that would cause php to bomb out and crash?
thanks _________________ Olly |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Sat Sep 18, 2004 12:34 am Post subject: |
|
|
what is the name of the PHP interpreter that you are using because FastCGI
is not yet supported on Abyss Web Server , telling me the name really helps.
01. Is it php-cgi.exe or php.exe ?
02. Do other scripts crash PHP ? |
|
Back to top |
|
 |
olly86 -
Joined: 25 Apr 2003 Posts: 993 Location: Wiltshire, UK
|
Posted: Sat Sep 18, 2004 10:41 am Post subject: |
|
|
TRUSTpunk wrote: | Is it php-cgi.exe or php.exe? |
I'm using php 5.0.1 and php-cgi.exe
TRUSTpunk wrote: | Do other scripts crash PHP ? |
this is the only script that i've found that causes php to crash
EDIT: I've just successfully run the same script on PHP4 _________________ Olly |
|
Back to top |
|
 |
TRUSTAbyss -
Joined: 29 Oct 2003 Posts: 3752 Location: USA, GA
|
Posted: Sat Sep 18, 2004 9:37 pm Post subject: |
|
|
Stay with PHP v4 because PHP v5 has alot of bugs in it , if I view the help
area of my GuestBook on PHP v5 , it shows up blank and on PHP 4 its fine. |
|
Back to top |
|
 |
|