Jump to content

Archived

This topic is now archived and is closed to further replies.

onlyican

Zend Studio, Windows and MySQL

Recommended Posts

Hey guys

I just downloaded Zend Studio
Got to say, I am loving this shing ding (Tryna cut down on my swearing)

BUT
if I type a MySQL function, it comes up with an error

So this tells me that the MySQL is not set up in the settings

I looked for the php.ini file

and it is basic
If you know Zend Studio ya know wha I mean
If not
Then under php5
The php ini is

[quote]zend_extension_ts=C:\Program Files\Zend\ZendStudio-5.2.0\lib\php5\ZendDebuggerLocal.dll
zend_debugger.allow_hosts=127.0.0.1/32
session.save_path=C:\Program Files\Zend\ZendStudio-5.2.0\tmp
[/quote]

I done a search for other php.ini files
Theres one in php4 (basicly the same)
and one somewhere else, which is blank

So anyone know how I can get this to work with MySQL?

Share this post


Link to post
Share on other sites
Make sure the MySQL extension is enabled.

Could you possibly paste the error here?

Share this post


Link to post
Share on other sites
how do I enable the MySQL extension??
the full code is
[code]
<?php
$db = mysql_connect("localtion","root","root");
mysql_select_db("market",$db);
?>
[/code]
This is something I just done quickly
Then I hit Debug
The error on the Debug Output is
[quote]
Fatal error: Call to undefined function mysql_connect() in PHPDocument1 on line 2
[/quote]

Now, my first post has the php.ini file. SO i am lost

Share this post


Link to post
Share on other sites
You need to edit the php.ini and configure the [b]extension_dir[/b] directive to point to the PHP extensions folder. The extension folder is located in side the folder you have installed PHP to. So if you have installed PHP in the root of your hard drive in a folder called php. Then the path to the PHP extension folder will C:\php\ext

The next step is to remove the semi-colon (;) from the the start of [b]extension=php_mysql.dll[/b]

Share this post


Link to post
Share on other sites
Ah, Umm I'm not sure. I guess it'll be a good idea to check out the zend studio manual. Should be discussed in their somewhere

Share this post


Link to post
Share on other sites
I think adding the lines what wildteen mentions should make it work.
Or you could install [url=http://zend.com/platform]Zend Platform[/url] and configure Zend Studio to use that as its debugger. It is free for development purposes.

That would give you more features too. Like profiling.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.