Problems with very first php script - "Object not found"
Posted: 31. January 2009 03:41
You can create a file with the Microsoft NotePad/WordPad editors and give it a name like "test.php" and put this file in the htdocs directory and when you set your browser to http://localhost/test.php, you will get an error page that says Object not found.
This is happening because the file created by NotePad/WordPad is a "text file", not a "php file". Look at the files in the windows explorer, view, detail and you will see the file type names in one of the columns in the middle.
It took quite awhile for me to figure out this was what was happening, hopefully this information saves others some time. It would also be nice to recommend some editors to use for creating the php files that would not have this problem as part of the xampp installation, or xampp getting started directions.
I used the SciTE editor, which is can be found w/google and downloaded at no charge. This editor has a mode you can set to support php,
others probably do as well.
I created a script with this editor with php filename extension, and save as php or read as php or show as php, saved it in the htdocs directory, and now everything works.
This is happening because the file created by NotePad/WordPad is a "text file", not a "php file". Look at the files in the windows explorer, view, detail and you will see the file type names in one of the columns in the middle.
It took quite awhile for me to figure out this was what was happening, hopefully this information saves others some time. It would also be nice to recommend some editors to use for creating the php files that would not have this problem as part of the xampp installation, or xampp getting started directions.
I used the SciTE editor, which is can be found w/google and downloaded at no charge. This editor has a mode you can set to support php,
others probably do as well.
I created a script with this editor with php filename extension, and save as php or read as php or show as php, saved it in the htdocs directory, and now everything works.