Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Google chrome not showing parsed php text
Old 01-23-2009, 06:28 PM Google chrome not showing parsed php text
racer x's Avatar
Ultra Talker

Posts: 457
Name: Randy
Location: Northern Wisconsin
Trades: 0
I have been using chrome a bit more since Firefox had been freezing(!) on me so many times. I have come to really like it.
However...
I am practicing PHP on local host with xampp and when I view the source of a page I am working on it does not show echoed variables or any parsed text for that matter. eg value="" (that's all that is printed to source code)

Parsed text IS printed to the page in the browser as normal.

Note: The exact same page source viewed in Firefox works fine showing all parsed variables and info.

Is this some kind of security thing Chrome has introduced?
racer x is offline
Reply With Quote
View Public Profile Visit racer x's homepage!
 
 
Register now for full access!
Old 01-23-2009, 06:52 PM Re: Google chrome not showing parsed php text
Decaf's Avatar
Ultra Talker

Posts: 489
Name: Adam
Trades: 0
1) Maybe it is a security thing
2) Is the text being printed before the <html> tag?
3) A source code snippet would help.
4) Are you connecting through the http://localhost or file:C/...
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Decaf is offline
Reply With Quote
View Public Profile Visit Decaf's homepage!
 
Old 01-23-2009, 08:58 PM Re: Google chrome not showing parsed php text
racer x's Avatar
Ultra Talker

Posts: 457
Name: Randy
Location: Northern Wisconsin
Trades: 0
1. I've done some reading and wonder if chrome will only display parsed text in source code if it is done with htmlentities() ? I am just learning form validation in php(and client-side). One php book I have (Codin' for the Web) doesn't even mention htmlentities while another book(Learning php & msql O'reily) uses it everywhere.

2. The code source looks exactly as normal source code view does, the only difference being that the parsed variables are not shown in the source.

3. Here is a snippet of the same exact viewed source code from a form:
(in chrome) value=""
(in Firefox) value="Joe"
The actual php on the form is: value="<?php echo $name ?>"

4. I am connecting through http://localhost/form_testing/form.php

Again, the variables are all showing up on the page correctly. Everything works on my validation etc. This was just something I was wondering about how chrome handles source code.

Maybe if you have some php pages on localhost that you can open with chrome you'll see what happens.

OK. I've looked at a bunch of PHP sites and viewed their source code. They seem to be displaying everything. I will look my page over again.
racer x is offline
Reply With Quote
View Public Profile Visit racer x's homepage!
 
Old 01-23-2009, 09:12 PM Re: Google chrome not showing parsed php text
NullPointer's Avatar
Will Code for Food

Posts: 2,786
Name: Matt
Location: Irvine, CA
Trades: 0
PHP is server side code. It doesn't care which browser the user has and acts the same regardless. If there is a problem with how something is displaying in chrome vs firefox vs IE or whatever then the problem is with PHP's output, not the PHP code itself. Unless you deliberately identify and tell PHP to do something different based on a users browser, the output will be the same.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
NullPointer is online now
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 01-23-2009, 10:56 PM Re: Google chrome not showing parsed php text
racer x's Avatar
Ultra Talker

Posts: 457
Name: Randy
Location: Northern Wisconsin
Trades: 0
When I was originally testing for errors it would print "you must fill in your name(etc)" but when I viewed the source code that code/text was not there where it would normally be after parsing.

Maybe has something to do with the form being sticky and resubmitting to itself? When that new page is displayed with previous input, etc. none of it shows up in the code but it does in the browser.

You would think if it was printing the input from previous attempts automatically that that would have to show up in the source?
racer x is offline
Reply With Quote
View Public Profile Visit racer x's homepage!
 
Old 01-23-2009, 11:35 PM Re: Google chrome not showing parsed php text
Decaf's Avatar
Ultra Talker

Posts: 489
Name: Adam
Trades: 0
Quote:
Originally Posted by racer x View Post
When I was originally testing for errors it would print "you must fill in your name(etc)" but when I viewed the source code that code/text was not there where it would normally be after parsing.

Maybe has something to do with the form being sticky and resubmitting to itself? When that new page is displayed with previous input, etc. none of it shows up in the code but it does in the browser.

You would think if it was printing the input from previous attempts automatically that that would have to show up in the source?
1) The PHP Source will have that error somewhere. It can't print "mystery"/"unknown" text, however if it is an parse/syntax error it will display a warning but that's not your problem

2) We will only have to guess without an example of the code.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE

Decaf is offline
Reply With Quote
View Public Profile Visit Decaf's homepage!
 
Reply     « Reply to Google chrome not showing parsed php text
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.17869 seconds with 12 queries