PHP-FPM - Default Issue with Ioncube/Wordpress

Discussion in 'Installation/Configuration' started by mcfreder, Aug 11, 2018.

  1. mcfreder

    mcfreder New Member

    Hello,
    This is my first time using ISPConfig on my dedicated server and I am almost satisfied with it. Just this issue with my wordpress that uses a theme which relies on Ioncube. Once I installed this latter any wordpress page reloads and loads forever.. And Even when it at last stops loading, I see bad gate way 502 or my wp-admin finally loads, but the website index.php shows empty always.

    The weird thing is that I have another website with wordpress installation (but No Ioncube being used) And that website loads like a rocket.

    This is my phpinfo
    [​IMG]
    Ioncube zend_extension is declared at "/etc/php5/fpm/conf.d/00-ioncube.ini"
     
  2. florian030

    florian030 ISPConfig Developer ISPConfig Developer

    you can check the error-log for this site. i have ioncube-installed for all php-versions and this works without a problem. maybe your theme is broken.
     
    ahrasis likes this.
  3. mcfreder

    mcfreder New Member

    Thanks for the hint! I have actually check it and found that php5-fpm/web1.sock was not connecting. So I technically deleted web1 website and created a new one with my domain and It connects now. And the website theme loads, but it takes like 20 - 30 seconds. So it's definitely not a broken theme because I have been using it for 2 years now and previously in Ubuntu 14.
    Btw Please have a look at this:
    [​IMG]
    Isn't mysql way too high ?
    Thanks
     
    Last edited: Aug 12, 2018
  4. mcfreder

    mcfreder New Member

    And could you share the guide you used to install ioncube with ispconfig and php 5.6? THanks
     
  5. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    By "previously in Ubuntu 14", what do you mean? Did you upgrade your Ubuntu OS recently? If you do, note that the default php for Ubuntu 16 is 7.0 and Ubuntu 18.04 is 7.2, which means that /etc/php5 folder should not be working anymore. If you use either Xenial or Bionic, you should either compile your own php5.6 or add ondrej php repository to install it. The default new folder for php file using ondrej compiled php it will be /etc/php/5.6, and this where you should add your ioncube and set the same to be used in ISPConfig additional php settings.
     
  6. mcfreder

    mcfreder New Member

    I have actually abandoned Ubuntu and this was a fresh install of Debian with ISPConfig. I have successfully compiled 5.4 & 5.6 & 7.0. I think my website will work if I switch PHP Mode! I'm 100% sure I need it to be able to choose Fast-CGI or Mod-PHP
    [​IMG]

    Why I don't have them on my ISPConfig? And How I add them?
     
  7. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Sorry to say that most newbies think they compiled their php properly and yet most of the time they did not and end up asking unnecessary questions in here.

    My advise is get your basic right, read and understand howtoforge.com tutorial for adding php to debian manualy and you should know where to add them without a need to ask so much.

    Note the path for php5.6 (or other php) manual compilation is different from ondrej php and it is normally in /opt/php-5.6 (change the version number for other php).
     
  8. mcfreder

    mcfreder New Member

    I have compiled and added php 5.6, php 5.4 and php 7.1 and also added them through ISPConfig "Additional PHP Versions"
    I have two website, one website using the manual 5.6 and loads like a rocket but the other website with a huge database and ioncube takes 20 -30 seconds to loads. Here is a screen from my actually ispconfig:
    [​IMG]

    And that link you referenced, It was the one I used to install 7.1 and 5.6 but others from other source. Please read my previous reply and again and answer my actual question which was: Why I don't have those PHP Modes and How to enable them on my ISPConfig?
    Because On my previous installation on Ubuntu I used Plesk and I had my php version as Fast-CGI which worked better for me.
     
  9. mcfreder

    mcfreder New Member

    My ISPConfig version is: 3.1.12 While the demo website seems to be Version: 3.1. Is it why I can't see those php modes?
     
  10. ahrasis

    ahrasis Well-Known Member HowtoForge Supporter

    Shouldn't that depends on what you have compiled, installed and enabled?
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    These PHP modes exist only on Apache web servers. Your server uses nginx which only supports the fast PHP-FPM mode but not old apache modes like mod-php or the deprecated FastCGI mode. If your site loads slow and has a large database, then the most likely reason for the slow load times is that the MySQL/MariaDB system has not been optimized yet. And check the error.log of the website to see if you get any errors there.
     
  12. mcfreder

    mcfreder New Member

    Thank you Till! So I need to reinstall ISPConfig with Apache to have those options?
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    No. Why do you want to have slower deprecated PHP modes? That Apache supports some old legacy PHP modes is no reason to install apache instead of Nginx.
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    The problem from first post is not related to the PHP mode in any way in my opinion. Basically, the wordpress theme that you are using in that site seems to require some custom rewrite rules and you probably have not added these in the nginx directives field yet. So which rules did you add in nginx directives for that site at the moment?
     
  15. mcfreder

    mcfreder New Member

    I have everything setup correctly and as i said earlier the other wordpress website works like a charm! And these are nginx settings I am using:
    location / {
    try_files $uri $uri/ /index.php?$args;
    }

    # Add trailing slash to */wp-admin requests.
    rewrite /wp-admin$ $scheme://$host$uri/ permanent;

    location ~* \.(jpg|jpeg|png|gif|css|js|ico)$ {
    expires max;
    log_not_found off;
    }

    Could you please guys answer my question! How to have those php modes enabled? Do I have to reinstall ISPConfig?
    Otherwise I have no choice but to go back to Plesk and resintall things back to were. I remember that I had FastCGI with Nginx, so I don't understand what's going on with this ispconfig!!
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Your question has already been answered. Those modes are modes of an Apache web server and not a Nginx web server, those modes are old modes and if plesk uses old PHP-FCGI instead of its successor php-fpm., then that's their decision. But this is not related to your problem as pointed out.

    Btw. as far as I know, Plesk still uses an apache behind the nginx as it does not support real nginx servers, which might explain why you still get php-fcgi there.

    Uhhhh, now we are really afraid to lose you as a person that downloaded the OpenSource software we develop for free and to whom we offer support for free ;) You want to go back to Plesk? Then go back to Plesk. It's so funny that some people really think that they can force developers or users of an OpenSource project to work faster, better, or anything else for them for free in the way they want by claiming that they switch back to a paid software they used before. In my experience, this attitude is widely found under Plesk users btw.

    So, feel free to use ISPConfig and we appreciate when you use it like the several hundred thousand other users we have, but don't try these little games, it will not work. The only thing that you might get with that is that we stop helping you.

    I explained to you already that php-fpm vs. php-fcgi is not related to your problem at all. That's as if you would claim that green cars generally are faster then red ones.

    But back to the original problem. Did you check the error.log of the website, any relevant errors in there? You say that this issue happens with one specific theme, does this theme has it's own .htaccess file? if yes, did you translate the rules in that file to nginx syntax and added them in the nginx directives field too?
     
  17. mcfreder

    mcfreder New Member

    See the problem here is I meant no offence by saying "I have no choice but to go back to plesk", I was being honest and wasn't trying to flame or insult anyone. When I first heard about ISPConfig and saw many tutorials and guides about it I was really hyped to try it on my production server directly. Which is exactly What I am doing now!! It is running on my production website and it is not working!! So now Instead of answering my question, you bash me with that sentence as if I am the villain.

    If FastCGI and Nginx are not the problem, could that be mysql? Because I have posted earlier a screen of top commands but no one seemed to be interested in having a look at it :( Just ahrasis implying that I am a newbie and he actually had no idea and haven't even read post.
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    I don't bash you for anything and I'm sorry if my words were a bit harsh, I just wanted to make you aware why you probably won't get support in an OpenSource community when continuing like this. Your problem is most likely not ISPConfig as ISPConfig has no influence on the speed of the site (the speed of a site depends on the web server (nginx), php and MySQL/mariaDB, ISPConfig itself is not involved there) and the issue is not the PHP mode as I outlined above as PHP-FPM is the standard PHP mode used with Nginx servers and many large websites use it.

    I referred to MySQL and mentioned it as a possible reason for a slow site, please see post #11. The default settings of MySQL and mariaDB on Debian and Ubuntu are for small databases. If you use a large database, especially when it uses InnoDB, then you'll probably have to optimize it's settings to get fast response times. This optimization depends on the hardware that you use (mostly RAM size and number of CPU cores) and you will find a lot of guides on that on the internet.
     
  19. mcfreder

    mcfreder New Member

    Offence none taken! Ok, I believe you!
    Yes, I have a large database and I regularly optimize/repair my tables. some of my tables use Innodb for read/write queries and some use MyISAM for mainly read queries. And as far as actual optimization of mysql I never had to, but I use cache plugins and native cache extension Redis and Xcache . Just before I installed debian and ISPConfig; I had Ubuntu 14 with Plesk 12 and both my websites loaded blazing fast for over 3 years not a single day my server shutdown. My hardware is pretty decent 16 Gb Ram and Xenon. my swap is as high as 22 GB.
    What should I do now?
     
  20. till

    till Super Moderator Staff Member ISPConfig Developer

    How large is the database (in GB) of that site approx?

    You say you use Redis, Redis is not installed on an ISPConfig server by default. Did you install Redis and the PHP redis extension and configure it? If not, then the Redis caching level is probably not working at the moment.
     

Share This Page