IPAD must-haves. And fun-to-haves.

Brighten your iPad with a colorful cover, stream to your TV, download pictures from your digital camera, and more. There’s already so much you can do with iPad and iPad mini

Apple Wireless Keyboard

The incredibly thin Apple Wireless Keyboard uses Bluetooth technology, which makes it compatible with iPad

Apple unveils iPad mini: ‘Thin as a pencil, light as paper’

iPad inspires creativity and hands-on learning with features you won’t find in any other educational tool

Lightning connector and FaceTime HD camera

Apple announces 4th generation iPad packing an A6X CPU

Pages

Showing posts with label Apache. Show all posts
Showing posts with label Apache. Show all posts

Tuesday, April 29, 2014

Can't locate Geo/Gpx.pm in @INC apache

Though there are many queries flowing around asking the same question. But here the error is thrown by apache instead of Perl. I am trying to create an XML Response for the client on Mac OS X Mavericks and have written the perl script as follows:

 

#!/usr/bin/perl -wT                                                                                                                                                                 
use lib '/opt/local/lib/perl5/site_perl/5.16.1/Geo';
use strict;
use CGI;
use Geo::Gpx;

open
(FH, "/tmp/temp/file.txt") or print ("Unable to Open File");

my $gpx = Geo::Gpx->new;
my $cgi = CGI->new;
print $cgi->header(-type=>"text/gpx",-status=>"200 OK");

my $lon;
my @arr = <FH>;

foreach(@arr){
my %waypoints;
my $var = $_;
my @lat = split(/\s+/,$var);
#@waypoints=split(/\s+/,$_);                                                                                                                                                    
$waypoints
{$lat[0]}=$lat[1];
$waypoints
{$lat[2]}=$lat[3];
$gpx
->add_waypoint(\%waypoints);
}

my $xml = $gpx->xml;
print $xml;
open FILE
, ">/tmp/temp/xmlfile.xml" or die $!;
print FILE $xml;
close
(FILE);
close
(FH);

 

 

For the apache to find the actual path of the Gpx.pm, I have used 'use lib' to show it the real path of the file. Although this script is working perfectly on command line, my apache server is throwing the following error:

 

[Tue Nov 26 18:34:51 2013] [error] [client 127.0.0.1] Can't locate Geo/Gpx.pm in @INC
(@INC contains: /opt/local/lib/perl5/site_perl/5.16.1/Geo /Library/Perl/5.16/darwin-thread-multi-2level
/Library/Perl/5.16 /Network/Library/Perl/5.16/darwin-thread-multi-2level /Network/Library/Perl/5.16
/Library/Perl/Updates/5.16.2 /System/Library/Perl/5.16/darwin-thread-multi-2level /System/Library/Perl/5.16
/System/Library/Perl/Extras/5.16/darwin-thread-multi-2level /System/Library/Perl/Extras/5.16 .) at /Users/Rachit/Sites/temp.pl line 7.
[Tue Nov 26 18:34:51 2013] [error] [client 127.0.0.1] BEGIN failed--compilation aborted at /Users/Rachit/Sites/temp.pl line 7.

 

I have used macports and have found searching through the Web that Mavericks has got perl 5.16 preinstalled. So apache may be using that and perl is using the macport installed libraries. On checking the paths mentioned by apache error_log file as I posted above, I have copied Gpx.pm in one of the libraries installed in Geo Folder but still not getting it resolved. On running 'which perl' The result

 

/opt/local/bin/perl

 

And 'which cpan' is giving

 

/opt/local/bin/cpan

 

Kindly fix this issue as I am not able to move forward because of this. And I am not so familiar with apache.

 

Thanks


View the original article here

Saturday, January 18, 2014

Can't locate Geo/Gpx.pm in @INC apache

Though there are many queries flowing around asking the same question. But here the error is thrown by apache instead of Perl. I am trying to create an XML Response for the client on Mac OS X Mavericks and have written the perl script as follows:

 

#!/usr/bin/perl -wT                                                                                                                                                                 
use lib '/opt/local/lib/perl5/site_perl/5.16.1/Geo';
use strict;
use CGI;
use Geo::Gpx;

open
(FH, "/tmp/temp/file.txt") or print ("Unable to Open File");

my $gpx = Geo::Gpx->new;
my $cgi = CGI->new;
print $cgi->header(-type=>"text/gpx",-status=>"200 OK");

my $lon;
my @arr = <FH>;

foreach(@arr){
my %waypoints;
my $var = $_;
my @lat = split(/\s+/,$var);
#@waypoints=split(/\s+/,$_);                                                                                                                                                    
$waypoints
{$lat[0]}=$lat[1];
$waypoints
{$lat[2]}=$lat[3];
$gpx
->add_waypoint(\%waypoints);
}

