Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues
Author Message
dad7732
RavenNuke(tm) Development Team



Joined: Mar 18, 2007
Posts: 1242

PostPosted: Sat Aug 14, 2010 5:31 am Reply with quote

Core tables loaded OK but trying to load IP2C tables got this error:

Code:
Fatal error: Call to undefined function gzfile() in /home/myname/www/mysite.com/INSTALLATION/installSQL.php on line 384


Never had this happen in any previous installation of last version of RN.

PHP 5 and MySQL 5 (both new to me - first time using)

Cheers

BTW: Using latin1_swedish_ci as instructed in another thread
 
View user's profile Send private message
nuken
RavenNuke(tm) Development Team



Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Sat Aug 14, 2010 7:14 am Reply with quote

gzfile() is a PHP function. You will probably need to recompile php with zlib enabled.
I think:
zlib.output_compression = On

_________________
Tricked Out News 
View user's profile Send private message Send e-mail Visit poster's website
dad7732







PostPosted: Sat Aug 14, 2010 7:30 am Reply with quote

I'll have to get Verio support to do that as all I can do is vinstall php5 with no arguments .. I think

Interesting that the core tables installed but the IP2C tables didn't. Must be specific then.

Thanks, will report back of course
 
dad7732







PostPosted: Sat Aug 14, 2010 8:14 am Reply with quote

Well, that worked, IP2C tables installed but now we have another problem.

"index.php" Unknown Filetype .. bah ... Verio Support working on it. Luckily the server/domain isn't ready for use anyways, trying to get everything working. Fixing one problem created another one. Figgers

Cheers
 
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Sat Aug 14, 2010 8:32 am Reply with quote

That sounds like a server MIMETYPE not set /not set correctly to handle php files
 
View user's profile Send private message Send e-mail
dad7732







PostPosted: Sat Aug 14, 2010 9:28 am Reply with quote

Yes it does, but only the .php files in the root directory give the unknown filetype error. In the installation directory there is no problem loading the setup.php and installsql.php files .. mystery progresses. I renamed .htaccess in case there was a problem there but that didn't help.

index.php in another domain root works just fine, only the RN root doesn't work.
 
dad7732







PostPosted: Sat Aug 14, 2010 10:28 am Reply with quote

Update:

DocumentRoot and DocumentIndex Index.php

All set correctly everywhere - httpd.conf and .htaccess .. etc.
 
dad7732







PostPosted: Sat Aug 14, 2010 2:04 pm Reply with quote

Will have to check, when I get home, using FileZilla to upload the files if the root files somehow were uploaded as binary or ascii .. don't know offhand but a clue maybe is that I tried the domain in Safari from my iPhone 4 and the index.php file showed as the source (gibberish), no error. May be something to pursue, will re-upload the root files.
 
dad7732







PostPosted: Sat Aug 14, 2010 4:22 pm Reply with quote

Transfer type has nothing to do with the problem, tried both binary and ascii.

What is interesing is that I tried a simple php "hello world" and that worked. There is something that is not likeable with RN and I suspect the "mainfile.php". What I did was to load JUST the index.php file and there was no error. Loaded each .php file in the root and when it came to mainfile.php is when I got the error and the index.php file looked like garbage, etc. Also interesting is that all the other php files work in the various directories. After all, I did get to load the tables with installSQL.php and setup.php works. Just the php files in the root don't work.

I'm suspecting something awry with PHP-5 and RN, not sure as other php files work in the root. Even tried installing RN 2.3.0.0 and that doesn't work either.
 
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Sat Aug 14, 2010 5:10 pm Reply with quote

I can not see how anything dealing directly with RN could cause such an error ("index.php" Unknown Filetype).

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
Palbin







PostPosted: Sat Aug 14, 2010 5:11 pm Reply with quote

Try deleting the .htaccess in the root.
 
dad7732







PostPosted: Sat Aug 14, 2010 5:22 pm Reply with quote

Palbin wrote:
Try deleting the .htaccess in the root.


Did that, no luck.

Removed RN and installed PHPBB3 and that works like a charm. This was for testing only, RN will be re-installed when we figure out the problem.

Interesting that it is just the root php files, the others work just fine. I thought it may also be the htaccess file but isn't.

How I tested:

1. removed all files in the root except for index.php - no error but didn't display anything but a blank page of course

2. added the other php files to the root - index.php still showed no error and a blank page

3. uploaded mainfile.php and index.php displayed the error and a garbage page full of ascii type characters.

4. removed all root files and uploaded an index.php file with the "Hello World" dialog ... that worked.

Will keep PHPBB3 up and runnng and will install RN to the default /html/ directory, should co-exist I guess, we'll find out.
 
dad7732







PostPosted: Sat Aug 14, 2010 5:36 pm Reply with quote

No luck, still get a garbage page for index.php in /html/index.php.

Part of the first line:

Code:
‹������ì<ëØ^KI6µµå‚HHbL\´¬(tm)


Must be something about my PHP that it doesn't like:

PHP Version 5.2.13

When I installed it, I checked all the options, so none are missing or disabled.
 
djmaze
Subject Matter Expert



Joined: May 15, 2004
Posts: 727
Location: http://tinyurl.com/5z8dmv

PostPosted: Sat Aug 14, 2010 6:09 pm Reply with quote

#1 PHP.INI: zlib.output_compression = Off
#2 Apache: disable mod_deflate

if it worked with #1: good
if it worked with #2: bad, you must configure apache properly
 
View user's profile Send private message Visit poster's website
dad7732







PostPosted: Sat Aug 14, 2010 7:20 pm Reply with quote

djmaze wrote:
#1 PHP.INI: zlib.output_compression = Off
#2 Apache: disable mod_deflate

