p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

php_website_programming thread: Newbie to PHP (CGI) on WIndows ME under badblue


Message #1 by "Steve Hall" <steve@m...> on Tue, 18 Feb 2003 08:22:40
Hey Steve,

> I installed PHP in the standard way. I have abandoned APache for now and am
> running under BadBlue CGI server on windows ME.
>
> I created a .htaccess file and added
>             php_value "register_globals" "1"


Does BadBlue support .htaccess files?  I'm not sure that it does.  You might
have to configure PHP entirely within the php.ini file.



> Problem 1
> ******************************************
> I am trying to run a demo application from PHP4 Web Development Solutions -
> Wrox Publishing
>
> In that demo I get the following error:-
>
> Fatal error: Call to undefined function: preparedevice() in
> C:\PHP4\Ch04\index.php on line 14
>
> This function is in an ./include/utils.inc.php file but doesn't seem to be
> seen by the PHP system.

Did you include the file?  My guess is that you haven't, since if you
attempted to include the file and failed, you'd see a warning or error that
the file wasn't included.

If you did include the file, then you wouldn't get the undefined function
error.



> Problem 2
> ******************************************
> I noticed that the PHP folder had a index.php file so I tried to open it!
> and got this error - are these two problems connected?
>
> Warning: mysql_connect() [function.mysql-connect]: Can't connect to MySQL
> server on 'localhost' (10061) in C:\php\core\mysql.lib.php on line 5
>
> Warning: mysql_select_db() [function.mysql-select-db]: Can't connect to
> MySQL server on 'localhost' (10061) in C:\php\core\mysql.lib.php on line 6
>
> Warning: mysql_select_db() [function.mysql-select-db]: A link to the server
> could not be established in C:\php\core\mysql.lib.php on line 6
> Can't connect to MySQL server on 'localhost' (10061)


Your MySQL problems are probably due to one or both of the following:

  *  You don't have MySQL installed.
  *  You didn't modify the index.php file to use the correct username and
password to connect to MySQL.  This implies having a valid username/password
set up in MySQL.



Take care,

Nik


  Return to Index