Author |
Message |
JohnO
New Member


Joined: Jan 09, 2004
Posts: 9
|
Posted:
Fri Jan 09, 2004 9:04 am |
|
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? |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Fri Jan 09, 2004 10:48 am |
|
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? |
|
|
|
 |
JohnO

|
Posted:
Fri Jan 09, 2004 11:12 am |
|
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

|
Posted:
Fri Jan 09, 2004 11:26 am |
|
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

|
Posted:
Fri Jan 09, 2004 12:19 pm |
|
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

|
Posted:
Fri Jan 09, 2004 12:21 pm |
|
|
|
 |
JohnO

|
Posted:
Fri Jan 09, 2004 1:13 pm |
|
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

|
Posted:
Fri Jan 09, 2004 1:19 pm |
|
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

|
Posted:
Fri Jan 09, 2004 2:00 pm |
|
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

|
Posted:
Fri Jan 09, 2004 2:02 pm |
|
What release of php is on this new server? What OS also. |
|
|
|
 |
JohnO

|
Posted:
Fri Jan 09, 2004 2:07 pm |
|
PHP version 4.3.4
OS is Linux
Apache version is 1.3.29 |
|
|
|
 |
Raven

|
Posted:
Fri Jan 09, 2004 2:16 pm |
|
|
|
 |
JohnO

|
Posted:
Fri Jan 09, 2004 2:19 pm |
|
Yea, I had tried that. No problem, it came right up immediately! |
|
|
|
 |
Raven

|
Posted:
Fri Jan 09, 2004 2:25 pm |
|
Line 676 readsCode: $readNews = file_get_contents("http://finance.yahoo.com/q?s=$Symbol&d=t");
| Temporarily replace that one line with these 3 linesCode: $getNews = fopen("http://finance.yahoo.com/q?s=$Symbol&d=t", "rb");
$readNews = fread($getNews, 32767);
fclose($getNews);
| Did that help? |
|
|
|
 |
JohnO

|
Posted:
Fri Jan 09, 2004 3:59 pm |
|
It seemed to solve the problem. It seems faster then even my old server.
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

|
Posted:
Fri Jan 09, 2004 4:36 pm |
|
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

|
Posted:
Thu Jan 15, 2004 1:05 pm |
|
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!
 |
|
|
|
 |
|