RE: [PHP] Freebsd 6.2 amd64 PHP 5.2.5 Internal Server Error
| From: | Andrés Robinet | Date: | Tue, 15 Jan 2008 00:21:15 +0000 |
| Subject: | RE: [PHP] Freebsd 6.2 amd64 PHP 5.2.5 Internal Server Error | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-267259@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Anjan Upadhya [mailto:anjan@sproutloud.com]
> Sent: Monday, January 14, 2008 7:18 PM
> To: php-general@lists.php.net
> Subject: [PHP] 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@sproutloud.com
> 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@bestplace.net | MSN Chat: best@bestplace.net | SKYPE:
bestplace | Web: http://www.bestplace.biz | Web: http://www.seo-diy.com