Re: [PHP] Using PEAR and PHP

2012-08-23 Thread Matijn Woudt
On Thu, Aug 23, 2012 at 9:25 PM, Suraj Shah  wrote:
>
>
> On 23/08/2012 20:12, "Matijn Woudt"  wrote:
>
>
>
> On Thu, Aug 23, 2012 at 9:12 PM, Ashley Sheridan 
> wrote:
>
>
> On Thu, 2012-08-23 at 20:33 +0200, Matijn Woudt wrote:
>
>>
>> OK thanks Matijn.
>>
>> I’ll google it now and install it.
>>
>> There is a site.php as well as a config.php file in the sub-directory of
>> the
>> old server. I’ve copied these over but not sure why it still doesn’t
>> recognise it. I’ve amended the code to point to the new server as well.
>>
>> Suraj
>
> The old server has probably some freaky settings that make that
> directory automatically included, for example by modifing the php
> include dir in php.ini, or it is part of a package. You can open up
> this site.php file and look at the first lines, it might give you a
> hint if it's part of some package.
>
> - Matijn
>
>
> You just made me think actually, could it be an .htaccess file re-routing
> the file paths (different to URL re-routing)? Because of the way MacOS and
> Linux works, an .htaccess file would be hidden by default and therefore not
> necessarily copied across.
>
>
>
> That could be a possibility, though looking at the code Suraj send it's not
> very likely as there is path redirect magic in there. Most likely the web
> folder is named differently (it seems like it assumes the web files to be in
> public_html, which might not be the case in his new server.
>
> - Matijn
>
> You’re right Matijn.
>
> It’s currently pointing to a folder called ‘public_html’ where the index.php
> and the rest of the website is stored. I, first, tried configuring it so
> that on the new server, it was directly within the root server but this kept
> on bringing error messages.
>
> I then replicated the old server on the new server but am still getting
> these error messages as described earlier.
>
> Also, I have typed in ls  -a and it comes up with the directories, but there
> is no “such file” for .htaccess.
>
> Suraj

It's hard to say how the files should be stored and how it should be
configured, because it is specific to your old website.
All I can say now is, check the following:
1) Make sure you copied all files from the old server, so that all
files end up at the same place in the new server.
2) .htaccess files can also be stored in subdirectories, though that
doesn't seem likely here.
3) Check you old website virtual host config, this depends on which
webserver there is. In most (all?) webservers it is possibily to
specify URL redirects. For Apache on a Unix based server, check the
config files in /etc/apache (ubuntu has them in
/etc/apache/sites_enabled), Nginx would be in /etc/nginx (Ubuntu also
has them in /etc/nginx/sites_enabled). Other webservers probably also
have their config files in /etc//...

- Matijn

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Using PEAR and PHP

2012-08-23 Thread Suraj Shah


On 23/08/2012 20:12, "Matijn Woudt"  wrote:



On Thu, Aug 23, 2012 at 9:12 PM, Ashley Sheridan  
wrote:

On Thu, 2012-08-23 at 20:33 +0200, Matijn Woudt wrote:
>
> OK thanks Matijn.
>
> I’ll google it now and install it.
>
> There is a site.php as well as a config.php file in the sub-directory of the
> old server. I’ve copied these over but not sure why it still doesn’t
> recognise it. I’ve amended the code to point to the new server as well.
>
> Suraj

The old server has probably some freaky settings that make that
directory automatically included, for example by modifing the php
include dir in php.ini, or it is part of a package. You can open up
this site.php file and look at the first lines, it might give you a
hint if it's part of some package.

- Matijn


You just made me think actually, could it be an .htaccess file re-routing the 
file paths (different to URL re-routing)? Because of the way MacOS and Linux 
works, an .htaccess file would be hidden by default and therefore not 
necessarily copied across.



