php install question

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
tcl4p
Forum Newbie
Posts: 15
Joined: Mon Apr 02, 2007 9:28 am

php install question

Post by tcl4p »

I running apache 2.2 on vista home preium along side php5.2.9 with mysql 5.1.3 and things seemed to go OK with the install except for two problems. When I run http://localhost/ what I get is the " It Works! " from apache, but I have set up an index.php scrip which runs the phpinfo() function. If I add http://localhost/index.php, I see the php information page. I set the documentroot and directory to point to my htdocs directory where the index.php script resides. I added the addtype line AddType application/x-httpd-php .php .php5 .php4 .php3 .phtml as well. Can anyone give me any other avenues to look at to see why the php info page doesn't run with the http://localhost/?
The second problem has to do with mysql and the fact the phpinfo page doesn't see mysql. I did un-comment the extension=php_mysql line and I can open and see my mysql database via phpmyadmin. Again if anyone has any insight into this problem I would appreciate any help.

Thanks,
Tom
User avatar
Popcorn
Forum Commoner
Posts: 55
Joined: Fri Feb 21, 2003 5:19 am

Re: php install question

Post by Popcorn »

re the index.php, apache must know what to serve if it is asked for a directory. check you have:
"DirectoryIndex index.php" in your apache config.

for MySQL, one thing would be to suggest that you check the port PHP looks for matches the port you set MySQL to listen on (if memory serves, port 3306 by default).
tcl4p
Forum Newbie
Posts: 15
Joined: Mon Apr 02, 2007 9:28 am

Re: php install question

Post by tcl4p »

First, thanks for the reply. I did make sure the DirectoryIndex includes index.php. I also made sure that the port 3306 was open for mysql. I should mention that I can run php scripts that contain only php and no mysql without problem. I'm also using Zend Studio and can run my php scripts with Mysql from within Zend Studio without problem seeing results in the Zend browser window. When I run phpinfo i can see the mysql and mysqli properties. I put together a small php script that doesn't do anything other then connect to the mysql database, but even this fails and the error message I get from vista is there was a network timeout.
Unfortunately this still leaves me in the situation where I can't run php mysql scripts in the browser.
If anyone has any ideas I would appreciate your help.

Regards,
Tom
Post Reply