This topic is locked

includepath in generated code

8/22/2005 2:44:35 AM
PHPRunner General questions
rjks author

Morning,
I am trying phprunner and have generated a simple page to test it but I can´t get past the menu after logging in, I recieve errors that functions cannot be found all of which are in include files, heres an example
Warning: main(include/locale.php) [function.main]: failed to open stream: No such file or directory in c:\programme\e-novative\WAMP\www\askbetter_2\include\wmc_kinder_functions.php on line 2
The Login works over the SQL Table and I become the list of Tables but when I select one the output is as above.
I tried changing the include path to "../include/includefile.php" but that doesn´t work either.
This is the first time I have had this problem with PHP and mySQL after trying other code generation systems, they all worked.
Anyone got a tip??
Robert

rjks author 8/22/2005

Morning again,
after trying a few things I found that the problem seems to be that when a file is included and the included file also has an included file the path to the second included file is wrong.
i.e.
Main file includes "include/db.inc"
db.inc includes "include/string.inc"
The path to string.inc is wrong as db.inc and string.inc are both in the directory include and string.inc will be searched for in include/include/string.inc which doesn´t exist.
Is there a method of correcting this??
Mybe in the php.ini or phprunner config?
Robert

admin 8/22/2005

Robert,
according to PHP docmentation string.inc will be searched in includefolder and then, if not found, in include/include.
This error seems to be a PHP configuration issue. Please let me take a look at your PHP options.

To do that please put a php file with the following contents into your WWW root then open it in browser, save the result and send it to support@xlinesoft.com.

<?php

phpinfo();

?>
501228 8/23/2005

Alexey wrote in an email:
Robert,
Please open C:\Windows\php.ini file, find the

include_path option end change it to:

include_path = ".;C:\Programme\e-novative\WAMP\php\pear"
Adding "." in the beginning will make PHP search for included files in the current folder which is common behaviour.
Best regards,

Alexey Kornilov
Robert replyed:
Hi Alexey,
that was the problem, thanks again for the very quick and effective help.
Robert