Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

cannot execute img src in localhost

105 views
Skip to first unread message

Marty

unread,
Nov 7, 2012, 6:00:42 PM11/7/12
to
I have a web page that is webpage.php. It shows up fine in localhost
(ubuntu) except for the graphics. The header image, which is an img src,
shows the alt text and carves out a space for the image. But the image
does not show.

If I change the page to .html I can see everything in the browser. But, I
cannot execute the .html page on local host at all.

I tried asking in a php group but they said this is really a problem with
the html not functioning.

Any suggestions?

Ben Bacarisse

unread,
Nov 7, 2012, 7:17:37 PM11/7/12
to
The src attribute is wrong. Exactly how, it's impossible to say, partly
because your terminology is not clear. Here is my translation which you
can disavow if you like:

"I am running a web server on localhost. When I view webpage.php, the
main image does not appear. If I rename the file to webpage.html and
view it directly in a browser the image appears."

If that's what's happening, post the PHP and there's a change you will
get detailed assistance. The second most important data is the location
of the various files relative to each other.

You might also get fast answers if you uploaded the page and the image
to a publicly available server.

--
Ben.

Ian

unread,
Nov 7, 2012, 7:35:39 PM11/7/12
to
On Wednesday, November 7, 2012 6:00:42 PM UTC-5, Marty wrote:
> If I change the page to .html I can see everything in the browser. But, I
> cannot execute the .html page on local host at all.

Do you mean that you can see the .html page when you view it remotely through the browser, but can't see it when you view it locally through the browser?

If so, perhaps there is a problem with the local server that you have running on Ubuntu.

No matter what, if you post your code, it will make things clear.

Ian

Jonathan N. Little

unread,
Nov 7, 2012, 8:46:21 PM11/7/12
to
Marty wrote:
> I have a web page that is webpage.php. It shows up fine in localhost
> (ubuntu) except for the graphics. The header image, which is an img src,
> shows the alt text and carves out a space for the image. But the image
> does not show.
>
> If I change the page to .html I can see everything in the browser. But, I
> cannot execute the .html page on local host at all.

PHP is server side scripting where it outputs html. It sounds like you
have invalid PHP code.

>
> I tried asking in a php group but they said this is really a problem with
> the html not functioning.

Probably not. If just changing the file extension to .html fixes your
problem then what your problem is most likely is that you are not
writing PHP code but HTML markup.

>
> Any suggestions?
>

Post the the source code.


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Marty

unread,
Nov 7, 2012, 9:56:17 PM11/7/12
to
On Wed, 07 Nov 2012 20:46:21 -0500, Jonathan N. Little wrote:

> Marty wrote:
>> I have a web page that is webpage.php. It shows up fine in localhost
>> (ubuntu) except for the graphics. The header image, which is an img
>> src, shows the alt text and carves out a space for the image. But the
>> image does not show.
>>
>> If I change the page to .html I can see everything in the browser. But,
>> I cannot execute the .html page on local host at all.
>
> PHP is server side scripting where it outputs html. It sounds like you
> have invalid PHP code.
>
>
>> I tried asking in a php group but they said this is really a problem
>> with the html not functioning.
>
> Probably not. If just changing the file extension to .html fixes your
> problem then what your problem is most likely is that you are not
> writing PHP code but HTML markup.
>
>
>> Any suggestions?
>>
>>
> Post the the source code.

I can save it as .html or .php and the results are the same. I can see
everything formatted perfectly and I can see the alt text as well as the
placeholder for the image. But the image does not display.

To simplify troubleshooting, I put the image and the source file in the
same folder var/www. I use BlueFish editor and the preview or browser
button is set up to display the file in LocalHost.

I edited the source file to get rid of as much crap as possible and still
maintain the problem section:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My Title</title>
<meta name="description" content="My Descsription">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="msvalidate.01" content="5D6F360E7CD47C4B14275762DBC20BAA">
<link href="mystyle.php" rel="stylesheet" type="text/css">

</head>
<body>
<div align="center">
<table class="black_tableoutline" bgcolor="#FFFFFF" width="960">
<tbody>

