Rabu, 31 Maret 2010

Error yg kualami di XAMPP

Offline louis_coetzeeTopic starter

  • Enthusiast

    • View Profile
Hi, I had to re-install my wampserver, probably a new version, now I get this new error:
Deprecated: Function eregi() is deprecated in C:\wamp\www\age_art\new\models\products.php on line 8

Code: [Select]
This is: products.php

<?php
   function 
image_list($image_dir)
   {
      $fileCount 1
      $dir opendir($image_dir);
      while ($file readdir($dir)) 
      { 
  
         if (eregi("\.jpg",$file)) 
         {
    
         $image_array[$fileCount] = $file;
    
         $fileCount++;
  
         }
      }
      return $image_array;
   }
?>


Offline TeNDoLLA

  • Enthusiast

    • View Profile
It means the function is old and not supposed to use anymore. I don't remember the versions where this still was or where it was removed but thats probably the case. You should use preg_match. And instead of all ereg* functions there is usually preg_* function that you can use. You can use the i -modifier to get it work incase sensitive.

Code: [Select]
<?php
if (preg_match('/.jpg/i'$file))
« Last Edit: September 08, 2009, 01:14:06 PM by TeNDoLLA »

Offline louis_coetzeeTopic starter

  • Enthusiast

    • View Profile
It means the function is old and not supposed to use anymore. I don't remember the versions where this still was or where it was removed but thats probably the case. You should use preg_match. And instead of all ereg* functions there is usually preg_* function that you can use. You can use the i -modifier to get it work incase sensitive.

Code: [Select]
<?php
if (preg_match('/.jpg/i'$file))

Thanks a lot. Solved!

Exporting and Importing WordPress

In the last two chapters, I talked about Installing WordPress Locally and Building Custom WordPress Theme. This chapter will cover exporting your local WordPress to a web host. Assume you are done with the local WordPress development, it is time to learn how to export and import WordPress. Then you can keep the local version for backup purpose and future development (ie. testing new themes, plugins, and upgrades).

1. Export Local Database

Login to your local phpMyAdmin, select the database from the dropdown. Click on the Export tab:

  • Under the Export field, make sure all tables are selected
  • Under the Structure field, tick "Add DROP TABLE / DROP VIEW"
  • Tick "Save as File"
  • Then click Go and it will prompt you to download a SQL file

export database

2. Find & Replace All Local URLs

Open the database SQL file with a text editor. Find and replace all local URLs with your domain URL (eg. replace all "http://localhost:8888/mysite" with "http://www.yourdomain.com").

export database

3. Import The Database

Login to your server cPanel, go to MySQL Databases, create a new database and assign a user. Now go to phpMyAdmin, select the database (the one that was just created) from the dropdown, click on the Import tab, browse the SQL file and click Go.

export database

4. Upload WordPress

Upload the entire WordPress folder to your server.

5. Change The wp-config.php Setting

On your server, open the wp-config.php file. Change the database details to reflect your server settings.

export database

6. Done

Go to your website and everything should work perfect.

Adding Themes on Windows Server 2008

 

If you are tired of using the Windows Classic theme on your Server 2008, you can install Desktop Experience so that you can enjoy the eye candy goodness of the Vista theme. Desktop Experience will also install Windows Media Player, Windows Sidebar and photo gallery. Follow these steps to install Desktop Experience and liven up your server:


1. Click Start and select Server Manager

http://blogs.tech-recipes.com/shamanstears/files/2007/08/tr_win2008_servermgr2.png

2. When the Server Manager window appears, go to the left pane and select Features.

http://blogs.tech-recipes.com/shamanstears/files/2007/07/winsrv2k8_features.png

3. On the right, click the Add Features link.

http://blogs.tech-recipes.com/shamanstears/files/2007/07/winsrv2k8_powershll2.png

4. Check the Desktop Experience checkbox

http://blogs.tech-recipes.com/shamanstears/files/2007/08/tr_win2008_desktopexp.png

5. Click Next.

6. Click Install

7. When the installation is complete, Windows will notify you that you must restart your server to complete the process.

http://blogs.tech-recipes.com/shamanstears/files/2007/08/tr_win2008_desktoprestart.png

After you have rebooted, go to Services and make sure that the Themes service is started and set to Automatically Start (thanks DTron!). After that, you are ready to change the theme on your server.

