Installation Problem on Win 7 Pro, 64-bit

I'm having problems installing ZenPhoto. I'm not getting any error messages (that I can find), just a blank page. The post about "Blank page after setup" didn't help to solve the problem. I am installing ZenPhoto on my own computer at home and I am not using a hosting service. Here is my environment:

Windows 7 Pro, 64-bit
Apache 2.2.14, 32-bit
MySQL 5.1.49-community, 64-bit
PHP 5.3.3, 32-bit,
ZenPhoto 1.3.12

Here are the steps that I took:

Installed Apache 2.2
No errors during install
Updated server address, DocumentRoot and ScriptAlias
Created authorized users
Tested and works, internal and external

Installed PHP
phpInfo shows no problems; recognizes MySQL

Installed MySQL
It took several attempts before MySQL installed successfully.
Connected to MySQL
Create a new DB called zenphoto
Able to "show" database (empty)

Install ZenPhoto
Downloaded latest version
Unzipped it
Copied to my local WebServer ( $DOC_ROOT\zenphoto )

Made the following changes to zp-config.php

$conf['mysql_user'] = 'root'; // Need to create a dedicated zenphoto user
$conf['mysql_pass'] = 'Omitted';
$conf['mysql_host'] = 'localhost';
$conf['mysql_database'] = 'zenphoto';

I even tried uncommenting these
define('WEBPATH', '/zenphoto');
define('SERVERPATH', 'C:\WebServer\Documents\ZenPhoto');

To install / setup zenphoto, I am loading
http://localhost/zenphoto/zp_core/setup.php

It takes several seconds before returning a blank page. I am unable to find any error messages or diagnostic information.

I'm not sure what to try next. Is it a 64-bit issue? Are there any known issues with my configuration? Any help would be appreciated.

Thanks. Roger

Comments

  • acrylian Administrator, Developer
    I doubt it is a 64bit issue (although I neither have that nor Windows). Do you use any WAMP tool for this? These have been sucessfully used.

    `
    define('WEBPATH', '/zenphoto');
    define('SERVERPATH', 'C:\WebServer\Documents\ZenPhoto');
    `
    I am not familiar with Window but if this is a normal Apache server environment, shouldn't you use `/` instead of Windows' own `\`?

    Normally it is not necessary to set these two values.

    Anyway, if you get a blank page that is mostly a PHP error. You need to find the server's error log othwise everything is guessing.
  • I agree on the 64-bit issue but I have seen problems that only manifested themselves on the 64-bit version (usually wiyh drivers) so I wanted to include it.

    Ditto on the define statements. The config file suggested trying this if you were having problems. I noticed no differences.

    When I view source on the "results" from running setup, I get well-formed HTML with an empty BODY.

    I couldn't find a PHP error log. I stopped Apache and rotated the logs and restarted it. The error log had the usual startup statements. It also had a warning about setting the timezone.

    Here is the access log. The first entry is for the setup file. It indicates that it successfully loaded 0 bytes. The other entry was from a test php file that calls phpInfo().

    "GET /zenphoto/zp-core/setup.php HTTP/1.1" 200 -
    "GET /phpTest.php HTTP/1.1" 200 77121

    I suppose my next step is to add tracing statements to the setup file to see if I can narrow down the problem. Any other tips?
  • acrylian Administrator, Developer
    Well, it might be the 64bit issue but I have no idea why that would affect normal PHP from running...

    Regarding the defines. Yes, but that refers to wrong file paths actually. You really need to find the error log, the php error specifially. That should really be near the place you found the access log which does not help us here.
  • There should be a CGI error log. That is what you need to find to see what the failure is. Also be sure you are really using PHP5. There have been issues where people thought they were but that was not the case.
  • I was able to find / enable the log files but they didn't reveal any problems.

    I know enough about PHP to be dangerous so I opted to sprinkle the code with debug statements. The first thing that I found interesting was that following statement was false:

    if (isset($_POST['mysql'])) { //try to update the zp-config file

    The next thing that seemed odd was that the following statement never completed and yet no errors were thrown:

    if($connection = @mysql_connect($_zp_conf_vars['mysql_host'], $_zp_conf_vars['mysql_user'], $_zp_conf_vars['mysql_pass']))

    Each of the parameters is set and is the correct value for my database.

    I don't have a debugger to actually step into the method so I cannot tell what is happening.
  • Well, that is indeed a strange result if accurate.

    `@mysql(...)` will not display an error--that is what the `@` sign is all about. Maybe remove it and see if Mysql returns an error and if so, what.

    But this should not be required since we will get a result back in `$connection` which tells the success of the mysql call.

    So, either the connection is made--then we will take the true brach of the if statement--or it is not made and we will take the false branch. So your tracing should show one or the other. If MySQL does not come back then you of course will get neither of the traces. If it does not come back probably MySQL faulted. No idea why it would do that nor how to see what the fault is. Perhaps the Windows event log will show somehting. Possibly there is an issue with MySQL and Windows 64bit. You would have to query the MySQL forums about that.
  • I removed the @ from the start of the statement and was able to see the real messages:

    Warning: mysql_connect(): [2002] A connection attempt failed because the connected party did not (trying to connect via tcp://localhost:3306) in C:\WWW\htdocs\zenphoto\zp-core\setup.php on line 248

    Warning: mysql_connect(): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. in C:\WWW\htdocs\zenphoto\zp-core\setup.php on line 248

    Fatal error: Maximum execution time of 30 seconds exceeded in C:\WWW\htdocs\zenphoto\zp-core\setup.php on line 248

    I'm still confused that it wont go past the line. I don't have a PHP debugger so I can't step through the program. I am a Java developer, not a PHP developer, but I have to assume that an exception is being thrown and terminating the program but it is not generating a stack trace.

    The ZenPhoto installation instructions just said to create a database. Can anyone give more detailed instructions on how to create one? I opened a MySQL command prompt and typed

    mysql> create database zenphoto;

    What permissions should I use? Any tips on how to test the connection to the database? I'm going to research creating a database from PHP to find out how to verify that the process works.
  • acrylian Administrator, Developer
    Here are the requirements regarding MySQL that Zenphoto needs: http://www.zenphoto.org/2008/08/installation-and-upgrading/#3

    Never use the command line (I am on Mac..;)) I either create database via phpmyadmin locally or via my host's admin backend.

    If you installed all that stuff yourself you might have made a mistake (I don't know anything about setting up a server myself). I can really recommend to use the premade WAMP sets (I use a mac equivalent called MAMP). Saves a lot of trouble.
    http://www.wampserver.com/en/
  • Your problem resides with MySQL or at least the PHP--MySQL interface. Not really something that Zenphoto can deal with (after all, the query never returned.)

    Can you tell if MySQL is actually running on you system? Are there any Windows events with respect to MySQL?
  • Sorry to be the new guy who butts in, but I just want to verify this: it's not a Windows 7 problem? I'm considering an update to my site, and I'm currently running Windows 7, so when I saw this, I tried to go over it. I feel a little over my head, but as far as I understand, I should be okay running it on Windows 7? Or would you recommend using another operating system if I try a home setup like PepsiAndMs has?
  • acrylian Administrator, Developer
    I personally can't answer if there might be a problem with Windows 7 itself as I am on Mac. But if that is a standard Apache server setup I see no real reason it should not work. If unsure I really recommend to try the WAMP setup for local servers. Here the link: http://www.wampserver.com/en/
  • If this is a Windows problem it is more likely to be related to the 64bit OS than Windows 7. Unfortunately as you can tell from the thread, there has been no resolution so far.
  • I finally found the problem! It appears there is a bug in accessing MySQL from PHP with the latest version of PHP (5.3.0+). When you use localhost, it just hangs. When you use 127.0.0.1:3306, it works (the port is required). I also tried the real IP and it returned a 'failed connection' quickly.

    Now, the setup actually completes. I am getting warning errors about being unable to change the permissions on several folders from loose to strict+ (or any other setting). I have held off actually creating the database files until I get these resolved.
  • acrylian Administrator, Developer
    I use PHP 5.3.2 with MySQL 5.1 on my localhost (PHP 5.2.14 on my live server) and had never issues. But I don't have a 64bit system so I have no idea.

    Regarding the permissions you can try to set these via your FTP client directly.
Sign In or Register to comment.