That could be a possibility, though looking at the code Suraj send it's not 
very likely as there is path redirect magic in there. Most likely the web 
folder is named differently (it seems like it assumes the web files to be in 
public_html, which might not be the case in his new server.

- Matijn

You’re right Matijn.

It’s currently pointing to a folder called ‘public_html’ where the index.php 
and the rest of the website is stored. I, first, tried configuring it so that 
on the new server, it was directly within the root server but this kept on 
bringing error messages.

I then replicated the old server on the new server but am still getting these 
error messages as described earlier.

Also, I have typed in ls  -a and it comes up with the directories, but there is 
no “such file” for .htaccess.

Suraj


Re: [PHP] Using PEAR and PHP

2012-08-23 Thread Matijn Woudt
On Thu, Aug 23, 2012 at 9:12 PM, Ashley Sheridan
wrote:

> **
> On Thu, 2012-08-23 at 20:33 +0200, Matijn Woudt wrote:
>
> >
> > OK thanks Matijn.
> >
> > I’ll google it now and install it.
> >
> > There is a site.php as well as a config.php file in the sub-directory of the
> > old server. I’ve copied these over but not sure why it still doesn’t
> > recognise it. I’ve amended the code to point to the new server as well.
> >
> > Suraj
>
> The old server has probably some freaky settings that make that
> directory automatically included, for example by modifing the php
> include dir in php.ini, or it is part of a package. You can open up
> this site.php file and look at the first lines, it might give you a
> hint if it's part of some package.
>
> - Matijn
>
>
>
> You just made me think actually, could it be an .htaccess file re-routing
> the file paths (different to URL re-routing)? Because of the way MacOS and
> Linux works, an .htaccess file would be hidden by default and therefore not
> necessarily copied across.
>
>
>
That could be a possibility, though looking at the code Suraj send it's not
very likely as there is path redirect magic in there. Most likely the web
folder is named differently (it seems like it assumes the web files to be
in public_html, which might not be the case in his new server.

- Matijn


Re: [PHP] Using PEAR and PHP

2012-08-23 Thread Matijn Woudt
On Thu, Aug 23, 2012 at 9:14 PM, Suraj Shah  wrote:
>
>
>
> On 23/08/2012 20:12, "Ashley Sheridan"  wrote:
>
> On Thu, 2012-08-23 at 20:33 +0200, Matijn Woudt wrote:
>
>
>>
>> OK thanks Matijn.
>>
>> I’ll google it now and install it.
>>
>> There is a site.php as well as a config.php file in the sub-directory of
>> the
>> old server. I’ve copied these over but not sure why it still doesn’t
>> recognise it. I’ve amended the code to point to the new server as well.
>>
>> Suraj
>
> The old server has probably some freaky settings that make that
> directory automatically included, for example by modifing the php
> include dir in php.ini, or it is part of a package. You can open up
> this site.php file and look at the first lines, it might give you a
> hint if it's part of some package.
>
> - Matijn
>
>
> You just made me think actually, could it be an .htaccess file re-routing
> the file paths (different to URL re-routing)? Because of the way MacOS and
> Linux works, an .htaccess file would be hidden by default and therefore not
> necessarily copied across.
>
>
>
> Ok thanks Ashley.
>
> If this .htaccess file was hidden by default, how would I go about accessing
> it and copying or transferring it over?
>
> Suraj

On Linux systems (and probably Mac too), you can show if there are
hidden files by using ls -a.
You can just use cp .htaccess  to copy.

- Matijn

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Using PEAR and PHP

2012-08-23 Thread Suraj Shah



On 23/08/2012 20:12, "Ashley Sheridan"  wrote:

On Thu, 2012-08-23 at 20:33 +0200, Matijn Woudt wrote:

>
> OK thanks Matijn.
>
> I’ll google it now and install it.
>
> There is a site.php as well as a config.php file in the sub-directory of the
> old server. I’ve copied these over but not sure why it still doesn’t
> recognise it. I’ve amended the code to point to the new server as well.
>
> Suraj

The old server has probably some freaky settings that make that
directory automatically included, for example by modifing the php
include dir in php.ini, or it is part of a package. You can open up
this site.php file and look at the first lines, it might give you a
hint if it's part of some package.

- Matijn


You just made me think actually, could it be an .htaccess file re-routing the 
file paths (different to URL re-routing)? Because of the way MacOS and Linux 
works, an .htaccess file would be hidden by default and therefore not 
necessarily copied across.


Ok thanks Ashley.

If this .htaccess file was hidden by default, how would I go about accessing it 
and copying or transferring it over?

Suraj


Re: [PHP] Using PEAR and PHP

2012-08-23 Thread Ashley Sheridan
On Thu, 2012-08-23 at 20:33 +0200, Matijn Woudt wrote:

> >
> > OK thanks Matijn.
> >
> > I’ll google it now and install it.
> >
> > There is a site.php as well as a config.php file in the sub-directory of the
> > old server. I’ve copied these over but not sure why it still doesn’t
> > recognise it. I’ve amended the code to point to the new server as well.
> >
> > Suraj
> 
> The old server has probably some freaky settings that make that
> directory automatically included, for example by modifing the php
> include dir in php.ini, or it is part of a package. You can open up
> this site.php file and look at the first lines, it might give you a
> hint if it's part of some package.
> 
> - Matijn
> 


You just made me think actually, could it be an .htaccess file
re-routing the file paths (different to URL re-routing)? Because of the
way MacOS and Linux works, an .htaccess file would be hidden by default
and therefore not necessarily copied across.

-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] Using PEAR and PHP

2012-08-23 Thread Suraj Shah



On 23/08/2012 19:33, "Matijn Woudt"  wrote:

>>
>> OK thanks Matijn.
>>
>> I’ll google it now and install it.
>>
>> There is a site.php as well as a config.php file in the sub-directory of the
>> old server. I’ve copied these over but not sure why it still doesn’t
>> recognise it. I’ve amended the code to point to the new server as well.
>>
>> Suraj
>
> The old server has probably some freaky settings that make that
> directory automatically included, for example by modifing the php
> include dir in php.ini, or it is part of a package. You can open up
> this site.php file and look at the first lines, it might give you a
> hint if it's part of some package.
>
> - Matijn


This is currently what the first few lines of code say:



Re: [PHP] Using PEAR and PHP

2012-08-23 Thread Matijn Woudt
>
> OK thanks Matijn.
>
> I’ll google it now and install it.
>
> There is a site.php as well as a config.php file in the sub-directory of the
> old server. I’ve copied these over but not sure why it still doesn’t
> recognise it. I’ve amended the code to point to the new server as well.
>
> Suraj

The old server has probably some freaky settings that make that
directory automatically included, for example by modifing the php
include dir in php.ini, or it is part of a package. You can open up
this site.php file and look at the first lines, it might give you a
hint if it's part of some package.

- Matijn

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Using PEAR and PHP

2012-08-23 Thread Suraj Shah



On 23/08/2012 19:26, "Matijn Woudt"  wrote:



On Thu, Aug 23, 2012 at 8:21 PM, Suraj Shah  wrote:



On 23/08/2012 19:11, "Matijn Woudt" http://tijn...@gmail.com> > wrote:

> On Thu, Aug 23, 2012 at 8:12 PM, Suraj Shah   > wrote:
>> Thanks for your reply Ashley.
>>
>> I’m getting the attached error message which I can’t seem to solve. If it’s
>> just a matter of adding code to use for a library, would this be possible?
>> How do I go about configuring it?
>>
>> Many thanks,
>> Suraj
>>
>
> Suraj,
>
> Attachments usually don't work at mailing lists, you should paste it
> in your mail, or use something like pastebin. Second, you should
> bottom post at this (and probably any) mailing list.
> About your question, you can install the php-pear package if you don't
> have it from your package manager, and then all you have to do is call
> pear install 
> and you're done.
>
> - Matijn


Thank you Matijn.

Please find below the message I get when loading the page:



As I am totally new to this, I am not sure how to get the package manager or to 
install this on my Mac.

Sorry.

Suraj

Hi,

I don't know much about PHP on Mac, though I think you'll find something useful 
on google with 'Install PEAR on Mac'.
Looking at the error, it might be pearweb, or is there a site.php file in your 
web folder on the old server?


- Matijn


OK thanks Matijn.

I’ll google it now and install it.

There is a site.php as well as a config.php file in the sub-directory of the 
old server. I’ve copied these over but not sure why it still doesn’t recognise 
it. I’ve amended the code to point to the new server as well.

Suraj


Re: [PHP] Using PEAR and PHP

2012-08-23 Thread Matijn Woudt
On Thu, Aug 23, 2012 at 8:21 PM, Suraj Shah  wrote:

>
>
>
> On 23/08/2012 19:11, "Matijn Woudt"  wrote:
>
> > On Thu, Aug 23, 2012 at 8:12 PM, Suraj Shah  wrote:
> >> Thanks for your reply Ashley.
> >>
> >> I’m getting the attached error message which I can’t seem to solve. If
> it’s
> >> just a matter of adding code to use for a library, would this be
> possible?
> >> How do I go about configuring it?
> >>
> >> Many thanks,
> >> Suraj
> >>
> >
> > Suraj,
> >
> > Attachments usually don't work at mailing lists, you should paste it
> > in your mail, or use something like pastebin. Second, you should
> > bottom post at this (and probably any) mailing list.
> > About your question, you can install the php-pear package if you don't
> > have it from your package manager, and then all you have to do is call
> > pear install 
> > and you're done.
> >
> > - Matijn
>
>
> Thank you Matijn.
>
> Please find below the message I get when loading the page:
>
>
>
> As I am totally new to this, I am not sure how to get the package manager
> or to install this on my Mac.
>
> Sorry.
>
> Suraj
>

Hi,

I don't know much about PHP on Mac, though I think you'll find something
useful on google with 'Install PEAR on Mac'.
Looking at the error, it might be pearweb, or is there a site.php file in
your web folder on the old server?


- Matijn


Re: [PHP] Using PEAR and PHP

2012-08-23 Thread Suraj Shah



On 23/08/2012 19:11, "Matijn Woudt"  wrote:

> On Thu, Aug 23, 2012 at 8:12 PM, Suraj Shah  wrote:
>> Thanks for your reply Ashley.
>>
>> I’m getting the attached error message which I can’t seem to solve. If it’s
>> just a matter of adding code to use for a library, would this be possible?
>> How do I go about configuring it?
>>
>> Many thanks,
>> Suraj
>>
>
> Suraj,
>
> Attachments usually don't work at mailing lists, you should paste it
> in your mail, or use something like pastebin. Second, you should
> bottom post at this (and probably any) mailing list.
> About your question, you can install the php-pear package if you don't
> have it from your package manager, and then all you have to do is call
> pear install 
> and you're done.
>
> - Matijn


Thank you Matijn.

Please find below the message I get when loading the page:

[cid:3428594509_2202610]

As I am totally new to this, I am not sure how to get the package manager or to 
install this on my Mac.

Sorry.

Suraj


Re: [PHP] Using PEAR and PHP

2012-08-23 Thread Ashley Sheridan
On Thu, 2012-08-23 at 19:12 +0100, Suraj Shah wrote:

> Thanks for your reply Ashley.
> 
> I’m getting the attached error message which I can’t seem to solve. If
> it’s just a matter of adding code to use for a library, would this be
> possible? How do I go about configuring it?
> 
> Many thanks,
> Suraj
> 
> 
> 
> On 23/08/2012 19:08, "Ashley Sheridan" 
> wrote:
> 
> 
> On Thu, 2012-08-23 at 18:42 +0100, Suraj Shah wrote: 
> 
> 
> Hi.
> 
> I am currently working on a website which uses PHP as
> an integral programming language as part of it.
> 
> I am trying to replicate the website’s contents from
> one ftp server to another but am encountering serious
> issues in doing so. I’ve spent two days trying to find
> out the reasons and now think its down to the PEAR
> installation.
> 
> This is therefore a question on if I want to transfer
> a website from one domain to another, then do I need
> to install PEAR and re-configure all the files? At the
> moment, all I can see within the ftp client regarding
> PEAR are the ‘Mail’ and ‘Mail_Mime’ components.
> 
> I am new to this so any help on this would be great.
> 
> Many thanks
> 
> Suraj
> 
> 
> Suraj Shah
> Online Marketing Executive
> 26 Throgmorton Street | London | EC2N 2AN
> t: 020 7826 9031
> e: su...@aifa.net
> w: www.aifa.net  
> 
> 
> That would depend. Some servers install Pear outside the web
> root but in a location the web server has access to so that it
> can be used within your own scripts. Most often though, I've
> just seen code use a library or two from Pear and include them
> like you can see from your FTP access.
> 
> What kinds of errors are you getting when you attempt to get
> the site running on the second server?
> 
> 
> Suraj Shah
> Online Marketing Executive
> 26 Throgmorton Street | London | EC2N 2AN
> t: 020 7826 9031
> e: su...@aifa.net
> w: www.aifa.net
> twitter: @official_AIFA


Sorry, attachments get removed on this mailing list. Could you please
paste it into the body of one of your replies.

Also, please try not to top-post.

-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk




Re: [PHP] Using PEAR and PHP

2012-08-23 Thread Lester Caine

Suraj Shah wrote:

I am currently working on a website which uses PHP as an integral programming 
language as part of it.

I am trying to replicate the website’s contents from one ftp server to another 
but am encountering serious issues in doing so. I’ve spent two days trying to 
find out the reasons and now think its down to the PEAR installation.

This is therefore a question on if I want to transfer a website from one domain 
to another, then do I need to install PEAR and re-configure all the files? At 
the moment, all I can see within the ftp client regarding PEAR are the ‘Mail’ 
and ‘Mail_Mime’ components.

I am new to this so any help on this would be great.


PEAR can be managed in a number of ways. You do not say what OS you are working 
on, but most linux distributions carry PEAR packages as additional packages you 
can download and install with the PHP setup. This is often the preferred way of 
doing things, so if those packages have not been installed on your target 
system, then there will obviously be problems.


What I have done for some time since I used to be working between Linux and 
Windows servers was include the PEAR packages that I use as extra libraries 
within the website itself. That way the correct version is always distributed 
with the website.


What you need to do will depend on how you are currently accessing PEAR 
packages, and also which packages you are using.


--
Lester Caine - G8HFL
-
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk
Rainbow Digital Media - http://rainbowdigitalmedia.co.uk



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Using PEAR and PHP

2012-08-23 Thread Matijn Woudt
On Thu, Aug 23, 2012 at 8:12 PM, Suraj Shah  wrote:
> Thanks for your reply Ashley.
>
> I’m getting the attached error message which I can’t seem to solve. If it’s 
> just a matter of adding code to use for a library, would this be possible? 
> How do I go about configuring it?
>
> Many thanks,
> Suraj
>

Suraj,

Attachments usually don't work at mailing lists, you should paste it
in your mail, or use something like pastebin. Second, you should
bottom post at this (and probably any) mailing list.
About your question, you can install the php-pear package if you don't
have it from your package manager, and then all you have to do is call
pear install 
and you're done.

- Matijn

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Using PEAR and PHP

2012-08-23 Thread Suraj Shah
Thanks for your reply Ashley.

I’m getting the attached error message which I can’t seem to solve. If it’s 
just a matter of adding code to use for a library, would this be possible? How 
do I go about configuring it?

Many thanks,
Suraj



On 23/08/2012 19:08, "Ashley Sheridan"  wrote:

On Thu, 2012-08-23 at 18:42 +0100, Suraj Shah wrote:

Hi.

I am currently working on a website which uses PHP as an integral programming 
language as part of it.

I am trying to replicate the website’s contents from one ftp server to another 
but am encountering serious issues in doing so. I’ve spent two days trying to 
find out the reasons and now think its down to the PEAR installation.

This is therefore a question on if I want to transfer a website from one domain 
to another, then do I need to install PEAR and re-configure all the files? At 
the moment, all I can see within the ftp client regarding PEAR are the ‘Mail’ 
and ‘Mail_Mime’ components.

I am new to this so any help on this would be great.

Many thanks

Suraj


Suraj Shah
Online Marketing Executive
26 Throgmorton Street | London | EC2N 2AN
t: 020 7826 9031
e: su...@aifa.net
w: www.aifa.net 

That would depend. Some servers install Pear outside the web root but in a 
location the web server has access to so that it can be used within your own 
scripts. Most often though, I've just seen code use a library or two from Pear 
and include them like you can see from your FTP access.

What kinds of errors are you getting when you attempt to get the site running 
on the second server?

Suraj Shah
Online Marketing Executive
26 Throgmorton Street | London | EC2N 2AN
t: 020 7826 9031
e: su...@aifa.net
w: www.aifa.net
twitter: @official_AIFA


Re: [PHP] Using PEAR and PHP

2012-08-23 Thread Ashley Sheridan
On Thu, 2012-08-23 at 18:42 +0100, Suraj Shah wrote:

> Hi.
> 
> I am currently working on a website which uses PHP as an integral programming 
> language as part of it.
> 
> I am trying to replicate the website’s contents from one ftp server to 
> another but am encountering serious issues in doing so. I’ve spent two days 
> trying to find out the reasons and now think its down to the PEAR 
> installation.
> 
> This is therefore a question on if I want to transfer a website from one 
> domain to another, then do I need to install PEAR and re-configure all the 
> files? At the moment, all I can see within the ftp client regarding PEAR are 
> the ‘Mail’ and ‘Mail_Mime’ components.
> 
> I am new to this so any help on this would be great.
> 
> Many thanks
> 
> Suraj
> 
> 
> Suraj Shah
> Online Marketing Executive
> 26 Throgmorton Street | London | EC2N 2AN
> t: 020 7826 9031
> e: su...@aifa.net
> w: www.aifa.net


That would depend. Some servers install Pear outside the web root but in
a location the web server has access to so that it can be used within
your own scripts. Most often though, I've just seen code use a library
or two from Pear and include them like you can see from your FTP access.

What kinds of errors are you getting when you attempt to get the site
running on the second server?

-- 
Thanks,
Ash
http://www.ashleysheridan.co.uk




[PHP] Using PEAR and PHP

2012-08-23 Thread Suraj Shah
Hi.

I am currently working on a website which uses PHP as an integral programming 
language as part of it.

I am trying to replicate the website’s contents from one ftp server to another 
but am encountering serious issues in doing so. I’ve spent two days trying to 
find out the reasons and now think its down to the PEAR installation.

This is therefore a question on if I want to transfer a website from one domain 
to another, then do I need to install PEAR and re-configure all the files? At 
the moment, all I can see within the ftp client regarding PEAR are the ‘Mail’ 
and ‘Mail_Mime’ components.

I am new to this so any help on this would be great.

Many thanks

Suraj


Suraj Shah
Online Marketing Executive
26 Throgmorton Street | London | EC2N 2AN
t: 020 7826 9031
e: su...@aifa.net
w: www.aifa.net