Apache Error on Trunk 4991



  • I just upgraded one of my servers from 1.2 to Trunk SVN version 4990 and am getting an error during the install.

    My install gets to the point of backing up the MySQL database during the install and then says the following:

    • Setting up SSL FOG Server…OK
    • Restarting Apache2 for fog vhost…OK
    • Changing permissions on apache log files…OK
    • Backing up database…Failed!

    Upon checking the httpd logs in /var/logs/httpd, its stating the following when I try to pull open the fog UI on the web interface:

    [Fri Mar 11 11:12:19.144405 2016] [:error] [pid 5353] [client 10.10.51.22:33617] PHP Fatal error: Cannot create references to elements of a temporary array expression in /var/www/html/fog/lib/fog/fogcore.class.php on line 120

    Is something broken on the current trunk that is causing this?


  • Developer

    Bump… would be good for CentOS fresh install as well.


  • Moderator

    @Sebastian-Roth said:

    Sorry for leading the wrong direction. Should have thought about PHP version… sure PHP 5.4 is not happy with the current code.

    Any thought about doing something like php --version|grep "PHP 5" |awk '{ print $2 }' in the installer to make sure the returned value of PHP is greater than 5.5?



  • @Sebastian-Roth All good! I’m very appreciative of all of your quick responses on this. Been trying to start some Windows 10 rollouts for testing and FOG 1.2 and Windows 10 are not buddies…


  • Developer

    Sorry for leading the wrong direction. Should have thought about PHP version… sure PHP 5.4 is not happy with the current code.



  • @Tom-Elliott Looks like installing that repo did it. Thank you very much! I’m assuming a new package version if necessary for the latest trunk or something? Is this repo supposed to be added during the installfog.sh script?


  • Senior Developer

    @Kris-Phillips can you follow online and install the remi repository for centos then retry installer?



  • PHP version (php -v):
    PHP 5.4.16 (cli) (built: Jun 23 2015 21:17:27)
    Copyright © 1997-2013 The PHP Group
    Zend Engine v2.4.0, Copyright © 1998-2013 Zend Technologies

    CentOS Version (rpm --query centos-release):
    centos-release-7-2.1511.el7.centos.2.10.x86_64


  • Senior Developer

    What OS is this and what version is php? php -v



  • Latest error_logs file ending where error exists:
    Mar 11 12:27:35 CPFog.CANTON.local systemd[1]: Starting The Apache HTTP Server…
    Mar 11 12:27:35 CPFog.CANTON.local httpd[3263]: AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using CPFog.CANTON.local. Set the ‘ServerName’ directive globally to suppress this message
    Mar 11 12:27:35 CPFog.CANTON.local systemd[1]: Started The Apache HTTP Server.

    ● php-fpm.service - The PHP FastCGI Process Manager
    Loaded: loaded (/usr/lib/systemd/system/php-fpm.service; enabled; vendor preset: disabled)
    Active: active (running) since Fri 2016-03-11 12:27:35 EST; 2s ago
    Main PID: 3264 (php-fpm)
    Status: "Ready to handle connections"
    CGroup: /system.slice/php-fpm.service
    ├─3264 php-fpm: master process (/etc/php-fpm.conf
    ├─3265 php-fpm: pool www
    ├─3266 php-fpm: pool www
    ├─3267 php-fpm: pool www
    ├─3268 php-fpm: pool www
    └─3269 php-fpm: pool www

    Mar 11 12:27:35 CPFog.CANTON.local systemd[1]: Starting The PHP FastCGI Process Manager…
    Mar 11 12:27:35 CPFog.CANTON.local systemd[1]: Started The PHP FastCGI Process Manager.
    –2016-03-11 12:27:37-- http://10.10.51.22/fog//management/export.php?type=sqldump
    Connecting to 10.10.51.22:80… connected.
    HTTP request sent, awaiting response… 500 Internal Server Error
    2016-03-11 12:27:37 ERROR 500: Internal Server Error.

    Latest httpd error_log:
    [Fri Mar 11 12:45:42.007126 2016] [:error] [pid 3272] [client 192.168.114.2:60972] PHP Fatal error: Cannot create references to elements of a temporary array expression in /var/www/html/fog/lib/fog/fogcore.class.php on line 120

    Where is the fog_error log you’re looking for? I’m not familiar with the path I can find that on CentOS.


  • Senior Developer

    @Kris-Phillips what is in the latest fog_error log found in bin/error_logs



  • I ran set | grep proxy and it returned nothing.

    I also created a firewall rule on the gateway firewall to allow ports 80 and 443 outbound without any transparent proxy filtering specifically for the FOG server and it still returns this error.

    [EDIT]

    Also, for reference, I’m on 4991 now.


  • Moderator

    @Kris-Phillips Just to add a little background info to this.

    at the linux command prompt on your FOG server key in the following command.

    set | grep proxy

    If you get something like this, you have a proxy server configuration.

    http_proxy=https://192.168.1.48:3128
    https_proxy=http://192.168.1.48:3128
    no_proxy=192.168.1.53
    

    The key thing you need to add is the last line with the no proxy set to the IP address of your fog server.


  • Senior Developer

    There is no coding issue. It’s definitely related to the Proxy system. Just add --no_proxy=localhost,<ipoffogserver> or something similar to that.



  • Awesome. Thank you. Will it be in the next commit to the SVN? Because I’ll just watch for the version number to bump one.


  • Moderator

    @Kris-Phillips Well if you have the environment variables set to use an external proxy server for internet access, that would confuse the db backup function (which uses wget) to clone the backup. I have personally experienced this before. If you have the environment variables set you need to tell them to not use the proxy for the local machine.


  • Developer

    I am sure Tom will take care of this in a minute… Sounds like a code issue.



  • There is a HTTP and HTTPS filter that filters traffic in line on a firewall out to the internet, but nothing for local access. How would that have anything to do with a MariaDB backup, though?


  • Moderator

    Is your fog server behind an internet proxy server?


Log in to reply
 

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.