Home Forums Gamescan Chat42 About
* Login   * Register * FAQ    * Search
It is currently Sat 02-07-2026 8:17PM

All times are UTC - 6 hours




Post new topic Reply to topic  [ 8 posts ] 
Author Message
 Post subject: PHP at UMR?
PostPosted: Fri 10-01-2004 10:14PM 
Offline
Lieutenant

Joined: Thu 09-18-2003 7:19PM
Posts: 77
Location: Rolla

Source: Off Campus
So has anybody successfully gotten PHP to run through the CGI-BIN on your personal webspace? I kinda have it goin', but it throws out a whole lot of undeclared variable errors. The scripts run great on my linux box at home, but won't work thru CGI.

Any suggestions?

_________________
"...whatever you hear, stay away - John Doe has the upper hand..." "...he shot him...somebody call somebody..."


Top
 Profile E-mail  
    
 Post subject:
PostPosted: Fri 10-01-2004 11:05PM 


Source: Somewhere
make a public_php directory in the same directory as your public_html directory and set the appropriate permissions then throw your scripts in there. When you call the scripts use: http://acmphp.cs.umr.edu/~userid/script_name.php


Top
  
    
 Post subject:
PostPosted: Fri 10-01-2004 11:17PM 
Offline
Lieutenant

Joined: Thu 09-18-2003 7:19PM
Posts: 77
Location: Rolla

Source: Off Campus
Uh, not seeming to work... I just get a 404. What's up?

_________________
"...whatever you hear, stay away - John Doe has the upper hand..." "...he shot him...somebody call somebody..."


Top
 Profile E-mail  
    
 Post subject:
PostPosted: Fri 10-01-2004 11:49PM 


Source: Somewhere
http://acmphp.cs.umr.edu/ <-- says they're rebuilding the acm server so that is what's up


Top
  
    
 Post subject:
PostPosted: Sun 10-03-2004 12:31PM 
Offline
Penis Hater
User avatar

Joined: Mon 02-16-2004 1:47PM
Posts: 2106

Source: Fidelity
um... no....

In your public_html folder make a folder named cgi-bin. Put your scripts in there. Then you have to access your website through gpunix1.cc.umr.edu/cgi-bin/cgiwrap/userid/script_name.php
There is no tilde in front of your userid.
Also, you have to put "#!/umr/testbin/php --" at the beginning of the file.


Top
 Profile  
    
 Post subject:
PostPosted: Sun 10-03-2004 7:55PM 
Offline
Lieutenant

Joined: Thu 09-18-2003 7:19PM
Posts: 77
Location: Rolla

Source: Off Campus
Ok, that's the method I was told by IT. When i run cgiwrapd, it outputs a whole string of variable errors:

Output of script follows:
=====================================================
PHP Notice: Undefined variable: r in /afs/umr.edu/users/rasnqb/public_html/cgi-bin/index.php on line 58

And I get those two lines for every time I use a variable in the script with different line numbers lol.

What's up wit that?

_________________
"...whatever you hear, stay away - John Doe has the upper hand..." "...he shot him...somebody call somebody..."


Top
 Profile E-mail  
    
 Post subject:
PostPosted: Sun 10-03-2004 11:19PM 
Offline
Penis Hater
User avatar

Joined: Mon 02-16-2004 1:47PM
Posts: 2106

Source: Fidelity
Well, that's just a warning, not an error, your script should still run even with that.


Top
 Profile  
    
 Post subject:
PostPosted: Tue 10-19-2004 9:59PM 
Offline
Cookie Monster
Cookie Monster
User avatar

Joined: Mon 05-12-2003 6:27PM
Posts: 423
Location: Rolla

Source: TJ Hall
There is some code that can help you out with that problem:

Code:
//Error Handling (Defaults)
error_reporting (E_ALL ^ E_NOTICE);


You can put that at the top of your php files. You can edit the arguments to change which errors get output to the screen. This is pretty much a requirement for new versions of PHP. You can get around this if you propperly configure your php.ini which umr will not do.

Since I code php for a living (a sad living) I might give you some advice. I would put this in a seperate file that holds all of my global variables and global functions... if your code is complex enough to need this. Then you simply include that file into your other php files.

like:
include 'secure.php';

These are just some sample snippets from some code I've written. Hope that helps. Goto php.net and look at their documentation too.


Top
 Profile  
    
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group