Welcome to Geeklog Tuesday, November 21 2017 @ 09:06 pm EST


RichJ

Anonymous
Ok, I've been through the instructions (once with 3.7, once with 3.6), about a dozen threads, the FAQ, the "Common Problems", and I'm figgeren I might qualify for some govermit assistinse about now, 'cause even I know that mysql_connect() is a defined function. But first, I wanted to ask the experts on this board. I'm pretty sure all the paths are right, but I'm going to copy some file contents here with the hope I can save some questions and time: from config.php 9click read more)$_DB_dbms = 'mysql'; $_DB_host = 'localhost' $_DB_name = 'GL'; // Yes, it exists and mySQL is up and running $_DB_user = 'rich'; // that's me, I have all permissions on all hosts $_DB_pass = '*****'; // that's my p/w $_DB_table_prefix = 'gl_'; // e.g. 'gl_' $_CONF['path'] = '/geeklog/'; // right off the root; this is where config.php is located $_CONF['path_html'] = 'var/www/html/geeklog/'; //removed $_CONF['path'] . --- this is where everything that was in public_html resides $_CONF['site_url'] = 'http://dellsvr'; $_CONF['site_name'] = 'My portal'; $_CONF['site_slogan'] = 'It is only a dream if you are sleeping'; $_CONF['site_mail'] = 'admin@dellsvr'; $_CONF['theme'] = 'XSilver'; // default theme from lib-common.php: require_once( '/geeklog/config.php' ); There it is. The message I get is: Fatal error: Call to undefined function: mysql_connect() in /geeklog/system/databases/mysql.class.php on line 104 Does anybody see or suspect something messed up? Thanks, Rich

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/2002
Posts: 13073
Location:Stuttgart, Germany
I don't think it's a path problem. It looks like your PHP installation doesn't have the MySQL support compiled in. Check the output of <?php phpinfo() ?> - there should be a section on MySQL support. Also, the list of compile options should include --with-mysql. bye, Dirk

Anonymous

Anonymous
Yeah, first mess up -- never post your real database and user name. I hope you didn't do that. This line here should be the path from the root to whereever you have config.php located. You don't have the full path name. $_CONF['path'] = '/geeklog/'; // right off the root; this is where config.php is located These lines here should end in dot something like dellsvr.com. $_CONF['site_url'] = 'http://dellsvr'; $_CONF['site_mail'] = 'admin@dellsvr'; This line may have to be the full path from the root too. At least that's what I had to do to get it to work. from lib-common.php: require_once( '/geeklog/config.php' );

Anonymous

Anonymous
Dang Dirk, did I just post something wrong. His paths don't look right to me.

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/2002
Posts: 13073
Location:Stuttgart, Germany
The $_CONF['path_html'] should start with a slash: /var/... but other than that the setup looks okay to me. I assume "dellsvr" is a valid name on his local network. My point was that mysql_connect() is a function that's built-in (or rather compiled-in) to PHP. So if you get an "undefined function" error for that, something is wrong with your PHP setup. bye, Dirk

RichJ

Anonymous
I have 4.2.2-8.0.5 installed on RH 8. The Descr. in Webmin says: "PHP also offers built-in database integration for several commercial and non-commercial database management systems, so writing a database-enabled webpage with PHP is fairly simple." All I have been able to find that might relate to mysql config is a line in php.ini that was previously commented out: extension=mysql.so -- I removed the comment and restarted Apache to no avail. Dirk, where/how can I run that php command you gave me? This is on a LAN server and I changed the path to include the beginning / Thanks Rich

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/2002
Posts: 13073
Location:Stuttgart, Germany
There's a file called info.php in Geeklog's install directory that does a phpinfo() call. So do a http://yoursite/admin/install/info.php This will produce a page with lots of information about your PHP install. The first block will have a section called "Configure Command". Among the options listed there you should see "--with-mysql". Further down the page should be a separate block with details on PHP's MySQL interface. If you don't have those (search for "mysql" on the phpinfo() output) then that means you don't have MySQL support compiled into PHP. bye, Dirk

Anonymous

Anonymous
Hmmm. phpinfo() shows I have this (and many more): '--with-kerberos=/usr/kerberos' '--with-ldap=shared' '--with-mysql=shared,/usr' '--with-pgsql=shared' but there is not a dedicated table lower down for mysql. In the table called "dbx" mySql is listed as a supported database. Is that consistent with your setup? I did confirm in an independent php script that the same error occurs in attempting to connect to mysql with mysql_connect(...) I have verified that each component works (mysql,apache,php, and apache/php).spent the Where else to go sleuthing? Thanks, Rich

RichJ

Anonymous
Solved! Search for php-mysql-4.2.2-8.0.5.i386.rpm. Apparently RH is not including default support for mySql anymore because they are trying to push postgre. I could not locate this rpm on my CD image. I found it on one of the php forums, but I can't find the link now. If anyone needs the file, just email me. Or, someone tell me how to upload it to this portal and I'll do it. Thanks, Rich---It's only a dream (or nightmare) if you are sleeping.

Status: offline

Dennis

Forum User
Newbie
Registered: 07/01/2003
Posts: 1
Here is the link for the download. http://rpmfind.net/linux/RPM/redhat/8.0/i386/php-mysql-4.2.2-8.0.5.i386.html

Anonymous

Anonymous
I had what appeared to be the same problem. However, I had this rpm installed and still had the same problem. In my case, mod_perl was disabled in http.conf. Make sure perl is installed and mod_perl (for apache) is enabled. The php mysql interface depends on it -Andrew

Anonymous

Anonymous
OK, I got to the end of this thread, and feel like a Newbie agian. I have the same problem, error message etc... I installed Red Hat 8.0, and have the same messages in the test.php (MYSQL support is installed...) I am interested in the MOD_PERL thing. The last writer said that I should just enable it in my http.conf file, ok, well I don't have one! I only have an httpd.conf file, which is fine now, how do I enable something that I don't see there (ie mod_perl). I downloaded the RPM for mod_perl and it says that it is already installed. HELP

All times are EST. The time is now 09:06 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content