Requirements Problem: Installing D7 Gives PDO Errors
THE RESOLUTION:
Under the heading, "The most common steps you may need to perform are:" I added "c. Missing php.ini file." and changed the next letter to d. like this:
< snip >
chmod go-w sites/default/settings.php
c. Missing php.ini file.
It's possible that the setting for register_globals is enabled. If you get
this error, it it likely the php.ini file is missing in the public_html
directory on your site.
To fix the register_globals error, create a php.ini file in the
public_html directory with the following line in it:
register_globals = Off
It's possible that fixing this error will result in a subsequent error
related to PHP extensions.
To fix the pdo (PHP Data Objects) errors, add the following four lines to
the php.ini file, to look like this:
register_globals = Off
extension=pdo.so
extension=pdo_sqlite.so
extension=sqlite.so
extension=pdo_mysql.so
d. Write permissions after install.
< snip >
THE ERRORS:
I searched the documentation - without success. But it doesn't seem like an uncommon problem.
I jumped in and tried installing D7. New domain name, new hosting package. Uploaded and extracted D7. Contacted hostgator and couldn't solve this. Below is the error:
Error
PHP extensions Disabled
Drupal requires you to enable the PHP extensions in the following list (see the system requirements page for more information):
* pdo
Error
Database support Disabled
Your web server does not appear to support PDO (PHP Data Objects). Ask your hosting provider if they support the native PDO extension. See the system requirements page for more information.
~
DUPLICATE THE ERRORS AND SOLVE:
Starting over, I deleted all the files and the database. I extracted D7 and made the db again.
The only error at first was that register_globals was enabled. There were no pdo errors.
Original error was fixed with this line in the php.ini file (didn't exist yet) in public_html:
register_globals = Off
Tried the install again and register_globals was fixed, BUT the pdo errors (original post) showed up.
The solution was to add these four lines to the same php.ini:
extension=pdo.so
extension=pdo_sqlite.so
extension=sqlite.so
extension=pdo_mysql.so
~
When the errors show up, there's a link to the system requirements page which didn't help me, because it didn't show how to fix any settings related to the pdo requirements.
I took a stab at modifying the INSTALL.txt file for D7.
Hope this helps.
~ J
Original Thread = http://groups.drupal.org/node/129519
Comments
Comment #1
droplet commentedphp.ini is not always in public_html, we need more details on it
Comment #2
jsorgen commentedIn a clean D7 installation out of the box, php.ini does not exist on the site, if the site is new.
Comment #3
droplet commentedif you are not using a hosting that support it, put on public_html is no helps
about status:
http://drupal.org/node/156119
(at least a real patch for reviews)
Comment #4
jsorgen commentedIt's a patch (idea) for documentation. Do you have suggestions?
"Note that if a patch is not required in order to complete the idea described in the issue, then it is the idea itself that needs review." - Needs Review ["CNR"]
Comment #5
droplet commented1. 2 way to disable register_globals
- PHP.ini
-.htaccess
2. PHP.ini
- Point out a way to find the php.ini, eg. phpinfo()..
and for this problem, i don't think "c. Missing php.ini file" is a right topic. It's missing conf
only need to suggest user choosing an extension they needed
maybe a ref link: php.net/manual/en/pdo.installation.php
It's updating for INSTALL.txt which in D7 core. Patches is required.
at least now it needs work (but STATUS:active is more right in case)
Comment #6
jsorgen commentedI thought it was a good idea to edit the INSTALL.txt. I obviously don't have enough information to do it alone. I am dropping the assignment and if anyone else wants to modify what I've written and bring to conclusion then I am satisfied my efforts were not wasted.
Comment #8
jsorgen commentedFor the install to work, this customized php.ini belongs in the directory containing install.php - wherever that may be. If install.php is in /clients/ then php.ini goes into /clients/ to avoid trouble during installation.
The hosting provider may have a default php.ini you need to modify for register_globals and the pdo extensions.
It sounds simple enough to include in the INSTALL.txt and might be helpful for many others. If anyone has used the INSTALL.txt for reference, then please chime in.
Comment #9
renderfreak commentedHoly Crap Thank you! this worked!
Comment #10
jhodgdonI'm a bit confused about this issue. What instructions are you suggesting need to be added to the INSTALL.txt file?
Also, please do not add random tags to issues -- see the issue tag guidelines link below the tags field. Thanks!