i am new to opensuse,i have installed version 11.0.everything went
through well with LAMP.
i tried test.php(<?phpinfo();?>) and found out that the mysql module was missing althogh had installed.
But i can used the mysql-administrator-tool to create new user account and restore back-uped sql.
what’s wrong,please help,thank you.
PHP uses the php5-mysql module, which is not part of mysql but part of PHP. Check that you have installed this package, it is not mandatory. Some people run PHP without needing a connection to mysql (because they don’t use mysql or use some other DB, like postgres, e.g.).
mysql-administrator doesn’t use PHP and has its own means of accessing mysql.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I am not sure what the mysql-administration-tool is, but go into Yast
and see if you have a php module with mysql in its name as well… so,
Search: type in php and hit [enter], look for something like php-mysql
and make sure it is there. If it is then bounce Apache.
Good luck.
scchia62 wrote:
> i am new to opensuse,i have installed version 11.0.everything went
> through well with LAMP.
> i tried test.php(<?phpinfo();?>) and found out that the mysql module
> was missing althogh had installed.
> But i can used the mysql-administrator-tool to create new user account
> and restore back-uped sql.
> what’s wrong,please help,thank you.
>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIszWk3s42bA80+9kRAloTAJ9S/F0Vtxp0KAvN1bRbXbCclAacxgCfarXj
1IiUzIvl9WZTKZuWrjyfQgQ=
=Dpa5
-----END PGP SIGNATURE-----
i have checked the yast2,php5-mysql was installed alongside with
php5.
i am still in dark.
please help.
thank you.
this is the php5.conf
<IfModule mod_php5.c>
AddHandler application/x-httpd-php .php4
AddHandler application/x-httpd-php .php5
AddHandler application/x-httpd-php .php
AddHandler application/x-httpd-php-source .php4s
AddHandler application/x-httpd-php-source .php5s
AddHandler application/x-httpd-php-source .phps
DirectoryIndex index.php4
DirectoryIndex index.php5
DirectoryIndex index.php
</IfModule>
am i missing inclusion of mysql.sock?mysql.so?
That test.php should be
<?php
phpinfo();
?>
Short tags are not supported nowadays. Check that output again, there should be a mysql section and a mysqli section. Did you perhaps think that no output meant nothing installed?
hi ken_yap,i had tried your script,output is similar,mysql module
is missing.
this is part is phpinfo() output:
Configuration File (php.ini) Path /etc/php5/apache2
Loaded Configuration File /etc/php5/apache2/php.ini
Scan this dir for additional .ini files /etc/php5/conf.d
additional .ini files parsed /etc/php5/conf.d/ctype.ini, /etc/php5/conf.d/dom.ini, /etc/php5/conf.d/hash.ini, /etc/php5/conf.d/iconv.ini, /etc/php5/conf.d/json.ini, /etc/php5/conf.d/mysql.ini, /etc/php5/conf.d/mysqli.ini, /etc/php5/conf.d/odbc.ini, /etc/php5/conf.d/pdo.ini, /etc/php5/conf.d/pdo_mysql.ini, /etc/php5/conf.d/pdo_odbc.ini, /etc/php5/conf.d/pdo_sqlite.ini, /etc/php5/conf.d/sockets.ini, /etc/php5/conf.d/sqlite.ini, /etc/php5/conf.d/tokenizer.ini, /etc/php5/conf.d/xmlreader.ini, /etc/php5/conf.d/xmlwriter.ini
Well that module is read by PHP as you can see from these words:
/etc/php5/conf.d/mysql.ini
It’s a very long output, are you sure you don’t have a section labelled mysql and another section labelled mysqli? Use the search function of your web browser. And since short tags work for you, did you edit any of the config files since by default short tags are disabled?
What about trying a small PHP program that uses a function from the MySQL module? Here’s one from the PHP online manual:
<?php
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>
i chose to re-install opensuse-11,surprise all things worked well,mysql modules seen and phpmyadmin works,new user account created.But i still wonder why :
1)the script <?phpinfo();?> works for mandriva 1.2008(php
version 5.0xxx),but not for opensuse’s php(5.2xxx).
2.i run php written office app works perfect with mandriva’s php but shows fanny behaviour and characters likes (<br>," " and many others on the screen) with opensuse eventhogh i had switched On the Register_Globals.
thank you.
Probably because SUSE (or more likely the upstream PHP distribution) turned off short tags.
Short tags are discouraged. You might as well get used to it because it won’t be allowed in PHP6.
And register_globals? Shock, horror, is anybody still using that insecure setting? What were the PHP developers thinking when they invented that, as well as other dubious stuff like safe_quotes.
i used 3 pcs,2 in the office connected directly through the
ethernet port with wire(intranet),but not connected to internet.
pc1 configured at 192.168.0.1(mandriva 2008).
pc2 configured at 192.168.0.10(opensuse 11).
pc1 serves as server with php scripts,things work fine.
i noticed that pc1 loaded only with mysql module but pc2
in additional with mysql cli(module).Similar script only works for mandriva(php5.25)but not opensuse(php5.25).
pc3(at home)is standalone and behaved exactly as pc2.
is there any way i can disable the mysql-cli module in
opensuse?
thank you.
hey when u install LAMP u must add your user manualy!
u must edit httpd.conf and add your user by hand!