Welcome! Log In Create A New Profile

Advanced

Displaying PHP files correctly

Posted by 77928490 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Displaying PHP files correctly
February 04, 2013 10:09PM
Hi,
It looks like I need assistance right at beginning!!

As per the tutorial I have successfully loaded EasyPHP and ensured it is started. In tutorial 1.3 it tells us how to change the document root directory to DocumentRoot "F:\myphp" .When I do that and then run http://127.0.0.1/home I get a NOT FOUND HTTP error 404 page. This happens even if I use the default document root line.

Also If i try run and PHP file, the computer asks me if I want to open or save the file. Clearly missing something here. Please assist.

Rgds Ian
avatar
Mac
Re: Displaying PHP files correctly
February 05, 2013 10:09AM
If it wants to open the file, then Easy PHP is not running. If it is running, makes sure no other web server is running on your PC (e.g. IIS).

You do not have to change the document root. If you changed it to F, then you need an F-drive.

Where is it currently installed? Say it is C:/EasyPHP, change the config file back to what is was (DocumentRoot "${path}/www"winking smiley ). Then save your file (say for example is is test.php) under C:/EasyPHP/www.

Then you call it by http://localhost/test.php (if you have version 1.8 of EasyPHP - for version 2.0 you need to add home as in http://localhost/home/test.phpt).


.



,
Re: Displaying PHP files correctly
February 06, 2013 08:45PM
Hi

Alternative to what Mac has suggested as a solution to your problem, I would propose that you use an AMP software (XAMPP-incl in CD) to run and display PHP files/pages. You may run into a problem when you install it into a machine running Windows 8- as I did. It kept giving me a 'Web port conflict' error message, but in prior Widows OSs and Linux's Ubuntu 11.10 it runs smooth. Just make sure that once the app is installed with default installation folder, your PHP files are saved in 'C:\xampp\htdocs\' folder.
Re: Displaying PHP files correctly
February 06, 2013 09:00PM
Thanks.

I found a work around. Looking at the FAQ for PHP a reference was made about proxy servers and ports so I used http://127.0.0.1:8080/info.php and it worked. Hope this is a work around confused smiley.
avatar
Mac
Re: Displaying PHP files correctly
February 07, 2013 08:33AM
Yes, it is. You may have Skype running on port 80, which is what EasyPHP and XAMPP wants to use. So instead of uninstalling Skype, you change the port in the config file.
Re: Displaying PHP files correctly
February 08, 2013 08:57AM
Noted, thanx
Re: Displaying PHP files correctly
February 08, 2013 11:25AM
OR.. if you don't know how to change Port 80. You can first run EasyPHP and open skype afterwards, in that way they wont clash. Cause skype is actually using port 80 as an alternative port, so skype will still run perfect.
Re: Displaying PHP files correctly
February 08, 2013 01:56PM
Just finished section one, and i have learned so much about variables and how to display them. That was very interesting.
Mac users
February 11, 2013 12:28PM
I am working on mac and i found out that there is no support for mac users on the softwares provided on the cd, what do you suggest mac users should do. For now I'm borrowing a laptop from my friend to study.
avatar
Mac
Re: Displaying PHP files correctly
February 11, 2013 12:55PM
xampp for Mac is available on the CD, and that is probably the most important, because you have that and Notepad you can finish the course.

Other software is not available for Mac. Which is why I am not a huge fan of Mac.
avatar Re: Displaying PHP files correctly
February 11, 2013 07:01PM
if you still struggling you can try practice online http://studio2.coderun.com/IDE/ trust me you do don't want to waste time on trying to install software as we know this course is not about installing but to code with php n mysql so you need quick solution to start and i suggest this for you! and 000webhost.com you can host your files and domain for free

gbakamela [77234715]
Re: Mac users
February 18, 2013 10:57PM
If statements, comparison operators and switch understood.

Booleans will not be difficult, but I will have to be much more awake when tackling logical operators confused smiley, so I'm signing off for now....smile
Sorry, only registered users may post in this forum.

Click here to login