PHP Classes

problem with linux

Recommend this page to a friend!

      RSS Feed Reader  >  All threads  >  problem with linux  >  (Un) Subscribe thread alerts  
Subject:problem with linux
Summary:Why it does not work on linux servers?
Messages:5
Author:Javad Ahmadzadeh
Date:2009-04-24 18:27:41
Update:2009-04-24 20:46:24
 

  1. problem with linux   Reply   Report abuse  
Picture of Javad Ahmadzadeh Javad Ahmadzadeh - 2009-04-24 18:27:41
There is no problem in windows but when I'm going to test it on linux it turns this message ::

Warning: Invalid argument supplied for foreach()

  2. Re: problem with linux   Reply   Report abuse  
Picture of Daniel Tlach Daniel Tlach - 2009-04-24 19:34:07 - In reply to message 1 from Javad Ahmadzadeh
Thanks for report. I'll try it right now and see what's wrong.

  3. Re: problem with linux   Reply   Report abuse  
Picture of Daniel Tlach Daniel Tlach - 2009-04-24 19:52:22 - In reply to message 1 from Javad Ahmadzadeh
Hmm, tested on Linux and don't have any problems...

pg24.tv/_rss/example.php
src.danaketh.com/repository/Rss/exa ...

Both are Linux servers and on both it works. I thought that I maybe have some problem with reading feed from different sites but tested with phpclasses.org RSS it works.

Maybe this is caused by the issue I made a note in source code - on some hostings is possible that file_get_contents() or fopen() or both can't read remote files. Also SimpleXML may not be present...

Will be nice if you'd be able to provide me with more informations about the server and it's PHP config so I can set up same config on my dev server and try how the class will (or will not) work.

I'll also put some time to make a better error catching inside the class.

  4. Re: problem with linux   Reply   Report abuse  
Picture of Javad Ahmadzadeh Javad Ahmadzadeh - 2009-04-24 20:06:15 - In reply to message 3 from Daniel Tlach
Thanks god !!

I found the problem cause ....

You were right, fopen() command was denied. I'm using ini_set in my code

  5. Re: problem with linux   Reply   Report abuse  
Picture of Daniel Tlach Daniel Tlach - 2009-04-24 20:46:24 - In reply to message 4 from Javad Ahmadzadeh
:) I'm glad it works for you now.