1 0 Archive | Tutorials RSS feed for this section

Compile PHP 4 & 5 on Linux with OCI8 Support using Instant Client

I had a headache trying to compile PHP4 and PHP5 with OCI8 support and thanks to some PHP manual comments; I was able to build PHP4 & 5 successfully on Linux. The reason I post this is because this can prove to be a nueisance to people, especially PHP4. So here goes:

For both PHP4 and PHP5 compilations, you must perform the following:

- Download PHP source
- Download Oracle Instant Client (Basic + SDK + SQLPlus (optional) )
- Download libxml (optional)

1. Install the Instant Client RPMs using:

rpm -ivh oracle-instantclient-basic-10.2.0.3-1.i386.rpm oracle-instantclient-devel-10.2.0.3-1.i386.rpm oracle-instantclient-sqlplus-10.2.0.3-1.i386.rpm2.

Set ORACLE_HOME as

export ORACLE_HOME=/usr/lib/oracle/10.1.0.3/client;
export LD_LIBRARY_PATH=/usr/lib/oracle/10.1.0.3/client/lib;

Now to compile PHP4 with OCI8
PHP4 has many problems compiling with OCI8 and the following is a solution.

1. Download latest oci8-package from http://pecl.php.net/package/oci8
2. Extract package somewhere
3. Go to php-4.4.x-source directory
4. rm -rf ext/oci8
5. cp extracted oci8-1.2.x directory to/as ext/oci8
6. make distclean
7. ./buildconf –force
8. ./configure –with-oci8=$ORACLE_HOME (
other options you need)
9.
The compiler needs to find the includes oci.h + others so, from the default client install dirs, edit the php Makefile after it was configured. Open it up and look for “EXTRA_INCLUDES” and add to end of line

-I/usr/include/oracle/10.1.0.3/client (thats a capital i ) save the Makefile, then finish off compiling and installing php.

10. make
11. edit Makefile:
replace:
PEAR_INSTALL_FLAGS = -n -dshort_open_tag=0 -dsafe_mode=0
with:
PEAR_INSTALL_FLAGS = -cpear-install.ini -dshort_open_tag=0 -dsafe_mode=0
12. make install

You should be happy and dandy running PHP4. Also, a note to people who are compiling PHP4. Oracle released patches for the instant client to compile with PHP:

http://www.oracle.com/technology/pub/notes/technote_php_instant.htmlThe patches provided from Oracle are for PHP Versions 4.3.9 or 4.3.10. For PHP5, look in the PHP5 section.

To compile PHP5 with OCI8
Compiling with PHP5 isn’t that different but you don’t need to do all that fuss that was required in PHP4. Also, there is no need for any patches in versions after PHP 5.2.x.

1. After setting up the PHP5 source and Oracle Instant Client’s directories and the variables, run the buildconf script:

./buildconf –force2. ./configure –with-oci8=$ORACLE_HOME (other options you need)
3.
The compiler needs to find the includes oci.h + others so, from the default client install dirs, edit the php Makefile after it was configured. Open it up and look for “EXTRA_INCLUDES” and add to end of line

-I/usr/include/oracle/10.1.0.3/client

(thats a capital i ) save the Makefile, then finish off compiling and installing php.

4. make
5. make test
6. make install
And you’re done.

Please note that I have taken much of this material from the official PHP forums on OCI. If you need help, please visit the following page:

http://www.php.net/manual/en/ref.oci8.php

Also, the php 5.0.3 patch I was talking above can be found here coutesy of

You can apply the patch as follows :

patch -u php-5.0.3/ext/oci8/config.m4 php5_ociclient.patch
cd php-5.0.3
rm -rf autom4te.cache config.cache
./buildconf –force

I hope this will help many people.

Read full story »

Install Visual C++ 6 with SP5 on Vista

1. Firstly, you need to run the Visual Studio 6 setup using ‘Run as administrator’.
2. You can do that by right clicking on the setup file and select ‘Run as administrator’.
3. Ignore any errors Vista gives you while running the setup and ask it never to show you these errors again.
4. During the setup, do not select any options except VC and VB 6 as others have serious compatibility issues.
5. After the setup, restart your PC.
6. There will be another error when Windows starts, ignore it and continue.
7. Go your Service Pack 5 directory and look for a file named ‘sp598ent.stf’.
8. Open the file with a notepad and look for the following value.

