iphone WD app...

hello traj…

I found this page of yours working and displaying the iphone data:

http://woonsocketweather.com/iphone.php4

…Chris

Hiya Chris,

I managed to get it working under php4, but after making changes. I’m still trying with php5 and having problems.

http://woonsocketweather.com/iphone5.php

I’m a slow learner.

Hello traj…

Yes I did see your php5 page also for this, but it was showing some errors. If the php4 page is working why not just leave it as is? or is there a special reason you need the php5 version working?

on another totally unrelated to iphone.php note…I just visited your homepage and came across some errors there. see the included attachment of this message to view the screenshot I took of them.

After doing a google search I came across this solution for that problem…hope this helps you out in some way:

Solution:
allow_url_fopen should be ON in PHP configuration (php.ini). Probably, you don


Traj…

to get your mesoscale script working on your homepage…did you try changing this:

(include_path=‘.:/usr/lib/php5’)

to this:

(include_path=‘.:/usr/lib/php4’)

where the 5 is changed to a 4 at the end.

because your mesoscale test page does work here:

http://woonsocketweather.com/rss-mesoscale-test.php4

…chris

Just to do it. No other reason.

What file is it in? I’ve looked around for it and can’t seem to find it.

Hello traj…

I am assuming since you included on your homepage…it would be the include path in your index.php that needs the editing.

from Kens instructions below…

To show the summary on your homepage and the details in a separate page on your website, you include this in your homepage: <?php include("http://your.website/rss-mesoscale-test.php?summary=Y&inc=Y"); ?> and on the details page on your website, just have <?php include("http://your.website.rss-mesoscale-test.php?&inc=Y"); ?> and the details will be displayed with the look/feel of your website.

I am assuming if you changed in your index.php file this code from this:

<?php include("http://your.website/rss-mesoscale-test.php?summary=Y&inc=Y"); ?>

to this:

<?php include("http://your.website/rss-mesoscale-test.php4?summary=Y&inc=Y"); ?>

basically by adding the “4” at the end of the “php” line

It should work. Give it a try and let me know…Chris

Chris,

I tried what you suggested. I still had the problem. It just isn’t worth it with php5, so I removed the line from my .htaccess file which brought everything back to 4. Now it seems to be working ok.

Thanks for your help (again).

Traj

Hello Traj…

Looks better at least for now and until you get the php4- php5 problems figured out.

I am surprised if they told you to add that line to your htacess file, for it to use php5 instead of php4…that it didnt work. Perhaps contact them directly and make sure you did exactly as instructed to make it work. Just an Idea.

There are a few other people within the forums here that also use 1and1 as their host, and maybe they have some better answers on this. I am using E-rice since starting out 2 years ago and havent had many problems with them.

did you get the email I sent you? I sent it directly from your website contact us email link. please reply back to that email directly.

…Chris

Hello again Traj…

according to the FAQ Section of your web host 1and1 …here is instructions for using php5 on you server:

With 1&1 Linux hosting packages you have the choice between PHP 4 and
PHP 5. To distinguish a script as PHP 5, simply name the script with the file
extension .php5.

While the PHP developers have done their utmost to ensure compatibility, we cannot
guarantee that PHP 4 scripts will function 100% correctly under PHP 5.

Please note that in contrast to PHP 4, the default for the variable RegisterGlobals and allow_url_fopen is “off”.

By default Apache uses PHP 4 for .php extension. If you don’t want to rename all your
scripts to .php5 you can do the following:
Create a .htaccess file and place the following line AddType x-mapp-php5 .php in it.

This will tell Apache to use PHP 5 instead of PHP 4 for the extension .php in the
directory the .htaccess is placed and all sub-directories under it.

when you created the httaccess file did you use the following line exactly as this:

AddType x-mapp-php5 .php

with the spaces where they are shown in the line above?

may want to try again and see what happens…just copy and paste the line above into your .httaccess file and see what happens 2nd time around.

they also note that “allow_url_fopen is “off”.” is OFF…and that I believe should be “ON”, So ask them how this is also accomplished…as that is one of the errors you were receiving earlier and could be part of the problem.

if it still doesnt work…I would call them directly and ask them what else if anything must be done.

since they say on their site it should support php5…then it should work some how.

always worth a 2nd try…Chris

here’s another link about the allow url open…

http://faq.1and1.com/scripting_languages_supported/malware/20.html

I think you had everything correct before, but most likely had the allow url open…set to OFF…When it should have be set to ON.

…chris

You may have received my email that I placed the file you sent. As you can see, when I add that line to .htaccess, it goes to php5 and I have problems. When I go back to php4, they disappear.

Traj

Hello traj…

YES …I got your email and sent you another one.

Let me know if that helps…Chris

[quote author=gateway2capecod link=topic=40827.msg339021#msg339021 date=1251047418]
Solution:
allow_url_fopen should be ON in PHP configuration (php.ini). Probably, you don

1and1 does let you use allow_url_fopen with PHP5 … it just needs

allow_url_fopen = on

in a php.ini file in the document root directory. I had the same issue with PHP4->PHP5 conversion of my site, and the php.ini change fixed it right up :slight_smile:

Hi Ken…

should he have “register_globals” …Off Or On?

I dont understand why 1and1 just doesnt make the total switch over to all php5 instead of trying to use both php4 and php5. it would make you guys life easier.

…Chris

He should leave register_globals = off (which is the default for PHP5) … what that does is to take any argument on the URL and turn it into a php variable with the contents of whatever is after the equal sign. Not a good idea, and most PHP coders didn’t rely on that to fetch the arguments from the URL. So… leave it off in PHP5.

Some things work differently in PHP5 than PHP4, and I suppose that’s 1and1’s rationale for offering PHP4 as the default, but it’s an easy change to use PHP5 (and fix any things that break with the upgrade) at the webmaster’s discretion.

I’ve slowly been going through my scripts to make the PHP4/PHP5 compatible (mostly having to do with no putenv(“TZ=…”) and setting $PHP_SELF if it’s missing). I’ve (so far) avoided any PHP5-specific functions (like sunrise/sunset) so the scripts will work in either environment.

Best regards,
Ken

Hello Kevin and Ken…

Thanks for your input and replies on this…much appreciate the help.

everything seems to be working with his php4 pages at the moment so if it was me I would just leave it be.

…Chris

Thanks all. Like Chris says, it’s working so I’m not gonna mess with it right now. I have a few other tweaks I want to try.

Traj

This is a real nice iphone page, looks alot like http://i.wund.com/ without the forecast, has anyone added the forecast to this?

Here is my page now. http://www.rdoghouse.org/homewx/iphone.php