Re: Using PEAR and PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 23, 2012 at 9:25 PM, Suraj Shah <suraj@xxxxxxxx> wrote:
>
>
> On 23/08/2012 20:12, "Matijn Woudt" <tijnema@xxxxxxxxx> wrote:
>
>
>
> On Thu, Aug 23, 2012 at 9:12 PM, Ashley Sheridan <ash@xxxxxxxxxxxxxxxxxxxx>
> 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/<webservername>/...

- Matijn

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




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux