Saving error "0"
10 posts by 3 authors in: Forums > CMS Builder
Last Post: December 15, 2011 (RSS)
By s2smedia - October 18, 2011 - edited: October 19, 2011
Everytime I click to save a record or update, I get an error box with a "0" in it.
Please let me know what the issue is so I can fix it ASAP.
Thanks
Re: [s2smedia] Saving error "0"
By s2smedia - October 19, 2011
They said they made the update.. but im still getting the error.
My question is why did this happened all of a sudden? IT was working fine for over a year.
I made not changes, now get the error
Re: [s2smedia] Saving error "0"
By s2smedia - October 19, 2011
Hello,
Thank you for your patience.
If status is a string, exit function prints the status just before exiting.
If status is an integer, that value will be used as the exit status and not printed. Exit statuses should be in the range 0 to 254, the exit status 255 is reserved by PHP and shall not be used. The status 0 is used to terminate the program successfully. Also, php version with 4.2.0 or higher does not print the status, if it is an integer. Hence, the functions exit; , exit(0); , or exit(); will terminate the program normally. If you want to terminate the program with an error code, you need to specify the value as either an octal or character strings.
If you have any further questions, please update Support Console.
Sincerely,
Syd Mosley
Level 3 Technical Support
Re: [s2smedia] Saving error "0"
By Jason - October 19, 2011
If you run a page with just this:
<?php exit; ?>
on your server, do you get a 0 printed on your screen?
Are you using firefox and if so, do you experience the problem in other browsers?
This is definitely a server issue as a script with no output should NOT output anything. The fact that it sends out a 0 string points to an incorrect server configuration. If they are not willing to fix this issue, you may want to consider moving hosts.
Hope this helps
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [Jason] Saving error "0"
By s2smedia - October 19, 2011
What else could I tell them?
I sent them this origianlly:
This server is sending an incorrect response according to RFC 2616.
I set up a test page s2smedia.net/test.php
only thing on this page is <?php exit; ?>
The 0 displayed is not the PHP exit function's status code: it's what this server sends as content any time there is no content to be sent.
The server is sending a Content-Length of 0 and a message-body of "0", which is 1 byte long. This is contrary to the Content-Length of 0 it has sent. This is incorrect behaviour according to RFC 2616:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html
"When a Content-Length is given in a message where a message-body is allowed, its field value MUST exactly match the number of OCTETs in the message-body."
Browsers will try to ignore conflicting information, rather than displaying an error. It so happens that Firefox decides to ignore the Content-Length header while Internet Explorer decides to ignore the message-body.
Please update your servers to adhere to w3 standards as described here:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html
----------
They replied with this:
Thank you for your patience.
If status is a string, exit function prints the status just before exiting.
If status is an integer, that value will be used as the exit status and not printed. Exit statuses should be in the range 0 to 254, the exit status 255 is reserved by PHP and shall not be used. The status 0 is used to terminate the program successfully. Also, php version with 4.2.0 or higher does not print the status, if it is an integer. Hence, the functions exit; , exit(0); , or exit(); will terminate the program normally. If you want to terminate the program with an error code, you need to specify the value as either an octal or character strings.
If you have any further questions, please update Support Console.
Sincerely,
----------------------
Any idea on what I should reply with?
Re: [s2smedia] Saving error "0"
By Jason - October 19, 2011
They are referencing the php manual (http://ca3.php.net/exit), where they are saying that the function will output the value of $status if it's an integer or string. However, in our example (<?php exit; ?>) we are not giving exit a status variable, so nothing should be displayed
Also, CMS Builder requires PHP 4.3.2 or higher to run. According to the PHP manual, "PHP >= 4.2.0 does NOT print the status if it is an integer. " Therefore, you must be running above 4.2.0 and since 0 is an integer, it shouldn't be displayed. The issue should be the PHP function exit.
Hope this helps
Hope this helps
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Re: [s2smedia] Saving error "0"
By Dave - October 25, 2011
I've attached a test script we provided to demonstrate the problem. If you upload it to the root of your website and send them a link it should give them an easy means to identify the problem.
Hope that helps!
interactivetools.com
Re: [Dave] Saving error "0"
By s2smedia - October 30, 2011
Could it be a CMS version issue?
Re: [s2smedia] Saving error "0"
By Dave - October 30, 2011
It definitely not a CMSB issue, and you can confirm that by running the simple test script on your different sites.
My guess is they have PHP configured slightly different for each site. They may have been rolling out a new version. My guess is they are using a wrapper script around PHP and it has a bug in it.
If all else fails, there are other solutions or workarounds we could look at, but for the most part we need PHP to work as expected on the server.
Let me know what you hear back.
interactivetools.com
Re: [s2smedia] Saving error "0"
By Dave - December 15, 2011
We've added a work-around for this in the latest beta:
http://www.interactivetools.com/forum/gforum.cgi?post=91340
interactivetools.com