|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2000-07-19 13:16 UTC] amour at centras dot lt
I don't know where the problem is. But the fact is that relative paths don't work on my server. I'm using IIS4 server. I use relative path in include() and fopen() functions. For example, include("_settings.php")... It's worked with PHP4.0.0! The php.ini files are identical! From both versions I'm using.
I'm using 4.0.1pl2 version of PHP. It's binary version downloaded from php.net...
I can send you my php.ini if the problem can be in it...
That's all for now. Bye
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 08 10:00:01 2025 UTC |
More information from cynic@mail.cz Hi. I found out relative paths work with 4.0.2 DSO on Apache 1.3.12. And though I don't know the mechanism behind it, I found what has probably made the difference. As of 4 months ago win32 DSO PHP4 stopped building. The hack I was told to use was to delete everything but #include calls from <apache>/src/os/win32/readdir.h before building PHP. The original readdir.h from the 1.3.12 source looks like this: /* * Structures and types used to implement opendir/readdir/closedir * on Windows 95/NT. */ #include <io.h> #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #ifndef API_EXPORT # define API_EXPORT(type) __declspec(dllexport) type __stdcall #endif /* struct dirent - same as Unix */ struct dirent { long d_ino; /* inode (always 1 in WIN32) */ off_t d_off; /* offset to this dirent */ unsigned short d_reclen; /* length of d_name */ char d_name[_MAX_FNAME+1]; /* filename (null terminated) */ }; /* typedef DIR - not the same as Unix */ typedef struct { long handle; /* _findfirst/_findnext handle */ short offset; /* offset into directory */ short finished; /* 1 if there are not more files */ struct _finddata_t fileinfo; /* from _findfirst/_findnext */ char *dir; /* the dir we are reading */ struct dirent dent; /* the dirent to return */ } DIR; /* Function prototypes */ API_EXPORT(DIR *) opendir(const char *); API_EXPORT(struct dirent *) readdir(DIR *); API_EXPORT(int) closedir(DIR *); which I trimmed to this: /* * Structures and types used to implement opendir/readdir/closedir * on Windows 95/NT. */ #include <io.h> #include <stdio.h> #include <stdlib.h> #include <sys/types.h> With this readdir.h, relative paths work in 4.0.2 DSO. In the post 1.3.12 snapshot I tried (apache-1_3_20000825161201), readdir.h changed: /* * Structures and types used to implement opendir/readdir/closedir * on Windows 95/NT. */ #ifndef APACHE_READDIR_H #define APACHE_READDIR_H #include <io.h> #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #ifndef API_EXPORT # define API_EXPORT(type) __declspec(dllexport) type __stdcall #endif /* struct dirent - same as Unix */ struct dirent { long d_ino; /* inode (always 1 in WIN32) */ off_t d_off; /* offset to this dirent */ unsigned short d_reclen; /* length of d_name */ char d_name[_MAX_FNAME+1]; /* filename (null terminated) */ }; /* typedef DIR - not the same as Unix */ typedef struct { long handle; /* _findfirst/_findnext handle */ short offset; /* offset into directory */ short finished; /* 1 if there are not more files */ struct _finddata_t fileinfo; /* from _findfirst/_findnext */ char *dir; /* the dir we are reading */ struct dirent dent; /* the dirent to return */ } DIR; /* Function prototypes */ API_EXPORT(DIR *) opendir(const char *); API_EXPORT(struct dirent *) readdir(DIR *); API_EXPORT(int) closedir(DIR *); #endif /* ndef APACHE_READDIR_H */ I cut this down to what's below, and relative paths didn't work anymore. I'm no C programmer, so this is probably all the help I can provide. Well, I can compile and test more snapshots if needed. /* * Structures and types used to implement opendir/readdir/closedir * on Windows 95/NT. */ #ifndef APACHE_READDIR_H #define APACHE_READDIR_H #include <io.h> #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #endif /* ndef APACHE_READDIR_H */ As for compile-time errors, both builds yielded just the usual bunch of benign macro redefinitions and maybe some signed/unsigned int comparisions. At 09:19 AM 8/30/00 -0600, Zak Greant wrote the following: -------------------------------------------------------------- >At 03:05 PM 8/30/00 +0200, you wrote: >>4.0.2 and latest CVS (php4-200008300445) on NT4 SP5 with >>apache-1_3_20000825161201 still affected. Should I try it >>with 1.3.12? > >Hi Cynic, > >If you have time, that would be great! :) I anticipate that you will get exactly the same results. > >- Zak > ------end of quote------