You are here:  » Error Message


Error Message

Submitted by crounauer on Wed, 2006-09-06 08:00 in

Good Morning David,

When logging on this morning to register some feeds I got this error....

<?php
Warning
set_time_limit(): Cannot set time limit in safe mode in
/home/httpd/xxx/httpdocs/admin/feeds_register_step1.php on line 2
Warning
Cannot modify header information headers already sent by (output started at
/home/httpd/xxxhttpdocs/admin/feeds_register_step1.php:2in
/home/httpd/xxx/httpdocs/admin/admin_header.php on line 4
?>

Any suggestions?

Submitted by support on Wed, 2006-09-06 08:09

Hi There,

I know you've been working with the script for some time now - so do you think your host has just enabled Safe Mode recently, and this is the first time that you've come to register new feeds since they made the change?

Ideally, you don't want to be running in Safe Mode because if you are not allowed to use set_time_limit() (which is the function causing the error), then it is possible that you will not have enough time to import large feeds.

I quite recently made changes to the code in the admin section so that this warning message will not be generated - even if you are running in safe mode. What I would suggest is downloading the latest version of Price Tapestry, and just extract the scripts in the /admin directory to save having to redo any of your customisations.

That will let you register feeds again, and provided that the import can be completed within 30 seconds everything will work - but it is still worth contacting your host and asking for safe mode to be disabled on your account.

Cheers,
David.

Submitted by crounauer on Wed, 2006-09-06 09:08

Hi David,

Thanks for the quick response.

Am I correct in assuming that safe mode should be "on" for shared servers, but not that necessary for dedicated boxes as there is less of a security risk?

Simon.

Submitted by support on Wed, 2006-09-06 10:17

That's generally correct - if you have your own dedicated box and therefore in complete control of whatever runs on your server then there is no need for safe mode (assuming that you trust the scripts that you are running).

It seems to be 50/50 with regards to whether shared hosts run their PHP installations in safe mode - some do, some don't. The general opinion is that it isn't actually that "safe" and isn't something that should be handled at the PHP layer.

In fact, the forthcoming PHP 6 does not have the safe mode feature!

Cheers,
David.

Submitted by Antony on Wed, 2020-10-21 05:23

Hi David,

I've got a similar error message and I don't know why this happened and I don't think that I've done anything to cause this.

When trying to access ADMIN I see the following message:

{code saved}

The when trying to Login the following appears but don't give me access to the Admin Panel:

{code saved}

I've seen this before on a previous PTY install but cant remember how I when around it.

I'm getting hosting from One.com and I came across this online https://github.com/nextcloud/server/issues/16752 trying to look for a solution, I think it may be related, Can you help me on this?

Thanks,

Ant

Submitted by support on Wed, 2020-10-21 07:43

Hello Ant,

As your system policy may permit set_time_limit() for command line PHP (so that you can run cron.php without any time limit) what I would suggest first is to edit includes/admin.php and look for the following code at line 877:

  set_time_limit(0);

...and REPLACE with:

  @set_time_limit(0);

The "@" prefix should prevent the error message through the browser, but would still permit cron.php to issue the set_time_limit() if permitted...

Cheers,
David.
--
PriceTapestry.com

Submitted by Antony on Wed, 2020-10-21 16:32

Hi David,

Thanks for your response which resolved the issue, I been in contact with one.com since early hours as further problem occurred seeing the bellow on my home page. but so far they can't seem to find the problem I think something Ive done went wrong somewhere.

Since, I have tried to re-install pre-stable-version in various settings to see if my work is creating this problem. Now, its all PERFECT No Errors ANYWHERE under a totally different domain with new databases.

But on {link saved} which where I want it to be and where it was..

- If a new Database is created (New Name) I still see the Error message of yesterday ( without the @ on exclude/admin.php on line 877

- If the OLD database is deleted (wait one hour ... or more) and the created again for a fresh install but using the same old Database name the bellow comes up.

Nothing for you to fix really cos its probably server side. Any thoughts on this?

Best,

Ant

{code saved}

Submitted by support on Thu, 2020-10-22 07:47

Hello Ant,

It has halmarks of being a caching issue, in particular if you are seeing error messages from before applying the fix. Also you can run setup.php after installation and it will run the database checks again. When viewing the page, make sure to do a hard refresh (CTRL+F5 in most browser's) to ensure that not reloaded from browser cache but that doesn't preclude caching from the network of course...

Cheers,
David.
--
PriceTapestry.com