forum.coppermine-gallery.net

Support => cpg1.4.x Support => Older/other versions => cpg1.4 install => Topic started by: boothy on March 27, 2008, 02:27:18 pm

Title: [Solved]: Blank pages on install, error log say fpassthru() and fopen() at fault
Post by: boothy on March 27, 2008, 02:27:18 pm
Hi all,

I have noticed my webhost has recently upgraded to PHP5, and I have now tried to install my first cpg after this, before it worked fine, and an install when it was on PHP4 is still working.

I have uploaded all the files, taken a clean copy of cpg, checking all the db stuff and tried again to no avail.

Once I click submit on the installation page, and then continue onto the next page, all I get is a completely blank "login.php" page.  Viewing the source gives me:

Code: [Select]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY></BODY></HTML>

On looking at the error log in cpanel, I get this:

[Thu Mar 27 13:16:51 2008] [error] PHP Warning:  fpassthru(): supplied argument is not a valid stream resource in /home/xxxx/public_html/cpg/install.php on line 570
[Thu Mar 27 13:16:51 2008] [error] PHP Warning:  fopen() expects at least 2 parameters, 1 given in /home/xxxx/public_html/cpg/install.php on line 570
[Thu Mar 27 13:16:51 2008] [error] PHP Warning:  fpassthru(): supplied argument is not a valid stream resource in /home/xxxx/public_html/cpg/install.php on line 565
[Thu Mar 27 13:16:51 2008] [error] PHP Warning:  fopen() expects at least 2 parameters, 1 given in /home/xxxx/public_html/cpg/install.php on line 565

I have tried to go to other pages in coppermine, but the same blank page comes up.

Having looked at the install.php page, is there any way to remove the GD test, or fix the errors?

Thanks
Title: Re: Blank pages on install, error log say fpassthru() and fopen() at fault
Post by: Nibbler on March 27, 2008, 02:43:20 pm
The error messages are not important. Post a link to your page.
Title: Re: Blank pages on install, error log say fpassthru() and fopen() at fault
Post by: boothy on March 27, 2008, 02:49:21 pm
The gallery homepage (http://pdphoto.co.uk/fortec/)

Thanks
Title: Re: Blank pages on install, error log say fpassthru() and fopen() at fault
Post by: Nibbler on March 27, 2008, 03:10:44 pm
Your gallery only works in english. Might be a language fallback issue.

http://pdphoto.co.uk/fortec/index.php?lang=english

Disable lang fallback in config.
Title: Re: Blank pages on install, error log say fpassthru() and fopen() at fault
Post by: boothy on March 27, 2008, 04:01:40 pm
Very strange - I have now set up another gallery, and this time it went straight into the gallery instead of getting stuck at the login page!  Is it likely to happen again, eg if someone else accesses or sets up the gallery, I'm wondering if it's a browser/cookie problem?  Or if the lang fallback setting is the culprit, can I change the core files so that on install the setting in the config table is set to 0? 

If I need to make the second part into a new thread then let me know. :)
Title: Re: Blank pages on install, error log say fpassthru() and fopen() at fault
Post by: Nibbler on March 27, 2008, 04:04:42 pm
It's a PHP problem, but only affects a small number of people. I don't know the exact reason. Is there anything unusual about your PHP setup?

sql/basic.sql

Code: [Select]
INSERT INTO CPG_config VALUES ('language_fallback', '1');
Just change 1 to 0.
Title: Re: Blank pages on install, error log say fpassthru() and fopen() at fault
Post by: boothy on March 27, 2008, 04:12:56 pm
Sorry Nibbler, the only thing I know is that it's recently been changed to PHP5.

Apache version  1.3.41 (Unix)
PHP version    5.2.5
MySQL version    4.0.27-standard

Ah, that's where the default SQL config etc values are kept! I'd been looking for them to allow me to setup a custom config, and install it easily on multiple galleries, was about the only place I hadn't looked!   ::)

I also notice the error mesages are still appearing in the log, but at least the gallery can be accessed now.

Cheers