Forums

This topic is locked

Help! An unidentified error has occurred

Posted 11 Oct 2003 10:07:45
1
has voted
11 Oct 2003 10:07:45 john henderson posted:
Hi Guys,
I posted this in the PHP section but got no help. I am in a bit of a dilema here, I am using dream weaver 6.0 to build a dynamic web site with apache, php and mysql. Every thing seemed to be working fine until I installed version 7.0. Now when I try connecting to an existing database, dreamweaver can't find it. I even went to macromedia web site and found that this is a known problem. But is still did not help me to solve the problem. I know that it is to do with the 2 files in the _mmserverscripts folder. But I do not know what to add to them. Much appreciate any thing on this

cheers

John

cheers

John

MySql - Apache - PHP - Dreamweaver MX

Replies

Replied 05 Mar 2006 17:15:06
05 Mar 2006 17:15:06 bryan daniel replied:
After 2 grueling days of trying to figure this out, I finally was able to resolve the issue with the infamous “an unidentified error has occurred” while trying to load/identify a MySQL database within DreamWeaver MX 2004. The problem is with PHP, not DWMX 2004.

I’m sure some of this may not be accurate however I tested this on two machines running Windows XP SP2 and both times this worked. I’m assuming you’ve got the MySQL files installed and the ODBC driver installed as well. I’m not responsible for anything you do to your machine. With that said, I hope this post saves someone a lot of time.

Files I have installed or versions I have running:

IIS v5.1 (Windows XP Pro SP2)
DreamWeaverMX 2004 v7.0.1
Mysql-essential-5.0.18-win32.msi
Mysql-connector-odbc-3.51.12-win32driver.msi
Mysql-administrator-1.1.8-win.msi
Mysql-query-browser-1.1.20-win.msi
Php-5.1.2-win32.zip (this is the manual install file, not the windows installer .exe file)

The following are condensed directions that come from the install.txt file within the PHP .zip:

1.) If you were like me and tried installing a previous version of PHP, you must uninstall EVERYTHING. When removing the previous versions of PHP, select CUSTOM and select everything (.dll and .ini files especially). This is what I did, you may not have to. Backup if you must, I didn’t….. I like to live dangerously 

2.) Extract php-5.1.2-win32.zip to a folder. I used C:\PHP. I had to create the folder
PHP because v5.1.2 doesn’t create this folder for you. You may choose a
different location but do not have spaces in the path (like C:\Program
Files\PHP) as some web servers will crash if you do.

3.) The CGI and CLI binaries and the web server modules all require the php5ts.dll file to be available to them. You have to make sure this file can be found by your PHP installation. To make php5ts.dll available (install.txt says you have 3 options, I used the recommended option) add your PHP directory (C:\PHP in my case) to your PATH. To add to your PATH (Windows XP Pro):
a. Control Panel > System
b. Click on the “Advanced” tab
c. Click the “Environment Variables” button
d. Look in the “System Variables” pane and scroll to PATH
e. Double click PATH
f. Enter your PHP directory at the end, including ‘;’ before (e.g. ;C:\PHP) my entire PATH line looks like this: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\MySQL\MySQL Server 5.0\bin;C:\PHP
g. RESTART your computer. Shut down all the way, don’t just logoff/on.

4.) The next step is to set up a valid configuration file for PHP, php.ini. There are 2 files distributed with the .zip file, php.ini-dist and php.ini-recommend. The –dist file is what I used, the –recommend file is “optimized for security and performance”. Take your pick and rename the file to PHP.INI and place it in the C:\WINDOWS directory.

5.) Open the newly created PHP.INI file to edit. Click EDIT > FIND (ctrl+f) and search for string DOC_ROOT. Should be the first string you come to. Change the line to read: doc_root = “c:\inetpub\wwwroot\” or whatever your web servers document_root folder is. The folder I have selected is the default folder for IIS. (Notice quotation marks)

6.) I also edited the following: extension_dir = “c:\php\ext” (again, quotation marks). This is the default location for the extensions installed.

7.) Once the extension directory is named, you need to enable the extension(s) you want to you use by ‘uncommenting’ the extension=php_*.dll lines in the PHP.INI file. This is done by deleting the leading ; from the extension(s) you want to load. Example: to enable Bzip2 extension for PHP-Windows:
//change the following line from………
;extension=php_bz2.dll

//……..to
extension=php_bz2.dll

*****NOTICE the semi-colon before the word extension is removed******

I enabled all of the extensions for safe keeping. Do what you like. Make sure you enable extension=php_mysql.dll.

****After you modify the PHP.INI file, you are to RESTART for changes to take effect. Can’t just copy/paste and expect changes to take effect. Trust me…. And the installation file says so 

8.) PHP may be installed as a CGI binary, or with the ISAPI module. I did the ISAPI module so I could perform HTTP authentication using PHP. The install.txt file explains both however. To use ISAPI module do the following:
a. Go to Control Panel > Administrative Tools
b. Right click you ‘web sites’ or ‘default web site’ node and select Properties
c. Under ISAPI FILTERS, add a new ISAPI FILTER. Use PHP as the filter name, and supply a path to the php5isapi.dll.
d. Under HOME DIRECTORY change the Execute Permissions to ‘scripts only’.
e. Click the “Configuration” button and choose the Application Mappings tab. Click Add and set the Executable path to the appropriate ISAPI .DLL. For my computer it was C:\php\php5isapi.dll. Use PHP as the extension. Check the “Script Engine” checkbox. Click “OK” a few times and RESTART the computer. Do not just Logoff/on.

9.) That worked for me. Hope this simplified version helps.

Reply to this topic