Instalation problem with apache_1.3.41,php-5.2.5,mysql4.1.22
Moderator: General Moderators
Instalation problem with apache_1.3.41,php-5.2.5,mysql4.1.22
1) I am using apache_1.3.41, php-5.2.5 and mysql-4.1.22 on windows XP. I am trying to install all these together but it is not working when they are together. When i try to run the test.php (phpinfo()) it is not showing MySQL.
2) Also when i try to run the below code it is showing the following error:
Fatal error: Call to undefined function mysql_connect() in C:\ApacheServer\Apache\htdocs\testmysql.php on line 12
Below is the code:
<?php
// hostname or ip of server (for local testing, localhost should work)
$dbServer='localhost';
// username and password to log onto db server
$dbUser='root';
$dbPass='test';
// name of database
$dbName='test';
$link = mysql_connect("$dbServer", "$dbUser", "$dbPass") or die("Could not connect");
print "Connected successfully<br>";
mysql_select_db("$dbName") or die("Could not select database");
print "Database selected successfully<br>";
// close connection
mysql_close($link);
?>
I appreciate your help and time.
Let me know if you need any other files or information regarding setup.
Thanks in advance.
2) Also when i try to run the below code it is showing the following error:
Fatal error: Call to undefined function mysql_connect() in C:\ApacheServer\Apache\htdocs\testmysql.php on line 12
Below is the code:
<?php
// hostname or ip of server (for local testing, localhost should work)
$dbServer='localhost';
// username and password to log onto db server
$dbUser='root';
$dbPass='test';
// name of database
$dbName='test';
$link = mysql_connect("$dbServer", "$dbUser", "$dbPass") or die("Could not connect");
print "Connected successfully<br>";
mysql_select_db("$dbName") or die("Could not select database");
print "Database selected successfully<br>";
// close connection
mysql_close($link);
?>
I appreciate your help and time.
Let me know if you need any other files or information regarding setup.
Thanks in advance.
- EverLearning
- Forum Contributor
- Posts: 282
- Joined: Sat Feb 23, 2008 3:49 am
- Location: Niš, Serbia
Re: Instalation problem with apache_1.3.41,php-5.2.5,mysql4.1.22
Did you enable mysql extension in php.ini?
Re: Instalation problem with apache_1.3.41,php-5.2.5,mysql4.1.22
Yes, it is enabled.
Here is the code from php.ini file.
; Local Variables:
; tab-width: 4
; End:
[PHP_MYSQL]
extension=php_mysql.dll
I have installed Apache and then PHP. So while i was installing PHP i have selected only MySQL extension (i did not installed any other extension).
Thanks,
Here is the code from php.ini file.
; Local Variables:
; tab-width: 4
; End:
[PHP_MYSQL]
extension=php_mysql.dll
I have installed Apache and then PHP. So while i was installing PHP i have selected only MySQL extension (i did not installed any other extension).
Thanks,
- EverLearning
- Forum Contributor
- Posts: 282
- Joined: Sat Feb 23, 2008 3:49 am
- Location: Niš, Serbia
Re: Instalation problem with apache_1.3.41,php-5.2.5,mysql4.1.22
Check to see if you're editing the wrong php.ini file. Apache searches for it in several locations(read the install.txt for php5).
Other possibility is that php cant find the libmysql.dll file, which is needed for mysql extension, so copy it from php folder(it sits in the root) to windows/system32/ folder.
Other possibility is that php cant find the libmysql.dll file, which is needed for mysql extension, so copy it from php folder(it sits in the root) to windows/system32/ folder.
Re: Instalation problem with apache_1.3.41,php-5.2.5,mysql4.1.22
Hi Mark,
I copied the libmysql.dll file to windows/system32/ folder. But did not work out.
I tried to read the install.txt file but i couldn't found any location mentioned in the install.txt file. Besides that i am not too technical, i am just trying to start learning PHP by installating it. but i am failing in the first step itself
.
Let me know if you need any files to be uplaoded.
Thanks,
Kalyani
I copied the libmysql.dll file to windows/system32/ folder. But did not work out.
I tried to read the install.txt file but i couldn't found any location mentioned in the install.txt file. Besides that i am not too technical, i am just trying to start learning PHP by installating it. but i am failing in the first step itself
Let me know if you need any files to be uplaoded.
Thanks,
Kalyani
- EverLearning
- Forum Contributor
- Posts: 282
- Joined: Sat Feb 23, 2008 3:49 am
- Location: Niš, Serbia
Re: Instalation problem with apache_1.3.41,php-5.2.5,mysql4.1.22
And are you sure you're editing the right php.ini? Apache wont look in the folder you set PHP in, unless you add that folder to the windows PATH variable.
Try copying your php.ini it to folder where you installed apache or to windows/ folder.
Try copying your php.ini it to folder where you installed apache or to windows/ folder.
Re: Instalation problem with apache_1.3.41,php-5.2.5,mysql4.1.22
This is what i have in my Environment varibales path: C:\ApacheServer\PHP\;
and the path for PHP, APache and MySQL are under C:\ApacheServer
i.e., C:\ApacheServer\PHP
C:\ApacheServer\Apache
C:\ApacheServer\MySQL
Thanks,
Kalyani
and the path for PHP, APache and MySQL are under C:\ApacheServer
i.e., C:\ApacheServer\PHP
C:\ApacheServer\Apache
C:\ApacheServer\MySQL
Thanks,
Kalyani
- EverLearning
- Forum Contributor
- Posts: 282
- Joined: Sat Feb 23, 2008 3:49 am
- Location: Niš, Serbia
Re: Instalation problem with apache_1.3.41,php-5.2.5,mysql4.1.22
Is your extension_dir setting in php.ini set to a correct value?
Try changing some setting in php.ini like memory_limit to some other value, and then check to see if it changed(use phpinfo() ) to confirm apache is reading your php.ini file.
You did restart apache server after your changes in php.ini?
Try changing some setting in php.ini like memory_limit to some other value, and then check to see if it changed(use phpinfo() ) to confirm apache is reading your php.ini file.
You did restart apache server after your changes in php.ini?
Re: Instalation problem with apache_1.3.41,php-5.2.5,mysql4.1.22
It doesn't look like apache is able to read the php.ini file. As you said i have changed the values of memory_limit and restarted the apache and refresh the phpinfo(). It is still showing the old values.
Thanks,
Kalyani
Thanks,
Kalyani
- EverLearning
- Forum Contributor
- Posts: 282
- Joined: Sat Feb 23, 2008 3:49 am
- Location: Niš, Serbia
Re: Instalation problem with apache_1.3.41,php-5.2.5,mysql4.1.22
Then move your php.ini to apache or windows/ folder and restart apache again.
Re: Instalation problem with apache_1.3.41,php-5.2.5,mysql4.1.22
Mark, I have one more question
If apache is not able to read the php.ini file then how come it is showing the values in phpinfo(). Where are the values coming from.
I have compared the php.ini file values (display_errors, register_long_arrays) with phpinfo() and it looks different.
Thanks,
Kalyani
If apache is not able to read the php.ini file then how come it is showing the values in phpinfo(). Where are the values coming from.
I have compared the php.ini file values (display_errors, register_long_arrays) with phpinfo() and it looks different.
Thanks,
Kalyani
Re: Instalation problem with apache_1.3.41,php-5.2.5,mysql4.1.22
I tried to move the php.ini file to Apache folder but no luck.
Thanks,
Kalyani
Thanks,
Kalyani
- EverLearning
- Forum Contributor
- Posts: 282
- Joined: Sat Feb 23, 2008 3:49 am
- Location: Niš, Serbia
Re: Instalation problem with apache_1.3.41,php-5.2.5,mysql4.1.22
First, my name is not Mark, its just whose quote it is in the signature(Tom Sawyer by Mark Twain ring a bell?)
.
And as for where are values coming from, those are default values for PHP settings.
php.ini file is for your adjustments.
And as for where are values coming from, those are default values for PHP settings.
php.ini file is for your adjustments.
- EverLearning
- Forum Contributor
- Posts: 282
- Joined: Sat Feb 23, 2008 3:49 am
- Location: Niš, Serbia
Re: Instalation problem with apache_1.3.41,php-5.2.5,mysql4.1.22
Move it then to windows folder.
And are you working with "php.ini" file or with "php.ini-dist" or "php.ini-recommended"?
And are you working with "php.ini" file or with "php.ini-dist" or "php.ini-recommended"?
Re: Instalation problem with apache_1.3.41,php-5.2.5,mysql4.1.22
Oops I am so sorry. i am not good at books
So now i am excited to know your name then
Anyways i am using php.ini file only. i don't have "php.ini-dist" or "php.ini-recommended" files.
Now i moved php.ini file to Windows > System32 and it is still not working.
Thanks,
-Kalyani
Anyways i am using php.ini file only. i don't have "php.ini-dist" or "php.ini-recommended" files.
Now i moved php.ini file to Windows > System32 and it is still not working.
Thanks,
-Kalyani