How to view local PHP files with my browser?

I want to learn PHP and be able to view files I create (stored in my documents folder) by my browser. I read I'd have to get into Apache via Terminal and make some changes to be able to view PHP. I took a look inside and ran across warning comments, which scared me off!
Any suggestions?

Pretty simple, ther arew no "warnings" to consider. Depending on your version of Apache you may need to enable the  PHP  module in the configuration file at
/private/etc/httpd/httpd.conf
Look for the part where it says
#LoadModule  php 4_module
and also
#AddModule mod_ php 4.c
and make sure those lines are uncommented by deleting the "#" character, then restart Apache to activate the new settings . When you acces a PHP page, you must do it through Apache by clicking this URL: http://127.0.0.1/ Remember that HTML files can be dropped in a browser, but to run a PHP script file you must use an Apache URL.
Read more about Apache here:
http://Gnarlodious.com/Computer/Apache

Similar Messages

  • How to view weblogic log files from a browser

    Hi,
    I am running WebLogic Server 7.03 on Solaris 8.
    I have one Admin and multiple Managed servers running.
    Each creates its own log file.
    Is there anyway I can access this log files from the browser ?
    In Apache, you can create a link from htdocs dir to the logs dir
    and then view the log files from the browser. Is there a similar
    mechanism in Weblogic server.
    A quick response is well appreciated.
    Thanks in advance.
    -Anil Varma

    If you are on a unix system you can do something similar by making an open
    directory webapp with symbolic links to the weblogic log directories. I suggest
    that you protect that webapp with administration access only.
    Sam
    Anil Varma wrote:
    Hi,
    I am running WebLogic Server 7.03 on Solaris 8.
    I have one Admin and multiple Managed servers running.
    Each creates its own log file.
    Is there anyway I can access this log files from the browser ?
    In Apache, you can create a link from htdocs dir to the logs dir
    and then view the log files from the browser. Is there a similar
    mechanism in Weblogic server.
    A quick response is well appreciated.
    Thanks in advance.
    -Anil Varma

  • How can I download any file with this browser?

    I can't download any mp3 or mp4 file with the browser. When I click on the download box,then the browser started to load a page.. And after some time,it became stopped..

    Firefox for Android added the ability to save HTML5 video/audio playback in Firefox 21. Long tapping on a media file while it is playing will give you a save option. It can be found as Firefox Beta in the Play Store. In about 4 weeks it the change will be available on the release version of Firefox for Android.

  • How do I view ipod music files with out using I tunes?

    I trying to view my Ipod music files without using itunes. But when I conect my Ipod to my pc I can only view contacts, notes, and caladar through the driver.
    How do I view ipod music files with out using I tunes?

    they should be under ur my music folder if u have windows

  • Render local PHP files... any fix yet?

    So, I read numerous posts on this topic - but they all have been "archived" and cannot be replied to?? I think it is still very important and wonder, does that mean it is dealt with or still a know, ongoing issue I just missed the answer to??
    This thread most similarly matches my issue and themost detailed: http://discussions.apple.com/thread.jspa?messageID=978104
    I use Dreamweaver 8 and Safari 2.0.1 on a 10.4.2 System. As others have noted, when I go to drop a PHP file onto Safari, it just renders the source code. But, if I drop it on IE or Opera or FF it renders as expected.
    Yes, I have turned on Web Sharing in the System Preferences. Yes, I have turned on PHP (using this simple article http://www.phpmac.com/articles.php?view=225) and verified it by puttng a php file into my "Sites" folder and it renders fine in Safari that way. But, neither have been a solution. Nor is using other lesser supported browsers and what-not as I need to develope for Safari and have 30 or so sites I manage with a local system already in place that worked just fine in 10.3 and Safari from 10.3 - so moving all my stuff to my "Sites" is a no go. And, I believe I read it still is an issue in 10.4.7 - so updating the system is not the answer either.
    It is very bothersome to not be able to view my PHP files locally on Safari and have to have to put them on the server to view/test them as that was not the case under Safari under 10.3. The only other way to view them in Safari I have found is by using the Preview feature in Dreamweaver 8 (which no one else mentioned in other threads), BUT if there is a text link (like a 'click here' navigation link) in the page to another PHP file and you click said link, you jut get the source code for that next page as if you dropped the file on Safari. That is weird in itself that through Dreamweaver 8 it makes a Temp file of the PHP file and loads that in Safari just fine!!!! but to actually drop or load the actual PHP file (not the created Temp file).... nothing but source code.
    So, any status on this? Still a lingering issue? I wondered if the stop in posting to the topic means people just accepted the bug (I find that hard to believe), or it was fixed (by a hack or by Apple) and I missed it someplace? It does not seem to be a PHP issue (as some reports said initially) as othr browsers on the same system can render the files when dropped on them, but an actual issue with how Safari deals with PHP files now - when it handeled them just fine in 10.3.

    Please read the link to the previous closed thread in my first post as it explains it pretty clearly. It is all about a file with extension .php versus .html.
    but I will recap again here:
    I am very clear that Safari cannot run server side script locally. That is not the issue as that is a given.
    "What I am expecting Safari to do" - and what all developers are expecting Safari to do when it encounters a local PHP file (a file with extension .php versus .html) is to render the HTML and display the page - not the source code. who wants to see the source code when trying to preview the layout and look and feel of a page.
    again, in old 10.3 if you dropped a PHP file (file with .php extension) onto Safari, the file would display the HTML portion just fine and show the resulting webpage - and not process the PHP within the code naturally as it cannot being local and not off a server - but now in 10.4 if you drop a PHP file (file with .php extension) onto Safari it just shows you the source code. IF you chnage that exact files extension to .html it renders fine, chnage it back to .php and nothing but source code.
    this is a know glitch and covered in the first linked thread in depth..... I am more looking at this point to see if anyone is aware of a fix yet??

  • How can I print a file with mixed page orientation in windows 8.1?

    I have a win 7 and a win 8.1 computer.  I have a file which contains both landscape and portrait pages.  The file prints correctly with the mixed orientation from the win 7 pc, but will only print with either landscape or portrait on the win 8.1 pc. 
    I am using Adobe reader XI on the win 7 pc and adobe touch on the win 8.1 pc

    ส่งจาก จดหมายของ Windows
    จาก: Pat Willener
    ส่งเมื่อ: จ. 5 มกราคม 2558 6:15
    ถึง: thang dinhvan
    How can I print a file with mixed page orientation in windows 8.1?
    reply from Pat Willener in Adobe Reader Touch for Windows 8 - View the full discussion 
    I have a win 7 and a win 8.1 computer.  I have a file which contains both landscape and portrait pages.  The file prints correctly with the mixed orientation from the win 7 pc, but will only print with either landscape or portrait on the win 8.1 pc. 
    I am using Adobe reader XI on the win 7 pc and adobe touch on the win 8.1 pc
    If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7064031#7064031 and clicking ‘Correct’ below the answer
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7064031#7064031
    To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"
    Start a new discussion in Adobe Reader Touch for Windows 8 by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

  • Firefox 3.6.8 won't open local php files. It opens the save as text dialog box instead.

    When I try to open a local php file on my MAC hard drive with FF 3.6.8, the save file dialog box opens instead. It says: You have chosen to open index.php which is a TextEdit.app Document. I do not have this problem with Firefox 3.5.11.
    I have tried:
    opening the file directly from Firefox as well as
    double clicking the file (which is the most common way).
    I have also tried changing the file "open with" preference to "open with Firefox." That did not work either.
    Any help on this would be appreciated.
    I'm on a MAC OS 10.5.8
    Thnx, Nick

    You have to delete mimeTypes.rdf.
    You can find it here (Windows XP): C:\Documents and Settings\Username\Aplication Data\Mozilla\Firefox\Profiles\xxxxxxxx.default.

  • How to view a PDF file

    Hey, i was wondering if anyone knew how to view a PDF file in Java? I'm trying to make a button that will open a PDF file. Is there any other way without downloading an extension?

    Kandyman wrote:
    The thing with downloading extensions is that they are not free. Some are trial version. iText and Jasper are probably free and stable to a great extent. Plus they allow you to play with PDFs, Excel, Bar charts, Pie charts, CSV etc etc without the hassles of the heavyweight Swing.
    - Vaibhav Beohar

  • May by anyway view Local Network files[e-book] or videos or html pages, from the main PC

    In ipad 3 upgraded to 4 ios, may by anyway view Local Network files[e-book] or videos or html pages, from the main PC if, this main has local host[php/mysql] or, from the local network itself: eg //user/downloads/pdf/ebook1.pdf?

    In ipad 3 upgraded to 4 ios, may by anyway view Local Network files[e-book] or videos or html pages, from the main PC if, this main has local host[php/mysql] or, from the local network itself: eg //user/downloads/pdf/ebook1.pdf?

  • [SOLVED]opening local files with surf browser

    When I try to open local html files with surf from suckless-tools with the full path, I get the error message 'URL cannot be shown'. How do I tell surf that it's local file and not a url?
    Last edited by _feda_ (2011-12-16 00:23:34)

    What happens if you specify a local file path: Ctrl-g and
    file:///path/to/your/file.html

  • How to load unicode data files with fixed records lengths?

    Hi!
    To load unicode data files with fixed records lengths (in terms of charachters and not of bytes!) using SQL*Loader manually, I found two ways:
    Alternative 1: one record per row
    SQL*Loader control file example (without POSITION, since POSITION always refers to bytes!)<br>
    LOAD DATA
    CHARACTERSET UTF8
    LENGTH SEMANTICS CHAR
    INFILE unicode.dat
    INTO TABLE STG_UNICODE
    TRUNCATE
    A CHAR(2) ,
    B CHAR(6) ,
    C CHAR(2) ,
    D CHAR(1) ,
    E CHAR(4)
    ) Datafile:
    001111112234444
    01NormalDExZWEI
    02ÄÜÖßêÊûÛxöööö
    03ÄÜÖßêÊûÛxöööö
    04üüüüüüÖÄxµôÔµ Alternative2: variable length records
    LOAD DATA
    CHARACTERSET UTF8
    LENGTH SEMANTICS CHAR
    INFILE unicode_var.dat "VAR 4"
    INTO TABLE STG_UNICODE
    TRUNCATE
    A CHAR(2) ,
    B CHAR(6) ,
    C CHAR(2) ,
    D CHAR(1) ,
    E CHAR(4)
    ) Datafile:
    001501NormalDExZWEI002702ÄÜÖßêÊûÛxöööö002604üuüüüüÖÄxµôÔµ Problems
    Implementing these two alternatives in OWB, I encounter the following problems:
    * How to specify LENGTH SEMANTICS CHAR?
    * How to suppress the POSITION definition?
    * How to define a flat file with variable length and how to specify the number of bytes containing the length definition?
    Or is there another way that can be implemented using OWB?
    Any help is appreciated!
    Thanks,
    Carsten.

    Hi Carsten
    If you need to support the LENGTH SEMANTICS CHAR clause in an external table then one option is to use the unbound external table and capture the access parameters manually. To create an unbound external table you can skip the selection of a base file in the external table wizard. Then when the external table is edited you will get an Access Parameters tab where you can define the parameters. In 11gR2 the File to Oracle external table can also add this clause via an option.
    Cheers
    David

  • How to open a pdf file with command in WebBrowser control?

    Installed acrobat 6 or7 in my PC, then I load a WebBrowser control in IE to open a local pdf file with command line, such as "Page=3", and then open the same pdf file with WebBrowser control in other IE process, I found the command will affect other open and show operations in webbrowser. is it normal?  That is to say, When i set command "Page=3", the second time WebBrowser still open pdf with command "Page=3",I think it is bad.

    Hello:
    Thanks for your reply. I installed Acrobat6.0 or 7.0 in my PC, then i load a WebBrowser Control in IE by Html, then open local pdf with different command by running IE. We can get the command in this website: http://partners.adobe.com/public/developer/en/acrobat/PDFOpenParameters.pdf
    First:open local pdf with command : oWebBrowser.Navigate("G:
    PDF
    07000001.pdf#Page=3&Pagemode=thumbs", null, null, null, null);
    Second:Open the same local pdf with no command:  oWebBrowser.Navigate("G:
    PDF
    07000001.pdf", null, null, null, null)
    【Result】The first command "#Page=3&Pagemode=thumbs" will effect the way of showing pdf when second open. But, the phenomenon will not appear in Acrobat 8.0, 9.0, 10.0.

  • There is no 'Save as' under the file menu.  How do I save a file with another name?

    Numbers help refers to the 'Save As' function in the File menu.  My version (latest) does not have a 'Save As' function.  How do I save a file with another name?

    Ross Millard wrote:
    Badunit. You have an original file and an edited file. Now you duplicate the edited file and save it with a different name. Now do you have to go and delete the changed file from which the duplicate had been made? And.... is the original still unchaned... still original?
    Ross,
    For the situation you describe, Apple has provided Duplicate and Revert. Use File > Duplicate to reach this menu:
    Regards,
    Jerry

  • How to create a pdf file with CS5

    Hello, I'm new to PhotoShop CS5 and haven't figured out yet (despite two hours of trying) how to create a pdf file with pictures and texts.  Can someone please help me with this ?  The "help" button in CS5 doesn't seem to cover this question.  Nor do the FAQs.
    Thank you very much.

    Save As... Photoshop PDF.

  • How to fix the .pdf file with error "invalid annotation object"

    how to fix the .pdf file with error "invalid annotation object"

    As long as the PDF opens, then just try saving it to a new file name. There may be a preflight script that would help troubleshoot the issue.

Maybe you are looking for

  • Cache Connect in cluster

    Hi!!! We have 4-nodes linux cluster based on MC Service Guard. T10 works as a standalone in the packet "pack1" with other apps. Apps uses t10. Packet "pack1" (with t10 and apps) can be moved to any of 4 cluster nodes, and it doesn't have a home node

  • How to retain values in a seeded page

    Hi All, I am doing some personalization in a seeded page.I have attached two message text input items.But my problem is when i navigate to the next page and then again coming back to this page it is retaining all the values except those two values wh

  • Convert date "yyyy-MM-dd" to "MM/dd/yyyy"

    Hi, First of all thank you for helping in advance. I am a new rookie in Java language. However, I have question regarding to converting the date format that I get from mysql to the regular US display date format. The question is I got the date from m

  • Font for print Text in the smartform

    Hi, We need to print the numbers in the similar forts as they appear on cheques. Thanks in advance. Mahendra

  • How to resolve error when Loading External Table?

    I’m getting the following errors when attempting to load External Table -- I've changed the file extension from .csv to .txt to resolve ORA-29913 but error re-occurred. See syntax of External Table below. Thanks, Carol-Ann SQL> desc OWB_COUNTY_TIME