Hello,
I'm trying to get php4, apache2, and mysql3.23 to work on an rh9 machine.
I've installed those packages via rpm during the install. If i load this in
a page:
<? phpinfo(); ?>
and call it test.php then browse to it, i get php output. In that output it
is confirmed that mysql support is enabled.
When i installed mysql i ran:
mysql_install_d b
then set a password for the root user. I then logged in as the root user and
ran a grant command for a database i'll call example:
mysql -p
entered the root password:
GRANT ALL PRIVILEGES ON example.* TO
DataBaseUser@lo calhost
IDENTIFIED BY 'password';
this returned no errors. Again, from the mysql commandline i can log in as
this user, and use the database. I can query it, and add/delete information
from it. My problem comes when i try to access the database via a web page,
both httpd and mysql are on the same box, and i get an access denied
message. Here's my connect string:
$connection = mysql_connect(" localhost","Dat abaseUser","pas sword");
mysql_select_db ("example", $connection);
and when i load the page i get the can not connect, access denied.
Suggestions welcome.
Thanks.
Dave. 2 1750
dave <dm*******@woh. rr.com> wrote: Hello, I'm trying to get php4, apache2, and mysql3.23 to work on an rh9 machine. ... this returned no errors. Again, from the mysql commandline i can log in as this user, and use the database. I can query it, and add/delete information from it. My problem comes when i try to access the database via a web page, both httpd and mysql are on the same box, and i get an access denied message. Here's my connect string:
$connection = mysql_connect(" localhost","Dat abaseUser","pas sword"); mysql_select_db ("example", $connection);
you should start by analyzing your log files (usually in /var/log) to
figure out what is going wrong. in httpd.conf, turn on warning and error
displaying/logging if it's not activated already.
i have no experience with rh9 but maybe your apache is running in a chroot
environment for security? (a kind of jail outside which the web server
cannot access anything). in that case, you can try one of the following
(the last option seems best from a security point of view.)
- disable the chroot (check apache documentation)
- use '127.0.0.1' instead of 'localhost' to connect,
- create a softlink to the mysql socket (mysql.sock) in the chroot
directory and copy /etc/hosts and /etc/resolv.conf to the chrootdir
(usually /var/www, so the files become /var/www/etc/hosts etc.)
hope this helps,
steven.
Unfortunately I dont have the solution for you but I have an advice.
Try to install this http://www.webmin.com/ and you will have a better
understanding on what process is running and you will have easier access to
add user in mysql.
Hope it helps
ilo This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Erik |
last post by:
I understand, that PHP4 has a MySQL client built in.
I was warned, that this client does not support the MySQL 4.1.1
system, which I installed on my RH9 box end that I need to install
that version myself in PHP4.
Now how do I install that MySQL client in my PHP4 ?
Or is is easier/smarter to use another MySQL version, one that IS
supported directly by PHP4 ?
|
by: pancho |
last post by:
Greetings, I need help configuring/building PHP3 with MySQL as a DSO
on a Solaris 8 box - this module is needed to host some existing
sites I will be migrating
Note. I built PHP4 from source and it loads without an error.
When I try t run "apachectl configtest" I get the following error:
--
Cannot load /usr/local/apache/libexec/libphp3.so into server: ld.so.1:
/usr/local/apache/bin/httpd:
fatal: relocation error: file...
|
by: porneL |
last post by:
I've had setup on WinXP: Apache1.3 with PHP4 module and PHP5 installedas
CGI for one vhost.
This worked fine, till I installed Zend Studio 4 beta.
I'm trying to make Zend Server use my existing configuration, but without
success.
If I point it to PHP4 php.ini, PHP cannot find (or rather refuses to
load) modules.
If I point it to PHP5 php.ini, I cannot enter server console, because my
php lacks ZendOptimizer
|
by: Klaus Hansen |
last post by:
Hi all
Using Windows XP, PHP4.3.11 and Mysql 4.1.
Im a newbie to PHP and Mysql.
Im trying to connect to the database with this script:
<?php
//list_db.php
|
by: dave |
last post by:
Hello,
I'm trying to do some database work on an rh9 box. I installed httpd2,
mysq, mysql-server, and php4. I'm having difficulties connecting to a
database via a web page. I'm not sure if i missed something during the
install of the rpms or if i have a problem sql wise, and am hoping someone
can help.
When i installed mysql i ran:
mysql_install_db
then set a password for the root user. I then logged in as the root user and
ran a grant...
| |
by: Andy Baxter |
last post by:
hello,
I'm using the php4-mysql module with php4 under debian linux (sarge). I
have a script, schedule.php, which runs fine when I invoke it from the
command line, but fails with the error:
Fatal error: Call to undefined function: mysql_connect() in
/local/rivulet/interface/db.php on line 4
when I try to invoke it as a web page (using apache2). As far as I know,
|
by: Auddog |
last post by:
I'm wanting to work with php4 and want to know which version of mysql to
download that works great with php4 api version 3.23.x?
Thanks for any help you can provide.
A
|
by: doctorhardik |
last post by:
hai all
i am try configure php4.3.9 on my FC-3 machine.
and my mysql database version 5.0.1, in phpinfo file it show mysql but
when i run
php -v command it show error like
|
by: doctorhardik |
last post by:
hai all
i have Fedora3. i am trying to configure mysql5.0.1 with php4.3.9.
when i configure php with --with-mysql=shared,/usr i get mysql.so file.
but in phpinfo page i am not find mysql.
when i configure php with --with-mysql=/usr i am not get mysql.so file. bec i am
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |