PHP help here
Pages
- 1
- 2
Author | Topic: PHP help here |
---|---|
Master
Member # 4614
|
written Friday, July 22 2005 13:48
Profile
Homepage
What all do I need to get started, or what would you recommend? -------------------- -ben4808 For those who love to spam: CSM Forums RIFQ Posts: 3360 | Registered: Friday, June 25 2004 07:00 |
Guardian
Member # 2238
|
written Friday, July 22 2005 16:02
Profile
Homepage
Quit and leave it to the pros. That's what I do... -------------------- The critics agree! Demonslayer is "a five star hit!" raves TIMES Weekly! "I've never heard such thoughtful comments. This man is a genious!" says two-time Nobel Prize winning physicist Erwin Rasputin! Posts: 1582 | Registered: Wednesday, November 13 2002 08:00 |
Shaper
Member # 32
|
written Friday, July 22 2005 16:07
Profile
Take a course at a nearby college and purchase several books on the subject... -------------------- Lt. Sullust Cogito Ergo Sum Polaris Posts: 2462 | Registered: Wednesday, October 3 2001 07:00 |
Shock Trooper
Member # 4557
|
written Friday, July 22 2005 16:25
Profile
From you're other posts I assume you know C++ already right? From what I know of PHP (which isn't much), its much simpler than C++. You should be able to learn it fairly easily through a few tutorials. Here's one: http://www.w3schools.com/php/default.asp You should note, however, that PHP sucks. Posts: 264 | Registered: Wednesday, June 16 2004 07:00 |
Master
Member # 4614
|
written Saturday, July 23 2005 07:28
Profile
Homepage
Okay, so do I need to download PHP, MySQL, and Apache server for it to work? Hey, Aran! :D -------------------- -ben4808 For those who love to spam: CSM Forums RIFQ Posts: 3360 | Registered: Friday, June 25 2004 07:00 |
Infiltrator
Member # 154
|
written Saturday, July 23 2005 09:35
Profile
Yes. Don't forget to do it as an Apache Module, not CGI. -------------------- Inconsistently backward. SWOH. IM, PATF, ND. Posts: 612 | Registered: Saturday, October 13 2001 07:00 |
Master
Member # 4614
|
written Saturday, July 23 2005 09:38
Profile
Homepage
All right. Will try. -------------------- -ben4808 For those who love to spam: CSM Forums RIFQ Posts: 3360 | Registered: Friday, June 25 2004 07:00 |
Law Bringer
Member # 2984
|
written Saturday, July 23 2005 11:18
Profile
Homepage
quote:You are asking me? My accomplishment concerning PHP is to make it suck even more than it already does. It is good you cannot see the sourcecode of the postcount script. -------------------- The Encyclopaedia Ermariana <-- Now a Wiki! "Polaris leers down from the black vault, winking hideously like an insane watching eye which strives to convey some strange message, yet recalls nothing save that it once had a message to convey." --- HP Lovecraft. "I single Aran out due to his nasty temperament, and his superior intellect." --- SupaNik Posts: 8752 | Registered: Wednesday, May 14 2003 07:00 |
Master
Member # 4614
|
written Saturday, July 23 2005 12:31
Profile
Homepage
Well, you too had to have gotten started somehow. -------------------- -ben4808 For those who love to spam: CSM Forums RIFQ Posts: 3360 | Registered: Friday, June 25 2004 07:00 |
Agent
Member # 1104
|
written Saturday, July 23 2005 13:36
Profile
Homepage
You don't really have to install Apache as a server to use PHP, but it kinda works best on it. I personally use IIS since it's already installed on my comp. As for getting started with PHP, buy a book, it really does help. And the upside to getting a book is that you don't have to stare at a bright computer screen while learning the language. Another thing that might help is looking at already existing scripts, take them apart, see how the script works and what techniques are used, etc. I personally learned PHP by looking through the Invision Powered Board source code (when it was free). The last suggestion I'd give is if you want to look up what a certain function does, the easiest way is to go to www.php.net/<insert_function_name>. Take note of the user comments posted on the page as well, as they do have various goodies and timesavers. quote:As opposed to what? [ Saturday, July 23, 2005 13:44: Message edited by: RC ] -------------------- Austrian Alex - Reality Corp. Posts: 1307 | Registered: Tuesday, May 7 2002 07:00 |
Shock Trooper
Member # 4557
|
written Saturday, July 23 2005 14:28
Profile
For web programming, Perl. For GUI programming, C++/Java. Posts: 264 | Registered: Wednesday, June 16 2004 07:00 |
Master
Member # 4614
|
written Saturday, July 23 2005 15:11
Profile
Homepage
Well, I downloaded PHP 5.0.4 and Apache2 and am slowly working on MySQL (37MB is quite a bit), but I still can't figure out at all how what I'm supposed to do next. I just want to get to where I can start learning. -------------------- -ben4808 For those who love to spam: CSM Forums RIFQ Posts: 3360 | Registered: Friday, June 25 2004 07:00 |
Agent
Member # 1104
|
written Saturday, July 23 2005 15:57
Profile
Homepage
Firstly, install Apache. Here's a guide that'll help you out (I assume you're using windows): http://httpd.apache.org/docs/2.0/platform/windows.html Then get PHP installed: http://us2.php.net/manual/en/install.windows.apache2.php Then MySQL (which should be one of the easier things to install): http://dev.mysql.com/doc/mysql/en/windows-installation.html That should pretty much cover it all, but you still might run into a few minor conflicts, it happens. [ Saturday, July 23, 2005 16:01: Message edited by: RC ] -------------------- Austrian Alex - Reality Corp. Posts: 1307 | Registered: Tuesday, May 7 2002 07:00 |
Master
Member # 4614
|
written Saturday, July 23 2005 18:18
Profile
Homepage
Is there something special I have to do in order to try some things out offline, you know, just reading PHP documents from the hard drive with a browser? -------------------- -ben4808 For those who love to spam: CSM Forums RIFQ Posts: 3360 | Registered: Friday, June 25 2004 07:00 |
Agent
Member # 1104
|
written Saturday, July 23 2005 19:49
Profile
Homepage
You can directly edit PHP documents with any text editor on your hard drive, but in order to run them, you have to send the PHP script through the server (in this case, that would be Apache). Put the script in the htdocs directory, point your browser to http://localhost/<file_name>.php (or http://127.0.0.1/<file_name>.php). And no, you don't have to be connected to the internet to run the scripts through Apache, you just have to have eveything set up correctly. For example, you can put this into a text file and rename it to test.php: Then put this file into c:\Program Files\<Apache Directory>\htdocs Next, open up a browser and type in localhost/test.php. If you see the source, then PHP has not been properly configured. If you see an error or 404 message, Apache hasn't been set up correctly (or is using a port besides 80, in which case, use localhost:<port_number>/test.php). If you see the PHP Info, then everything has been set up and all's good. Edit: Also, if you're running these scripts offline, I've found it better to use a browser like firefox which won't give you annoying "You're working offline" messages every time you try to load a page. [ Saturday, July 23, 2005 19:55: Message edited by: RC ] -------------------- Austrian Alex - Reality Corp. Posts: 1307 | Registered: Tuesday, May 7 2002 07:00 |
Infiltrator
Member # 154
|
written Sunday, July 24 2005 04:41
Profile
Regarding PHP-sucks-persons: PHP sucks. Perl sucks more. Ruby sucks even moreso. I don't know about Python, but I doubt I'd put it underneath Perl. [ Sunday, July 24, 2005 04:46: Message edited by: Kakakaka ] -------------------- Inconsistently backward. SWOH. IM, PATF, ND. Posts: 612 | Registered: Saturday, October 13 2001 07:00 |
Master
Member # 4614
|
written Sunday, July 24 2005 11:42
Profile
Homepage
So what do you suggest, Kakakaka? :P Or else be quiet. ---- RC, thanks lots for your help, but every time I try to rename by text file "test.php," it stays a text file: "test.php.txt." Does this mean I'm not configured properly? [ Sunday, July 24, 2005 11:47: Message edited by: Mister Maoben ] -------------------- -ben4808 For those who love to spam: CSM Forums RIFQ Posts: 3360 | Registered: Friday, June 25 2004 07:00 |
Agent
Member # 1104
|
written Sunday, July 24 2005 12:34
Profile
Homepage
No, it means you need to change the settings in Notepad to save as "All File Types" instead of just a text file. You should see a pulldown menu with those options when you save the file using "Save As". Alternatively, you could just rename the file by deleting the last part of the file name (.txt). I'd recommend getting Crimson Editor to use as a PHP editor, though, instead of Notepad (Dreamweaver is nice, too, but it's quite expensive). @Kakaka - Let me guess, Microsoft ASP/ASP.NET? [ Sunday, July 24, 2005 12:38: Message edited by: RC ] -------------------- Austrian Alex - Reality Corp. Posts: 1307 | Registered: Tuesday, May 7 2002 07:00 |
Shock Trooper
Member # 4557
|
written Sunday, July 24 2005 13:24
Profile
quote:All scripting languages suck. They are the quickfix created by people who instead of creating code to simplify their problem, create entirely new languages that end up creating new problems. They are designed with fast production in mind, and are intrinsically commercial. Of these languages, Perl is fairly powerful, and Python is probably the best to use due to the implications of Boost-Python. quote:I never used it, so I can't really be sure, but Dev-PHP (http://devphp.sourceforge.net/) might be helpful. Posts: 264 | Registered: Wednesday, June 16 2004 07:00 |
Infiltrator
Member # 154
|
written Sunday, July 24 2005 13:26
Profile
I'd suggest PHP or Python. :P -------------------- Inconsistently backward. SWOH. IM, PATF, ND. Posts: 612 | Registered: Saturday, October 13 2001 07:00 |
Master
Member # 4614
|
written Sunday, July 24 2005 14:37
Profile
Homepage
quote:I think we're really getting to the root of the problem here. I don't really have a httpd.conf file. I have two text files in the \conf directory labeled "httpd" and "httpd.default." And if I'm supposed to insert those lines into one of those files, where? Sorry if I'm being sluggish on catching on to this here. :cool: [ Sunday, July 24, 2005 14:38: Message edited by: Mister Maoben ] -------------------- -ben4808 For those who love to spam: CSM Forums RIFQ Posts: 3360 | Registered: Friday, June 25 2004 07:00 |
Agent
Member # 1104
|
written Sunday, July 24 2005 16:31
Profile
Homepage
It would really help you if you went and turned file extensions on (Control Panel -> Folder Options -> View -> and uncheck "Hide Extensions for known filetypes"). Then you'll see that the httpd has suddenly become httpd.conf. Edit that file and insert the needed information. In this case, you would put in: You can put that anywhere in the file. [ Sunday, July 24, 2005 16:32: Message edited by: RC ] -------------------- Austrian Alex - Reality Corp. Posts: 1307 | Registered: Tuesday, May 7 2002 07:00 |
Infiltrator
Member # 154
|
written Monday, July 25 2005 04:34
Profile
At any rate, when you've confirmed it's working (phpinfo), you should mess around in php.ini: Register globals should be off. Zend compatiability mode should be off. Short open tag should be on. Allow call time pass reference should be on, no matter what the comments say. Safe mode, off. Expose PHP, off. Display errors, on. arg_seperator.output should be "&". If you're using PHP5, which I assume you are, you also need to make sure to enable the php_mysql.dll module. Enabling php_gd2.dll also makes sense there too. [ Monday, July 25, 2005 04:35: Message edited by: Kakakaka ] -------------------- Inconsistently backward. SWOH. IM, PATF, ND. Posts: 612 | Registered: Saturday, October 13 2001 07:00 |
Master
Member # 4614
|
written Monday, July 25 2005 09:22
Profile
Homepage
Okay, I typed those lines in, made a .php file in htdocs, and ran it with Internet Explorer under http://localhost/test.php. But, instead of running the file, a download dialog box came up to download the file. I don't think that's what I wanted... -------------------- -ben4808 For those who love to spam: CSM Forums RIFQ Posts: 3360 | Registered: Friday, June 25 2004 07:00 |
Infiltrator
Member # 154
|
written Monday, July 25 2005 11:22
Profile
You need to configure .php in httpd.conf.. read the readme files. -------------------- Inconsistently backward. SWOH. IM, PATF, ND. Posts: 612 | Registered: Saturday, October 13 2001 07:00 |
Pages
- 1
- 2