Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: I cannot access to Wallabag after installation got this error "An error occured: "db" directory must be writeable for your web server user!" #1023

Closed
sg-s opened this issue Jan 25, 2015 · 20 comments
Assignees
Labels

Comments

@sg-s
Copy link

sg-s commented Jan 25, 2015

It looks like I have the same issue as #990 , but his fix didn't work for me.
I have a Mac OS X machine with MAMP installed. I managed to get composer and wallabag installed.
I got to the wallabag install page and chose a mySQL database and made up a new user name and password (is that right?)
Then I got a black page. When I then deleted my install folder, I got the above error message.
Help?

@sg-s
Copy link
Author

sg-s commented Jan 25, 2015

this is what my compatibility
screen shot 2015-01-24 at 8 44 20 pm
test looks like:

@tcitworld
Copy link
Member

You said you made up a new user for MySql within wallabag. But you need to have this user created in MySql already. PHPMyAdmin will help you doing that.

Also, check your phpinfo() or php configuration to check if PDO is correctly enabled.

@tcitworld
Copy link
Member

(The bug has already been met, it's the fact that login informations are not checked before installing)

@tcitworld tcitworld self-assigned this Jan 25, 2015
@sg-s
Copy link
Author

sg-s commented Jan 25, 2015

But you need to have this user created in MySql already. PHPMyAdmin will help you doing that.

thanks. let me figure out how to do that and see if it works.

@sg-s
Copy link
Author

sg-s commented Jan 25, 2015

Sorry. Still getting the same error.
I did make a user and database using myPHPAdmin
screen shot 2015-01-25 at 6 19 01 pm
and the installation seems to have completed (i just got a blank white screen)
If i run

phpinfo()

in the terminal, I get nothing. So i guess something is broken there.
the mySQL server (running off of MAMP) is also on port 8889 -- wonder is that is important?

I also added the following lines to /etc/php.ini

detect_unicode = Off
extension=pdo.so

@sg-s
Copy link
Author

sg-s commented Jan 25, 2015

AH ha!
When I run

php pdo

I get this error:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20090626/pdo.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/pdo.so, 9): image not found in Unknown on line 0
Could not open input file: pdo

UPDATE
After fruitless effort, I'm unable to figure out why pdo is apparently not installed, not can I figure out how to fix this. Not sure if this is even the cause of the problem I'm seeing with wallabag
Also, for further information, my db folder is empty

Hope you can figure this out!

@tcitworld
Copy link
Member

Hi,
phpinfo() is not meant to be run in a terminal. You need to create a file (for instance named phpinfo.php) with the following code in it :

<?php
phpinfo();
?>

Then access the file from your browser. Search for PDO references. If you don't find any, it means PDO isn't correctly installed and/or configured.
I've seen some answers by searching for « MAMP install pdo » on the internets.

@sg-s
Copy link
Author

sg-s commented Jan 27, 2015

Hi,

Thanks for your detailed reply. I did as you suggested, and see the the following things of relevance:

under "Configure Command"

'--with-pdo-mysql=shared,/Applications/MAMP/Library' '--with-pdo-pgsql=shared,/Applications/MAMP/Library/pg'

further down, I see this:

screen shot 2015-01-26 at 9 30 27 pm
it looks like everything works? 😕

I'm going to assume that despite these messages, PDO is actually not installed. I'll search for problems with MAMP and PDO now.

@sg-s
Copy link
Author

sg-s commented Jan 29, 2015

Hi, I've tried to see if I can find a problem with MAMP and PDO, but I'm not even sure if this is the problem. Based on the phpinfo() output above, do you think my PDO install is screwed up in some way? thanks.

@tcitworld
Copy link
Member

Next version of wallabag will detect automatically PDO flaws. But right now we'll have to dig.

Would you try this and adapt it to your case (the correct path is the one your error message gave before). To test, relaunch php pdo.

@sg-s
Copy link
Author

sg-s commented Feb 3, 2015

thanks for your patience. i added the path to my $LD_LIBRARY_PATH using

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/php/extensions/no-debug-non-zts-20090626/

and now the output of php --version is

PHP 5.3.28 with Suhosin-Patch (cli) (built: Jan 23 2014 20:55:45) 
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies

i also reinstalled wallabag form scratch, but disappointingly, get the same error.

on trying php pdo
i get an error:

Could not open input file: pdo

this error is so unique that this is the only mention of this on the web.

@tcitworld
Copy link
Member

OK. Now PDO seems to be properly installed with it's drivers.
Can you enable displaying errors and reseting the Log error level to E_ALL ?

Oh wait, I've read that your server was running on a non standard port. After your database server name at the wallabag installation add the port like this : localhost:8889

@tcitworld
Copy link
Member

Could not open input file: pdo

This error is totally normal, there's no file called pdo, that all. But since you don't get the same error as before, it's okay.

@sg-s
Copy link
Author

sg-s commented Feb 3, 2015

But since you don't get the same error as before, it's okay.

