[Solved]: Blank pages on install, error log say fpassthru() and fopen() at fault [Solved]: Blank pages on install, error log say fpassthru() and fopen() at fault
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

[Solved]: Blank pages on install, error log say fpassthru() and fopen() at fault

Started by boothy, March 27, 2008, 02:27:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

boothy

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:

<!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

Nibbler

The error messages are not important. Post a link to your page.


Nibbler

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.

boothy

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. :)

Nibbler

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

INSERT INTO CPG_config VALUES ('language_fallback', '1');

Just change 1 to 0.

boothy

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