1. Right-click the desktop and select Personalize.

http://blogs.tech-recipes.com/shamanstears/files/2007/08/tr_win2008_selectpersonalize.png

2. Select Theme.

http://blogs.tech-recipes.com/shamanstears/files/2007/08/tr_win2008_personalize.png

3. From the Theme Settings window, use the Theme dropdown and select the Windows Vista theme.

http://blogs.tech-recipes.com/shamanstears/files/2007/08/tr_win2008_selecttheme.png

4. Click OK.

So you go from a boring look like this:

http://blogs.tech-recipes.com/shamanstears/files/2007/08/tr_win2008_classic.png

To a much better visual experience:

http://blogs.tech-recipes.com/shamanstears/files/2007/08/tr_win2008_vista.png

 

Jumat, 26 Maret 2010

PDF PC Media Download

PDF PC MEDIA yg tahun 2009

buruan download sebelum hangus!!





http://rapidshare.com/files/361877873/PCMedia.Jan.2009.PDF.eBook.rar
http://rapidshare.com/files/361913764/PCMedia.Feb.2009.PDF.eBook.rar
http://rapidshare.com/files/361926254/PCMedia.Mar.2009.PDF.eBook.rar
http://rapidshare.com/files/361944596/PCMedia.Apr.2009.PDF.eBook.rar
http://rapidshare.com/files/361952592/PCMedia.May.2009.PDF.eBook.rar
http://rapidshare.com/files/361961472/PCMedia.Jun.2009.PDF.eBook.rar
http://rapidshare.com/files/361970663/PCMedia.Jul.2009.PDF.eBook.rar
http://rapidshare.com/files/361982218/PCMedia.Aug.2009.PDF.eBook.rar
http://rapidshare.com/files/361992580/PCMedia.Sep.2009.PDF.eBook.rar
http://rapidshare.com/files/362003281/PCMedia.Oct.2009.PDF.eBook.rar
http://rapidshare.com/files/362017322/PCMedia.Nov.2009.PDF.eBook.rar
http://rapidshare.com/files/362028068/PCMedia.Dec.2009.PDF.eBook.rar

Install Joomla on IIS

Joomla is an open-source content management system (CMS) that lets you build Web sites and powerful online applications, such as:

  • Corporate Web sites or portals
  • Corporate intranets and extranets
  • Online magazines, newspapers, and publications
  • E-commerce and online reservations
  • Government applications
  • Small business Web sites
  • Non-profit and organizational Web sites
  • Community-based portals
  • School and church Web sites
  • Personal or family home pages

For more information about Joomla, visit the Joomla Web site.

This article describes how to install and configure Joomla for use with the FastCGI extension on Internet Information Services 7 (IIS 7) on Windows® Web Server 2008. The instructions assume that you have set up and configured the FastCGI extension and the PHP libraries. The instructions have been tested and found to work with the following software versions:

  • PHP 5.2.9
  • MySQL 5.1.34
  • Joomla 1.5.14

Prerequisites

From the base default configuration file provided by PHP, modify the following lines in your Php.ini configuration:

  • Define extension_dir as c:\php\ext (for example, the location of your php extensions directory).
  • Uncomment extension=php_mysql.dll in the extensions list to enable MySQL support.

In order for Joomla to work correctly with IIS 7, it is necessary to install an update for IIS FastCGI module for IIS 7.

Download and Unpack the Application

First, download the latest stable release of Joomla. For this article, Joomla version 1.5.14 was used (future versions are likely to be similar to install). Uncompress the Joomla files and copy them to C:\Inetpub\wwwroot\joomla (or another directory of your choosing).

Before running the Joomla installer, create the configuration file Configuration.php, which Joomla uses to store key configuration settings. Assign write permissions to it with the command (from the installation directory):

C:\inetpub\wwwroot\joomla>icacls configuration.php /grant BUILTIN\IIS_IUSRS:W

The installer will modify the Configuration.php file with information provided during the installation process.

Joomla uses the Administrator\Cache folder Tmp and therefore needs to be able to write and modify files in this folder. Grant "modify" permissions to the folder:

C:\inetpub\wwwroot\Joomla>icacls administrator\cache /grant BUILTIN\IIS_IUSRS:(OI)(CI)(M)

