wisnoskij Posted March 6, 2013 Share Posted March 6, 2013 (edited) 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 March 6, 2013 by wisnoskij Quote Link to comment https://forums.phpfreaks.com/topic/275334-php/ Share on other sites More sharing options...
ignace Posted March 6, 2013 Share Posted March 6, 2013 (edited) 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 March 6, 2013 by ignace Quote Link to comment https://forums.phpfreaks.com/topic/275334-php/#findComment-1416993 Share on other sites More sharing options...
wisnoskij Posted March 6, 2013 Author Share Posted March 6, 2013 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. Quote Link to comment https://forums.phpfreaks.com/topic/275334-php/#findComment-1417005 Share on other sites More sharing options...
ignace Posted March 6, 2013 Share Posted March 6, 2013 Yup DomCrawler and CssSelector can be simply downloaded to use. You can use composer.phar which allows you to easily download/upgrade the dependencies. Quote Link to comment https://forums.phpfreaks.com/topic/275334-php/#findComment-1417018 Share on other sites More sharing options...
Adam Posted March 6, 2013 Share Posted March 6, 2013 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. Quote Link to comment https://forums.phpfreaks.com/topic/275334-php/#findComment-1417025 Share on other sites More sharing options...
Hall of Famer Posted March 7, 2013 Share Posted March 7, 2013 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. Quote Link to comment https://forums.phpfreaks.com/topic/275334-php/#findComment-1417124 Share on other sites More sharing options...
wisnoskij Posted March 7, 2013 Author Share Posted March 7, 2013 (edited) 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 Symfony, 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 March 7, 2013 by wisnoskij Quote Link to comment https://forums.phpfreaks.com/topic/275334-php/#findComment-1417250 Share on other sites More sharing options...
wisnoskij Posted March 7, 2013 Author Share Posted March 7, 2013 The best solution seems to be to use another still active and supported project. phpquery is designed for 5.2. But Ganon seems more popular and better documented and works on 5.3.1+ with even a lot of support for PHP4. Quote Link to comment https://forums.phpfreaks.com/topic/275334-php/#findComment-1417292 Share on other sites More sharing options...
wisnoskij Posted March 8, 2013 Author Share Posted March 8, 2013 (edited) Maybe I am just an idiot. 13 is bigger than 3. Even if it looks like it is in the 3.1 series. Edited March 8, 2013 by wisnoskij Quote Link to comment https://forums.phpfreaks.com/topic/275334-php/#findComment-1417500 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.