Strange problem with "glob" PHP function...

 
Post new topic   Reply to topic    Aprelium Forum Index -> PHP
View previous topic :: View next topic  
Author Message
johnfound
-


Joined: 14 Jun 2004
Posts: 4

PostPosted: Mon Jun 14, 2004 8:42 am    Post subject: Strange problem with "glob" PHP function... Reply with quote

Hi all.
I have very strange problem with PHP function "glob" using Abyss Web server.
I have 2 instalations of Abyss server on two Win98 machines with the same versions of Windows and PHP ( Win98 + PHP 4.3.7) on my home computer and my office computer.

The strange thing is the function "glob" works on my home computer, but does not work on my office computer, but returns FALSE with empty list all the time.

Maybe there are some setings in ABYSS server and/or php.ini file to make it work? Any idea?

Regards.
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Mon Jun 14, 2004 8:56 am    Post subject: Reply with quote

Its probably your php.ini , copy the php.ini from your
home and bring it to work and replace that php.ini
with your home php.ini file and it should work.

I think it has to do with Safe Mode
but im not really sure , try it though !

-------------------------------------------------------------------------------

Be sure to create a backup of your old php.ini
at your office so if something goes wrong , you
can easily put that php.ini back where it was.
Back to top View user's profile Send private message Visit poster's website
johnfound
-


Joined: 14 Jun 2004
Posts: 4

PostPosted: Mon Jun 14, 2004 9:35 am    Post subject: Reply with quote

After several experiments, I found that "glob" treats path string relatively to root of the drive, not relatively to the document root.
For example, when I call glob("content/*.txt", 0) - it searches in "D:/content/*.txt" and of course returns empty list. When I copy the directory "content" from my web server document root to the root of the drive, the script begins to work fine and "glob" returns "proper" lists with files.

File functions on the other hand, work fine with relative paths: file_get_contents("content/somefile.txt") read the file in "D:/WebSites/htdocs/content/somefile.txt" in exactly proper way.

It seems for me that this is because of some server setings, not PHP. Of course I can be wrong...

Regards.
Back to top View user's profile Send private message
johnfound
-


Joined: 14 Jun 2004
Posts: 4

PostPosted: Tue Jun 15, 2004 6:53 am    Post subject: Reply with quote

Hi all, again.
I changed the file php.ini with the one from my home computer, as TRUSTpunk suggested, but unfortunately nothing happen. The problem still exists.

Can someone help me?... Or this is PHP interpreter problem?

Regards.
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Tue Jun 15, 2004 1:25 pm    Post subject: Reply with quote

johnfound,

If you can't find the solution please send us your php.ini and abyss.conf files (from both computers) and your script to support@aprelium.com . Tell us also how the problem happens in the second computer.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
johnfound
-


Joined: 14 Jun 2004
Posts: 4

PostPosted: Tue Jun 15, 2004 7:38 pm    Post subject: Reply with quote

aprelium wrote:
johnfound,
If you can't find the solution please send us your php.ini and abyss.conf files (from both computers) and your script to support@aprelium.com . Tell us also how the problem happens in the second computer.


Thank you all. It seems that I found what was the problem.

The problem was actually in php.exe. On my home computer I have installed version 4.3.6 but on my office computer was version 4.3.7 (probably buggy...) the problem disapeared after downloading and installing on my office computer newest version from the CVS - namely 4.3.8

Best regards.
John Found
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> PHP All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group