Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

php - can anyone help?

Thread Tools
 
Search this Thread
 
Old 30 May 2002, 11:26 AM
  #1  
Hos
Scooby Regular
Thread Starter
iTrader: (1)
 
Hos's Avatar
 
Join Date: Jul 1999
Location: Dundee
Posts: 978
Likes: 0
Received 0 Likes on 0 Posts
Post

Hiya,
I want to use certain modules on my website such as a news program which i really really want and a tag system. edit- news system uses MSQL database and php.

My webhosting has php and mysql enabled but i don't have direct access to it. I've tried to install these components but had no luck.

So.. I've downloaded PHP4.06 / Apache1.3.20 / ActivePerl5.6 / MySQL3.23 and PhpMyAdmin in one bundle. I've managed to set it up on my computer fine, and the local host works. but i don't know what to do next.

All the websites just say go get on with it. do I upload it to my hosting or what? I'm a little confused.


[Edited by Hos - 5/30/2002 11:29:45 AM]
Old 30 May 2002, 12:27 PM
  #2  
AndiThompson
Scooby Regular
 
AndiThompson's Avatar
 
Join Date: Aug 2001
Location: Republic Of Mancunia
Posts: 2,474
Likes: 0
Received 0 Likes on 0 Posts
Post

Effectively what you've got there is your own server, I'm running a similar set up on my PC now, and I use it to host a few sites and files and stuff, it's easier than uploading everything.

What connection are you on? If it's ADSL find out if you've got a static IP address, if you have you can just set your domain to point to that IP address, if not it gets a little more tricky, as you need a dynamic DNS account, loads of places will give you a URL that will always point to your current IP because of a little program that runs in the background of your PC, for example andi.ath.cx always points to my computer, whatever my IP address is. Once you've set that up you can set up your domain to point to it. Not amazingly complex, just a bit hard to describe.
Old 30 May 2002, 01:02 PM
  #3  
rik1471
Scooby Regular
 
rik1471's Avatar
 
Join Date: Nov 2001
Posts: 4,788
Likes: 0
Received 0 Likes on 0 Posts
Post

i dont think thats what he meant
Old 30 May 2002, 01:16 PM
  #4  
snowcrash
Scooby Regular
 
snowcrash's Avatar
 
Join Date: Mar 2002
Location: www.scoobyzone.co.uk
Posts: 2,082
Likes: 0
Received 0 Likes on 0 Posts
Post

have you got access to mysql from your webhost provider? (i.e. have they given you a database and username and password for mysql??)

Old 30 May 2002, 02:01 PM
  #5  
AndiThompson
Scooby Regular
 
AndiThompson's Avatar
 
Join Date: Aug 2001
Location: Republic Of Mancunia
Posts: 2,474
Likes: 0
Received 0 Likes on 0 Posts
Post

Rik, what he's download is stuff to run his own server, for some reason I just presumed he was going to run his own server
Old 30 May 2002, 03:55 PM
  #6  
Hos
Scooby Regular
Thread Starter
iTrader: (1)
 
Hos's Avatar
 
Join Date: Jul 1999
Location: Dundee
Posts: 978
Likes: 0
Received 0 Likes on 0 Posts
Smile

Hiya,
Andi, riks correct. I don't want my computer being an internet host. I am looking to use my web hosting account to do the php stuff.

Snow, I asked them to set up a database and they did so. They have been fantastic. They set up a username and password for me. i don't want to keep bothering them every 2 seconds about this though, or whenever i want something new installed. I know if it was me, i'd get annoyed.

