How to use scriptAlias in apache2

I have apache2 installed.
and I have 3 directorioes with index.php, all have the same index.php but just directory doc2 has data.php
-doc1—-> index.php
-doc2—-> index.php and data.php //in this directory i have index.php whitch content require “dates.php”
print “Hello”;
require ‘data.php’; //when [...]

Try to upload .zip file using ftp_put function but it is not able to upload large file(more than 1 MB)

I am using the following code to upload a .zip file, but am unable to upload a file of size greater than 1MB:
$upload = ftp_put($conn_id, $target_path.’/’.$filename, $source, FTP_BINARY);

Any thoughts?

Preserving linebreaks in the begginning of textarea

Here again with new problem

in textarea it displayed without the first new line.

like this

but it should be like this?


sorry for my English =)

sql select dates for current and prev month

Please help whith query. Have a table:
id | u_id | start_date | end_date |
01 | 7 | 2012-09-05 | 2012-09-23 |
02 | 4 | 2012-09-10 | 2012-09-15 |
03 | 4 | 2012-09-27 | 2012-10-05 |
04 | 5 | 2012-10-01 | 2012-10-09 [...]

Override Magento Config

I am looking for a good solution to override the Magento config without changing the default values.
For example, I want to override the “web/unsecure/base_skin_url” item in the core_config_data table without deleting the existing value. So if anywhere in the code this exact code is called:

It will find the config option I set and not the [...]

How to use my newly installed php 5.4.x in Mac Os (Mountain Lion)?

I just installed php 5.4.7 in my mountain lion system using this guide (
The problem is that when a run a simple php file with the following code :

I get information about the old php version (5.3.x).
By the way I already added the /usr/local/bin as the first path of the $PATH [...]

Fastest way to search and remove/add line from/to file

I’m wondering what the fastest way is to remove a specific line from a potentially large file, if it exists.
So for example I want the following line

to be removed from the file


Also, I want to add a line to the file, if it doesn’t already exist.
The order of the file doesn’t matter, and can be [...]

Pagination with custom post types

This is my code to show the custom post type:
<?php $query = new WP_Query( ‘post_type=prensa_post&posts_per_page=3&order=DESC’ ); ?>
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
<div class=”article_date”><?php the_time(‘d/m/Y’); ?></div>

.htaccess not rewriting my url

I have made a simple url shortener. I’m trying to get .htaccess to rewrite a url that look slike this to this so that it can be used in a function that will redirect to an external url.
Here is the .htaccess code I am using:
SetEnv TZ Europe/London
RewriteEngine on
RewriteRule ^([a-zA-Z0-9]+)$ index.php?code=$1

At the top of [...]

php apache thread issue

I am using the js/php library plupload to create a multi-file upload widget. Everything works awesome in my local machine. I am able to upload files which are like 100 MB+ (plupload states it can support up to 2GB)
The problem is that when I move this script to my production environment, for files that are [...]

Hire Me
Follow Me!
Most Popular Articles & Pages
Because your vote is Important
Sorry, there are no polls available at the moment.