if it worked with #1: good
if it worked with #2: bad, you must configure apache properly


If you're addressing the installation of the core tables and IP2C then that's already been done by enabling zlib.

It's the rest that's not working.
 
dad7732







PostPosted: Sun Aug 15, 2010 8:11 am Reply with quote

SOLVED !!!!

mainfile.php

Code:
// Get PHP Version

$phpver = phpversion();


Changed to:
Code:
// Get PHP Version

// $phpver = phpversion();


No adverse effects noticed working over the entire site, it all works. Why? No idea. Wink

My hunch was basically correct in assuming that it had to be something with mainfile.php and since it was obvious that the new PHP had something to do with it, I just took a chance by commenting out that line. IOW, basically an uneducated guess at best that paid off. But I'm not all that bad at sleuthing. Cool

I'll leave it up to the gurus to figure out why this now works and why it didn't before commenting out the line.


Cheers
 
Palbin







PostPosted: Sun Aug 15, 2010 10:17 am Reply with quote

FYI your going to get warnings when doing the above. You should at least set it to 0.
What value are you getting from phpversion(); ? I would suspect "zlib" to be the problem.
Code:


if ($phpver >= '4.0.4pl1' && isset($_SERVER['HTTP_USER_AGENT']) && strstr($_SERVER['HTTP_USER_AGENT'],'compatible')) {
   if (extension_loaded('zlib')) {
      @ob_end_clean();
      ob_start('ob_gzhandler');
   }
} elseif ($phpver > '4.0' && isset($_SERVER['HTTP_ACCEPT_ENCODING']) && !empty($_SERVER['HTTP_ACCEPT_ENCODING'])) {
   if (strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) {
      if (extension_loaded('zlib')) {
         $do_gzip_compress = true;
         ob_start(array('ob_gzhandler',5));
         ob_implicit_flush(0);
         if (strstr($_SERVER['HTTP_USER_AGENT'], 'MSIE')) {
            header('Content-Encoding: gzip');
         }
      }
   }
}
 
dad7732







PostPosted: Sun Aug 15, 2010 11:24 am Reply with quote

If zlib would not have been enabled, the IP2C tables would not have loaded. But we tried it both ways afterwards by re-installing PHP-5 with zlib=off and still displayed the problem. It wasn't until commenting out the line that it began to work and zlib remains enabled.

So, what do I set to "0". I've been all over the site in every module, etc. and no warnings. However, I want to be in compliance.

Thanks

Querying the PHP Version:

Current PHP version: 5.2.13
 
Palbin







PostPosted: Sun Aug 15, 2010 11:34 am Reply with quote

Try uncommenting $phpver = phpversion(); and then commenting out the follwoing two lines.

Code:


if ($phpver >= '4.0.4pl1' && isset($_SERVER['HTTP_USER_AGENT']) && strstr($_SERVER['HTTP_USER_AGENT'],'compatible')) {
   if (extension_loaded('zlib')) {
      //@ob_end_clean();
      //ob_start('ob_gzhandler');
   }
 
dad7732







PostPosted: Sun Aug 15, 2010 11:42 am Reply with quote

Commenting out the two lines and uncommenting the one line ... works, site loads w/o any problems.

Should this issue be of concern in a patched version or documentation somewhere? Or for RN 3 ? My new vps is running Linux RHEL, my other vps is FreeBSD if any of that makes a difference.

Thanks
 
Palbin







PostPosted: Sun Aug 15, 2010 11:58 am Reply with quote

I don't really now what I am talking about in terms of server configuration, but I would refer back to djmaze's post.

djmaze wrote:
#1 PHP.INI: zlib.output_compression = Off
#2 Apache: disable mod_deflate

if it worked with #1: good
if it worked with #2: bad, you must configure apache properly


There is a problem with your configuration somewhere, but someone smarter than me will have to comment on that.
 
dad7732







PostPosted: Sun Aug 15, 2010 12:35 pm Reply with quote

zlib = ON
Mod_Deflate is DISABLED - commented out

So then I guess I'll have to uncomment the mod_deflate. Why now beats me, its also commented out on my other VPS, has been for years. And I've installed many RN versions. Or could just leave everything as-is for now.

Cheers
 
dad7732







PostPosted: Sun Aug 15, 2010 12:44 pm Reply with quote

Ok, old VPS
zlib compression = OFF
Apache configuration - there is no mod_deflate

Must be a new version of Apache running on the new VPS is my only guess/answer.
 
dad7732







PostPosted: Sun Aug 15, 2010 2:52 pm Reply with quote

Wrap up ...

Apache: enabled mod_deflate
PHP.ini: disabled zlib compression
rebooted server

All is well, removed the IP2C tables and re-installed without a problem.

Sounds like a good thing to include in documentation simply because the new Apache version comes with mod_deflate commented out.

Cheers

The two lines to uncomment:
Code:
if ($phpver >= '4.0.4pl1' && isset($_SERVER['HTTP_USER_AGENT']) && strstr($_SERVER['HTTP_USER_AGENT'],'compatible')) { 

   if (extension_loaded('zlib')) {
 -->     //@ob_end_clean();
 -->     //ob_start('ob_gzhandler');
   }
 

Or just don't comment out to begin with.
 
dad7732







PostPosted: Mon Aug 16, 2010 6:40 am Reply with quote

DJMAZE Forgot to thank you for your answer, didn't dawn on me that you hit the nail on the head until Palbin's post. I went back and uncommented those lines in mainfile.php, enabled mod_defalate and set zlib enable to OFF. It all works like it should now with just the mod_deflate enabled. Smile

Cheers
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> v2.4 RN Issues

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©