Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.0
Author Message
JohnO
New Member
New Member



Joined: Jan 09, 2004
Posts: 9

PostPosted: Fri Jan 09, 2004 9:04 am Reply with quote

I've used Stock Quote with phpnuke 6.5 with absolutely no problems. I just recently went to a new server, and decided to upgrade phpnuke with the first release (not beta) of phpnuke 7.0. It just churns away without doing anything. The screen will finally go to a"Cannot find Server". The address it is trying to load is
Quote:
/index.php?loadSQAtStartup=+&submit=Live+Quotes
I know the db is set up correctly. I know the index.php file has a connection with the DB. Any ideas or has anyone else had a problem with Stock Quote and 7.0?
 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Fri Jan 09, 2004 10:48 am Reply with quote

I use it w/o any problems on 7.0 and I know others are too. I just tried it before sending this and it seems to be working ok. Maybe there's a conflict with another block on your site? Are you using the latest release or are you just transferring from your 6.5 release?
 
View user's profile Send private message
JohnO







PostPosted: Fri Jan 09, 2004 11:12 am Reply with quote

I didn't transfer it, but I used the same release and download (3.3) that I used for 6.5. I thought that was the latest.
If it is another block, would deactivating all the blocks remove any conflict?
Also, I tried setting up a standard connection and it would time out. I did this on my old site with no problem.
I'll download your latest release, delete the old setup and try again. I shouldn't have to reinstall the table in mysql. do I?

Thanks a bunch for the quick response!!!
 
Raven







PostPosted: Fri Jan 09, 2004 11:26 am Reply with quote

3.3 is the latest. Deactivate the other blocks and see if it works. If so, then start activating the blocks 1 by 1 until we find the conflict. Then we can try to figure it out. The table hasn't changed.
 
JohnO







PostPosted: Fri Jan 09, 2004 12:19 pm Reply with quote

OK, I tried deactivating all the blocks (and modules). It still would time out or go to a"cannot find server page". I then downloaded the most recent version from your site, deleted the stock quotes and then added them back. Still no dice!

The only thing left is to delete the table in mysql and reinstall that. but I don't think that is the problem.

There is another difference, although I don't think it's it...I have not transferred the domain to the site yet, so to test, I'm having to type http://server.lunarpages.com/~mysite/nuke/. I also don't have nuke installed on my root directory. Any chance this could cause problems?

Thanks!
 
Raven







PostPosted: Fri Jan 09, 2004 12:21 pm Reply with quote

Try changing your site url setting in Preferences to http://server.lunarpages.com/~mysite/nuke
 
JohnO







PostPosted: Fri Jan 09, 2004 1:13 pm Reply with quote

Well, I tried that and it still times out. It's like it either cannot communicate with Yahoo to get the info(which if this was the case I would think it would be almost an immediate response), or it is have a hard time bringing the info back (which explains why it times out.) Could it possibly be my host server problem? I did have the same issues last night, so if it is, it's not a short term problem.
 
Raven







PostPosted: Fri Jan 09, 2004 1:19 pm Reply with quote

I know this will sound silly, but please try it. After it times out, place your cursor at the end of the address in the url box and press enter. Does it come back now?
 
JohnO







PostPosted: Fri Jan 09, 2004 2:00 pm Reply with quote

I first tried the block, and it came back with an error that said it was unable to get stock information. Prior to your last response, I kept getting the can't find server page. Well, I decided to try the block again...and after about 2 minutes, it actually came up!

So then I went to the Stock Quote Module. Again, after about 2 minutes, it came up!!

The bad news is that I tried to get a quote. After about 5 minutes I got the following:
Quote:

Warning: file_get_contents(http://finance.yahoo.com/q?s=HAL&d=t): failed to open stream: HTTP request failed! 0  in /home/sitename/public_html/divisions/modules/Stock_Quote/index.php on line 676


I went back to the block again.It's funny but it seems to go to 38% complete, and then sits there for a long time. After about 2-3 minutes, it did come up again.

At least it is starting to bring the info in, but very slooooow. Any ideas on how to improve?
Thanks
 
Raven







PostPosted: Fri Jan 09, 2004 2:02 pm Reply with quote

What release of php is on this new server? What OS also.
 
JohnO







PostPosted: Fri Jan 09, 2004 2:07 pm Reply with quote

PHP version 4.3.4
OS is Linux
Apache version is 1.3.29
 
Raven







PostPosted: Fri Jan 09, 2004 2:16 pm Reply with quote

Take nuke completely out of the picture. Just try this url in your browser http://finance.yahoo.com/q?s=HAL&d=t
 
JohnO







PostPosted: Fri Jan 09, 2004 2:19 pm Reply with quote

Yea, I had tried that. No problem, it came right up immediately!
 
Raven







PostPosted: Fri Jan 09, 2004 2:25 pm Reply with quote

Line 676 reads
Code:
      $readNews = file_get_contents("http://finance.yahoo.com/q?s=$Symbol&d=t");
Temporarily replace that one line with these 3 lines
Code:
      $getNews = fopen("http://finance.yahoo.com/q?s=$Symbol&d=t", "rb");

      $readNews = fread($getNews, 32767);
      fclose($getNews);
Did that help?
 
JohnO







PostPosted: Fri Jan 09, 2004 3:59 pm Reply with quote

It seemed to solve the problem. It seems faster then even my old server. Very Happy
Your the man!

Thanks!

For my own curiosity,and to make this a learning experience, what did you do to make it work faster? First you needed to get it before you could read it? Is it server related?
 
Raven







PostPosted: Fri Jan 09, 2004 4:36 pm Reply with quote

Your new host must not be using the same [correct] configuration. Can you send me the output of your phpinfo(), or PM me a link to it. The original line should work, and will work, if they have certain settings in their php.ini file.
 
JohnO







PostPosted: Thu Jan 15, 2004 1:05 pm Reply with quote

To followup, I changed servers with my host for a different reason (although in the back of my mind, I really didn't want to be on a server that may have a configuration issue). I changed the line back to the original, and it works perfectly and fast.
Again, thanks for the help!
Very Happy
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.0

View next topic
View previous topic
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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©