Questions tagged [set-include-path]
31 questions
0
votes
0 answers
PHP set_include_path to replace template files if file exists
I have implemented a simple template system using Oscommerce 2.3.4. So that I can run multiple shops, with the potential to change the content or look of a shop on a 'site' or 'template' basis.
The core OSC files (module files, classes etc.) still…

dading84
- 1,210
- 12
- 18
0
votes
1 answer
set_include_path does not have an effect when used in browser
I am using set_include_path() to add to the PHP search path so the server can find the gs executable. Things work as expected when I run the script from the command line (i.e., "php testpath.php") but, when I invoke the script from the browser on…

hitlad
- 431
- 1
- 3
- 13
0
votes
1 answer
Where PHP "set_include_path" is effective?
I would like to add my_path to include_path and include files relatively to my_path.
Is that enough to set the include_path using set_include_path in the main PHP file of my website, or I must do this in every PHP file ?

Misha Moroshko
- 166,356
- 226
- 505
- 746
0
votes
0 answers
Shared hosting, add library path (similar to ZEND)
I am actually installing google API Library.
I can't change php.ini, so I am trying to use set_include_path()
$clientLibraryPath = "/library/Zend";
$old = get_include_path(); // = .:/usr/local/php5.4/lib/php
$new =…

Bastien Saugat
- 11
- 3
0
votes
2 answers
Having a problem with namespaces and set_include_path() in PHP
C:\xampp\htdocs contains Controller.php and ApplicationHelper.php. C:\xampp\htdocs\site contains index.php.
Here is the error I am getting:
Fatal error: Class 'site\controller\ApplicationHelper' not found in C:\xampp\htdocs\Controller.php on line…

birderic
- 3,745
- 1
- 23
- 36
0
votes
0 answers
Yii how to include ssh2 library
I am Newbie in Yii and i am trying to include the library ssh2 in Yii, I made:
set_include_path(get_include_path().PATH_SEPARATOR.'/home/local/php/');
include('Net/SSH2.php');
$ip = "192.168.199.17";
$ssh = new Net_SSH2($ip);
It gives:
Error…
0
votes
1 answer
Dealing with PHPUnit path issues
I am getting the following error when I try to run PHPUnit from within my current MVC framework application
Fatal error: Cannot redeclare class PHPUnit_Util_FilterIterator in /usr/local/pear/PHPUnit/Util/FilterIterator.php on line 162
I've managed…

Alex C
- 16,624
- 18
- 66
- 98
0
votes
1 answer
Include path and weird structure
Hai.
I've got site which is really weird, and now is making me troubles.
This is simplified structure
public_html
- adm
--- raport
------ raportpdf.php
--- class
------ Bonus
--------- Bonus_DAO.class.php
------ config.php
--- raport.php
-…

Misiur
- 5,019
- 8
- 38
- 54
0
votes
0 answers
PHP set_include_path and require_once
I have an error that happens only on my host server, on my local environment not:
Fatal error: require_once() [function.require]: Failed opening required '\Audero\Loader\AutoLoader.php'…

Bibou
- 11
- 1
0
votes
1 answer
Include path ignored
I have the following code (simplified) to add a path to my include paths (to temporarily fix an website with old code).
set_include_path(get_include_path() . PATH_SEPARATOR . '/foo/bar');
I have a settings file /foo/settings/settings.inc.php
Now…

Matthijn
- 3,126
- 9
- 46
- 69
0
votes
1 answer
Fatal error: require_once(): Failed opening required file.php
I've a site that runs on my local machine. These rows are ok when I'm on OSX. While on windows generates errors:
set_include_path ( get_include_path () . ':' . dirname ( __FILE__ ) . '/../lib/propel/runtime/lib/' );
set_include_path (…

Massimo Variolo
- 4,669
- 6
- 38
- 64
0
votes
1 answer
PHP: Why isn't my `set_include_path()` working when pointing up one directory?
There's a little library I'm trying to plug in to my project. This lib has some includes and requires across classes, so I'm trying to set an include path for all that to work.
When trying to set an include path off a sibling branch, I run into a…

mOrloff
- 2,547
- 4
- 29
- 48
0
votes
1 answer
How to set_include_path in php (Dreamweaver)?
How to set_include_path for php project?
Now I set path is
include('Zend/Search/Lucene.php');
set_include_path('Zend'.PATH_SEPARATOR.get_include_path());
require_once('Zend/Loader.php'); and directory for save this project…
set_include_path('Zend'.PATH_SEPARATOR.get_include_path());
require_once('Zend/Loader.php'); and directory for save this project…

Panda Pat
- 1
- 1
-1
votes
1 answer
Running C file in Visual Studio Code (Windows) without error - #include stdio.h cannot open source file
How to run a C file in Visual Studio without:
having error message #include stdio.h cannot open source file; and
not download mingw for Visual Studio Code?

WONG NICHOLAS _
- 87
- 9
-1
votes
1 answer
Does PHP/Apache look for an includes folder by default?
I have recently discovered set_include_path() and have found that the path that is returned is the path to my includes directory.
Does PHP automatically look for an includes directory and update the include_path to this?
I have also noticed that the…

hungerstar
- 21,206
- 6
- 50
- 59