I do get the same error as before. sorry for the confusion.

I tried re-installing wallabag, set my SQL ports to the default (3306), and went ahead, but i see the same problem.

when I click "install wallabag", i instantly get a blank screen, with zero feedback. is this normal? perhaps something is going wrong with the install?

the db folder is still empty.

also, I think this

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/php/extensions/no-debug-non-zts-20090626/

does absolutely nothing because I'm only adding that environment variable to my bash shell. How does php know this path? shouldn't I write this path somewhere?

thanks for the help so far.

@tcitworld
Copy link
Member

If you get a blank screen, it's because errors are not displayed. Edit your php.ini to enable display of errors and set the error level to E_ALL.

I thought you didn't get the PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php/extensions/no-debug-non-zts-20090626/pdo.so' - dlopen(/usr/lib/php/extensions/no-debug-non-zts-20090626/pdo.so, 9) error anymore.

Oh, and does it works if you choose the SQLite installation ? Don't forget to check the file rights on the whole folder, you can set the rights to chmod 777 for the moment, and change it later.

@sg-s
Copy link
Author

sg-s commented Feb 4, 2015

sorry for the confusion. I'm still getting the original error (in the title of this thread). I don't get the PHP warning.

I'll edit php.ini and report back.

@sg-s
Copy link
Author

sg-s commented Feb 5, 2015

I'm so sheepish.

The Bad news
I still get the same error with mySQL. I checked that the php shows no errors, I enabled error logging in php.ini (but obviously did it wrong because I still see no errors when I install wallabag)

In my php.ini file, I mofified it to:

 error_reporting 32767

but it didn't do anything.

The good news

I chose a SQLite database and wallabag installed and works great! (at least, I can log in and see stuff) this is what I see:

screen shot 2015-02-04 at 10 09 44 pm

so i think this solves my problem (I can use wallabag). but others might have the same issue with PDO/mySQL/MAMP etc. thanks for all the help @tcitworld 👍

please close if you think this has gone on long enough.

@sg-s
Copy link
Author

sg-s commented Feb 5, 2015

if you're interested, i wrote up what I did, and this should help others:

Modify your $PATH variable

Your $PATH variable tells bash where to look for commands. Edit your ~/.bash_profile to look like:

export PATH=/Applications/MAMP/bin/php/php5.6.2/bin:/usr/local/bin:$PATH

This tells the computer to use MAMP's PHP, instead of the crappy version built into OS X.

Modify your php.ini file

Add the following lines to your php.ini

extension_dir = "/Applications/MAMP/bin/php/php5.6.2/lib/php/extensions/no-debug-non-zts-20131226/"
extension = pdo_mysql.so

This tells php to load the PDO extension, and points to the right location.

Check that everything works using php --version. You should see this:

PHP 5.6.2 (cli) (built: Oct 20 2014 16:21:27) 
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies

If you see an error message about missing PDO, you probably haven't fixed your $PATH.

Install wallabag

Navigate to the Documents folder of your webserver (here, /Library/WebServer/Documents/) and run

curl -s http://getcomposer.org/installer | php
composer create-project wallabag/wallabag wallabag
mv composer.phar wallabag/
cd wallabag
php composer.phar install

That's it. Now go to localhost/wallabag/

and choose a SQLite database, and a user name and password.

@nicosomb
Copy link
Member

nicosomb commented Feb 5, 2015

Le 05/02/2015 04:37, Srinivas Gorur-Shandilya a écrit :

if you're interested, i wrote up what I did, and this should help others:

  Modify your |$PATH| variable

Your |$PATH| variable tells |bash| where to look for commands. Edit your
~/.bash_profile to look like:

export PATH=/Applications/MAMP/bin/php/php5.6.2/bin:/usr/local/bin:$PATH

This tells the computer to use MAMP's PHP, instead of the crappy version
built into OS X.

  Modify your php.ini file

Add the following lines to your |php.ini|

|extension_dir = "/Applications/MAMP/bin/php/php5.6.2/lib/php/extensions/no-debug-non-zts-20131226/"
extension = pdo_mysql.so
|

This tells php to load the PDO extension, and points to the right location.

Check that everything works using |php --version|. You should see this:

|PHP 5.6.2 (cli) (built: Oct 20 2014 16:21:27)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies
|

If you see an error message about missing PDO, you probably haven't
fixed your |$PATH|.

  Install wallabag

Navigate to the Documents folder of your webserver (here,
|/Library/WebServer/Documents/|) and run

curl -s http://getcomposer.org/installer| php
composer create-project wallabag/wallabag wallabag
mv composer.phar wallabag/
cd wallabag
php composer.phar install

That's it. Now go to |localhost/wallabag/|

and choose a SQLite database, and a user name and password.


Reply to this email directly or view it on GitHub
#1023 (comment).

Maybe this document can be added into our documentation website :)

@tcitworld tcitworld added the Bug label Jul 28, 2015
@nicosomb
Copy link
Member

This bug affects wallabag v1. This version won't evolve anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants