News:

The Toadfish Monastery is at https://solvussolutions.co.uk/toadfishmonastery

Why not pay us a visit? All returning Siblings will be given a warm welcome.

Main Menu

Basic php html total idocy banging head against brickwall question

Started by Griffin NoName, April 13, 2008, 02:15:38 AM

Previous topic - Next topic

Bob in a quantum-state-of-faith

I'm sorry-- I'm at a loss, as I never actually coded in php before.  I used vba scripts, back in '02.

All I can say is review PHP syntax.

This seems to be straightforward: http://www.php.net/manual/en/language.types.string.php
Sometimes, the real journey can only be taken by making a mistake.

my webpage-- alas, Cox deleted it--dead link... oh well ::)

Griffin NoName


Yup, tried all that.

It really does seem that the php (or javascript) is just not working.

The simplest set variable --- echo/print/document.write - produces nothing on screen let alone the later html displaying it.

It seems bizarre.
Psychic Hotline Host

One approaches the journey's end. But the end is a goal, not a catastrophe. George Sand


beagle

I'm an ASP.NET rather than php person, so you may want to disregard this:

Isn't it just that you've called it program.html instead of program.php, so Apache/IIS doesn't know from the file extension it is supposed to invoke the php engine on it?

The angels have the phone box




Griffin NoName

Possibly although from what I've read it appears to be that it doesn't actually matter what the file extension is. And certainly the javascript ought to work even if the php doesn't.

In any case, I am stuck with the html extension - it's not "created" by me, its' part of a package and it's the file one is told to "alter for such stuff.

Of course, I could alter the package to suit, but that means nasty stuff every time an upgrade is issued.

I've already hiked the php that HAS to be done elsewhere into a separate (additional) file which does have a php extension and which is the advised method of passing stuff into the html code via an "include".

Nope, it does not make sense.

My latest thoughts are taking me down the path of passing stuff through the html without involving any screen display - that seems to work because I am not fiddling with "thisstupidthing" but just dumping it to the next program in the chain - which is a php file.

I still believe there must be a way, but I have no more time to waste on it.

I hate it when a computer beats me.
Psychic Hotline Host

One approaches the journey's end. But the end is a goal, not a catastrophe. George Sand


beagle

This Javascript way works for me on Vista/IE7


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<html>
<head>
bla
bla
bla
<script type="text/javascript">
var stupidthing="Hello World";
</script>
</head>
<body>
<form>
<input type="text" id="helloworld"></input>
<script type="text/javascript">
document.getElementById("helloworld").value=stupidthing;
</script>
</form>
</body>
</html>


Wouldn't like to guarantee it anywhere else, and it's probably important that the setting Javascript is after the input definition.
The angels have the phone box




Griffin NoName

Yep, I almost had that at one point...... thanks.

I reckon it would work for me too. In fact I reckon all the combinations I tried would have worked for me altogether.

IF somehow all the execute permissions on the program files hadn't been messed around with !!!!!!!!!!!!!!!!

I'd only checked and set them all on Friday............... silly to assume a few hours later they will still all be ok............. obviously I need to check them every few hours......... that should fill up any spare time I have awake.

Whole directory fulls had got their execute permission unset. Presumably early on Saturday.

Thank goodness just now I was running my new solution which used a completely different pair of programs and it was perfectly obvious the file was "missing" - ie. not getting executed at all. It sort of nudged me beyond the this code isn't working mindset into this whole thing isn't working mindset. It wasn't at all obvious from the file with what I thought was a coding problem. And I wasn't looking cos I had checked the permissions Ha Ha Ha bloody Ha.

I am NOT happy with this new HOSTing co. but then I think I have mentioned that before.


Sorry to have wasted everyone's time on top of my own.


:blush:
Psychic Hotline Host

One approaches the journey's end. But the end is a goal, not a catastrophe. George Sand


Bob in a quantum-state-of-faith

Quote from: Griffin NoName on April 13, 2008, 08:58:59 PM
Sorry to have wasted everyone's time on top of my own.

:blush:

Wasted?  I wouldn't say that.

A lesson was learned.  I, for one, was intrigued and learned a bit about PHP, of which I knew nothing previously.

Next time, you, knowing what you know NOW will check the permissions/settings first, any time you have a problem.

I wouldn't call that a waste. 

Frustrating as Perdition, :headbang:  but not a waste--just so long as you don't actually :explode:

:mrgreen:
Sometimes, the real journey can only be taken by making a mistake.

my webpage-- alas, Cox deleted it--dead link... oh well ::)

Griffin NoName

Well, next time I'll be paranoid is what you mean.

Because I don't really expect permissions to unset themselves to quite that extent in quite that little time. Like I had checked them. I'd moved on to the next thing to check.

They'd even unset permissions on a system I wasn't working on at all. Which meant that anyone trying to use it wouldn't have been able to. Luckily hardly anyone uses my systems :ROFL:

I guess if they did I'd have to pay more for Hosting !

Um.

Oh dear.

I've just offered to Host a forum for West London ME sufferers. Surprising number of them there are too.

What with this Hosting co. of mine saying they delete any old files they think are too old without warning ..... and the fact that I have also found out that they've disabled half the cpanel functions.... I think I need to find a better hosting co. and pay more....  I heard there's some good hosting being developed in Toadfish land..........

The message you get on all the cpanel options they've disabled is
contact them to get it enabled

When you do, they don't respond.

Eventually - after weeks of repeat requests and no replies - I rang them in the US -

They told me they wouldn't ever be enabling them.... they've stopped supporting them...

I asked them if they got a lot of phone calls like mine....

They said Yes They Did.

I think unsetting permissions may be their way of controlling traffic :mrgreen:

I know, I know, cheap hosting, you get what you pay for.... <sigh>
Psychic Hotline Host

One approaches the journey's end. But the end is a goal, not a catastrophe. George Sand


beagle

Quote from: Bob in a quantum-state-of-faith on April 13, 2008, 09:27:49 PM
A lesson was learned. 

Exactly. In future you'll blame everyone else first, and only admit it might possibly be less than optimal behaviour in your coding as a last resort.
The angels have the phone box




Griffin NoName

Psychic Hotline Host

One approaches the journey's end. But the end is a goal, not a catastrophe. George Sand


Sibling Zono (anon1mat0)

In all fairness, while in development a programmer will look to his own code as faulty first, but once the code is working for him he will blame the environment (everything else) first.
Sibling Zono(trichia Capensis) aka anon1mat0 aka Nicolás.

PPPP: Politicians are Parasitic, Predatory and Perverse.

beagle

The angels have the phone box