Hello,
I just downloaded and installed the cvs version. It works on my local system, but it doesn't on the remote host. I checked dozens of time the settings.php password, db, etc...
Drupal 4.6 works perfectly at the same host, using the same data base, same user, same password (different prefix only, and different url/domain).
I get an empty string as sql error message:
The MySQL error was: .
Are you sure you have the correct username and password?
Yes. the same as existing drupal 4.6 install.
Are you sure that you have typed the correct hostname?
Yes. idem.
Are you sure that the database server is running?
Yes. working for other installation.
To check that the settings.php was properly uploaded, I changed the username in settings.php and uploaded again: the name changed in the mention at the bottom of the new error page, but the mysql error is still an empty string.
I do have a mysql error message if I change the username on my localhost:
The MySQL error was: Access denied for user: 'testerror@localhost' (Using password: YES).
Currently, the username is testerror and the database server is localhost.
????
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | db-connect.database.mysql.inc.3.patch | 560 bytes | beginner |
| #7 | db-connect.database.mysql.inc.2.patch | 560 bytes | beginner |
| #6 | db-connect.database.mysql.inc.patch | 562 bytes | beginner |
Comments
Comment #1
beginner commentedIf I suppress the @ I have the following error message:
which seems strange in this context.
I have a - in the database host: out-data.org. Would that affect the parsing of the variable in settings.php?
Comment #2
beginner commentedIt's definitely a php problem, not mysql settings:
we use PHP Version 4.2.3
by replacing the line:
by its values:
I still get the Wrong parameter count for mysql_connect() message...
???
4.6 works fine on the same host.
Comment #3
beginner commentedDrupal 4.6:
Drupal cvs:
One more parameter has been added.
php.net/mysql_connect :
php 4.3.0 Added the client_flags parameter.
i.e. cvs Drupal and the coming 4.7 version will not work for php versions < 4.3.0. My hosts unfortunately uses 4.2.3.
Comment #4
beginner commentedI've seen that the list of requirements states php > 4.3.0, but I guess I won't be the only one to be surprised to see that drupal doesn't work AT ALL (no DB connection) when they upgrade.
Yet, by modifying the line above, to make it look like version 4.6, I am able to use drupal cvs on my server with an older php version (I'm on the lookout for other similar bugs).
I was trying to add a if loop, checking on the php version used, so that we have:
but I cannot find in the documentation how this variable can be tested.
Also, once connected to the data base, a warning in admin/settings can be added about the php version used.
Or do you really mean to shut out all the people who depend on the (lack of) will of their host to upgrade php? If so, at the very least, add a list item in the error message to remind people to check for the php version.
B.
Comment #5
Prometheus6 commentedHere's your test.
Comment #6
beginner commentedThanks Prometheus6.
here's a proper patch on includes/database.mysql.inc
tested on local (php 4.3.x) and remote (php 4.2.x).
Comment #7
beginner commentedAm I doing things the wrong way round?? (I am beginner, and new to this diff thing!)
here's the negative of the previous one...
Comment #8
beginner commentedgrrr....
Did I say I was a beginner?
I was diffing against the already modified file.
This patch should be the good one (either that or expect to have a flood of support request when drupal 4.7 comes out!).
Comment #9
gábor hojtsyWell, other parts of Drupal also expect PHP 4.3+ (the search indexing code is one example if I remember well), so if you give the impression at this point that it is fine to run with PHP 4.3-, then other things will probably break. I am not certain though :)
Comment #10
Prometheus6 commentedI decided to play patch bingo.
Comment #11
beginner commentedPlaying bingo is good! :-D
Goba,
Precisely, that's why I said earlier to write a warning in admin/settings about the sub-requirements php version used and let them have a quick idea of what may not work. Currently, I am running http://www.wechange.org/ on drupal cvs (two days ago) and php 4.2.3. Drupal can still work, even if some features can be expected to be broken. I haven't tried search indexing yet, but now I shall know that I cannot use it until I manage to persuade my host to upgrade php (unlikely in the short term!).
So, I'd rather use a slightly broken Drupal than no drupal at all! The site admin just needs to be warned (so that they don't flood the forum with support requests). Just let them know in admin/settings what is likely to be broken.
OR, if the drupal core developpers are purists and only care about self-hosting drupal users and ignore the mass of users who don't really have a choice, they should at least put a proper warning when failing to connect:
(shall I create a patch for this one? Now I know how to do one!)
as I said earlier:
it's either that (my patch, or the piss-off message) or expect to have a flood of support request when drupal 4.7 comes out!
Comment #12
gábor hojtsyWell, you can actually vote with your money, and go to a different hosting provider. There are plenty already supporting PHP 4.3+ and PHP 5. Note that the latest stable PHP version in the 4.x family is already 4.4.0! 4.3.0 was released on 27th December 2002, so it is becoming three years old software in no time.
Comment #13
chx commentedI added that parameter and now Drupal relies heavily on it. We can't support ancient PHP releases for ever.
Comment #14
chx commentedAlso note that in Drupal 4.6 (not 4.7!) INSTALL.txt says "Drupal requires a web server, PHP4 (4.3.3 or greater) " which means that this beginner have not RTFM.