Installer won't run

tfaithw

Joined: 2007-03-05
Posts: 24
Posted: Sun, 2012-04-08 04:53

I recently had the brilliant idea to save some money and consolidate the hosting for my two sites, which involved moving my photography site to a new server (hosting is still through the same provider, Doteasy). When I try to access Gallery2, initially it would immediately take me to the Upgrader screen, but after authenticating me, it would start the process over and I never made it to the next step (it was showing some error about deprecating the ereg in gallery storage class, I can't quite recall now). This was when I figured out that the new server is running PHP 5.3.6, which apparently does not play well with whatever version of G2 I was running (it's been over two years since I updated my website). I've now tried to run the preinstaller (which initially would only take me to an error page until I changed the CHMOD for preinstall.php from 777 to 755) to install the newest version, but after I get the files downloaded and extracted, the installer link does the exact same thing as the preinstaller and takes me to an error page. The upgrade folder is already CHMOD'd to 755 so I have no idea what I need to fix to get the installer to run. In addition, because I was (stupidly) expecting to be able to just restore my entire site on the new server, I never put G2 into maintenance mode or disabled any of the modules. In case it makes a difference, I ran the GHCC.php checker, and got this....

safe mode Pass
exec() enabled Fatal Warning -- The exec() function must not be disabled by the disabled_functions parameter in php.ini
file_uploads enabled Pass
session.save_path writable Pass
session.use_cookies enabled Pass
allow_url_fopen on Pass

Final Status Report: Your PHP configuration flagged a fatal warning. Gallery will not run on this host without modifications to your PHP configuration

It's been a long time since I did a Gallery install, but it seems like having the Exec() function disabled only meant you were limited by what image editors you could use....or something like that????

I'm kicking myself, the amount of money I saved consolidating my hosting wasn't worth this headache.

Any ideas?

Thanks!!!
Tiffany

 
tfaithw

Joined: 2007-03-05
Posts: 24
Posted: Sun, 2012-04-08 05:15

Here is the PHP info, I'm not sure which part of that is actually relevant for copying and pasting purposes so I'm just adding a link.

http://tfwphotography.com/phpinfo.php

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2012-04-08 12:09

When you move your gallery you must chmod the entire g2data directory recursively.
chmod -R 0777 /path/to/your/g2data

Quote:
exec() enabled Fatal Warning -- The exec() function must not be disabled by the disabled_functions parameter in php.ini

I'd ask your host to fix this or find another host. It will limit your gallery.
FAQ: How can I move my Gallery installation from one server to another?

-s

 
tfaithw

Joined: 2007-03-05
Posts: 24
Posted: Sun, 2012-04-08 14:17

Thanks Suprsidr. I've now tried changing the path of my g2data to 777, but that didn't make a difference. I've tried to do a fresh install too, and since I never actually get the installer to open, you'd think that G2 doesn't actually know where my g2data folder is at yet for that to be the culprit.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2012-04-08 14:58

So are you trying to restore your old G2, or redo the whole thing?

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
tfaithw

Joined: 2007-03-05
Posts: 24
Posted: Sun, 2012-04-08 14:59

I've emailed the customer support folks at Doteasy, maybe they'll have some idea what the trick is to getting these scripts to run since I never had any issues before the migration. I've also asked them about fixing that exec() function bit too.

 
tfaithw

Joined: 2007-03-05
Posts: 24
Posted: Sun, 2012-04-08 15:14

Either!!!! It'd be nice if I could just upgrade, but given that I didn't deactivate any modules and whatnot before backing up, I'm not sure how that would work. If I can do a clean install, that'd be fine too, I have all my data and edited theme files. The Upgrader used to pull up (even if I could not run it successfully since it was for the previous version I upgraded to), until I unpacked the newest version's files over the old upgrader, and now neither the upgrader or the installer will run. I'm thinking it could be something on Doteasy's side, but was hoping maybe someone had encountered this before and knew the trick. Seems like it must be with the permissions since I was able to change them and get the preinstaller to run.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2012-04-08 15:24

Edit all the necessary info in your old gallery2/config.php ie. path to g2data, DB info, and last line baseUri

Make sure you chmod -R 0777 /path/to/g2data <- the -R is important

Then try to visit your gallery2/main.php
Gallery will redirect to installer or upgrader if g2data/versions.dat is missing or not readable
FAQ: How can I move my Gallery installation from one server to another?

No need to reinstall, I've moved hundreds of gallery2's over the years.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
tfaithw

Joined: 2007-03-05
Posts: 24
Posted: Sun, 2012-04-08 16:38

Soooo frustrating!!! I finally stumbled across getting the permissions changed correctly. I've only CHMOD'd through FTP so I went to find the G2 CHMOD tool, which worked yesterday, but wasn't today, so I figured it had to be something with the permissions. I eventually got enough things changed to 755 that it ran, and then actually was able to get the upgrader to run too (yay!). It gave me an error about the path/g2data file not being 777 so I went back to the CHMOD tool, stupidly told it to make everything 777, and now can't get the CHMOD tool or upgrader to run anymore. I hate this new server!!! Oh, and yes, I did doublecheck my config file and all that is correct.

 
tfaithw

Joined: 2007-03-05
Posts: 24
Posted: Sun, 2012-04-08 17:06

Blah. I've now used the preinstaller to change my gallery2 folder to 755, but still can't get any php scripts to run anymore.

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2012-04-08 17:31

Did your host give you shell access to your account?

I have a script that could help, but it relies on exec() or passthru()
You could try it.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2012-04-08 17:35

I use the following 2 commands to change all files to 644 and directories to 755

find . -type f -print0 | xargs -0 chmod 0644
find . -type d -print0 | xargs -0 chmod 0755

so if you upload shellExec.php to your gallery2 directory and try to execute these commands it'll either work or it won't.
You realize the issues you are having are directly related to your hosting.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
tfaithw

Joined: 2007-03-05
Posts: 24
Posted: Sun, 2012-04-08 20:34

Thanks S, I appreciate the help! I uploaded the shellexec.php file and it did actually run (which is a step in the right direction lately!) but exec() is disabled. Yes, it is becoming abundantly clear that my issues are with the hosting. I'll just have to wait for them to get back to me tomorrow and see what can be done. I've never had this problem with Doteasy before. Thanks for trying!!!!