0

I decided to reword and improve previous question which I closed, because it got pretty bad score and got burried because of that.

So, I installed few days ago an Ubuntu 14.04 on my VPS (had 12.04 before) . I configured Apache2 and PHP, uploaded my website there and everything seemed to work ok, but I just discovered that I cannot log in to my website. So now charactersitics:

  • The problem exists only on this server, this is not a problem with PHP script itself as it works locally just fine.

  • Drupals CLI (Drush) works just fine. I can use it to generate one-time login link and login with it, but strange things happen then, like admin menu is at the beginning, and after refreshing - disappears. I have session cookies, and can access admin pages, so this doesn't seem to be a problem with sessions. However every change I will try to made - will not be done. After sending form, everything will go back to what it was. So this doesn't seem to be a problem with sessions. No errors occurs.

  • Apache log have no errors. Drupal itself also have no errors in its log. mysql.err and mysql.log are empty.

  • On this server I have also installed Redmine, which is based on Ruby on Rails, and I'm using Passenger mod to run it - and it works ok, the problem not occurs, so it's probably something with PHP .

  • MySQL user have proper privileges, he can write to database, his credentials are used by Drush (CLI) and it works as expected (from the command line).

It seems like PHP executed from http cannot make any changes in database, however database is perfectly accessible from CLI with the same credentials. It looks like some misconfiguration but is very hard to track down, as it doesn't give away anything in logs. Therefore I have not too much to show, but I can paste my php.ini from /etc/php5/apache2/php.ini , but it is default - I didn't change anything there, which baffling me even more - http://pastebin.com/ZjiSSSht . If you need any more data from this server, please let me know in comment, I'm not sure what else may be useful.

System: Ubuntu 14.04, Apache 2.4.7, PHP 5.5.9-1ubuntu4.2 , mysql Ver 14.14 Distrib 5.5.37

  • Have you tried editing the PHP code to echo mysql_error() after the failed connection? Keep digging until you do get an error message. By the way, did you notice the reason your previous question was closed? – Ladadadada Jul 2 '14 at 6:27
  • I guess it contained too little detail, however I though that the problem is so characteristic, that someone will instantly figure out what is going on, as I didn't change at all default settings. So it seemed to be kind of a common problem, that is very hard to google out. I tried to echo mysql_error at the end of index.php but without luck. There is no output of this function. – Łukasz Zaroda Jul 2 '14 at 9:20
  • I think the biggest problem with this is precisely lack of the error messages. I feel it should be something trivial to fix, as my setup is pretty default. – Łukasz Zaroda Jul 2 '14 at 9:25
0

It appears the problem was with not enabled rewrite module. As I had working pretty urls on all websites, never occured to me, that this may be a problem ^ .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.