|
|
|
|
![]() ![]() |
Nov 18 2007, 10:44 AM
Post
#11
|
|
|
Oh come on Mrs. B! Group: Members Posts: 648 Joined: 6-June 07 From: Tasmania, Australia Member No.: 22,422 |
i hardly know the basics of php and i dont no anything about mysql besides how to set up a database and that.
i cant help you with your problem. im not saying you HAVE to use xampp, i just like it better (ive used both). but if your actually making a server then your meant to install the real things separately. |
|
|
|
Nov 18 2007, 01:32 PM
Post
#12
|
|
|
Advanced Member Group: Members Posts: 170 Joined: 30-July 07 Member No.: 23,704 |
I'm not saying that WAMP5 is not a good package as I've tested that as well. But personally, I would prefer xampp. And of course with the lite version.
As for the php test page problems, I did actually write exactly what kelvinmaki wrote: CODE <?php echo "<P>This is a test using the first tag type.</P>"; ?> and still get This is a test using the first tag type. "; ?> on the actual page. And removing <P>, </P> tags returns an empty page. Anyway regarding to your code below, I've tested it in xampp server in my localhost and it just show everything correctly. Why don't you uninstall your WAMP5 server and install xampp. Try it out and see you get the same problem. I'm really curious that you have that "; ?> showing. The website I cannot load is http://shanghaiexpat.com and it stopped loading right after I installed the package with MySQL, Apache and PHP. Try for yourself, I'm sure you can load the whole page with no problems. And like I wrote before, their main page source now has this bit in it CODE <!-- Error: 2013:Lost connection to MySQL server during query --> I'm pretty sure that the Lost connection to MySQL server error for http://shanghaiexpat.com was due to time out that closed the connection. By default, the server closes the connection after xx hours or xxxxx seconds if nothing has happened to the connection. |
|
|
|
Nov 18 2007, 03:56 PM
Post
#13
|
|
|
Absolute Newbie Group: Admin Posts: 888 Joined: 20-February 05 From: Indianapolis, Indiana, USA (Midwest) Member No.: 2,714 myCENTs:35.43 |
With the semicolon there, the code is fine and should display correctly. If you remove the paragraph tags, the display should be okay as well.
Perhaps you should look at the source code for the page displayed in your browser and post the HTML if any that is there. I do not use WAMP5, XAMPP, or any other pre-packaged web server software. I manually installed Apache, PHP, MySQL, and even PERL. As a result, my system reacts more like an actual server instead of a test platform. The only difference is that because I use Windows, some of the Apache modules are available and there are a few limitations with PHP. Be sure that you clear your browsers cache between tries. As for your connection problem at shanghaiexpat.com, I cannot see any way that you recent installation would cause the error. More than likely, they are having a few problems of their own and you just happened to try and visit during this time. Again, clear your cache and try again. As for your database issues, have you created a root user and password? Have you created the database named "test"? Remember, you have to use the mysqladmin command prompt program to create users and databases but to work with a database, it's tables, and data, you use the mysql command prompt program. Installing a PHP based MySQL interface is a good idea if you get overwhelmed with the command prompt. phpMyAdmin is the usual method of doing this! Please start a new topic in the PHP forum if you encounter any further problems with PHP as it will likely get more attention there and is off topic here! vujsa |
|
|
|
Nov 18 2007, 06:41 PM
Post
#14
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 9 Joined: 14-November 07 Member No.: 26,161 |
kelvinmaki, I already uninstalled WAMP5 and plan to install xampp. Curiously enough, after uninstalling WAMP5 I could surf shanghaiexpat.com again. It really seems to me there is a connection between the fact that I had a server installed and that problem, especially because they always put a message on the main page, if there is some maintenance work going on.
vujsa, I will just answer your post here and then stop asking about PHP. I did not have any HTML in the source page, it was actually just those two lines, and I copied them from a manual! Anyway, I'll try xampp and see what happens. I also wanted to install all components manually, but then thought I could practice other things, like coding and designing pages first, then go to configuring servers by myself. Thanks everyone for answers. |
|
|
|
Nov 19 2007, 04:43 AM
Post
#15
|
|
|
Advanced Member Group: Members Posts: 170 Joined: 30-July 07 Member No.: 23,704 |
kelvinmaki, I already uninstalled WAMP5 and plan to install xampp. Curiously enough, after uninstalling WAMP5 I could surf shanghaiexpat.com again. It really seems to me there is a connection between the fact that I had a server installed and that problem, especially because they always put a message on the main page, if there is some maintenance work going on. For WAMP5 package, there might be some kind of configuration you need to do or the package overwrite your system HOST file for redirecting to the internet. Anyway you can try out xampp package for your learning phase of PHP programming. And a good start of installing those webserver package will be focusing on programming alone. It will take awhile to configure all those server and database manually but of course If you are a more technical side who need to know how things work. Then go ahead. Anyway those two lines should work in Xampp as that's what I've did to in my Xampp webserver. Good luck |
|
|
|
Nov 19 2007, 03:39 PM
Post
#16
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 9 Joined: 14-November 07 Member No.: 26,161 |
I've installed xampp lite, had problems with it, like Apache and MySQL services going off/on all the time.
Then I installed regular xampp, MySQL is working with my queries in mysql.exe console. Now I have new questions: Why does xampp_start.exe tell me that 'Apache+MySQL starting now' - what part of MySQL starts at this point, if I am able to work with databases at any time, even before I start these services? How can I get the index.html or index.php page to display when I go to http://localhost? Right now it jumps to http://localhost/xampp/ with the navigation page. Why do I get This is a test using the first tag type. "; ?> as a page for this code CODE <?php ?echo "<P>This is a test using the first tag type.</P>"; ?> It doesn't even seem like PHP is not configured, since it is actually displaying some text. Thanks This post has been edited by readme123456: Nov 19 2007, 03:46 PM |
|
|
|
Nov 21 2007, 03:10 AM
Post
#17
|
|
|
Advanced Member Group: Members Posts: 170 Joined: 30-July 07 Member No.: 23,704 |
I've installed xampp lite, had problems with it, like Apache and MySQL services going off/on all the time. Then I installed regular xampp, MySQL is working with my queries in mysql.exe console. Now I have new questions: Why does xampp_start.exe tell me that 'Apache+MySQL starting now' - what part of MySQL starts at this point, if I am able to work with databases at any time, even before I start these services? It should be stating that its RUNNING. If you can query your MySQL database, then the service is already started. Its not indicated at the control panel of XAMPP and yet your can access the database might due to starting of service during installation. And not updating in control panel of XAMPP. Restart your computer and it should be fine. When you installed the XAMPP, it will install apache webserver, MySQL to windows services. So upon startup of windows, it should start too. How can I get the index.html or index.php page to display when I go to http://localhost? Right now it jumps to http://localhost/xampp/ with the navigation page. Why do I get This is a test using the first tag type. "; ?> as a page for this code CODE <?php ?echo "<P>This is a test using the first tag type.</P>"; ?> It doesn't even seem like PHP is not configured, since it is actually displaying some text. Thanks In the directory of xampp, there should be a folder named htdoc. Create a new folder in there, eg. myweb. Then put the index.php file in that directory myweb. To access your index.php page. Url should be http://localhost/myweb/index.php. There you should be able to access your page. As for why you are getting that extra text/codes, Its weird. Tested it in my local server and it work just fine. You try to do the myweb example and try putting your code in. I'm pretty sure it should work. Cheers |
|
|
|
Nov 21 2007, 03:46 AM
Post
#18
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 9 Joined: 14-November 07 Member No.: 26,161 |
For some reason the text in my test page is now displaying correctly when put in both htdocs and htdocs/test/ directories.
How can I make the server display index.php when directing to http://localhost? Right now it jumps to http://localhost/xampp control panel. This post has been edited by readme123456: Nov 21 2007, 06:47 AM |
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
|
Lo-Fi Version | Time is now: 5th December 2008 - 01:50 AM |