November 13th in Linux/Unix, PHP Scripts by pbu .

FIX->Fatal error: Maximum execution time of 300 seconds exceeded with phpMyAdmin

PHPMyAdmin will not work for uploading large mysql databases. If you attempt to upload a large mysql dataset you will often get this error

Fatal error: Maximum execution time of 300 seconds exceeded

Fix:

If you get this error you will need edit config.default.php inside phpmyadmin and look for this line

$cfg['ExecTimeLimit'] = 300;

and replace with 0 or any larger value

$cfg['ExecTimeLimit'] = 3600;

If that doesnt work, try this BigDump MySQL Importer. It is free for download.

If you have commandline …

November 12th in PHP Scripts by pbu .

Fix-> Warning: ereg_replace(): REG_BADRPT in PHP

If you are a PHP programmer and if you are using regular expressions with ereg_replace then often with replacing particular characters you might encounter error like

Warning: ereg_replace(): REG_BADRPT

Here is a simple function that causes this error

function OrigURL($str)
{
$out = ereg_replace(‘+’,’ ‘,$str);
return $out;
}

Solution: Just escape the characters. Only then it will work.

$out = ereg_replace(‘\+’,’ ‘,$str);

Hope this would help!

November 12th in PHP Scripts by pbu .

How to remove GET variable within $_SERVER['QUERY_STRING'] in PHP

I was working on a mysql search script with paging where i had to pass the same GET parameters to page numbers like

search.php?q=what+europe+scripts&page=1

I used $_SERVER['QUERY_STRING'] to get the GET parameters. But the problem i got was when i was in page 2 it would show query string like

search.php?q=what+europe+scripts&page=1&page=2

and if i am in page 5, it would show like

search.php?q=what+europe+scripts&page=1&page=2&page=3&page=4&page=5

This is an unwanted problem and i wanted to strip/remove only the page variable.

If you are in such a situation here is …

October 18th in PHP Scripts by pbu .

How to unzip ZIP files with PHP

How to automatically unzip uploaded zip files with PHP

I wanted to upload a zip file with php script and unzip it within the server running PHP and linux. How to do it? i am documenting here about a solution to unpack uploaded zip files locally within the server with PHP.

well! it can be done in 3 ways. I

1. Using PHP exec command
2. suPHP (Alternative to PHPsuexec)
3. Get Pclzip class library. (create and extract ZIP files
4. Using Zziplib with …

October 2nd in General, PHP Scripts, vBulletin by pbu .

How to Fight Spam in Vbulletin

Until recently i have encountered a sudden new attacks of spam registrations and many many spam threads posted in my forum. I just cant figure out how as I have already enabled captcha in registration page and enabled email confirmation. Despite this somehow spammers managed to bypass the registration and managed to post spam threads.

Fighting spam involves great amount of work. Just make sure you do the following settings in your vbulletin forum.

1. Enable captcha and Email Confirmation forum …

September 12th in Design, PHP Scripts by pbu .

How to design 3 Column Website Layout with Top Navigation Menu in CSS

CSS as we go deeper and deeper it gets harder and harder to understand, especially margins, padding and floats could be confusing at times as well. I am going to post here the tutorial to make a very simple CSS website layout (skeleton) with

- Container
- Header
-Top Navigation Menu
- Left Navigation Menu
- Right Navigation menu
- Content Part
- Footer

All elegantly stacked one by one with divs and with css stylesheet. This is a very basic skeleton. The most important css code …

August 8th in Linux/Unix, PHP Scripts, vBulletin by pbu .

Your password is 180 days old, and has therefore expired

i was getting this message from vbulletin after logging as administrator. I wasnt able to find the setting in vbulletin control panel that would disable this 180 day password, until i finally figured out.

Your password is 180 days old, and has therefore expired.

Please change your password using this page.

To fix this Go to UserGroups > Administrator Group > Edit > Set 180 days password expiry to 0

Thats it!

August 7th in General, PHP Scripts, vBulletin by pbu .

Where to buy good vbulletin themes?

ok, you have bought a vbulletin license and looking to customize the look of the forum. Giving a good professional look to your forum can be well worth it to attract more users to signup. If you are willing to spend $20 – $50 there are number of places to look for.

First check out

http://www.vbulletin.org

This is a official vbulletin add-ons site where plenty of skins and plugins are available for free download provided you have a valid vbulletin license.

The following …

July 30th in General, Internet, Javascript, PHP Scripts by pbu .

Lightweight PHP WYSIWYG HTML Editor

Lightweight WYSIWYG Editor for PHP

A dead simple javascript based WYSIWYG html editor for PHP. It is lightwight, fastloading html editor can be integrated to PHP scripts easily.

I always wanted a very simple WYSIWYG editor for my PHP scripts with just simple functions like bold, italic, URL and Image insertion and nothing more than that! I came across many many open source editors and each had disadvantages like popup html window for inserting links, slow loading and much more, which …

July 22nd in Internet, PHP Scripts, Wordpress by pbu .

Displaying HTML code in WordPress Posts!

I had a terrible problem for a long time which frustrated me quite often! Being a programmer myself i wanted to post html code on my wordpress post and everytime i do it wordpress wont show the code and only shows the html output.

Just like html i wanted to post code like various other programming languages like PHP, CSS and javascript as well. i finally somehow resolved my problem by installing the free wordpress plugin syntax-highlighter. The code looked …

 Page 3 of 5 « 1  2  3  4  5 »