Forum Moderators: coopster
Loadmodule...
Apache Config Script :
ScriptAlias /cgi-bin/ "C:/Server/Apache2/cgi-bin/"
ScriptAlias /php/ "c:/Server/php/"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
Action application/x-httpd-php Server/php/php.exe
Like I said before I have not configured my MySQL script. Please ask if you need anymore information. I just want to get this problem solved.
One other thing I would like to add is that I have been able to get phpMyAdmin with XAMP. Though, I can not get it working seperately! It is so irritating!
Thanks for any help,
Rat
[edited by: jatar_k at 2:29 pm (utc) on Aug. 27, 2005]
[edit reason] removed url [/edit]
There are a couple of threads in our PHP Library [webmasterworld.com] that might be handy:
Troubleshooting Steps for PHP/Apache on windows [webmasterworld.com]
Installing PHP5 Under Windows XP and Apache [webmasterworld.com]
Configuration File (php.ini)= Path C:\WINDOWS
It was C:\WINDOWS\php.in, but I deleted the file and now I get C:\WINDOWS... How do I get rid of this, I don't believee I am following the instructions correctly followed on the other webpages... I did put ./in the blanks next to extension dir in my php folder in C:\Server...
Grrr.... Could this be my problem? I didn't set something up correctly.I was also wondering where you put the .dll files at? Do you put those in WINDOWS, system32, or WINDOWS/System? I am so confused...
Rat
# configure the path to php.ini
PHPIniDir "C:/php"
; Directory in which the loadable extensions (modules) reside.
extension_dir = "c:\php\"
I did as you said and added the PHPini Dir to my Apache httpd.confg file and it still wants to give me the error message! I also changed the extension directory to C:\Server\PHP\ext\ and it still does not work. I have a php.ini configuration file in about three directories! I don't know what else to do... Grrr....
I don't know what is wrong! The Apache webserver is running great, and phpinfo.php is displaying on my monitor, but phpmyadmin is not working. I believe I can also access mysql to, but don't know how to unless through cmd prompt... This is racking my brain and is taking forever! Any other advice or information... Here is the APache confg file changes (PHP,Apache, and MySQL are located in C:\Server):
LoadModule php5_module "c:/Server/PHP/php5apache2.dll"
AddType application/x-httpd-php .php
ScriptAlias /php/ "c:/Server/php/"
AddType application/x-httpd-php .php
AddType application/x-httpd-php .phtml
Action application/x-httpd-php Server/php/php.exe
# configure the path to php.ini
PHPIniDir "C:/php"
Now php file changes :
Uncommented:
extension=php_mysql.dll
extension_dir = "c:\php\"
; created my own directory so I can
; manage cleanup of temporary session files:
session.save_path = "C:\Program Files\Apache Group\Apache2\htdocs\tmp"
libmysql.dll. Have you reveiwed the MySQL Functions Installation on Windows Systems [php.net] yet?
My setup is: Windows XP Pro machine w/
Apache 2.0.54, PHP 5.0.4, mySQL 4.1.14 and phpMyAdmin 2.6.4 rc1
PHP seems to be working fine. I have a web-calender program that uses it and a BBS and both have no problems what-so-ever. mySQL also seems to be just dandy, because the Calender and BBS are drawing from it.
phpMyAdmin though, is not dandy. Every time I try to open the index file, I get a "can't find or read config" error, with a link below to the config file.
The only thing I even touched in the config file was the server address. When I click on the file, I get NO error message, nothing, a blank page.
I've got the directory permissions set to everyone has access. I just simply can't get the stupid thing to read the config file that's right under it's nose. Any ideas? Suggesstions?
I am still getting no response... I also tryed inserting this script and end executing it to see if mysql works... This is what I inserted into the php script:
<?php
// Connecting, selecting database
$link = mysql_connect('mysql_host', 'mysql_user', 'mysql_password')
or die('Could not connect: ' . mysql_error());
echo 'Connected successfully';
mysql_select_db('my_database') or die('Could not select database');
// Performing SQL query
$query = 'SELECT * FROM my_table';
$result = mysql_query($query) or die('Query failed: ' . mysql_error());
// Printing results in HTML
echo "<table>\n";
while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) {
echo "\t<tr>\n";
foreach ($line as $col_value) {
echo "\t\t<td>$col_value</td>\n";
}
echo "\t</tr>\n";
}
echo "</table>\n";
// Free resultset
mysql_free_result($result);
// Closing connection
mysql_close($link);
?>
I get the following error when executing it :
Fatal error: Call to undefined function mysql_connect() in C:\Server\Apache2\htdocs\execute.php on line 3
Rat
PHPIniDir "C:/php"
<?php
phpinfo();
?>
; created my own directory so I can
; manage cleanup of temporary session files:
session.save_path = "C:\Program Files\Apache Group\Apache2\htdocs\tmp"
After I did that I restarted the server and looked at my phpinfo.php on my server and found that I could only see sql lite in my phpinfo.php file. I also saw that the Configuration File (php.ini) Path was C:\WINDOWS still... Another thing was when I went to the sessions.savepath I found that no temp folder was created in there at all and there was no folder called temp. The temp information was supposed to go into the php.ini file right?
Another thing I noticed in my php folder was that there were too php files... php.ini.dst and php.ini.recommended(bigger file than php.ini.dst/the file I have now enabled) I will try opening up that file to see if that isn't the problem...
Rat
First I searched my computer and found the php.ini files in three different locations... One was in C:\Server\PHP DIR, another in my C:\Server\Apache2\htdocs DIR, and another was in my WINDOWS DIR. I deleted both the one in the apche2 dir and the windows dir.
That's all good, but now notice what directory your PHPIniDir directive is set to in your Apache config? It is 'c:\php' -- I'm guessing it should be 'c:/Server/php' -- no? The directive in Apache tells it where to find your php.ini file and it isn't going to find it because there is no 'c:/php' directory on your machine. Therefore, as stated in one of the troubleshooting threads earlier, PHP will use it's own *internal* php.ini. That's why the phpinfo() showed you this ...
After I did that I restarted the server and looked at my phpinfo.php on my server and found [...] that the Configuration File (php.ini) Path was C:\WINDOWS still...
It is also why your session.save_path is not reflecting the value you specified. By the way, if I remember correctly, PHP won't create the temp directory for you, you are merely telling PHP where to write the session save file information as it creates and manages sessions. You will probably have to create the directory manually.
Yes, PHP does come with two different options for php.ini initial configuration setups. You can open both and read through them to see which you would rather begin using and make a copy of it to your root PHP directory (which it seems you have already done).
Anyway, get that PHPIniDir directive pointing to your php.ini file's directory ('c:/Server/PHP') and restart Apache. You should then see your extensions and session.save_path directives showing what you expect.
I was wondering though if you knew of any security precautions I can take to secure my webpage/host... I was also wondering if there is a way from to not allow people to access my phpmyadmin file off my site... Do you know how to do this? One more thing is, do you know anything about these two red text prhrases:
The $cfg['PmaAbsoluteUri'] directive MUST be set in your configuration file!
The mbstring PHP extension was not found and you seem to be using a multibyte charset. Without the mbstring extension phpMyAdmin is unable to split strings correctly and it may result in unexpected results.
Thank you so much!
Rat
I can't help you much with PHPMyAdmin, I've never used it. You might try their site forums to see if you can find any discussion or FAQ on securing their software. Perhaps somebody else in this forum has some ideas ...?