Wednesday, December 1, 2010

Install PHP 5.3.3 for IIS7 in Windows 7

1. Enable IIS 7 from Control Panel>Programs and Features>Turn Windows Features on or off, and make sure CGI feature is selected.

2. download and Unzip the PHP5.3.3 package in c:\php5.33

3. Configure IIS7 to support PHP5.3, that involves couple of steps:
1). Launch Internet Information Services (IIS) Manager from Control Panel>System and security>Administrative Tools
2). Browse to FastCGI and open it, and then hit [Add Application], in the [Full Path], enter C:\php5.33\php-cgi.exe (that is my case), final hit [OK] button.
3). Back to IIS main page, open [Handler mapping], hit [add module mapping], enter *.php in the [request path] field, and select FastCgiModule from the Module dropdown list, enter C:\php5.33\php5-cgi.exe in the [Executable] textbox, and enter php in the [name] filed, finally hit [OK], and confirm the creation.
4).From IIS7 main page, open the [default document], and add index.php to the default document list.

4. Back to c:\php5.33 folder, make a copy of php.ini-development, and rename it to php.ini; and open Computer Properties, and add C:\php5.33 to the environmental variable PATH. Next edit php.ini to enable php_mysql module or more, and set the timezone to your area, for example, America/Los_Angeles.

5. Make sure Network service and local service have read access to c:\inetpub\wwwroot, and give IUSR and IIS_IUSR users the read/execute rights in c:\php5.33 folder.

6. Restart the Word Wide Web publishing service.

7. Open your browser and navigate to a php page, and it's done, and you can test from the Command line with this command: php.exe -i

Wednesday, November 17, 2010

SQL Server does not exist or access denied.

I installed Primavera P6 R8 Professional EPPM on a Windows Server 2008 based Terminal Server, and the database already installed and tested on a dedicated MS SQL Server. When the installation wizard run dbconfig.exe to configure the database connection, I got this error message:

Bad public user name or password. [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.

Because in the same terminal server, Primavera P6 V7 is connecting to the same SQL Server without any problem. In another Windows Server 2008 R2 with P6 R8 installed, we can connect to the same database in the SQL Server. SQL Server 2005 Backward Compatibility package already installed. I think the problem must be in the Windows Server 2008. First, check the Firewall settings, and in the Exceptions tab, I did not see anything related to P6 Professional EPPM being showed there. So I hit the Add Program, and select P6 Professional, and hit OK return. Run P6 Professional again. Bingo, this time it works.

Tuesday, November 2, 2010

Error at object ‘DatabaseSelection’ in markup file

I tried to install AdventureWorks OLAP and OLTP Sample by running AdventureWorks2008_SR4.exe on SQL Server 2008 Standard Edition, but after I accepted the license agreement, the installation gave me this error:

Failed object initialization (ISupportInitialize.EndInit). An exception occurred while executing a Transact-SQL statement or batch. Error at object ‘DatabaseSelection’ in markup file ‘DatabaseInstaller;component/databaseselection.xaml’ Line 78 Position 3.

Then I launched the SQL Server Configuration Manager, and I found there are 3 instances running in my desktop: ACT7, SQL Express, and MSSQLSERVER. Only MSSQLSERVER instance is SQL Server 2008, the other two are SQL 2005. I guess the installation have not ability to identify which one is SQL Server 2008 instance, and already pick up the wrong instance to connect, so I stopped the two SQL Server 2005 instances, and run the AdventureWorks2008_SR4.exe again. I found the error's just gone.

It looks like the installation need to be improved so that user can select the instance to install when multiple instances exist.

Friday, July 9, 2010

Exception setting "ViewEntireForest": "Could not find any Domain Controller in domain myoffice.local

Tried to run Exchange 2007 server EMS(Exchange management shell), and most of time, I got this error:

Exception setting "ViewEntireForest": "Could not find any Domain Controller in domain myoffice.local. The myoffice.local is up and running and all other machines did not complain the main. I run nslookup against this domain in the exchange server without any error. I remember I can use the lmhosts file to define the location of the domain, so I put a line below in the end of the lmhosts file, and it fixed my error:

192.168.1.20 MylocalDomain #PRE #DOM:myoffice.local

Tuesday, July 6, 2010

Bad public user name or password. Database Server Error: ORA-28001: the password has expired

One of our Primavera user tried to login to Project Management it is coming up with , and the user select to configure the database connection, but in the end, it gave the following error message:
"Bad public user name or password. Database Server Error: ORA-28001: the password has expired;"

I helped them to fix by the steps below:

1. Open a DOS Prompt, and type the command below:
sqlplus /as sysdba

2. After you see the SQL prompt, type the SQL statement below:

CREATE PROFILE Primavera_Profile LIMIT PASSWORD_LIFE_TIME UNLIMITED;

alter user pubuser PROFILE Primavera_Profile;
alter user privuser PROFILE Primavera_Profile;

NOTE: the user above may need to be changed if pubuser1 or privuser1 is used.
3. Try to launch your PM6 again.

Monday, June 28, 2010

Manually remove mpstxgx.exe or rttrwq.exe trojan

Kaspersky V6.0 reported there is a trojan named mpstxgx.exe on my PC, and Kaspersky tried to deleted the mpstxgx.exe file, but it was created again and again in the C:\ and D:\. I have to remove this Trojan manualy.

After did some research, I knew these files are related to this Trojan: mpstxgx.exe, rttrwq.exe, and mkfght0.dll. To remove mpxstxgx.exe, I first restart the Windows XP to Safe mode with Command Prompt, then from type the commands below:

c:\>attrib -r -s -h autorun.inf
c:\>del autorun.inf
c:\>attrib -r -s -h mpstxgx.exe
c:\>del mpstxgx.exe
c:\>attrib -r -s -h \windows\system32\rttrwq.exe
c:\>del \windows\system32\rttrwq.exe
c:\>attrib -r -s -h \windows\system32\mkfght0.dll
c:\>del \windows\system32\mkfght0.dll
c:\>D:
D:\>attrib -r -s -h autorun.inf
D:\>del autorun.inf
D:\>attrib -r -s -h mpstxgx.exe
D:\>del mpstxgx.exe


After that, restart my PC to Windows XP normal mode. run regedit from CMD. and change the CheckedValue value in this location from 0 to 1:

HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\
Advanced\ Folder\Hidden\SHOWALL\

That's done.

Wednesday, June 16, 2010

The performance counter registry hive is corrupted

One client tried to install SQL Server 2008 in their Windows Server 2003 (Simplified chinese edition), and he got the error below when setup check system:

The performance counter registry hive is corrupted.

Followed the instructions on http://support.microsoft.com/kb/300956 did not work. But the instructions on http://connect.microsoft.com/SQLServer/feedback/details/312847/performance-counter-registry-hive-consistency-check-failed-at-traditional-chinese-windows-server-2003
fixed the issue, and what I did is to export the 009 subkey in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib to a file, then edit the file , and change the value from 009 (English) to 004 (Chinese culture). Next, import the registry file to Windows Registy.

Thursday, June 10, 2010

Primavera gave ORA-12545:Connect failed because target host or object does not exist.

A fellow me and said he got the error below after installing Oracle Primavera P7:

ORA-12545:Connect failed because target host or object does not exist.

I asked him to remove Oracle 10g Express Edition and Oracle Primavera P6 Ver 7, then reinstall again, the problem got fixed.

This error is usually caused by the host setting in both tnsnames.ora and listener.ora. If ip address is used rather hostname, this issue should go away.

Saturday, June 5, 2010

Primavera P3.1 running on Windows XP SP3 issue

One client called me yesterday said his Primavera P3.1 suddenly had problem on the resources module since last month, and it worked fine before. I know P3.1 is a 16 bit application and it won't work in 64 bit system. But his issue for P3.1 was totally different, because only the resources linked to the activity had problem. The symptom is when you select an activity, and click on the Resources tab, and add/change resources for the activity, the entire P3.1 application was close without any warning. I reinstalled P3.1 without luck, and set P3.1 to run compatible with Windows 98 did not fixed. I concluded P3.1 conflicted with other applications running in the background, so I launch msconfig and disabled suspected background services, restarted the windows, and Ooh, the issue's gone! I took me almost 1.5 hours to resolve this problem.

Configure Oracle Instantclient for Primavera P6 Version 7

Primavera P6 Version 7 comes with Oracle 10g Express Edition, and when you install Primavera P6.7 using Standalone option, Oracle 10g Express is automatically installed. But I found a lot of people have problem getting Oracle working with Primavera P6. One of problem is the configuration of Oracle Instantclient. Here is my experience of configuring Oracle Instantclient.

First, you need to download a 32 bit Oracle instantclient even you are installing Primavera in a 64 bit operating system like Windows 7 or Windows Server 2008 R2. The url is http://www.oracle.com/technology/software/tech/oci/instantclient/index.html. After download, unzip this file in folder in your local drive, i.e. c:\instantclient_10.2, then add this folder to the PATH system environment variable from the advanced settings in the Properties of My Computer.
You don't need to configure the tnsnames.ora file, but in case, your Oracle Connection String must use Oracle Easy Connection format like //mymachine.mydomain:port/XE or mymachine.mydomain:port/XE, for example, enter connection string as 192.168.0.10:1521/XE.

If you opt to use tnsnames.ora, the content of this file should look like below:

XE =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.10)(PORT = 1521))
)
(CONNECT_DATA =
(SID = XE)
(SERVER = DEDICATED)
)
)


Then, add TNS_ADMIN to your Windows environment variables, the value of TNS_ADMIN is the path to your Oracle Instantclient, i.e. c:\instantclient_10.2, finally restart your Windows. After that, when Primavera prompts for the oracle Connection String, just enter XE. If you don't configure oracle Instantclient properly, the typical error you got is this one:

Bad public user name or password. database server error: ORA-12154: TNS:could not resolve the connect identifier specified.

For more information about Instantclient ,please check http://download.oracle.com/docs/cd/B19306_01/server.102/b14357/ape.htm.

Bad public user name or password. Database Server Error: ORA-12170: TNS:Connect timeout occurred

Today I received a phone call from a client, he said when he tried to connect to Oracle from Primavera P6 V7, he got the error below:

Bad public user name or password. Database Server Error: ORA-12170: TNS:Connect timeout occurred

Because he was able to connect to the database in oracle 10g XE with Prmavera project management, and he claimed he did not change the configuration , so firewall or Oracle Instantclient settings should be fine. I further contacted his IT people about the Oracle server. He mentioned he did disable the Large Send Offload for the network adapter in the Oracle server yesterday, and the IT guy said he did not find any connection problem yet. But I think the ORA-12170 error should be caused by this change, and I asked him to disable the network adapter, then enable it again, finally restart the Oracle instance. After that, the ORA-12170 error's gone.

Sunday, May 30, 2010

String or binary data would be truncated.

Just helped a client to upgrade Primavera Expedition V7 to Primavera Contract Manager V12. Then my client reported to me they received the error below in random:

SQLServerException: String or binary data would be truncated.

Checked the JBoss log, I got the full error below:

2010-05-30 10:59:57,281 INFO [STDOUT] DatabaseMgrSessionBean.executeUpdate the update statement is : UPDATE rqch SET rqch.change_number = '00005', rqch.change_date = '2010/05/26' , rqch.title = 'CCO #04-R1 Berth 3 Loading Cage Roof', rqch.additions = 0.0, rqch.deductions = 2733.000, rqch.chng_master_key = '000XXJZEK2169000000000file', rqch.chng_sys_item_type = 'CO', rqch.created_system = 'WEB', rqch.last_edit_system = 'WEB' WHERE rqch.master_key = '00057KdEK1010000000000CPM0'
2010-05-30 10:59:57,296 INFO [STDOUT] ERROR - DatabaseMgrSessionBean.executeUpdate SQLException :
2010-05-30 10:59:57,296 ERROR [STDERR]
com.microsoft.sqlserver.jdbc.SQLServerException: String or binary data would be truncated.

After further analyzed the SQL statement, I found the title field in rqch table is too short (varchar(32)), I changed it to varchar(80), and "String or binary data would be truncated." error disappears.

There was an error in communicating with Excel Calculation Services

Tried to install MOSS 2007 and integrate Primavera With MOSS 2007. However, I got the error message below when testing Sharepoint Server 2007 with Excel Services:

There was an error in communicating with Excel Calculation Services http://sharepoint2007:56737/SharedServices1/ExcelCalculationServer/ExcelService.asmx exception: The request failed with HTTP status 401: Unauthorized. [Session: (null) User: MyLocalDomain\administrator].

I tried all recommendations I got from Internet about this error in the Sharepoint 2007, including using Kerberos authentication, but none of them works. However, I got a tip from an article from Microsoft about using authdiag.msi, I installed authdiag.msi and it detected the error below:

AllowKeepAlive: NTLM requires KeepAlive connections

Then I jumped to IIS Manager, and checked Enable AllowKeepAlive option for all Sharepoint Websites. Immediately, my Sharepoint 2007 was able to open an Excel Workbook in the report dashboard, and the annoying error of "The request failed with HTTP status 401: Unauthorized. " had just gone. My life was saved.

Wednesday, May 12, 2010

How to find Primavera P3 users

Primavera P3 is very old now, but some people still use it. Some time you may forget what user is registered for the P3 login. Here is how to find it:

Browse to your P3 PC, and go to c:\p3win\p3work, open the file named userfil.p3 using a Hex editor such as WinHex and Ultra-Edit, starting from offset 00000820, 8 bytes for user name. You can even remove the password in this file.

How to find Primavera P3 users

Primavera P3 is very old now, but some people still use it. Some time you may forget what user is registered for the P3 login. Here is how to find it:

Browse to your P3 PC, and go to c:\p3win\p3work, open the file named userfil.p3 using a Hex editor such as WinHex and Ultra-Edit, starting from offset 00000820, 8 bytes for user name. You can even remove the password in this file.

Friday, May 7, 2010

Do you know Primavera Applications?

I did not know about Primavera until I got a job deals with primarily Primavera based applications. If I ask you what software is widely used in project management for large projects, and you properly say MS project. Yes, MS Project definitely is one of the applications, but I can tell you Primavera should be the most powerful one.

Primavera is acquired by Oracle in the year of 2008, and its product line includes Primavera Project Management, Contractor, Contract Management, Risk Management, Earned Values Management, and Portfolio Management, and so on. I think the most popular software are Primavera Project Management and Contract Management. The current Primavera Project Management software is called P6, latest version is P6 Version7, and old versions include P5, P4, P3EC, P3. The latest version of Primavera Contract Management is V13, and early version is called Primavera Expedition.

To learn more about Primavera applications, please visit Oracle.com.