I am a fairly seasoned linux user, I have a Centos virtual machine with apache and am trying to audition zenphoto and piwigo. Piwigo wil not even run the installer, I tried the 2.4.0 RC2 zip file and got a blank page, the log file contained this error message
[Sat Apr 21 21:57:03 2012] [error] [client 127.0.0.1] PHP Fatal error: Unknown: Failed opening required '/var/www/html/photos/index.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
"OK", I thought, being too ambitious "lets try the netinstall method", got exactly the same message (except for the filename).
[Sat Apr 21 22:04:35 2012] [error] [client 127.0.0.1] PHP Fatal error: Unknown: Failed opening required '/var/www/html/piwigo-netinstall.php' (include_path='.:/usr/share/pear:/usr/share/php') in Unknown on line 0
Now this is probably some kind of configuration error, after all I did not really set up the VM as a web server, but some clue as to what I have to fix would be helpful. My VM meets the requirements of PHP5, mysql5 and apache, it has enough storage, I am trying to install as root. If I put a "hello world" php file in the root of the photos dir I can load it as expected, so a minimal test of PHP is successful and I satisfy all the listed requirements.
You are boasting that the project is 10 years old and yet you still expect users to go to a system log and then only get a message saying in effect "it didn't work". Zenphoto on the other hand runs a precheck which informs me: what is missing but would be nice to have, what will prevent installation and even offers to fix some problems it encounters. Zenphoto does work on my VM.
How can I make progress with piwigo without having to guess blindly what to fix in the configuration? Is there any documentation I have missed?
Last edited by epo (2012-04-23 14:06:39)
sorry but it's very hard to help you run on a custom server
Piwigo runs on all mutualized hosts, even those with few capacities (like free.fr for French users), and I never get this kind of error
for me it's really looking like a misconfiguration of PHP engine
about your little test did you try
<?php echo 'Hello World'; ?>
I tried the latter (a PHP script). I realise you can't remotely debug every configuration and that is not what I am asking but a complete listing of prequisites with ideally a script to verify them during install would be very helpful, otherwise I have nothing to go on.
My PHP is version 5.3.3, this is Centos 6 which is not necessarily state of the art but a very common server distro.
Last edited by epo (2012-04-22 15:05:45)
as far as I know Piwigo doesn't need any special configuration or plugins for it's default functions, except GD or ImageMagick which doesn't influate the install process
GD was installed, ImageMagick was not installed (there's two non-listed requirements), I installed it and ran apachectl graceful, no change in behaviour with netinstall.
Did some more tests, the netinstall script tries to open http://piwigo.org/download/netinstall/ if I try to open this from a browser on my machine it fails with "You don't have permission to access /download/netinstall/ on this server."
I said GD or ImageMagick (as IM is not available on most mutualized hosts)
netinstall use some basic secure connection with piwigo.org, it tries to connect with curl, fopen, and fsockopen
but all this doesn't explain why you can either execute the netinstall file
Ah yes, missed "or", I will admit defeat for now and try to debug it at leisure. I can't even add echo statements to netinstall and get any output so I need to figure out how to make progress. Thanks for listening and trying to help.
If I run it from the command line I can get the output from echo statements on the terminal and see that execution goes to case 1 of the first big switch statement which outputs a language selection menu. Execution continues to the end of case 1.
Output does not happen in a browser, so are the echo statements causing it to fail? Seems unlikely as echo does work in a basic hello world php script.
Following some pleadings to the Google demi-gods I tried seeing if it was an SELINUX problem. My Centos system had SELINUX set to enforcing in /etc/selinux/config, I changed this to permissive and reboted.
The piwigo netinstall now gets further, reporting that it requires write permission. I will try the zip file again.
The bigger question for me is what piwigo was asking httpd to do that is upsetting SELINUX, I run my servers secure and anything which can't fit in with this is unacceptable. As I mentioned in my first post zenphoto manages to work out of the box.
The problem was to do with how files are placed in the web directory while under SELINUX, I am doing some further investigation and will report my findings in another thread.
Last edited by epo (2012-04-23 14:08:24)