PHP Web Host - Quality Web Hosting For All PHP Applications Free RavenNuke(tm) Add Ons
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1174

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

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: 1437
Location: North Carolina

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

gzfile() is a PHP function. You will probably need to recompile php with zlib enabled.
I think:
zlib.output_compression = On
View user's profile Send private message Send e-mail Visit poster's website
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1174

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

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
View user's profile Send private message
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1174

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

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
View user's profile Send private message
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6302
Location: Vsetin, Czech Republic

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

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 Visit poster's website
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1174

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

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.
View user's profile Send private message
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1174

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

Update:

DocumentRoot and DocumentIndex Index.php

All set correctly everywhere - httpd.conf and .htaccess .. etc.
View user's profile Send private message
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1174

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

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.
View user's profile Send private message
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1174

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

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.
View user's profile Send private message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2408
Location: Pennsylvania

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

I can not see how anything dealing directly with RN could cause such an error ("index.php" Unknown Filetype).
View user's profile Send private message Visit poster's website
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2408
Location: Pennsylvania

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

Try deleting the .htaccess in the root.
View user's profile Send private message Visit poster's website
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1174

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

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.
View user's profile Send private message
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1174

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

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.
View user's profile Send private message
djmaze
Subject Matter Expert


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

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

#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
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1174

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

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.
View user's profile Send private message
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1174

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

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
View user's profile Send private message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2408
Location: Pennsylvania

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

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');
         }
      }
   }
}
View user's profile Send private message Visit poster's website
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1174

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

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
View user's profile Send private message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2408
Location: Pennsylvania

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

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');
   }
View user's profile Send private message Visit poster's website
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1174

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

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
View user's profile Send private message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2408
Location: Pennsylvania

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

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.
View user's profile Send private message Visit poster's website
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1174

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

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
View user's profile Send private message
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1174

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

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.
View user's profile Send private message
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1174

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

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.
View user's profile Send private message
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1174

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

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
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum