O'Reilly Forums: Setting Up Php - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Setting Up Php is there a guide somewhere to setting up PHP/OS X?

#1 User is offline   stevebur 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 13-April 09

Posted 13 April 2009 - 09:21 AM

for the examples in this book?
0

#2 User is offline   rosco ;) 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 04-May 09

Posted 04 May 2009 - 08:25 AM

Your best off with something like XAMP, MAMP or WAMP depending on whether you're using linux/unix, Mac or Windows for your development environment. This is really easy to set up, and the monitor will show you the default diretory to place the .PHP code. Which in wamp is c:\wamp\www.
Get WAMP here:- WAMP Here

The PHP file that's required is in the chapter 1 final zip

This post has been edited by rosco ;): 04 May 2009 - 08:49 AM

0

#3 User is offline   ajaxnewbie 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 18-May 09

Posted 18 May 2009 - 11:45 PM

Hi,

I did setup WAMP PHP server as you mentioned.

But now I am always getting request.status = 0 instead of 200.

SO even if the control goes into my displayDetails function, it's not displaying the content for the selected item.

PLease suggest.

thanks
0

#4 User is offline   richardbarth 

  • New Member
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 19-July 09

Posted 20 July 2009 - 01:28 PM

QUOTE (ajaxnewbie @ May 18 2009, 11:45 PM) <{POST_SNAPBACK}>
Hi,

I did setup WAMP PHP server as you mentioned.

But now I am always getting request.status = 0 instead of 200.

SO even if the control goes into my displayDetails function, it's not displaying the content for the selected item.

PLease suggest.

thanks


Have you ever been able to correct this and get the data to display? I'm having a similar problem.

Thanks.
0

#5 User is offline   JimBou 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 31-January 10

  Posted 31 January 2010 - 03:32 AM

QUOTE (richardbarth @ Jul 20 2009, 01:28 PM) <{POST_SNAPBACK}>
Have you ever been able to correct this and get the data to display? I'm having a similar problem.

Thanks.



I have this same problem. The book says their is information available to set up the server side php scripts, but there is nothing in the back of the book, or on the website (that I can find). Could someone please reply to this question please as I can't get any of the book examples to work.
0

#6 User is offline   sailing_12 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 12-February 10

  Posted 12 February 2010 - 07:46 AM

Here's how I solved this problem -

1. Install XAMPP for Windows found here: http://www.apachefriends.org/en/xampp-windows.html (I used basic package, .exe format)

2. Locate the htdocs\xampp folder and create a folder called headfirst-ajax in it.

3. create another folder called ch01 inside of the headfirst-ajax created above. The folder path should now be: htdocs\xampp\headfirst-ajax\ch01.

4. Copy the css, images and scripts folders, as well as inventory.html and getDetails.php into the ch01 folder above.

5. Open http://localhost/xampp/headfirst-ajax/ch01/inventory.html in a browser. Images and details should work. If not, check your paths, file/folder names, code, etc. (I was missing my displayDetails() function at first...)

6. I'm planning to create ch02, ch03, etc. folders and work from there.

**********************************************************************

It's really poor editing that this book was released without any instructions or prerequisites to set up a lab environment. I searched through the book, it's website, and these forums for the better part of an evening before I figured out how to do it on my own. I even sent an email to the author but have not received a response.

I hope this helps everyone - pass it on.




0

#7 User is offline   babi_sz 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 22-April 10

Posted 22 April 2010 - 03:49 PM

Hi,

I've tried the solution in the previous post, but didn't work probably because there were other tiny settings that had to be changed on my system and it frustrated me. This doesn't mean it won't work for others.

I checked out HF PHP & MySQL for server setup - it's way better than whatever is suggested in HF Ajax. Unfortunately the different Windows versions require different approach, I have a Vista Home Premium on a 64-bit machine, which makes it a bit complicated, but here is a link to how to activate your IIS7 server, install PHP and MySQL

http://maximumpcguides.com/windows-vista/h...php-web-server/

Furthermore, PHP info will return an error (HTTP Error 404.17 - Not Found - The requested content appears to be script and will not be served by the static file handler.) unless you set the Enable 32-bit Applications to True on a 64-bit machine. See instructions here http://www.hanselman.com/blog/HTTPError404...64bitVista.aspx

I hope this helps someone.

I copied the files and folders of HF Ajax Ch01 into the wwwroot folder and ran it from http://localhost/inventory.html and it finally works!!!! With all the pictures and descriptions.

I agree, the HF Ajax book starts off very badly by not setting up the environment, thereby leaving a huge gap and frustrating everyone.


Babi

This post has been edited by babi_sz: 22 April 2010 - 03:51 PM

0

#8 User is offline   Super Duper Noob 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 06-June 10

Posted 06 June 2010 - 11:03 PM

use wamp
once installed, click the wamp icom on the system tray then click the www directory.
once the www folder pops up, unzip the chapter then copy n paste the unzipped folder into the www folder...

once finished, click the wamp icon on the system tray once again then click on localhost.
browser will pop up n u see the wamp main page..
look for the chapter folder name on the site...
after that, go figure..
0

#9 User is offline   chang_ang 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 02-August 10

Posted 02 August 2010 - 03:27 PM

QUOTE (sailing_12 @ Feb 12 2010, 07:46 AM) <{POST_SNAPBACK}>
Here's how I solved this problem -

1. Install XAMPP for Windows found here: http://www.apachefriends.org/en/xampp-windows.html (I used basic package, .exe format)

2. Locate the htdocs\xampp folder and create a folder called headfirst-ajax in it.

3. create another folder called ch01 inside of the headfirst-ajax created above. The folder path should now be: htdocs\xampp\headfirst-ajax\ch01.

4. Copy the css, images and scripts folders, as well as inventory.html and getDetails.php into the ch01 folder above.

5. Open http://localhost/xampp/headfirst-ajax/ch01/inventory.html in a browser. Images and details should work. If not, check your paths, file/folder names, code, etc. (I was missing my displayDetails() function at first...)

6. I'm planning to create ch02, ch03, etc. folders and work from there.

**********************************************************************

It's really poor editing that this book was released without any instructions or prerequisites to set up a lab environment. I searched through the book, it's website, and these forums for the better part of an evening before I figured out how to do it on my own. I even sent an email to the author but have not received a response.

I hope this helps everyone - pass it on.



Finally got it to work using XAMPP. Thanks for the info!
0

#10 User is offline   mtv134 

  • New Member
  • Pip
  • Group: Members
  • Posts: 3
  • Joined: 22-September 10

Posted 22 September 2010 - 04:03 AM

I Love this book and you can also find more resources about Ajax Programming
0

#11 User is offline   MrsRodgers 

  • New Member
  • Pip
  • Group: Members
  • Posts: 1
  • Joined: 13-July 12

Posted 13 July 2012 - 11:27 AM

 sailing_12, on 12 February 2010 - 07:46 AM, said:

Here's how I solved this problem -
...
I hope this helps everyone - pass it on.


God bless you, Sailing_12!!
0

#12 User is offline   burnedfaceless 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 29-April 14

Posted 29 April 2014 - 08:38 PM

If you have problems email me at burnedfaceless@gmail.com.

I can tell you with Ajax well I dual boot I don't run a virtual server but I'll probably experiment on a real one. The thing is with Ajax any JavaScript you run into compatibility you don't have on php.

Shoot me an email there's a command line thing and a few programs. Pretty easy to set up.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users