Wednesday, August 3, 2016

FoxPro: Table '' has become corrupted. The table will need to be repaired before using again.

I came across this error while trying to run an old foxpro application to analyse and understand some functionality which i need to replication in an new application that am working on.

Quick google search helped me fix it fast, might not be the appropriate way but it gave me a swift go towards my goal.
Am using VFP 9.0 IDE, so follow and type these commands in your command window


  1. CD to the path location to the corrupt table.
  2. SET TABLEVALIDATE TO 0 && this disables table validate for the current session
  3. USE size && open, select the corrupt table
  4. COPY STRUCTURE TO size1 && copy table structure to a new temp table
  5. USE size1 && select, open up the temp table
  6. APPEND FROM size && append all the data from the corrupt table to the new table



That is it, delete the old corrupt table and then rename the new temp table with the desired table name because it has all the old table data.

Hope it help, happy coding ;)

Thursday, March 17, 2016

Installing symfony on windows, PHP Warning: file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed

I am trying out the symfony framework and a novice with Php language. When doing a symfony installation, i got the mentioned error of SSL operation failing as shown below
  SSL failure
Am using windows 7, XAMPP handling the web server and database server. A search on the web gives lots of solutions related to SSL operation failed but not so much related to solve it for symfony installation in simple terms.
Found a link here which i followed to solve my problem at hand. It is not the best but at-least lets you passed that error.

  1. First add php path to the windows enviroment variables (my case "D:\xampp\php")
  2. Create a install.php file in your web server www folder and insert the code below
    <?php
    $arrContextOptions=array(
    "ssl"=>array(
    "verify_peer"=>false,
    "verify_peer_name"=>false,
    ),
    );
    $response = file_put_contents('symfony', file_get_contents('https://symfony.com/installer', false, stream_context_create($arrContextOptions)));
    echo $response;
    ?>
    It should look like below in ur favorite editor
     
    Browse the install.php file url in your browse and expect to get a response similar to the one below

    Expect to find a new file "symfony" in your www folder.  
  3. Open up the command prompt (CMD) as administrator, navigate to the webserver publish folder or www folder, as the symfony installation instructions say, run the command "php symfony" to check if installer is usable.
  4. Now ready to create your first symfony project, type "php symfony new my_proj" in your command prompt and wait for the installer to pull all files down to your disk.
Enjoy ! 

Sunday, July 31, 2011

OLE error code 0x80029c4a: Error loading type library/DLL.

Just a quick tip on such an error i got when writing a .NET C# activeX control to be used in a FoxPro 9.0 application. I was using Regasm to register the DLL which was successful but when i try to add it to a FoxPro form then that error would pop up ! Well guess what just make sure you produce a .TLB for your DLL and that will sort out that error. A type library (.tlb) is a binary file containing all the information you need to use procedures or classes in DLLs. Type regasm /h on the command prompt for more info on how to use it, by the way regasm.exe is a tool with in the .NET framework so to use it, you either navigation to the .NET folder or you register the path in you environmental variable.
Find regasm tool at path CD %windir%\Microsoft.NET\Framework\v(N)*\ in the windows OS after installing .NET framework (Note (N) is the version number of version of .NET framework you have so replace (N) with 1 or 2 or 3 or 4).
Hope this helps in case you got such a silly error !

Was reading article here for creating a .NET activeX control for a FoxPro application.

Friday, January 28, 2011

Wamp error "Forbidden You don't have permission to access / on this server."

Well was faced with such a situation when i tried accessing my site remotely from a new installation of WAMP2.0 on the server. i googgled for an answer but most of the posts didn't quite get straight to the point why this was happening. I read around and got the solution.

Why the error
WAMP has an installation of apache (a web server) bundled together and it is configured to receive local connection by default so if you try accessing the site from outside the hosting machine then you will get that error.

Solution
You will need to edit the configuration file for apache to enable external access. Get to the hosting machine, locate the system tray click on the WAMP icon -> Apache -> httpd.conf, this will open up the apache config file in notepad. locate line '' (without the single quotes around line 207), a few lines below before you meet the closing tag '' you will find the line below:
Deny from all
Allow from 127.0.0.1

replace them with the lines below:

#Deny from all
#Allow from 127.0.0.1
Allow from all

Save file and close it, go back to the system tray click of the Wamp icon -> stop all services then wait for 1 min then back to the system tray again Wamp icon -> start all services.

Thats it you can now access your site from anywhere.