ccgi down
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Plusnet Community
- :
- Forum
- :
- Help with my Plusnet services
- :
- Everything else
- :
- ccgi down
Re: ccgi down
16-03-2010 2:54 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: Tony Almost there now, just on last section trying to find out why a section of my PHP code no longer puts partial output on to the browser screen.
Try sticking "implicit_flush = 1" into your php.ini
Re: ccgi down
16-03-2010 2:58 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: Gabe
Quote from: Bob We're looking at a problem with POST variables Tony
Try turning register_globals = Off using the php.ini file I sent you.
Edit: sorry, that's addressed to Tony. I also posted one somewhere round here.
Yep, over here
Bob Pullen
Plusnet Product Team
If I've been helpful then please give thanks ⤵
Re: ccgi down
16-03-2010 3:07 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: Gabe But Ben's is the more correct solution. You were using $PHP_SELF rather than $_SERVER['PHP_SELF'] and turning register_globals off kills $PHP_SELF, leaving your form with action="". That's an old trick to get a form to post to itself but not good html, so the substitution is better.
Tried using::
<form name="form1" method="post" action="<?=$_SERVER['PHP_SELF']?>">
and renaming php.ini to deactivate it and it did not work.
Quote Try sticking "implicit_flush = 1" into your php.ini
Rather than have everything in the php.ini file, can I just have the lines for the settings that I want to change? e.g. implicit_flush = 1
Tony
Re: ccgi down
16-03-2010 3:15 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: Tony
<form name="form1" method="post" action="<?=$_SERVER['PHP_SELF']?>">
There seems to be some confusion. Unfortunately PHP_SELF won't work with POST forms at the moment, you can use $_SERVER['SCRIPT_URL'] instead. We may be able to fix PHP_SELF however it may be a limitation of suEXEC, which we're using on the new platform.
It's better to have register_globals set to off, for a variety of reasons, however we decided to initially run with it on, to ease the transition to the new platform.
Quote
Rather than have everything in the php.ini file, can I just have the lines for the settings that I want to change? e.g. implicit_flush = 1
Yes, although I've just tested that setting myself and it doesn't seem to help. I've been having a quick look at it (I'm not officially assigned to this just helping out a little in quiet moments here and there) and I fear it may be another side effect of using suexec, as it seems to work fine when I run it on the command line.
Re: ccgi down
16-03-2010 3:27 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
<form name="form1" method="post" action="<?=$_SERVER['SCRIPT_URL']?>">
did work, but not if I took out the php.ini with the register_globals = off in it.
@Ben - yes there was no difference (no flushing) using the implicit_flush = 1 (or implicit_flush = on)
Tony
Re: ccgi down
16-03-2010 3:50 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: Tony Tried using::
<form name="form1" method="post" action="<?=$_SERVER['PHP_SELF']?>">
and renaming php.ini to deactivate it and it did not work.
Sorry, should have made it clear what I meant by the substitution.
Quote Rather than have everything in the php.ini file, can I just have the lines for the settings that I want to change? e.g. implicit_flush = 1
Yes, but it overrides the whole php.ini, so a one line php.ini reduces everything else to defaults, which may cause problems.
Gabe
Re: ccgi down
16-03-2010 4:31 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Either the server is overloaded or there was an error in a CGI script.
Suggestions? We have already lost two days on this alone.
Re: ccgi down
16-03-2010 4:45 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: Tony Can someone please confirm that the PHP server buffering arrangements are different in the new server?
Any joy if you add
SetEnv no-gzip dont-vary
to your .htaccess?
Gabe
Re: ccgi down
16-03-2010 4:53 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: pcr After additional messing around with .htaccess file, now a simple 3-line php script which calls phpinfo() function returns a slightly different message
Will it run if you disable the .htaccess (add a letter before the dot)?
Gabe
Re: ccgi down
16-03-2010 5:32 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: Gabe
Quote from: pcr After additional messing around with .htaccess file, now a simple 3-line php script which calls phpinfo() function returns a slightly different message
Will it run if you disable the .htaccess (add a letter before the dot)?
Gabe
I get the same error and I don't have a .htaccess file (as far as I can see!)
Re: ccgi down
16-03-2010 5:37 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Without the extra entry in .htaccess, it currently says 'Waiting for http://www.domainname.co.uk/php/filename.php'; and may time out, or it may eventually show the results.
Just so you can see what I'm up against, I'd better give you the code I'm using in that section:
$currentfilesize=filesize($myfile1);
$divider=0;
do {
clearstatcache();
flush();
sleep(10);
$divider++;
if ($divider % 6 == 0) {echo (">");}
} while (filesize($myfile1) == $currentfilesize);
?>
<script language="javascript" type="text/javascript">
window.location.replace( "<?php print $PHP_SELF ?>" );
</script>
</body>
</html>
As a brief explanation, the code before this section displays the contents of a file.
This section keeps checking (every 10 seconds) whether the file has changed size and keeps the browser 'alive' with a bit of output ('>') once a minute.
If the file has changed, it reloads the page using a Javascript reload which displays the new contents of the changed file. Bit of a hash-up, but it worked OK before the change.
Tony
Re: ccgi down
16-03-2010 10:04 PM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
I've managed to avoid most of the usual problems as the CMS system I use (MODx) is written for PHP5, although I had a few permissions related headaches and have had to edit out one line of my .htaccess (namely "Options +FollowSymlinks") to avoid the 500 error.
I do have one ongoing problem though: logging into my CMS manager is very frustrating. It often takes several attempts before the system accepts the login and I often get thrown out at no notice. This is a known problem according to their help files, usually due to sessions being closed by "aggressive garbage collection". Unfortunately, their proposed solution, adding the lines below (adjusting for the folder path) triggers more 500 errors.
php_value session.save_path /path/to/your/web/content/sessions/
php_value session.gc_maxlifetime 28800
If I am on the right track, what would be the correct path? It's entirely possible I put the wrong one in!
Re: ccgi down
17-03-2010 9:20 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: Tony
window.location.replace( "<?php print $PHP_SELF ?>" );
We're currently having problems with $PHP_SELF, does it work if you use $_SERVER['SCRIPT_URL'] instead?
Re: ccgi down
17-03-2010 9:30 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
Quote from: Astronut If I am on the right track, what would be the correct path? It's entirely possible I put the wrong one in!
Right track, but you'd need to make the changes in a custom php.ini (like <a href="http://community.plus.net/forum/index.php/topic,83568.msg696223.html#msg696223">this one</a>. The path will be something like /share/storage/0X/us/username/sessions/. You can get your path from phpinfo().
Gabe
Re: ccgi down
17-03-2010 9:41 AM
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Report to Moderator
The window.location.replace( "<?php print $PHP_SELF ?>" ); line merely re-starts the PHP file.
It only gets to that line if the file contents has changed. The code shown is actually at the end of a real-time visit tracker.
It is not desperate as I have substituted a javascript 'refresh page every 2 minutes' to the html. I'm sure that other customers have more pressing needs, with whole sites falling over.
Thanks again,
Tony
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page