Announcement

Collapse
No announcement yet.

php invoke ... already enabled for PHP 7.0

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] php invoke ... already enabled for PHP 7.0

    After installing apache2 and php7.0,. php is simply not working:

    $ ps -edf | grep -i php
    root 1274 1 0 08:19 ? 00:00:00 php-fpm: master process (/etc/php/7.0/fpm/php-fpm.conf)
    www-data 1282 1274 0 08:19 ? 00:00:00 php-fpm: pool www
    www-data 1283 1274 0 08:19 ? 00:00:00 php-fpm: pool www
    jon 3240 1975 0 08:25 pts/0 00:00:00 grep --color=auto -i php

    I don't think this is adequate. And opening phpinfo.php with a browser just shows up the contents of the file.

    In /var/syslog, I find a bunch of lines like this:

    Feb 26 08:01:01 jon-neon php7.0-cli: php_invoke ctype: already enabled for PHP 7.0 cli SAPI
    Feb 26 08:01:01 jon-neon php7.0-cli: php_invoke gettext: already enabled for PHP 7.0 cli SAPI
    Feb 26 08:01:01 jon-neon php7.0-cli: php_invoke sysvsem: already enabled for PHP 7.0 cli SAPI
    Feb 26 08:01:01 jon-neon php7.0-cli: php_invoke exif: already enabled for PHP 7.0 cli SAPI

    What in the world does php have to do with exif?

    In auth.log, I find

    Feb 26 08:20:02 jon-neon systemd: pam_unix(systemd-user:session): session opened for user jon by (uid=0)
    Feb 26 08:20:02 jon-neon sddm-helper: pam_unix(sddm:session): session opened for user jon by (uid=0)
    Feb 26 08:20:02 jon-neon sddm-helper: pam_systemd(sddm:session): Cannot create session: Already running in a session
    Feb 26 08:20:02 jon-neon sddm-helper: pam_unix(sddm-greeter:session): session closed for user sddm
    Feb 26 08:20:02 jon-neon sddm-helper: pam_kwallet5(sddm:session): pam_kwallet5: pam_sm_open_session
    Feb 26 08:20:02 jon-neon sddm-helper: pam_kwallet5(sddm:session): pam_kwallet5: final socket path: /tmp/kwallet5_jon.socket
    Feb 26 08:20:03 jon-neon polkitd(authority=local): Registered Authentication Agent for unix-session:2 (system bus name :1.42 [/usr/lib/x86_64-linux-gnu/libexec/polkit-kde-authentication-agent-1], object path /org/kde/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)
    Feb 26 08:20:05 jon-neon systemd-logind[1031]: Removed session 1.
    Feb 26 08:20:29 jon-neon dbus[1042]: [system] Failed to activate service 'org.bluez': timed out
    Feb 26 08:21:30 jon-neon dbus[1042]: [system] Failed to activate service 'org.bluez': timed out

    Also, dist-upgrade has messed up my grub, which is now some sort of neon stuff and ignores all but /dev/sda. I suppose that is another topic.
    'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

    #2
    A bunch of questions:
    - How did you install php and apache?
    - What happens when you go to http://localhost?
    - What does the contents of the apache log look like?
    - Whats the output of php --version?

    Comment


      #3
      1 - sudo apt-get install apache2 php7.0

      2 - I see the index file I put there, with links to some local stuff and with phpinfo.php right thre, as I have always done.

      3 -
      $ pwd
      /var/log/apache2$ ll
      total 16
      drwxr-x--- 2 root adm 4096 Feb 26 08:00 ./
      drwxrwxr-x 11 root syslog 4096 Feb 26 08:19 ../
      -rw-r----- 1 root adm 1336 Feb 26 09:23 access.log
      -rw-r----- 1 root adm 2076 Feb 26 08:20 error.log
      -rw-r----- 1 root adm 0 Feb 26 08:00 other_vhosts_access.log

      +0100] "GET / HTTP/1.1" 200 781 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2750.0 Iron Safari/537.36"
      ::1 - - [26/Feb/2017:08:16:32 +0100] "GET /favicon.ico HTTP/1.1" 404 500 "http://localhost/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2750.0 Iron Safari/537.36"
      ::1 - - [26/Feb/2017:08:16:33 +0100] "GET /phpinfo.php HTTP/1.1" 200 427 "http://localhost/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2750.0 Iron Safari/537.36"
      ::1 - - [26/Feb/2017:08:16:42 +0100] "GET /jphpinfo.php HTTP/1.1" 404 502 "http://localhost/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2750.0 Iron Safari/537.36"
      ::1 - - [26/Feb/2017:08:18:52 +0100] "GET / HTTP/1.1" 200 781 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2750.0 Iron Safari/537.36"
      ::1 - - [26/Feb/2017:08:21:07 +0100] "GET /favicon.ico HTTP/1.1" 404 501 "http://localhost/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2750.0 Iron Safari/537.36"
      127.0.0.1 - - [26/Feb/2017:09:23:24 +0100] "GET / HTTP/1.1" 200 781 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 Lightning/4.7.4"

      $ tail error.log
      [Sun Feb 26 08:07:41.598269 2017] [core:notice] [pid 13930:tid 140310375610240] AH00094: Command line: '/usr/sbin/apache2'
      [Sun Feb 26 08:12:58.016975 2017] [mpm_event:notice] [pid 13930:tid 140310375610240] AH00491: caught SIGTERM, shutting down
      [Sun Feb 26 08:13:42.970780 2017] [mpm_event:notice] [pid 1888:tid 140523423618944] AH00489: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
      [Sun Feb 26 08:13:42.970967 2017] [core:notice] [pid 1888:tid 140523423618944] AH00094: Command line: '/usr/sbin/apache2'
      [Sun Feb 26 08:18:09.281086 2017] [mpm_event:notice] [pid 1888:tid 140523423618944] AH00491: caught SIGTERM, shutting down
      [Sun Feb 26 08:18:10.393584 2017] [mpm_event:notice] [pid 2882:tid 140704585889664] AH00489: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
      [Sun Feb 26 08:18:10.393661 2017] [core:notice] [pid 2882:tid 140704585889664] AH00094: Command line: '/usr/sbin/apache2'
      [Sun Feb 26 08:19:29.285353 2017] [mpm_event:notice] [pid 2882:tid 140704585889664] AH00491: caught SIGTERM, shutting down
      [Sun Feb 26 08:20:03.929252 2017] [mpm_event:notice] [pid 1820:tid 139704576079744] AH00489: Apache/2.4.18 (Ubuntu) configured -- resuming normal operations
      [Sun Feb 26 08:20:03.929526 2017] [core:notice] [pid 1820:tid 139704576079744] AH00094: Command line: '/usr/sbin/apache2'

      $ php --version
      PHP 7.0.15-0ubuntu0.16.04.2 (cli) ( NTS )
      Copyright (c) 1997-2017 The PHP Group
      Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
      with Zend OPcache v7.0.15-0ubuntu0.16.04.2, Copyright (c) 1999-2017, by Zend Technologies

      Don't know anything about zend. Thanks for helping!
      'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

      Comment


        #4
        Oh, yes, phpinfo.php contains

        <?php

        // Show all information, defaults to INFO_ALL
        phpinfo();

        // Show just the module information.
        // phpinfo(8) yields identical results.
        phpinfo(INFO_MODULES);

        ?>
        'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

        Comment


          #5
          I have had no more answers on this subject., but unfortunately the problem persists unchanged. I have further checked and going via a browser thru localhost to phpinfo.php adds nothing to /var/log/php7.0-fmp.log. It's as if php is not even being called.

          No ideas? I don't much want to go back to standard Kubuntu. Kind of got used to Neon.
          'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

          Comment


            #6
            Found fix, but why?

            I found a guy with the same problem on Ubuntu 16.04 here and then did the following:

            $ php -r 'echo "\n\nYour PHP installation is working fine.\n\n\n";'

            Your PHP installation is working fine.

            $ sudo apt-get install libapache2-mod-php
            $ sudo service apache2 restart
            $ sudo a2enmod php7.0
            $ systemctl status apache2.service

            Then, AFTER reloading phpinfo.php, it works. So i think it was the install of libapache2-mod-php, whatever that is, which did it.

            QUESTION: Why did that not get installed along with apache2?
            'I must have a prodigious quantity of mind; it takes me as much as a week sometimes to make it up.' Mark Twain

            Comment


              #7
              Because not everyone uses PHP.


              Sent from my iPhone using Tapatalk
              "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
              – John F. Kennedy, February 26, 1962.

              Comment

              Working...
              X