Re: PHP extension and the open file

From: Date: Sun, 03 Jun 2007 18:34:04 +0000
Subject: Re: PHP extension and the open file
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-4697@lists.php.net to get a copy of this message
homer242 wrote: > Hi, > > I've coded an extension for php in C. It's based on an other project > called "redtemplate" write in C too. Redtemplate is a template system > likes clearsilver. > > In my extension, there are the function rd_display($file) which call > redtemplate_parse() which open the $file with open or fopen (lex/yacc do > this job). > > My problem is that extension doesn't work in browser. I mean, in > console, "php index.php" work but in browser, on the same php file, i > have this message : > > Fatal error: File 'themes/lanteam/main.html' not found ! ... > > > I think the problem is where php is executed in apache. > > What do i do to solve this problem ? Set your include_path correctly. PHP changes the cwd to the directory the top script is in which is apparently not where your themes directory is. -Rasmus

« previous php.pecl.dev (#4697) next »