Go Back   nV News Forums > Software Forums > Software Development

Newegg Daily Deals

Reply
 
Thread Tools
Old 05-17-07, 02:20 PM   #13
ViN86
 
Join Date: Mar 2004
Posts: 15,486
Default Re: PHP Question

ill probably end up referencing multiple functions from the same file, so ill use require() so i dont end up calling the require_once() multiple times (i agree multiple instances is a poor technique ghost)

also, what do you all use to debug your php scripts? right now im just runnin a local apache server with PHP5. but if i have errors, the code just doesnt display at all.

what can i use to debug the code and find errors? thx
ViN86 is offline   Reply With Quote
Old 05-17-07, 02:24 PM   #14
evilghost
Registered User
 
Join Date: Jul 2005
Posts: 3,606
Default Re: PHP Question

In /etc/php.ini (or your php.ini)

error_reporting = E_ALL & ~E_NOTICE
display_errors = on
evilghost is offline   Reply With Quote
Old 05-17-07, 02:32 PM   #15
ViN86
 
Join Date: Mar 2004
Posts: 15,486
Default Re: PHP Question

Quote:
Originally Posted by evilghost
In /etc/php.ini (or your php.ini)

error_reporting = E_ALL & ~E_NOTICE
display_errors = on
lol... DE DE DE

should have figured i should turn error reporting on in php. thanks ghost
ViN86 is offline   Reply With Quote
Old 05-17-07, 02:33 PM   #16
evilghost
Registered User
 
Join Date: Jul 2005
Posts: 3,606
Default Re: PHP Question

evilghost is offline   Reply With Quote
Old 05-18-07, 01:22 PM   #17
fivefeet8
Ngemu Mod
 
Join Date: Jul 2003
Location: Fresno, CA
Posts: 1,886
Default Re: PHP Question

Quote:
Originally Posted by ViN86
ill probably end up referencing multiple functions from the same file, so ill use require() so i dont end up calling the require_once() multiple times (i agree multiple instances is a poor technique ghost)
I think in your case, either require_once() or require() will work because you'd still only be calling one instance. Since all the functions you need will be located on a single php script. Maybe you think require_once() means you need to require the file again if you need the function again on the same page. Which isn't the case.

Require_once() simply checks to see if you've already included an instance. If you have, it will not include it again. If you haven't, it will include it. Require() does not check and will include an instance again no matter if you've already included it or not.

I only suggested require_once() because if the plan to extend into OOP programming later on, require() may cause errors if your classes reference other classes.
__________________
[i7 2600k @4.4ghertz][2x4 GB DDR3 1600][EVGA GTX570 1.280GB SC][EVGA GTX460 physx][Asrock Extreme7 Gen3 Z68][2xSeagate 160 Gb SATA HD raid0][Seagate 250 GB SATA2 HD][Sony Bravia 40' 1080p LCD HDTV][NEC 3520a DVD+-DLw][Windows 7 Ultimate x64][Rosewill 1000w]
fivefeet8 is offline   Reply With Quote
Old 05-18-07, 01:50 PM   #18
ViN86
 
Join Date: Mar 2004
Posts: 15,486
Default Re: PHP Question

Quote:
Originally Posted by fivefeet8
I think in your case, either require_once() or require() will work because you'd still only be calling one instance. Since all the functions you need will be located on a single php script. Maybe you think require_once() means you need to require the file again if you need the function again on the same page. Which isn't the case.

Require_once() simply checks to see if you've already included an instance. If you have, it will not include it again. If you haven't, it will include it. Require() does not check and will include an instance again no matter if you've already included it or not.

I only suggested require_once() because if the plan to extend into OOP programming later on, require() may cause errors if your classes reference other classes.
oh ok. yes i misunderstood the purpose of require_once()
ViN86 is offline   Reply With Quote
Old 05-21-07, 03:03 PM   #19
ViN86
 
Join Date: Mar 2004
Posts: 15,486
Default Re: PHP Question

what do you guys use to manage your MySQL database on a remote server?

also, what is the default username and password? do i have to email the host to get this info? or is it probably just the account info?
ViN86 is offline   Reply With Quote
Old 05-21-07, 08:08 PM   #20
supra
2JZ powered
 
supra's Avatar
 
Join Date: Dec 2004
Location: Aus
Posts: 1,321
Send a message via MSN to supra
Default Re: PHP Question

Quote:
Originally Posted by ViN86
what do you guys use to manage your MySQL database on a remote server?
i use phpmyadmin
__________________
supra is offline   Reply With Quote

Old 05-21-07, 11:57 PM   #21
evilghost
Registered User
 
Join Date: Jul 2005
Posts: 3,606
Default Re: PHP Question

Quote:
Originally Posted by ViN86
what do you guys use to manage your MySQL database on a remote server?

also, what is the default username and password? do i have to email the host to get this info? or is it probably just the account info?
SSH + /usr/bin/mysql
evilghost is offline   Reply With Quote
Old 05-22-07, 03:33 AM   #22
SLippe
R.I.P. Babe Thread
 
Join Date: Jun 2004
Posts: 12,387
Default Re: PHP Question

Holy crap you all scare me! LOL I've been wanting to add a forum to my site for years now, but the whole PHP MySQL thing scares me and I haven't the slightest idea about it. If someone would like to help me...evilghost...I would really appreciate it! Sorry about the hijack.
SLippe is offline   Reply With Quote
Old 05-22-07, 07:49 AM   #23
ViN86
 
Join Date: Mar 2004
Posts: 15,486
Default Re: PHP Question

Quote:
Originally Posted by SLippe
Holy crap you all scare me! LOL I've been wanting to add a forum to my site for years now, but the whole PHP MySQL thing scares me and I haven't the slightest idea about it. If someone would like to help me...evilghost...I would really appreciate it! Sorry about the hijack.




but seriously, ill keep posting questions in here as they come up. Slippe, go out and buy a Apache/PHP/MySQL book and just start reading. if you have any program experience (C, C++, even VB) it will be extremely easy
ViN86 is offline   Reply With Quote
Old 05-22-07, 08:49 AM   #24
ViN86
 
Join Date: Mar 2004
Posts: 15,486
Default Re: PHP Question

Quote:
Originally Posted by supra
i use phpmyadmin
how does phpmyadmin prevent others from accessing it?

cant they just access the phpmyadmin and mess with the database? or is there a login or something?

ive been lookin into it. it's pretty powerful and functional. i like it.
ViN86 is offline   Reply With Quote
Reply


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Similar Threads
Thread Thread Starter Forum Replies Last Post
One more question... soundview00 NVIDIA Linux 1 10-02-02 05:31 PM
1st post - XP Restore question Needa916 Microsoft Windows XP And Vista 2 09-12-02 05:24 PM
Newby question about nforce.... superconti NVIDIA Linux 2 09-07-02 11:46 PM
Dual boot question.. Tactics General Hardware 15 09-07-02 10:39 AM
Nvidia Driver Rpm Question Big Booger NVIDIA Linux 17 08-11-02 12:55 PM

All times are GMT -5. The time now is 02:11 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 1998 - 2014, nV News.