<tr style="height: 60px; text-align: center;">
<th height="484" valign="top" width="83%">
<p align="center">
<img src="problemfile.jpg" alt="problem image" height="220"
width="700">
</p>
<table align="center" bgcolor="#eef3f9" height="40"
width="676" border="0">
<tbody>
<tr>
<td class="style25" height="36" valign="top"
width="601"><span
class="gobanner">Some Text
..</span>. </td>
<td class="style25" valign="top" width="150"><img
src="orange_go_btn34.jpg"
alt="" align="left" height="34" width="112"></td>
</tr>
</tbody>
</table>

</div>
</body>
</html>

Jonathan N. Little

unread,
Nov 7, 2012, 11:20:54 PM11/7/12
to
Okay there is your answer. That is HTML markup not PHP code. PHP code
would be something like this:


<?php

$A_PHP_Variable="I am a variable";
$A_num=5;
$Double_Me=$A_num * 2;

echo "<p>Creating HTML with PHP and $A_num doubled is $Double_Me</p>";

?>

se

unread,
Nov 8, 2012, 12:18:03 AM11/8/12
to

"Marty" <mar...@aol.com> skrev i meddelelsen
news:509b1f50$0$58015$c3e8da3$9b4f...@news.astraweb.com...
A stylesheet must have the extention .css

Jukka K. Korpela

unread,
Nov 8, 2012, 2:07:39 AM11/8/12
to
2012-11-08 7:18, "se", using a forged address, wrote:

> <link href="mystyle.php" rel="stylesheet" type="text/css">
> A stylesheet must have the extention .css

Nonsense. As long as the HTTP headers specify Content-Type: text/css,
any conforming browser will treat the data as CSS.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Message has been deleted
Message has been deleted

Denis McMahon

unread,
Nov 8, 2012, 7:18:11 AM11/8/12
to
On Thu, 08 Nov 2012 02:56:17 +0000, Marty wrote:

> I edited the source file to get rid of as much crap as possible and
> still maintain the problem section:

No you didn't. If the problem is displaying the image, then it should be
apparent in the following (and arguably the <p> and </p> could be
omnitted):

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>My Title</title>
</head>
<body>
<p>
<img src="problemfile.jpg" alt="problem image" height="220"
width="700">
</p>
</body>
</html>

As a general observation, if you use a content-type http pseudo header in
the document head, some people suggest that best practice is to place it
as the first element in the <head>, as it may require that the document
be re-parsed - the sooner the browser can make this decision the less
time it wastes parsing stuff that will become redundant when it starts
again.

Also - as an aside - in a "normal"[1] apache web server + php
configuration, if a file called something.php contains only html markup
and no <?php ... ?> code sections, the php processor will pass it
unaltered to the web server process for sending to the requesting client.

[1] every configuration is different, but there are some things that most
configurations will do the same way.

Rgds

Denis McMahon

Marty

unread,
Nov 8, 2012, 10:50:51 AM11/8/12
to
On Thu, 08 Nov 2012 02:56:17 +0000, Marty wrote:

Forget the code above. I see it has a lot of distracting elements. Here
is an HTML file. The problem is the same. I cannot display the image in
LocalHost. By the way, the same code will display properly on a browser.
It just will not work with localhost. So, I do not think it is an html
problem at all. Know of any newsgroups that could help with a localhost
problem?

Could it be the doctype statement?

By the way, you most certainly can have a .php for a css file. Doing so
enables you to do lot of other things as well. It works perfectly in a
regular browser.

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>My Title</title>
<meta name="description" content="My Descsription">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<body>
<img src="problemimage.jpg" alt="problem image"
height="220" width="700">
</body>
</html>
Message has been deleted

Jukka K. Korpela

unread,
Nov 8, 2012, 11:44:56 AM11/8/12
to
2012-11-08 18:15, Tim Streater wrote:

> Or are you running apache on your machine, with the image and html files
> in the proper place so that you can put http://localhost/problem.html
> into your browser?

That seems to be the natural interpretation. Now, we might conjecture
that the server software sends wrong information in HTTP headers. We
just need to hack into the OP's system to check that... wait a sec...

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Jonathan N. Little

unread,
Nov 8, 2012, 12:14:48 PM11/8/12
to
Marty wrote:
> Forget the code above. I see it has a lot of distracting elements. Here
> is an HTML file. The problem is the same. I cannot display the image in
> LocalHost. By the way, the same code will display properly on a browser.
> It just will not work with localhost. So, I do not think it is an html
> problem at all. Know of any newsgroups that could help with a localhost
> problem?


Wait a minute, by the above are you saying that it works if your view is
using your local filesystem but fails using the server? IOW

file:///var/www/thepage.html

works but

http://localhost/thepage.html

doesn't?

If so then that would point to a problem with your server configuration.
You need to check out your /etc/apache2/httpd.conf

Ed Mullen

unread,
Nov 8, 2012, 2:05:29 PM11/8/12
to
Try specifying a path for the image files in your code.


--
Ed Mullen
http://edmullen.net/
Bureaucracy: a method of turning energy into solid waste.

Denis McMahon

unread,
Nov 8, 2012, 5:00:09 PM11/8/12
to
On Thu, 08 Nov 2012 15:50:51 +0000, Marty wrote:

> Know of any newsgroups that could help with a localhost
> problem?

First of all, there is no such thing as a localhost problem, the problem
is either with your local webserver configuration, or with your html. Do
you even have a local webserver running?

Please try the following shell command:

sudo ps -A | grep apache

You should see something like:

1269 ? 00:03:17 apache2
9231 ? 00:00:00 apache2
9232 ? 00:00:00 apache2
9238 ? 00:00:00 apache2
9239 ? 00:00:00 apache2
9243 ? 00:00:00 apache2
9661 ? 00:00:00 apache2
9750 ? 00:00:00 apache2
10175 ? 00:00:00 apache2
10176 ? 00:00:00 apache2
10597 ? 00:00:00 apache2

If that shows several entries, then the webserver seems to be running.
Try typing the following 2 lines, both followed by return (note there may
be no visible response to the 'nc localhost 80', just type the GET
anyway.):

nc localhost 80
GET /webpage.php

This should display the content that your php file generates and delivers
via the webserver.

If the 'nc localhost 80' returns a normal (eg name@host$) prompt, then
it's possible your webserver, although running, isn't active on the
expected port.

Try the following command:

sudo netstat -t -l -p -v | grep http

This should output a line similar to the one below (the 1269 will
probably be a different number, and I've trimmed some whitespace):

tcp 0 0 *:http *:* LISTEN 1269/apache2

Finally, try opening the browser and enter the following in the location
bar:

http://localhost/name.ext

Where name.ext is the name and extension of your image file. If the image
file is in the root directory of the web server, then it should display
in the browser. If it does not display, then either:

a) There's no browser running
b) The file is not where the server is looking for it

Rgds

Denis McMahon

Marty

unread,
Nov 8, 2012, 7:53:08 PM11/8/12
to
I get You don't have permission to access /imagefile.jpg on this server.
When I do localhost/imagefile.jpg

Jonathan N. Little

unread,
Nov 8, 2012, 8:25:10 PM11/8/12
to
Marty wrote:

> I get You don't have permission to access /imagefile.jpg on this server.
> When I do localhost/imagefile.jpg
>

Your server is not setup properly. This is not an HTML problem this is a
Apache server setup problem, (assuming your are using Apache). Or your
have a permission problem, for example you put the file with your
profile and image is neither wwwdata user or group (marty:marty) OR your
file is not world readable (660).


sudo chown -R wwwdata:wwwdata /var/www/*

Marty

unread,
Nov 8, 2012, 9:43:59 PM11/8/12
to
On Thu, 08 Nov 2012 20:25:10 -0500, Jonathan N. Little wrote:

> Marty wrote:
>
>> I get You don't have permission to access /imagefile.jpg on this
>> server.
>> When I do localhost/imagefile.jpg
>>
>>
> Your server is not setup properly. This is not an HTML problem this is a
> Apache server setup problem, (assuming your are using Apache). Or your
> have a permission problem, for example you put the file with your
> profile and image is neither wwwdata user or group (marty:marty) OR your
> file is not world readable (660).
>
>
> sudo chown -R wwwdata:wwwdata /var/www/*

I know next to nothing about linux commands. Is it a chown I need to use
or a chmod? Is the syntax you show here correct?

Jonathan N. Little

unread,
Nov 8, 2012, 9:57:48 PM11/8/12
to
chown changes the owner and group

chmod change the permission for owner, group, and world.

Depends on what you need to do. I am assuming that your server's
document root is /var/www if so then post the output of the following:

ls -lha /var/www

if your document root is different change accordingly

Ben Bacarisse

unread,
Nov 8, 2012, 10:00:08 PM11/8/12
to
Yes, chown not chmod (though if things are really screwed you might need
that as well) and, yes, the syntax is correct. It's something of a
sledgehammer, but with little information to go on it seems like a good
start. He's assuming that there is some permission problem and the
easiest solution is to make everything owned by the user id that the
apache server uses (that's wwwdata). The ":wwwdata" bit also sets the
group id that owns the files which is probably overkill, but won't do
any harm.

The meta answer is to type man sudo and then man chown. You won't
understand all of what you see but, in general, the basics are up the
top so you can read until you get baffled. Do that enough and you'll
find you don't get baffled so much after a while.

--
Ben.

Jonathan N. Little

unread,
Nov 8, 2012, 10:28:16 PM11/8/12
to
Ben Bacarisse wrote:
> Marty <mar...@aol.com> writes:
>
>> On Thu, 08 Nov 2012 20:25:10 -0500, Jonathan N. Little wrote:
>>
>>> Marty wrote:
>>>
>>>> I get You don't have permission to access /imagefile.jpg on this
>>>> server.
>>>> When I do localhost/imagefile.jpg
>>>>
>>>>
>>> Your server is not setup properly. This is not an HTML problem this is a
>>> Apache server setup problem, (assuming your are using Apache). Or your
>>> have a permission problem, for example you put the file with your
>>> profile and image is neither wwwdata user or group (marty:marty) OR your
>>> file is not world readable (660).
>>>
>>>
>>> sudo chown -R wwwdata:wwwdata /var/www/*
>>
>> I know next to nothing about linux commands. Is it a chown I need to use
>> or a chmod? Is the syntax you show here correct?
>
> Yes, chown not chmod (though if things are really screwed you might need
> that as well) and, yes, the syntax is correct.

Yes is is possible to have it work with neither the owner or the group
set to wwwdata if world is set to read. But

-rw-rw---- marty marty imagefile.jpg

would give him the problem that he is experiencing and simply turning on
world read would fix it.

More info would help and that is why I ask for a listing of the dir. For
a private server to make thing easier to edit locally there are things
you can do to simplify the process. If you access the server from
Windows workstations you can make a samba share to the document root and
used "force group = wwwdata". Or if you access from Linux on the local
machine then edit apache config to set
"export APACHE_RUN_GROUP=marty"

Just depends on his situation.

Denis McMahon

unread,
Nov 9, 2012, 7:04:57 AM11/9/12
to
On Thu, 08 Nov 2012 20:25:10 -0500, Jonathan N. Little wrote:

> sudo chown -R wwwdata:wwwdata /var/www/*

Bad advice.

He said he's using Ubuntu. On my Ubuntu server, the web user is www-data,
not wwwdata! This was the default user name set up by the installer.

What he could do is either of the following:

Method:

Easy Method A makes all the files in the /var/www tree the property of
the apache process.

1) sudo cat /etc/passwd | grep www

Hopefully there's only one line, and it will look something like:

www-user:x:999:999:www-group:/var/www:/bin/sh

The fields are separated by the colon characters.

user name : password : user id : group id : group name : home : shell

A password of "x" means an encrypted password is stored in another file.

2) Get the user name and group name from above line (which in this case
is www-user:www-group)

3) sudo chown -R wwwdata:wwwdata /var/www/*

Easy Method B:

Method B allows anyone to read all the files in the /var/www tree,
regardless of who actually owns them.

sudo chmod -R w+r /var/www/*

There are other methods, but they all require more knowledge of linux
users, groups and permissions than I'm prepared to contemplate getting
into with Marty here.

Rgds

Denis McMahon

Ben Bacarisse

unread,
Nov 9, 2012, 7:50:14 AM11/9/12
to
"Jonathan N. Little" <lws...@gmail.com> writes:

> Ben Bacarisse wrote:
>> Marty <mar...@aol.com> writes:
>>
>>> On Thu, 08 Nov 2012 20:25:10 -0500, Jonathan N. Little wrote:
>>>
>>>> Marty wrote:
>>>>
>>>>> I get You don't have permission to access /imagefile.jpg on this
>>>>> server.
>>>>> When I do localhost/imagefile.jpg
>>>>>
>>>>>
>>>> Your server is not setup properly. This is not an HTML problem this is a
>>>> Apache server setup problem, (assuming your are using Apache). Or your
>>>> have a permission problem, for example you put the file with your
>>>> profile and image is neither wwwdata user or group (marty:marty) OR your
>>>> file is not world readable (660).
>>>>
>>>>
>>>> sudo chown -R wwwdata:wwwdata /var/www/*
>>>
>>> I know next to nothing about linux commands. Is it a chown I need to use
>>> or a chmod? Is the syntax you show here correct?
>>
>> Yes, chown not chmod (though if things are really screwed you might need
>> that as well) and, yes, the syntax is correct.
>
> Yes is is possible to have it work with neither the owner or the group
> set to wwwdata if world is set to read. But
>
> -rw-rw---- marty marty imagefile.jpg
>
> would give him the problem that he is experiencing and simply turning
> on world read would fix it.

Sure, but (to rather labour this detail) my point about maybe needing
both is just that if user and group read permission are missing,
changing the owner won't do it.

> More info would help and that is why I ask for a listing of the
> dir.

Absolutely. Further hints can also come from the error log.

To the OP: have a look at the error log. On my setup I just do

tail /var/log/apache2/error.log

to see that last few entries. When there is a misconfiguration you
might get lots of errors, in which case viewing the whole file is more
useful.

<snip>
--
Ben.

Ben Bacarisse

unread,
Nov 9, 2012, 8:10:16 AM11/9/12
to
Denis McMahon <denismf...@gmail.com> writes:

> On Thu, 08 Nov 2012 20:25:10 -0500, Jonathan N. Little wrote:
>
>> sudo chown -R wwwdata:wwwdata /var/www/*
>
> Bad advice.
>
> He said he's using Ubuntu. On my Ubuntu server, the web user is www-data,
> not wwwdata!

Well spotted!

> This was the default user name set up by the installer.
>
> What he could do is either of the following:
>
> Method:
>
> Easy Method A makes all the files in the /var/www tree the property of
> the apache process.
>
> 1) sudo cat /etc/passwd | grep www

Or just "sudo grep www /etc/passwd". Indeed, on my default install (and
I think on many) there's no need for the sudo since /etc/passwd is
readable by all.

> Hopefully there's only one line, and it will look something like:
>
> www-user:x:999:999:www-group:/var/www:/bin/sh

Just to clarify (since the OP is new to this) you are most likely to see
www-data in both places.

> The fields are separated by the colon characters.
>
> user name : password : user id : group id : group name : home : shell
>
> A password of "x" means an encrypted password is stored in another file.
>
> 2) Get the user name and group name from above line (which in this case
> is www-user:www-group)
>
> 3) sudo chown -R wwwdata:wwwdata /var/www/*

I think you meant to edit that!

> Easy Method B:
>
> Method B allows anyone to read all the files in the /var/www tree,
> regardless of who actually owns them.
>
> sudo chmod -R w+r /var/www/*

I think you meant:

sudo chmod -R o+r /var/www/*

> There are other methods, but they all require more knowledge of linux
> users, groups and permissions than I'm prepared to contemplate getting
> into with Marty here.

It's a nightmare trying to guess what might or might not be wrong here.
I am still not convinced it's a file permission or ownership thing,
since the defaults work without change (at least on my setup) but
something is wrong so permissions do need to be checked.

--
Ben.

Denis McMahon

unread,
Nov 9, 2012, 12:38:29 PM11/9/12
to
On Fri, 09 Nov 2012 13:10:16 +0000, Ben Bacarisse wrote:

> Denis McMahon <denismf...@gmail.com> writes:

>> 2) Get the user name and group name from above line (which in this case
>> is www-user:www-group)
>>
>> 3) sudo chown -R wwwdata:wwwdata /var/www/*
>
> I think you meant to edit that!

Yes, it should have been something like:

3) Use the following, substituting the user name and group name from step
2 for user and group:

sudo chown -R user:group /var/www/*

>> sudo chmod -R w+r /var/www/*
>
> I think you meant:
>
> sudo chmod -R o+r /var/www/*

Damn it, I'm on a roll today. :(

Yes, I did, and in my defence, I still make the w+r (world+read) mistake
myself regularly, especially if I haven't had to chmod anything for a few
days.

Rgds

Denis McMahon

se

unread,
Nov 9, 2012, 4:12:28 PM11/9/12
to

"Lewis" <g.k...@gmail.com.dontsendmecopies> skrev i meddelelsen
news:slrnk9mno6....@mbp55.local...
> In message <k7ffae$8of$1...@dont-email.me>
> se <s...@no-one.here> wrote:
>
>> <link href="mystyle.php" rel="stylesheet" type="text/css">
>> A stylesheet must have the extention .css
>
> What idiot told you that?

A .php extention won't work together with a rel="stylesheet"
At least not in EW2. I just made a trial. You should do.

>
> No, a stylesheet can have any name at all, and any (or no) extension.
>
>
> --
> For more than a thousand generations the Jedi were the guardians of
> peace and justice in the galaxy. Before the dark times. Before the
> Empire.


Jonathan N. Little

unread,
Nov 9, 2012, 5:12:37 PM11/9/12
to
se wrote:
>
> "Lewis" <g.k...@gmail.com.dontsendmecopies> skrev i meddelelsen
> news:slrnk9mno6....@mbp55.local...
>> In message <k7ffae$8of$1...@dont-email.me>
>> se <s...@no-one.here> wrote:
>>
>>> <link href="mystyle.php" rel="stylesheet" type="text/css">
>>> A stylesheet must have the extention .css
>>
>> What idiot told you that?
>
> A .php extention won't work together with a rel="stylesheet"
> At least not in EW2. I just made a trial. You should do.

I guess you never heard of the ForceType directive nor the PHP header()
function.

What is EW2?

Denis McMahon

unread,
Nov 9, 2012, 9:21:51 PM11/9/12
to
On Fri, 09 Nov 2012 22:12:28 +0100, se wrote:

> "Lewis" <g.k...@gmail.com.dontsendmecopies> skrev i meddelelsen
> news:slrnk9mno6....@mbp55.local...
>> In message <k7ffae$8of$1...@dont-email.me>
>> se <s...@no-one.here> wrote:
>>
>>> <link href="mystyle.php" rel="stylesheet" type="text/css">
>>> A stylesheet must have the extention .css
>>
>> What idiot told you that?
>
> A .php extention won't work together with a rel="stylesheet"
> At least not in EW2. I just made a trial. You should do.

I have no idea what ew2 is, but a php file can return a stylesheet as
long as it sets the correct content type (and even that might not be
essential as the mime type should be defined in the link element).

<?php

header( "Content-Type: text/css; charset=utf-8" );

session_start();

echo "body {padding:1em 3em}";

if ( !isset( $_SESSION["logged_in"] ) )
echo "body {background-color:#ffcccc}";
else
echo "body {background-color:#ccffcc}";

unset( $_SESSION );

?>

This can be seen at:

http://www.sined.co.uk/tmp/phpcss.htm

which calls the css without starting a session first

and:

http://www.sined.co.uk/tmp/phpcss2.php

which creates a session and then calls the css

Note - the "unset( $_SESSION );" is inserted so that calling phpcss2.php
followed by phpcss.htm doesn't create a false "logged in" colour when
you're meant to see the not logged in colour. Otherwise the session from
the earlier call to phpcss2.php would persist to the later call to
phpcss.php.

Rgds

Denis McMahon

Denis McMahon

unread,
Nov 9, 2012, 10:08:06 PM11/9/12
to
On Sat, 10 Nov 2012 02:21:51 +0000, Denis McMahon wrote:

> unset( $_SESSION );

This should have been:

session_destroy();

Rgds

Denis McMahon
Message has been deleted

BootNic

unread,
Nov 11, 2012, 3:24:44 AM11/11/12
to
In article <slrnk9ul3t....@mbp55.local>, Lewis
<g.k...@gmail.com.dontsendmecopies> wrote:

> In message <k7jrjs$ev7$1...@dont-email.me se <s...@no-one.herewrote:

[snip]

>> At least not in EW2. I just made a trial. You should do.

> I have no idea what EW2 is, but yes it does work, I have tried it.

Microsoft Expression Web 2 perhaps

[snip]

> Regardless, a stylesheet does not require .css. Never has. Anyone who
> told you that was ignorant or lying.

If It's On The Internet, It Must Be True

google: stylesheet "must have" "css extension"

Easy to see where some may get the impression that a stylesheet needs
an extension.

Sometimes it takes a several wacks with a clue club to undo a stupid
stick.


--
BootNic Sun Nov 11, 2012 03:24 am
I had a monumental idea this morning, but I didn't like it.
*Samuel Goldwyn*
signature.asc

se

unread,
Nov 11, 2012, 4:26:41 AM11/11/12
to

"Lewis" <g.k...@gmail.com.dontsendmecopies> skrev i meddelelsen
news:slrnk9ul3t....@mbp55.local...
> In message <k7jrjs$ev7$1...@dont-email.me>
> se <s...@no-one.here> wrote:
>
>> "Lewis" <g.k...@gmail.com.dontsendmecopies> skrev i meddelelsen
>> news:slrnk9mno6....@mbp55.local...
>>> In message <k7ffae$8of$1...@dont-email.me>
>>> se <s...@no-one.here> wrote:
>>>
>>>> <link href="mystyle.php" rel="stylesheet" type="text/css">
>>>> A stylesheet must have the extention .css
>>>
>>> What idiot told you that?
>
>> A .php extention won't work together with a rel="stylesheet"
>
> You have to specify the type="text/css".
>
>> At least not in EW2. I just made a trial. You should do.
>
> I have no idea what EW2 is, but yes it does work, I have tried it.
>
> If it is not working for you, it is probably your web-server overriding
> the type declaration, usually like this:
>
> AddType application/x-httpd-php .php
>
> Although, I *believe* the local type declaration should always override
> the server default. *That* I have not tested.
>
> Regardless, a stylesheet does not require .css. Never has. Anyone who
> told you that was ignorant or lying.
>
> --
> You know, in a world in which Bush and Blair can be nominated for the
> Nobel Peace Prize, "for having dared to take the necessary decision to
> launch a war on Iraq without having the support of the UN" I find myself
> agreeing with Tom Lehrer: satire is dead. - Neil Gaiman

Denis showed it. And you're right.

Regards

Jonathan N. Little

unread,
Nov 11, 2012, 8:20:17 AM11/11/12
to
BootNic wrote:
> In article <slrnk9ul3t....@mbp55.local>, Lewis
> <g.k...@gmail.com.dontsendmecopies> wrote:

>> I have no idea what EW2 is, but yes it does work, I have tried it.
>
> Microsoft Expression Web 2 perhaps

Oh! Well I have never put anything with "Microsoft" and "standards
compliant" in the same sentence so I would not use it for validating any
code...
0 new messages