Notices


Reply
Thread Tools
Posts: 4 | Thanked: 0 times | Joined on Mar 2011
#1
Hi folks,

I set up the php and lighttpd on my N900. the problem is I had a php file where:

$connect=mysql_connect("someserver.com","user","pa ss") or die ("error in mysql connection:<strong>".__LINE__."</strong>");

once I open this trough the browser Im getting an erorr message "Fatal error: Call to undefined function mysql_connect() in /var/www/htdocs/db.php on line"

I tought that its maybe cause I did not installed mysql on the phone so did apt-get install mysql
then I entered:
mysql_install_db
and started the server with
mysqld_safe &

but still having the problem with:
"Fatal error: Call to undefined function mysql_connect() in /var/www/htdocs/db.php on line"

any ideas?
 
jedi's Avatar
Posts: 1,411 | Thanked: 1,330 times | Joined on Jan 2010 @ Tatooine
#2
Looks like you haven't got the php-mysql module installed...

(and I'm not sure if it's available on the N900)
__________________
May the source be with you.
 
Posts: 4 | Thanked: 0 times | Joined on Mar 2011
#3
I was thinking about it to instal it from the repository but I have the php-cgi from http://talk.maemo.org/showpost.php?p...8&postcount=24 and dont know if I instal php mysql from the repository if the sqlite will work.
 
jedi's Avatar
Posts: 1,411 | Thanked: 1,330 times | Joined on Jan 2010 @ Tatooine
#4
I just checked and php5-mysql is in the repos, as is php5-sqlite. There shouldn't be any problems with them co-existing.
__________________
May the source be with you.
 
Posts: 255 | Thanked: 107 times | Joined on Nov 2010
#5
don't forget to enable the mysql module in php.ini!
 
Posts: 105 | Thanked: 99 times | Joined on Feb 2011 @ India
#6
wow, we have mysql for maemo? how is it even possible?
 
Posts: 4 | Thanked: 0 times | Joined on Mar 2011
#7
the only problem is that I nebaled mysql in php.ini with extension=mysql.so
but to enter the extension_dir I would need to locate mysql.so and I cant find it. there are only files called libmysql.....so...

so my phpinfo() looks like:
Configure Command ./configure --enable-shared --disable-static --disable-rpath --disable-debug --without-pear --enable-spl --with-config-file-path=/etc --disable-ipv6 --enable-magic-quotes --enable-memory-limit --disable-short-tags --disable-ctype --disable-dom --enable-ftp=shared --without-gettext --without-iconv --enable-libxml --with-zlib=shared --without-libxml-dir --disable-xmlreader --disable-xmlwriter --disable-mbstring --disable-mbregex --enable-simplexml --enable-session --disable-soap --enable-sockets=shared --disable-tokenizer --disable-filter --without-curl --without-gd --without-gmp --without-ldap --without-mysql --without-pgsql --with-sqlite --enable-xml=shared --disable-xmlreader --disable-xmlwriter --disable-apc --enable-pcntl=shared --enable-pdo --disable-cli --enable-cgi --enable-force-cgi-redirect --disable-fastcgi

and the php file still gots the error:
Fatal error: Call to undefined function mysql_connect() in /var/www/htdocs/db.php on line 3
 
Posts: 130 | Thanked: 132 times | Joined on Jan 2013 @ India
#8
Hi, sorry for bumping old thread but i have same problem, im unable to use lighttpd with mysql, yes i have installed php5-mysql but still im unable to use it with php, it works fine standalonecthough.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 06:49.