13 Group 28 <OTHER NUMBERS>

9. Replace this value with the following value

13 Group 28 38 29 30 32 26 27 14 25 16 17 20 18 19 15 39 21 22 24 23 43

10. Make sure you only correct the numbers by looking at these values and don’t change the spaces.
11. Run the setup, ‘setupsp5.exe’ using ‘Run as Administrator’.
12. Once the setup is complete, you will need to restart the computer and you’re done.

Some people say that you need to have UAC (User Access/Account Control) turned on for this to work, but you don’t. Also, this solution was given by guideX on MSDN forums and the credit goes to him. Thanks.

Read full story »

nvlddmkm.sys error BSOD

I ran into this error quite a lot of times and before Microsoft released the following two patches for Vista, this was the only solution to the error. I found the solution below from a post on a thread, I don’t really remember. So, all teh credit is to that guy.

http://support.microsoft.com/kb/938194 and http://support.microsoft.com/kb/938979

While using Windows Vista, I came across the following error:

nvlddmkm.sys has stopped responding and has recovered or something similar

Its a software issue and not a driver issue.

Method

Note: I am just explaining it as simply as I can. U can modify the solution so it is more precise, if you wish. I just wanted to fix the problem with the minimum of trouble.

1. Turn UAC off. If you like it, then you can keep it running.
2. Uninstall any Nvidia drivers, and delete the remaining files from Program Files (the ones windows lets you delete)
3. Restart the PC into safe mode – (F8 at boot)
4. Find any remaining NVidia driver files (normally start with nv) and delete them.
5. Reboot into normal mode Vista
6. Using Explorer or open My Computer and browse C:\Windows\
7. Right-Click on System32 folder and click ‘search’
8. Enter NV*.sys
9. This will show you all the Nvidia system files in the folder. The ones we are interested in is the ‘nvlddmkm.sys’ and how many copies we have.
10. If you tried multiple install/uninstall you will a few copies of it. I had 19 copies. If you look at the location, they were all in the ‘FileRepository’ folder under different subfolder. Something like nv_as***, nv_io***, etc
11. Note down the name of the sub folders where the file is located, nv_as***
12. So we now know that we have X copies of the nvlddmkm.sys file and what folders they are located in under the FileRep folder. There might be one under the main system32 folder as well. Note it down.
13. Vista has a totally awesome function. ACLs for network geeks…Access-Control Lists or Access-Lists or whatever you want to call them
14. Browse to Accessories from the Start menu (win icon>all programs)
15. Right-Click on command and click ‘Run as Admin’
16. OK so in our Admin CMD window we type the following commands in sequence
17. takeown /f C:\Windows\System32\DriverStore\FileRepository\*.*
18. The command above will give you ownership of all the files under the FileRep folder
19. cacls C:\Windows\System32\DriverStore\FileRepository\*.* /G Username:F
20. Replace username with your windows account name or login name
21. Like magic we are done. Oh and if ur wondering…u cant do the above via GUI. Windows will give you permission but you would still not be able to delete anything ?
22. Earlier we did the search for the nvlddmkm.sys under the system32 folder. Do that again. In the search results, select all the instances of the nvlddmkm.sys file and delete them. OK, next is a totally optional step but I did it to make 100% sure it was all gone.
23. We noted down all the nv_as**, etc folder which had the nvlddmkm.sys file in it, delete the folders and empty ur RecBin
24. Fire up your ForceWare drivers for the install. Disabled ur Aero Vista before hand, it does make a difference.
25. Restart, login, set ur resolution and enjoy the whole error-free nvlddmkm.sys effect.
26. Few notes. Make sure u can see the file extensions and system files are not hidden (blasphemous behaviour for techGeeks).

The whole procedure might sound like a really long way to get the problem sorted out buts its not. When u actually do it u will see that in totally in takes around 10 mins tops to get the whole thing sorted out.

Piece of advice, I don’t recommend u apply the ACL commands to your whole storage systems. I usually enter it for the FileRep folder and ALL my HDDs that used for only data storage, like avi’s, etc.

Read full story »
Page 6 of 6« First...23456