Jump to content

Recommended Posts

Hello PHP freaks,
I have come for some non-coding PHP advise/help.

I have never used PHP myself and know very little about the language. I am trying to figure out if I can use PHP for a project I am currently involved in and need a few very specific pieces of informational for a very specific running environment.

The general situation is that I am stuck using GoDaddy shared linux hosting. Before I had access to the account to test in the environment it was to be used in, I already wrote a program in Perl. GoDaddy "supports" Perl, but only an old version and it does not support installing Perl CPAN modules. If you do not know much about Perl, from my understanding this basically means you cannot do much with it as the core Perl is just very basic and designed to be used alongside modules.
Specifically, you do not have access to Make or a C compiler on these GoDaddy accounts.

I am here to ask if you could give me enough knowledge about PHP to tell if GoDaddy supports PHP well enough to actually do something with it. I am not asking for GoDaddy  specific information, though that would be great.

What version of PHP is really a necessity? GoDaddy has PHP 5.3 installed, but you can downgrade to 5.2.

Note (not sure what this means, or if it matters. I know they disabled Sockets in Perl): GoDaddy states: The PHP 5 function register_globals is turned off by default. To change the status of a function, you can use custom initialization (php5.ini) files.
Does PHP have a module/custom class/library system that requires any sort of install at all or access to system folders?

Will lack of make and/or a C compiler possibly be a problem?
My project requires a powerful and robust web scrapper, something that uses CSS Selectors if at all possible (but at least something as robust).
And really needs some sort of Try/Catch style error handling, or whatever equivalent PHP has. (For perl you need a custom module for this)
And finally I will need the ability to access MySQL Databases. (I am sure GoDaddy comes with whatever is needed for this)


so what do you think? 

Thanks in advance for any help,
  jonathon

Edited by wisnoskij
Link to comment
https://forums.phpfreaks.com/topic/275334-php/
Share on other sites

5.3 is good although 5.4 would be better.

 

register_globals is turned off and it should stay that way.

 

PHP comes bundled with a great deal of modules, so there is hardly any need for make or a c compiler.

 

https://github.com/symfony/DomCrawler: is a WebScraper written in PHP with support for CSS selectors (when you also download the CssSelector component)

 

PHP has support for try/catch: http://www.php.net/manual/en/language.exceptions.php

 

MySQL is one of the many modules PHP supports. Though it is advised to use mysqli instead of mysql since the mysql module is deprecated (as of PHP 5.5)

Edited by ignace
Link to comment
https://forums.phpfreaks.com/topic/275334-php/#findComment-1416993
Share on other sites

Great, that sounds terrific.
and I assume since it was not mentioned that installing this DomCrawler is basically just copying over a few files into your working directory.

I was just told that basically it is known that shared hosting just does LAMP (where the P stands for PHP). And that GoDaddy will support enough PHP to do any reasonable project with, at the very least.

So I guess I am good. I do not know why GoDaddy cannot be upfront with this. If they had said that they highly suggested that you use PHP, I would have used it. Instead they are like: Ya, we support Perl, and Ruby, and ten other languages you have never even heard about. Use whatever you want.

Link to comment
https://forums.phpfreaks.com/topic/275334-php/#findComment-1417005
Share on other sites

So I guess I am good. I do not know why GoDaddy cannot be upfront with this. If they had said that they highly suggested that you use PHP, I would have used it. Instead they are like: Ya, we support Perl, and Ruby, and ten other languages you have never even heard about. Use whatever you want.

I imagine most people don't look to their hosting company to advise them of what programming language to use, but look for a hosting company that provides what they need. That's probably why GoDaddy lists all the languages you can use, and not which you should be using.

 

Also just to add, PHP extensions don't introduce new constructs into the language unlike Perl. Everything is included within the core, extensions just add new classes and functions. Most hosting companies provide the common ones though.

Link to comment
https://forums.phpfreaks.com/topic/275334-php/#findComment-1417025
Share on other sites

So Godaddy's default PHP version is 5.3? Thats nice, many shared and free hosts still run PHP 5.2 as default, though some do allow you to upgrade with one click. My software requires PHP 5.3, so I just have to tell users getting errors to upgrade their PHP. Its kinda bad when you have to repeat the same line over and over again lol, but this cant be helped until webhosts aint stubborn enough to stick to an old fashioned php version.

Link to comment
https://forums.phpfreaks.com/topic/275334-php/#findComment-1417124
Share on other sites

Note: Specifically, at the time of this post, they seem to be running "PHP 5.3.13 (cli) (built: May 14 2012 16:26:28)".
So DomCrawler, or at least DomCrowler version 2 is not usable.

It looks like S
ymfony, prior to version 2, was just one big project without separate components. But it looks like it still did basically the same stuff, and I should be able to use the legacy 1.4 version designed for 5.2.

Edited by wisnoskij
Link to comment
https://forums.phpfreaks.com/topic/275334-php/#findComment-1417250
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.