my $xml = $gpx->xml;
print $xml;
open FILE
, ">/tmp/temp/xmlfile.xml" or die $!;
print FILE $xml;
close
(FILE);
close
(FH);

 

 

For the apache to find the actual path of the Gpx.pm, I have used 'use lib' to show it the real path of the file. Although this script is working perfectly on command line, my apache server is throwing the following error:

 

[Tue Nov 26 18:34:51 2013] [error] [client 127.0.0.1] Can't locate Geo/Gpx.pm in @INC
(@INC contains: /opt/local/lib/perl5/site_perl/5.16.1/Geo /Library/Perl/5.16/darwin-thread-multi-2level
/Library/Perl/5.16 /Network/Library/Perl/5.16/darwin-thread-multi-2level /Network/Library/Perl/5.16
/Library/Perl/Updates/5.16.2 /System/Library/Perl/5.16/darwin-thread-multi-2level /System/Library/Perl/5.16
/System/Library/Perl/Extras/5.16/darwin-thread-multi-2level /System/Library/Perl/Extras/5.16 .) at /Users/Rachit/Sites/temp.pl line 7.
[Tue Nov 26 18:34:51 2013] [error] [client 127.0.0.1] BEGIN failed--compilation aborted at /Users/Rachit/Sites/temp.pl line 7.

 

I have used macports and have found searching through the Web that Mavericks has got perl 5.16 preinstalled. So apache may be using that and perl is using the macport installed libraries. On checking the paths mentioned by apache error_log file as I posted above, I have copied Gpx.pm in one of the libraries installed in Geo Folder but still not getting it resolved. On running 'which perl' The result

 

/opt/local/bin/perl

 

And 'which cpan' is giving

 

/opt/local/bin/cpan

 

Kindly fix this issue as I am not able to move forward because of this. And I am not so familiar with apache.

 

Thanks


View the original article here

Thursday, February 28, 2013

Re: Installing Apache 2.4.3 on OSX 10.6.8

I decided to try and install php from source--just to see if I could do it.  After messing around with vagrant unsuccessfully, I decided vagrant was way too complicated, and I installed php from source myself.  In case anyone else is interested in how I installed php, I followed the php install instructions here (which are the Unix install instructions, which the Mac Install Instructions said to use):

 

http://www.php.net/manual/en/install.unix.apache2.php

 

Here are some clarifications of some of the steps:

 

3) I ignored step 3 (because I had already installed apache):

 

Build and install Apache. Consult the Apache install documentation for more details on building Apache.

 

 

cd httpd-2_x_NN

./configure --enable-so

make

make install

 

Apparently the apache install does the --enable-so by default.

 

 

5) I had previously installed mysql, and the --with-mysql flag, succeeded in allowing me to access my databases from a php script.

 

 

6) Make sure you do step 6:

 

 

cp php.ini-development /usr/local/lib/php.ini

 

I guess by default php reads the php.ini file located at /usr/local/lib/ and there isn't one there until you copy it.

 

7) The php install took care of adding the specified line to apache's http.conf.

 

 

8) I added the following to http.conf:

 

 

    SetHandler application/x-httpd-php

 

 

 

9)  To test your php install, start apache then create a file called my_test.php containing the following:

 

 

 

 

echo "My first PHP script!";

phpinfo();

?>

 

 

 

 

Put that file in the directory /usr/local/apache2/htdocs.  Then use the following url in your browser:

 

 

http//localhost:8080/my_test.php

 

 

(Note that in apache's httpd.conf file, I have this line:

 

 

Listen 8080

 

 

which makes apache listen on port 8080, which means I have to include the port in the url.)

 

 

If you scroll down the resulting page, you can see lots of php/mysql/apache configuration info.


View the original article here

Tuesday, February 26, 2013

Installing Apache 2.4.3 on OSX 10.6.8

Hi,

 

I'm trying to install Apache web server on Mac OSX 10.6.8. On my first attempt with ./configure, I was informed that my apr version was too old. So I downloaded apr and apr-util, and as instructed by the Apache INSTALL doc, I upacked those files and moved their directories to httpd-2.4.3/srclib/apr and httpd-2.4.3/srclib/apr-util:

 

~/Downloads/httpd-2.4.3/srclib$ ls Makefile

Makefile.in     apr          apr-util

 

 

Then the Apache INSTALL doc said to run configure like this:

 

 

~/Downloads/httpd-2.4.3 $ ./configure --with-included-apr

 

 

Then I got a new error:

 

configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

 

 

So I looked at the Apache installation docs here:

 

http://httpd.apache.org/docs/current/install.html

 

which say:

 

REQUIREMENTS
....
....
Perl-Compatible Regular Expressions Library (PCRE)
This library is required but not longer bundled with httpd. Download the source code from http://www.pcre.org, or install a Port or Package. If your build system can't find the pcre-config script installed by the PCRE build, point to it using the --with-pcre parameter. On some platforms, you may have to install the corresponding -dev package to allow httpd to build against your installed copy of PCRE.

 

 