Joomla uses the temporary folder Tmp to store temporary files and therefore needs to be able to write and modify files in this folder. Grant "modify" permissions to the folder:

C:\inetpub\wwwroot\Joomla>icacls tmp /grant BUILTIN\IIS_IUSRS:(OI)(CI)(M)

Set Up the Database

Before starting the installation procedure for Joomla, you must create a database on your server. Also create a user and grant this user "db ownership" permission to the database. This article uses the following database information:

  • Database name: joomla
  • Database user: joomla
  • Account password: joomla

Run the Installation Script

1. Start the configuration procedure in a Web browser. Go to http://localhost/joomla/. (If the Index.php file is not in the browser default document, then add it.)

2. Select the language, and then click Next.

Figure 1: Choose Language page

3. Verify that all pre-installation checks are successful, and then click Next.

Figure 2: Pre-installation Check page

4. Review the GNU General Public License, and then click Next.

 

Figure 3: License page

5. On this page enter the following information, and then click Next.

      a. Host Name: localhost
      b. Username: joomla
      c. Password: joomla
      d. Database: joomla

Figure 4: Database Configuration page

6. On the FTP Configuration page, select the No option button (not to enable FTP file system layer), and then click Next.

Figure 5: FTP Configuration page

7. Specify the site name and the administrator password. Click Next to complete the installation.


Note: You may scroll down and install sample data if you prefer.


Figure 6: Main Configuration page

8. The Finish page appears, and you are instructed to delete the C:\inetpub\wwwroot\joomla\installation directory.

Figure 7: Finish page

9. You can now go to the Joomla site.

Figure 8: Joomla site

Enable Search Engine Friendly URLs

By default, Joomla uses query string parameters for all the URLs it generates for your Web site. You change this by by enabling search engine friendly URLs, a feature which relies on the URL rewriting functionality.

IIS 6.0 does not include URL rewriting capabilities; you can use a third-party URL rewriting product such as ISAPI_Rewrite or Ionics ISAPI Rewrite Filter.

IIS 7 includes URL rewriting support, which can be enabled by installing Microsoft URL Rewrite Module for IIS 7.

1. Download and install the Microsoft URL Rewrite Module.

2. If it does not already exist; create and open a Web.config file located in the C:\inetpub\wwwroot\joomla directory.

3. Paste the following XML code into this file.

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
  <system.webServer>
    <rewrite>
      <rules>
        <rule name="Security Rule" stopProcessing="true">
          <match url="^(.*)$" ignoreCase="false" />
          <conditions logicalGrouping="MatchAny">
            <add input="{QUERY_STRING}" pattern="mosConfig_[a-zA-Z_]{1,21}(=|\%3D)" ignoreCase="false" />
            <add input="{QUERY_STRING}" pattern="base64_encode.*\(.*\)" ignoreCase="false" />
            <add input="{QUERY_STRING}" pattern="(\&lt;|%3C).*script.*(\>|%3E)" />
            <add input="{QUERY_STRING}" pattern="GLOBALS(=|\[|\%[0-9A-Z]{0,2})" ignoreCase="false" />
            <add input="{QUERY_STRING}" pattern="_REQUEST(=|\[|\%[0-9A-Z]{0,2})" ignoreCase="false" />
          </conditions>
          <action type="CustomResponse" url="index.php" statusCode="403" statusReason="Forbidden" statusDescription="Forbidden" />
        </rule>
        <rule name="SEO Rule">
          <match url="(.*)" ignoreCase="false" />
          <conditions logicalGrouping="MatchAll">
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" pattern="" ignoreCase="false" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" pattern="" ignoreCase="false" />
            <add input="{URL}" negate="true" pattern="^/index.php" ignoreCase="false" />
            <add input="{URL}" pattern="(/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$" />
          </conditions>
          <action type="Rewrite" url="index.php" />
        </rule>
      </rules>
    </rewrite>
 </system.webServer>
</configuration>

4. Save the web.config file.

5. Open a Web browser, and log on to the Joomla administrator console at http://localhost/joomla/administrator/.

6. Click on Site --> Global Configuration menu to configure SEO Settings:

1. Search Engine Friendly URLs - Yes

2. Add suffix to URLs - No

Figure 9: Global Configuration page

3. Click Apply to save the configuration.

4. Restart Windows® Internet Explorer®.

