Re: Using remote include config file and class in a local file

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

 



Including security warning from php.net/

"Remote file may be processed at the remote server (depending on the
file extension and the fact if the remote server runs PHP or not) but
it still has to produce a valid PHP script because it will be
processed at the local server. If the file from the remote server
should be processed there and outputted only, readfile() is much
better function to use. Otherwise, special care should be taken to
secure the remote script to produce a valid and desired code."

Deos the file produce a valid PHP script? Please make a HTTP request
and post output here. You should get valid PHP file.

If not you should fix the problem with two possible solutions.

By disabling PHP script execution on remote server. This could be
impossible if remote server runs an active PHP server.

Or by editing file to produce a valid PHP script. For example:
     echo "class RemoteClass() { echo "test" }"
would produce a valid PHP script.


Cemal Eker




On Tue, Nov 3, 2009 at 10:35 AM, Anton Heuschen <antonfh@xxxxxxxxx> wrote:
> Question is wrt to including a config file on an external server in a
> local include
>
> Lets say that on 127.0.0.1 I have test.php with
>
> include http://200.200.1.1/Folder/Config.php
>
> $obj = new RemoteClass()
>
> do stuff
>
>
> and on server 200.200.1.1 I have my Config.php file which is contains
> the class RemoteClass() { echo "test" }
>
>
>
> If I try to test it locally it says it cannot find RemoteClass ...
>
>
> How can I include/require a config (or any other php classes file) on
> my local running php script ?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

-- 
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