So I downloaded pcre and installed pcre with ./configure, make, make install, which seemed to install pcre correctly. But when I tried to run ./configure for Apache, Apache still couldn't find pcre. So next I tried:

 

 

~/Downloads/httpd-2.4.3$ ./configure --with-included-apr --with-pcre=../pcre-8.32/pcre-config

 

 

and this time ./configure seemed to end normally.

 

On to make:

 

~/Downloads/httpd-2.4.3$  make

 

 

But make ends with pcre errors:

....

....

Downloads/httpd-2.4.3/modules/cache -I/Users/7stud/Downloads/httpd-2.4.3/modules/core -I/Users/7stud/Downloads/httpd-2.4.3/modules/database -I/Users/7stud/Downloads/httpd-2.4.3/modules/filters -I/Users/7stud/Downloads/httpd-2.4.3/modules/ldap -I/Users/7stud/Downloads/httpd-2.4.3/modules/loggers -I/Users/7stud/Downloads/httpd-2.4.3/modules/lua -I/Users/7stud/Downloads/httpd-2.4.3/modules/proxy -I/Users/7stud/Downloads/httpd-2.4.3/modules/session -I/Users/7stud/Downloads/httpd-2.4.3/modules/ssl -I/Users/7stud/Downloads/httpd-2.4.3/modules/test -I/Users/7stud/Downloads/httpd-2.4.3/server -I/Users/7stud/Downloads/httpd-2.4.3/modules/arch/unix -I/Users/7stud/Downloads/httpd-2.4.3/modules/dav/main -I/Users/7stud/Downloads/httpd-2.4.3/modules/generators -I/Users/7stud/Downloads/httpd-2.4.3/modules/mappers  -prefer-non-pic -static -c util_pcre.c && touch util_pcre.lo

util_pcre.c:48:18: error: pcre.h: No such file or directory

util_pcre.c: In function 'ap_regfree':

util_pcre.c:103: error: 'pcre_free' undeclared (first use in this function)

util_pcre.c:103: error: (Each undeclared identifier is reported only once

util_pcre.c:103: error: for each function it appears in.)

util_pcre.c: In function 'ap_regcomp':

util_pcre.c:129: error: 'PCRE_CASELESS' undeclared (first use in this function)

util_pcre.c:131: error: 'PCRE_MULTILINE' undeclared (first use in this function)

util_pcre.c:133: error: 'PCRE_DOTALL' undeclared (first use in this function)

util_pcre.c:136: warning: implicit declaration of function 'pcre_compile'

util_pcre.c:136: warning: assignment makes pointer from integer without a cast

util_pcre.c:142: warning: implicit declaration of function 'pcre_fullinfo'

util_pcre.c:142: error: expected ')' before 'pcre'

util_pcre.c:142: warning: type defaults to 'int' in declaration of 'type name'

util_pcre.c:142: warning: cast from pointer to integer of different size

util_pcre.c:143: error: 'PCRE_INFO_CAPTURECOUNT' undeclared (first use in this function)

util_pcre.c: In function 'ap_regexec_len':

util_pcre.c:180: error: 'PCRE_NOTBOL' undeclared (first use in this function)

util_pcre.c:182: error: 'PCRE_NOTEOL' undeclared (first use in this function)

util_pcre.c:198: warning: implicit declaration of function 'pcre_exec'

util_pcre.c:198: error: expected ')' before 'pcre'

util_pcre.c:198: warning: type defaults to 'int' in declaration of 'type name'

util_pcre.c:198: warning: cast from pointer to integer of different size

util_pcre.c:221: error: 'PCRE_ERROR_NOMATCH' undeclared (first use in this function)

util_pcre.c:223: error: 'PCRE_ERROR_NULL' undeclared (first use in this function)

util_pcre.c:225: error: 'PCRE_ERROR_BADOPTION' undeclared (first use in this function)

util_pcre.c:227: error: 'PCRE_ERROR_BADMAGIC' undeclared (first use in this function)

util_pcre.c:229: error: 'PCRE_ERROR_UNKNOWN_NODE' undeclared (first use in this function)

util_pcre.c:231: error: 'PCRE_ERROR_NOMEMORY' undeclared (first use in this function)

make[2]: *** [util_pcre.lo] Error 1

make[1]: *** [all-recursive] Error 1

make: *** [all-recursive] Error 1

 

 

Any ideas what went wrong or what I should try next? The Apache install web page says:

 

On some platforms, you may have to install the corresponding -dev package to allow httpd to build against your installed copy of PCRE.

 

But I can't find any information on where "the corresponding -dev package" can be downloaded.

 

Thanks.


View the original article here