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.phpIt 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
`
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.
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?
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.
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.
`@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.
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.
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/
Can you tell if MySQL is actually running on you system? Are there any Windows events with respect to MySQL?
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.
Regarding the permissions you can try to set these via your FTP client directly.