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

Just recently I've been getting an error on multiple site I use cms builder on.
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

I read a previous post regarding this issue and contacted my hosting company.

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

My hosting company response:


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

Hi,

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: [s2smedia] Saving error "0"

By Jason - October 19, 2011

Hi,

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

Just a followup on this for anyone with a similar issue. We had a similar bug report on another host.

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!
Dave Edis - Senior Developer
interactivetools.com
Attachments:

php_exit_bug.php 1K

Re: [Dave] Saving error "0"

By s2smedia - October 30, 2011

i am a little confused.. I have multiple sites on the same server using CMS builder.. some of them get the error, some dont.

Could it be a CMS version issue?

Re: [s2smedia] Saving error "0"

By Dave - October 30, 2011

Hi s2smedia, Is the host Ipower?

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.
Dave Edis - Senior Developer
interactivetools.com

Re: [s2smedia] Saving error "0"

By Dave - December 15, 2011

Hi s2smedia,

We've added a work-around for this in the latest beta:
http://www.interactivetools.com/forum/gforum.cgi?post=91340
Dave Edis - Senior Developer
interactivetools.com