Current location: Hot Scripts Forums » Programming Languages » PHP » converting CGI/Perl site to PHP


converting CGI/Perl site to PHP

Reply
  #1 (permalink)  
Old 07-31-03, 10:27 AM
lordmerlin lordmerlin is offline
Newbie Coder
 
Join Date: Jul 2003
Location: South Africa
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
converting CGI/Perl site to PHP

Hi

I have a big site which was written in CGI / Perl, with file extentions .cgi and .pl.

Is there any way of converting it to php files?


tia
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 07-31-03, 05:16 PM
Damian's Avatar
Damian Damian is offline
Wannabe Coder
 
Join Date: Jun 2003
Posts: 149
Thanks: 0
Thanked 0 Times in 0 Posts
nope...you need to rewrite it.
__________________
"My occupation now, I suppose, is jail inmate."
- Unibomber Theodore Kaczynski, when asked in court what his current profession was.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 08-01-03, 08:47 AM
lordmerlin lordmerlin is offline
Newbie Coder
 
Join Date: Jul 2003
Location: South Africa
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
ok, I have a server with a cgi-bin folder, which they claim can run cgi and perl scripts. If I want to leave the files as is, how would I then use them? On the previous server the files were simply located in /home/httd/html/. But I think they configured it to pickup index.cgi

Any ideas?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 08-01-03, 08:07 PM
Damian's Avatar
Damian Damian is offline
Wannabe Coder
 
Join Date: Jun 2003
Posts: 149
Thanks: 0
Thanked 0 Times in 0 Posts
yep...you need to configure your server as it was before. create the DIRS as before and tell them that those DIRS need to be able to run CGI scripts. It's a two minute job. If they don't carry out a job so small, make sure you find another host as they're most certainly lazy and support is crap !

Damian
__________________
"My occupation now, I suppose, is jail inmate."
- Unibomber Theodore Kaczynski, when asked in court what his current profession was.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 08-02-03, 07:10 AM
lordmerlin lordmerlin is offline
Newbie Coder
 
Join Date: Jul 2003
Location: South Africa
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
Well, no I moved to anoher Host, cause they give me much much better options, but this one site is in CGI. How would I be able to test anything that is written in CGI?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 08-02-03, 01:13 PM
Damian's Avatar
Damian Damian is offline
Wannabe Coder
 
Join Date: Jun 2003
Posts: 149
Thanks: 0
Thanked 0 Times in 0 Posts
you got me there... don't actually know 1 line of cgi...i'm a php coder ..sorry
__________________
"My occupation now, I suppose, is jail inmate."
- Unibomber Theodore Kaczynski, when asked in court what his current profession was.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #7 (permalink)  
Old 08-03-03, 06:11 AM
Skeleton Man Skeleton Man is offline
Community Liaison
 
Join Date: Jun 2003
Location: Australia
Posts: 406
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Well, no I moved to anoher Host, cause they give me much much better options, but this one site is in CGI. How would I be able to test anything that is written in CGI?
Basically, you point ur browser at the script, e.g. http://www.yoursite.com/script.cgi

If it displays some content, the script works, if it comes up with "500 Internal Server Error" the permissions are wrong, or the script has problems.... checking the server error log will sometimes reveal more information..

Converting between Perl and PHP isn't terribly difficult if you have a working knowledge of both... Perl is more complex to learn and work with in some ways though...

If you need any more help, just shout...
__________________
Chris (aka Skeleton Man)
ProgrammingTalk's Perl/PHP Moderator !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #8 (permalink)  
Old 08-03-03, 07:01 AM
lordmerlin lordmerlin is offline
Newbie Coder
 
Join Date: Jul 2003
Location: South Africa
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
well, I changed the permissions to 751, but this is via an FTP application, as I don't have a shell account on that server. Yet it still comes up with a 500 Internal Server Error, and I haveto wait until Monday for the Support people to check the log files. In the header I have #!/usr/bin/perl, this is right, cause that's where perl resides on a FreeBSD box.

My knowledge on PHP is still quiet limited, but on the Perl / CGI side I know nothing. How difficult is it to convert the site to PHP?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP and MySQL ? rob2132 Hot Scripts Forum Questions, Suggestions and Feedback 4 08-29-08 03:22 AM
ASP and PHP programmer needed! imediaweb Job Offers & Assistance 22 06-29-05 09:14 AM
Ad management and optimisation using php surebetdmg PHP 0 08-28-03 07:45 PM
Converting to PHP darkcarnival PHP 0 08-03-03 12:03 PM
Use PHP to download .html file from another site (Like LWP::Simple in Perl) ? kevin PHP 4 07-03-03 02:57 AM


All times are GMT -5. The time now is 01:13 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.