RE: Freebsd 6.2 amd64 PHP 5.2.5 Internal Server Error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Anjan Upadhya [mailto:anjan@xxxxxxxxxxxxxx]
> Sent: Monday, January 14, 2008 7:18 PM
> To: php-general@xxxxxxxxxxxxx
> Subject:  Freebsd 6.2 amd64 PHP 5.2.5 Internal Server Error
> 
> Hello,
> 
> I have a freebsd 6.2 server running amd64 version with php 5.2.5. The
> web server is Apache 1.3.39. The following bit of code works on the 32
> bit version of php running on Freebsd 6.2 (32 bit), Apache 1.3.39 build
> but causes a 500 internal server error when run on the amd64 bit
> version. The amd64 bit version has the web application mounted as a nfs
> mount.
> 
> $file_name = MOUNT_DIR . "/test.txt";
>                    if (!$write_handle = fopen($file_name, 'w')) {
>                        return false;
>                    }
>                                      //set conforming strings to true
>                    $ins_fields_sql = "SET standard_conforming_strings
> to
> TRUE;";
>                    fwrite($write_handle, $text_to_write . "\n");
>                    #### THIS WRITE HAPPENS TO THE FILE
> 
>                    foreach ($ar_orders as $key => $value) {
>                     ### INTERNAL SERVER ERROR
>                    }
> 
> Has anyone come across this? Any insight would be greatly appreciated.
> 
> --
> Regards,
> 
> Anjan Upadhya
> V.P. of Software Development
> anjan@xxxxxxxxxxxxxx
> ph: 954.332.7875
> ==================
> www.sproutloud.com
> SproutLoud Media Networks, LLC.
> 

This is weird, and it's a bit odd that the code is causing a #500 error
after you have successfully written the file. I would do the following:
1 - Check the apache logs (the overall error_log, and the specific domain's
error log). What do they say about the error?
2 - If you are using mod_rewrite, that could be the cause (it's a good
source for # 500 errors, and you can enable rewrite.log for debugging, if
that's the case)
3 - If you can test it with several browsers do it (IE has caused me trouble
at least on my development box, it was kind of throwing a GET request twice,
and one of the times without the last part of the URL path... weird).

Regards,

Rob

Andrés Robinet | Lead Developer | BESTPLACE CORPORATION
5100 Bayview Drive 206, Royal Lauderdale Landings, Fort Lauderdale, FL 33308
| TEL 954-607-4207 | FAX 954-337-2695
Email: info@xxxxxxxxxxxxx  | MSN Chat: best@xxxxxxxxxxxxx  |  SKYPE:
bestplace |  Web: http://www.bestplace.biz | Web: http://www.seo-diy.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux