PHP not working

Discussion in 'ISPConfig 3 Priority Support' started by muekno, Jun 15, 2016.

  1. muekno

    muekno Member HowtoForge Supporter

    Installed new webserver on jessie according tutorial in multiserver enviorement
    PHP is install and works otherwise install scrip and a own phpinfo script would not work.
    define new website with database. Website is base on PHP, starting bring only PHP source text.
    Looking at relevant file in sites-availabe found this
    </IfModule>

    <Directory /var/www/max-eckstein.de/web>
    # Clear PHP settings of this website
    <FilesMatch ".+\.ph(p[345]?|t|tml)$">
    SetHandler None
    </FilesMatch>
    Options +FollowSymLinks
    AllowOverride All
    Require all granted
    </Directory>
    <Directory /var/www/clients/client0/web1/web>
    # Clear PHP settings of this website
    <FilesMatch ".+\.ph(p[345]?|t|tml)$">
    SetHandler None
    </FilesMatch>
    Options +FollowSymLinks
    AllowOverride All
    Require all granted
    </Directory>
    what me tells PHP is disabled on this site.
    By creating website I set all including option equal to working site in other ISPConfig system, server there is still opensuse 13.2
    as the .vhost file ist ISPConfig created I do not want to change manually.

    need help

    By the way the ftp problem on same server, other tread is fixed

    Rainer
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Edt the website settings in ispconfig, set php to either fpm or fastcgi, ensure that the suexec checkbox is enabled and press save.

    Btw. the easiest way to get w orking ftp website is:

    Click on new website, just enter the domain name into the domain field, the press save. As all defaults are already correct for a php website, no need to change anything.
     
  3. muekno

    muekno Member HowtoForge Supporter

    As I wrote all is like sites more than on sites working on other machine.
    Suexc checked, php-fpm set, so no need to change. Apache restarted.
    checked cgi and save, unchecked cgi and save,tomestamp of .vhost change so it schould be written by ISPConfig, restarted apache
    same problem

    Rainer
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Other machines do not matter for the local config of a server.
    Is there a vhost file with .err ending in the /etc/apache2/sites-available/ folder.
     
  5. muekno

    muekno Member HowtoForge Supporter

    Yes I know, other server is in an other ISPConfig system, but ISPConfig Version are the same, so parameter settings should give same results. Only differenz webserver on the other system is opensuse 12.3 latest patches, not working server ist debian jessie latest patches.
    There is no . err file in /etc/apache2/sites-available/ folder. There is even not an error log in /var/log/apache2 only the other_vhosts_access.log which look fine.
    Bye the way I'm useing ISPConfig now for I think nearly 3 years, hat set up quite al lot of web server, thats the first not runing from stratup.
    Rainer
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

  7. muekno

    muekno Member HowtoForge Supporter

    The line looks a bit different than noted here,
    * * * * * /usr/local/ispconfig/server/server.sh 2>&1 > /dev/null | while read line; do echo `/bin/date` "$line" >> /var/log/ispconfig/cron.log; done
    I commented it wrote bach and did this command, output was
    crontab: installing new crontab
    [email protected]:/etc/apache2# /usr/local/ispconfig/server/server.sh
    /usr/local/ispconfig/server/server.sh
    16.06.2016-11:57 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    16.06.2016-11:57 - DEBUG - Found 1 changes, starting update process.
    16.06.2016-11:57 - DEBUG - Replicated from master: REPLACE INTO web_domain (`domain_id`,`sys_userid`,`sys_groupid`,`sys_perm_user`,`sys_perm_group`,`sys_perm_other`,`server_id`,`ip_address`,`ipv6_address`,`domain`,`type`,`parent_domain_id`,`vhost_type`,`document_root`,`web_folder`,`system_user`,`system_group`,`hd_quota`,`traffic_quota`,`cgi`,`ssi`,`suexec`,`errordocs`,`is_subdomainwww`,`subdomain`,`php`,`ruby`,`python`,`perl`,`redirect_type`,`redirect_path`,`seo_redirect`,`ssl`,`ssl_state`,`ssl_locality`,`ssl_organisation`,`ssl_organisation_unit`,`ssl_country`,`ssl_domain`,`ssl_request`,`ssl_cert`,`ssl_bundle`,`ssl_key`,`ssl_action`,`stats_password`,`stats_type`,`allow_override`,`apache_directives`,`nginx_directives`,`php_fpm_use_socket`,`pm`,`pm_max_children`,`pm_start_servers`,`pm_min_spare_servers`,`pm_max_spare_servers`,`pm_process_idle_timeout`,`pm_max_requests`,`php_open_basedir`,`custom_php_ini`,`backup_interval`,`backup_copies`,`backup_excludes`,`active`,`traffic_quota_lock`,`fastcgi_php_version`,`proxy_directives`,`last_quota_notification`,`rewrite_rules`,`added_date`,`added_by`) VALUES ('1','1','0','riud','ru','','4','*','','max-eckstein.de','vhost','0','name','/var/www/clients/client0/web1','','web1','client0','-1','-1','n','n','y','1','1','www','php-fpm','n','n','n','','','','n','','','','','','','','','','','','','webalizer','All','','','y','dynamic','10','2','1','5','10','0','/var/www/clients/client0/web1/web:/var/www/clients/client0/web1/private:/var/www/clients/client0/web1/tmp:/var/www/max-eckstein.de/web:/srv/www/max-eckstein.de/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin','upload_max_filesize=10M\r\npost_max_size=10M\r\nmemory_limit=164M\r\nsuhosin.request.max_varname_length=200\r\nsuhosin.post.max_name_length=200\r\nsuhosin.get.max_name_length=200\r\nsuhosin.get.max_value_length=2000\r\nmax_execution_time=300\r\nsuhosin.executor.include.whitelist=phar,vfs\r\nalways_populate_raw_post_data=-1\r\nmax_input_vars=1500\r\ndisplay_errors = On\r\nerror_log = /var/log/php-scripts.log\r\n','none','1','','y','n','','','','','2016-06-15','admin')
    16.06.2016-11:57 - DEBUG - Calling function 'ssl' from plugin 'apache2_plugin' raised by event 'web_domain_update'.
    16.06.2016-11:57 - DEBUG - Calling function 'update' from plugin 'apache2_plugin' raised by event 'web_domain_update'.
    16.06.2016-11:57 - DEBUG - Writing the vhost file: /etc/apache2/sites-available/max-eckstein.de.vhost
    PHP Warning: file_put_contents(/etc/php5/fpm/pool.d/web1.conf): failed to open stream: No such file or directory in /usr/local/ispconfig/server/lib/classes/system.inc.php on line 791
    16.06.2016-11:57 - DEBUG - Writing the PHP-FPM config file: /etc/php5/fpm/pool.d/web1.conf
    16.06.2016-11:57 - DEBUG - Calling function 'restartPHP_FPM' from module 'web_module'.
    16.06.2016-11:57 - DEBUG - Restarting php-fpm: systemctl reload php5-fpm.service
    16.06.2016-11:57 - DEBUG - Apache status is: running
    16.06.2016-11:57 - DEBUG - Calling function 'restartHttpd' from module 'web_module'.
    16.06.2016-11:57 - DEBUG - Restarting httpd: systemctl restart apache2.service
    16.06.2016-11:57 - DEBUG - Apache restart return value is: 0
    16.06.2016-11:57 - DEBUG - Apache online status after restart is: running
    16.06.2016-11:57 - DEBUG - Processed datalog_id 690
    16.06.2016-11:58 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    finished.

    There is no problem with rewriting of files, as file timstamp is changed, see
    -rw-r--r-- 1 root root 2147 Jun 16 11:57 max-eckstein.de.vhost

    Rainer
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Does the directory /etc/php5/fpm/pool.d/ exist and does it contain the web1.conf file? If the directory does not exist, then the Debian php5-fpm package is not installed.
     
  9. muekno

    muekno Member HowtoForge Supporter

    The package was not installed, did the install with cut and paste from the tutorial, ok my fault. thank you very much for the quick help. The web1.conf now exists.

    Rainer
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Ensure that you also installed mod_fastcgi (not to mix up with mod_fcgi), the module gets installed in the same chapter of the guide that installs php-fpm. Is ispconfig able to activate php in the vhost now when mod_fastcgi and php5-fpm are installed (deactivate PHP and then activate it again, then wait until the slave server processed the change).
     
  11. muekno

    muekno Member HowtoForge Supporter

    Thank you after installing mod_fastcgi all is fine

    Rainer
     

Share This Page