5. Go to http://localhost/joomla/. All links in Joomla pages now have URLs without query string parameters. If you click on any of these links, the server returns a correct response:

Figure 10: Links in Joomla page

 

Note: This article updates "Joomla! on IIS" by Ruslan Yakushev, published on December 12, 2008.

Links for Further Information 

Setting up FastCGI for PHP.

Using FastCGI to Host PHP Applications on IIS 7.0.

Installing PHP on Windows Vista with FastCGI.

Installing FastCGI Support On Server Core.

FastCGI forum.

PHP community forum.

Exporting and Importing WordPress

In the last two chapters, I talked about Installing WordPress Locally and Building Custom WordPress Theme. This chapter will cover exporting your local WordPress to a web host. Assume you are done with the local WordPress development, it is time to learn how to export and import WordPress. Then you can keep the local version for backup purpose and future development (ie. testing new themes, plugins, and upgrades).

1. Export Local Database

Login to your local phpMyAdmin, select the database from the dropdown. Click on the Export tab:

  • Under the Export field, make sure all tables are selected
  • Under the Structure field, tick "Add DROP TABLE / DROP VIEW"
  • Tick "Save as File"
  • Then click Go and it will prompt you to download a SQL file

export database

2. Find & Replace All Local URLs

Open the database SQL file with a text editor. Find and replace all local URLs with your domain URL (eg. replace all "http://localhost:8888/mysite" with "http://www.yourdomain.com").

export database

3. Import The Database

Login to your server cPanel, go to MySQL Databases, create a new database and assign a user. Now go to phpMyAdmin, select the database (the one that was just created) from the dropdown, click on the Import tab, browse the SQL file and click Go.

export database

4. Upload WordPress

Upload the entire WordPress folder to your server.

5. Change The wp-config.php Setting

On your server, open the wp-config.php file. Change the database details to reflect your server settings.

export database

6. Done

Go to your website and everything should work perfect.

Download Movie Gratiss

Website untuk Download Movie dari Indowebster.
Di website ini terdapat banyak judul film yang di index berdasarkan abjad awalnya sehingga memudahkan anda mencari berbagai judul film, belum lagi Movie tersebut di upload di server lokal (IDWS). Maju terus untuk Cinema3Satu


Cinema3Satu


Istall PHP5 di Windows Server 2008

A few prerequisites for installing FastCGI would seem obvious but let's go ahead and mention them anyway.

The first of course is an installation of Server 2008 (though this works on Vista if you are so inclined) and having IIS 7 installed already. You can also enable FastCGI while installing IIS, but for this demo I already have a virtual server with IIS 7 installed so let's go with that.



1. Open Server Manager dari Administrative Tools.

2. In the left pane expand Roles and click Web Server (IIS), then in the center pane scroll down and click Add Role Services.


IIS 7: Install FastCGI & PHP on Server 2008 - 1

3. Next on the Select Role Services screen select CGI, under Application Development, then click Next.


IIS 7: Install FastCGI & PHP on Server 2008 - 2

4. Confirm Installation Selections by reviewing the options you picked and then click Install.


IIS 7: Install FastCGI & PHP on Server 2008 - 3

5. You should see Installation Succeeded on the Installation Results screen; go ahead and click Close.


IIS 7: Install FastCGI & PHP on Server 2008 - 4

6. You will now see the CGI role service under the IIS panel.


IIS 7: Install FastCGI & PHP on Server 2008 - 5

Now that wasn't too bad was it? You will notice that you installed CGI instead of FastCGI, but by selecting CGI it enables both. Now let's move on to installing PHP!


Install PHP on IIS 7

When dealing with PHP there are many different versions that are in use and depending on the application you are going to be using you may need a specific version. There are also repackaged versions like those from Zend that are pre-packaged and optimized extensions that work together.

If you want to use the official release you can get it from: http://www.php.net/downloads.php

For this demo I am going to use PHP 5.2.6 Non-thread-safe installer under Windows Binaries. It is recommended to use the non-thread safe build with IIS 7 since FastCGI will ensure single threaded execution environment.

Once you download it to your server let's get started.



1. Left click on the PHP Installer Binary.


IIS 7: Install FastCGI & PHP on Server 2008 - 6

2. You will now see the PHP Setup Wizard window, go ahead and click Next.


