PHP require_once without the need to pass the full path

1

I have a legacy project, where all PHP files connect to the database through the file "oracle_ado.php"

This file is in the "../inc/" folder and the rest in the folder "../ prod /".

I'm setting up another server for this application, where the files in the "../prod/" folder can not find the "oracle_ado.php" file

Require is as follows ...

require_once ('oracle_ado.php');

being changed to ...

require_once ('../inc/oracle_ado.php');

The application runs seamlessly.

On the current server runs without the need to enter the path "../inc/", can anyone tell me what it can be? What is missing on the new server?

Both Linux servers

    
asked by anonymous 24.10.2017 / 12:24

1 answer

1

what should have on that server that is running within the PHP configuration in php.ini a redirect in the variable; include_path=".: / path / inc: / path / prod" ai there must be the absolute path of the inc folder , or other folders so it should work fine, on the new server if you configure so should also work, but the suggestion is you use the hosts and perform on it if you use, otherwise all other applications running will have access to the files as it gets this setting on the server.

    
24.10.2017 / 12:49