I just want this thing installed and working and be in control.
What i downloaded was phpdev4. (from http://www.firepages.com.au/)
I was under the assumption that i could transfer it to my hosting account then have everything to work from there. Just really confused now.

Anyone know anyone that installs php/mysql stuff for you..lol would be easier.
Hos
Old 30 May 2002, 04:20 PM
  #7  
Trotty
Scooby Regular
 
Trotty's Avatar
 
Join Date: Feb 2002
Posts: 179
Likes: 0
Received 0 Likes on 0 Posts
Post

If your web hosts are running mySQL for you all you need to do is follow the instructions for the php jobbie - usually upload all necessary files to your server, and then run the 'control panel' php page - from here you will be able to setup your directory structure and db options (u/n, pwd, etc) - this is what I've done in the past for php or perl-based BB's.

Any good?

Ian
Old 30 May 2002, 05:26 PM
  #8  
netclectic2
Scooby Regular
 
netclectic2's Avatar
 
Join Date: Mar 2001
Posts: 218
Likes: 0
Received 0 Likes on 0 Posts
Post

to test if php is installed and accessible on the server create a file calle info.php containing

<?php
phpinfo();
?>

upload this file to your webspace and browse to it. if php is installed you should see loads of techie info about php.

[Edited by netclectic2 - 5/30/2002 5:26:29 PM]
Old 30 May 2002, 06:08 PM
  #9  
Hos
Scooby Regular
Thread Starter
iTrader: (1)
 
Hos's Avatar
 
Join Date: Jul 1999
Location: Dundee
Posts: 978
Likes: 0
Received 0 Likes on 0 Posts
Smile

Ok i created the php file and it showed the php information for my website. Just was looking to have it so i have direct access and can change certain things without having to bother my webhost.

For example, the news program i want to install i have to change a line in the php.ini (register_globals = On) and i don't have access to it.

Thanks for everyones help anyway. i appreciate it.
Hos



[Edited by Hos - 5/30/2002 6:17:42 PM]
Old 30 May 2002, 06:29 PM
  #10  
snowcrash
Scooby Regular
 
snowcrash's Avatar
 
Join Date: Mar 2002
Location: www.scoobyzone.co.uk
Posts: 2,082
Likes: 0
Received 0 Likes on 0 Posts
Post

hmm interesting, is this the issue with that the latest php has a new global variable problem???

if it is i bypassed the editing the php.ini solution by dumping 4 lines of code into every php script to do utilise the old global variable system.
Old 30 May 2002, 06:44 PM
  #11  
Hos
Scooby Regular
Thread Starter
iTrader: (1)
 
Hos's Avatar
 
Join Date: Jul 1999
Location: Dundee
Posts: 978
Likes: 0
Received 0 Likes on 0 Posts
Post

yeah. this thing like the old php but needs the globals on to recognise the login.

Snowcrash, sounds like you can help.

I got given this advice to try as i can't access the php.ini file.

-------------------------------------------------
As you don't have access to your php.ini, there might also be the possibility to add the line

ini_set ("register_globals","Yes");

to one or more of your php-files. I don't know which files to edit though as I don't know how to program in PHP. Probably editing b2config.php might be sufficient. For further information take a look at this site here: http://www.php.net/manual/en/function.ini-set.php.
---------------------------------------------------------

can you give any advice where in the php files to put that line? sounds like you have done it before or something similar. when i mean where, is there a certain area where you would do it?
Old 30 May 2002, 07:23 PM
  #12  
snowcrash
Scooby Regular
 
snowcrash's Avatar
 
Join Date: Mar 2002
Location: www.scoobyzone.co.uk
Posts: 2,082
Likes: 0
Received 0 Likes on 0 Posts
Post

put the following code in the top of every php file (just after the "<?php" line) your php program uses :


if (isset($_REQUEST)) {
while(list($varname, $varvalue) = each($_REQUEST)) { $$varname =
$varvalue; }
}
if (isset($_SERVER)) {
while (list($varname, $varvalue) = each($_ENV)) { $$varname =
$varvalue; }
while (list($varname, $varvalue) = each($_SERVER)) { $$varname =
$varvalue; }
}



that is all you have to do - this makes old php programs work on the latest php version ..

[Edited by snowcrash - 5/30/2002 7:23:37 PM]

[Edited by snowcrash - 5/30/2002 7:24:03 PM]




All times are GMT +1. The time now is 01:45 PM.