IIS 7: Install FastCGI & PHP on Server 2008 - 7

3. On the End-User License Agreement, go ahead and place a check in the box accepting the terms in the License Agreement and then click Next.


IIS 7: Install FastCGI & PHP on Server 2008 - 8

4. Now select a destination folder, for our example I am going to use C:\PHP5\, type or navigate to where you want to install it and click Next.


IIS 7: Install FastCGI & PHP on Server 2008 - 9

5. Now select IIS FastCGI as the web server and click Next.


IIS 7: Install FastCGI & PHP on Server 2008 - 10

6. The Choose Items to Install screen is next. I am going to stick with the default, as adding extensions that you don't need increases your vulnerability profile.

If you have need of an additional Extension just open up the drop down and choose it, then click Next.


IIS 7: Install FastCGI & PHP on Server 2008 - 11

7. Here comes the big moment! Click Install and watch the magic happen.


IIS 7: Install FastCGI & PHP on Server 2008 - 12

8. You should see the Setup Completion screen now. Go ahead and click Finish.


IIS 7: Install FastCGI & PHP on Server 2008 - 13

9. Ok, now we will have to make a few modifications to the way PHP handles itself so we are going to modify the php.ini file.

First navigate to the place you installed PHP and open php.ini in notepad.


IIS 7: Install FastCGI & PHP on Server 2008 - 14

10. First let's modify fastcgi.impersonate and set it to 1. Remember you are going to have to uncomment these first and then change the value, and also CTRL+F is your friend!


IIS 7: Install FastCGI & PHP on Server 2008 - 15

11. Now find cgi.fix_pathinfo and set it to 1 also, remember to uncomment by removing ;


IIS 7: Install FastCGI & PHP on Server 2008 - 16

12. Next up is cgi.force_redirect and we are going to set this to 0, and uncomment.


IIS 7: Install FastCGI & PHP on Server 2008 - 17

13. Then let's set open_basedir to the root level of our website content directory, which I will use the default C:\inetpub


IIS 7: Install FastCGI & PHP on Server 2008 - 18

14. Now save your changes to php.ini


IIS 7: Install FastCGI & PHP on Server 2008 - 19

That's it! Let's go ahead and test the install, by going to a command prompt and doing the following:



1. Open a command prompt.

2. Navigate to the directory you installed PHP to.

3. Type in: PHP –info and you should see a lot of scrolling and information. This means PHP is good to go.

Below is the start of the command and output, then the second picture is the last thing that will be shown.


IIS 7: Install FastCGI & PHP on Server 2008 - 20


IIS 7: Install FastCGI & PHP on Server 2008 - 21

You have now properly installed and tested PHP on the server. Now we have to configure IIS 7 to use PHP through FastCGI.


Configure IIS7 to use PHP

IIS7 can be configured to handle PHP mappings at server or site levels, but for this example we are going to set the configuration at the server level. This just basically tells the server how to handle files with .php type extensions.



1. Open IIS Manager and select the server in the left pane and then click on Handler Mappings in the center pane.


IIS 7: Install FastCGI & PHP on Server 2008 - 22

2. In the right Action pane select Add Module Mapping…


IIS 7: Install FastCGI & PHP on Server 2008 - 23

3. Fill out the following information and click OK:

Request Path: *.php
Module: FastCgiModule
Executable: {path to your PHP install}\php-cgi.exe
Name: Whatever you want

IIS 7: Install FastCGI & PHP on Server 2008 - 24

4. You will get a popup asking if you want to create a FastCGI application, go ahead and click Yes.


IIS 7: Install FastCGI & PHP on Server 2008 - 25

5. You will now see your enabled handler in the list.


IIS 7: Install FastCGI & PHP on Server 2008 - 26

You have now successfully setup your IIS7 web server to handle PHP files via FastCgi. But don't take my word for it, let's go ahead and run a test.



1. Navigate to the default site directory at C:\inetpub\wwwroot

2. Create a file called info.php and place the following in the file:

<?php phpinfo(); ?>

3. Open your browser and point it at http://localhost/info.php and you should see a PHP information page similar to this:


IIS 7: Install FastCGI & PHP on Server 2008 - 27

This shows a successful handling of PHP files by IIS7. You have now configured your server to run PHP via FastCGI on IIS7.