PDO not available - codeigniter

I'm not a php developer, just started learning and migrating my php web site to code igniter. Previously I tried to deploy code on my production web site (paid hosting), and a class with PDO reference didn't work, so I backed out form that. My hosting company told me to change my plan to a more expensive plan. I don't want to do that but still I want to use PDO based code;
(From my CPanel I can see "PHP Version 5.2.17", however PDO doesn't work... I thought PDO was bundled with PHP 5...)
anyway
- Is this something that can be added to code igniter even if environment doesn't provide? as a library..etc?
- Or is it commonly available/provided if I change my hosting company to a free hosting company?
Thanks for your advises.

PDO is built into CodeIgniter(system/database/drivers/pdo/); however, if your host does not support it, then it cannot be used.
As for free hosting that provides, PDO, you'll have to do your research on that one.

Related

Laravel setup on HostGator VPS

I want to deploy my Laravel App in a VPS hosting plan.
I have a WHM, but I've no experience deploying my app and configure the server.
I don't have a domain, so I want to test my app using an IP address (like DigitalOcean)
any help?
Edit:
I've completed these steps into my WHM.
Have SSH access to the VPS
Have a sudo user and set up some kind of firewall (for example ufw)
Install required software (nginx, MySQL, PHP, Composer, npm) and additional PHP modules if necessary.
I've created an account ( CPanel ) and I've completed steps
Create a database
Checkout your application using VCS like Git
Configure your .env file.
Install your composer packages, run npm, or anything you would like to do
The account ( CPanel provides an IP address that looks like http://xxx.xxx.x.xx/~cpanel-account-name/).
I can access the website correctly ( however all images are broken and even laravel-routes are not found 404). I know the issue is because ( ~cpanel-account-name/ ) found at the end of the URL.
But how can I fix It?
Since this is quite a broad topic that consists of multiple questions, perhaps you could elaborate on steps you have already taken or the step you are stuck at / need help with?
In short, you need to do the following:
Have SSH access to the VPS
Have a sudo user and set-up some kind of firewall (for example ufw)
Install required software (nginx, MySQL, PHP, Composer, npm) and additional PHP modules if necessary.
Create a database
Checkout your application using VCS like Git
Configure your .env file.
Install your composer packages, run npm or anything you would like to do
Set-up nginx
If this seems daunting, I would advice to tackle it one by one and trying to research every step along the way. This might be challenging and time-consuming, but will be very rewarding!
Alternatively, a paid solution like Laravel Forge can help you take care of server management.

Move OctoberCMS website from Ubuntu VM to a CentOS 7 VM

Our web developer picked OctoberCMS to develop our new website (his skill). Unfortunately before completion he rapidly left us due to health reasons and is no longer available. His Ubuntu environment has some problems and we need it on CentOS 7 anyway. The rest of us are OctoberCMS newbies, but want to learn it.
We built a CentOS 7 VM and installed OctoberCMS and want to move his work over.
We can not find any instructions on how to "export" the work he has done thus far and import it into our new OctoberCMS.
He is using 10 plugins and 3 he developed. (I don't know if that is relevant)
Is there an easy way to do this or at least instructions?
We have been googling, youtubing, IRC'ing for a week and still at a loss.
Any help would be most appreciated.
There really isn't anything special you need to know about moving an OctoberCMS install to a new server compared to moving over any other PHP application.
I am assuming you know how to do the basics of setting up a LAMP stack, such as setting up a virtual host for the domain you want to host the site on and setting up a MySQL database and user/password to access the database. There are of course many variants on how you could accomplish this such as using a management tool like Plesk or cPanel, or just configuring the services manually via the command line.
1) Ensure your new server is running at least roughly the same version of Apache, MySQL, and PHP.
2) Copy over the directory that contains all of the web files from the old server into the document root for your domain on the new server.
3) Do a database dump from the old server and copy it to the new server. If possible, use the same database name and username and password as the old server. This way you don't have to worry about updating the configuration of the website.
4) Pull up the site and troubleshoot any errors that come up. It is helpful if OctoberCMS debug mode is on.
Following the above method will ensure that you have the exact same setup on your new server that the old server had. This will copy over all of the plugins, data, etc.
There are of course many complexities that can come up during a switch over like this, but this should at least get you started and you can come back to StackOverflow with some more specific hurdles.
Hope that helps.

How to use my own local web server to run Laravel?

Though I'm famillar of how MVC works I'm a novice Laravel Dev.
After reading the installation docs, and succesfully started it's server. (i'm not using homestead) I was wondering if i could use my own web server (easyphp) to run laravel localhost instead of it's own mini web server. Can I do that without running the command php artisan serve?
You can run laravel anywhere, it's nothing special. Though as you would know you should redirect it's rootdirectory to / public which can be done by virtualization or using some htaccess file. Both are really easy to do and should work right away.

Bluemix and CMS (Joomla) and CF Push

I have installed a Joomla site with CF on bluemix.
As you know Joomla as other CMS allows to install components for adding functionalities.
This uploads the php code needed for the component and add additional tables/entries in the Database.
My issue is that when I CF PUSH, the new component script is removed from the joomla folders on bluemix, and the database still contains component's tables/entries.
I guess this is the situation for all CMS (Drupal, Wordpress, Joomla, Vbulletin, etc..).
How could I get a kind of CF PULL (?) to keep the modified CMS code including the new component locally on the computer side ?
So when i will redo the CF PUSH the installed component will not be erased.
Thank you in advance for your support,
Best regards
Yves
There is no cf pull command in Cloud Foundry. The closest you would have is the cf files app-name command that you can navigate the directory structure of your cloud application and get specific files as needed, but this would be really tedious if you have multiple files to copy to your local computer.
It looks like Joomla fits better with the IBM Containers service in Bluemix. With the IBM Containers you can have an Docker image from Joomla (https://hub.docker.com/_/joomla/) and use persistent Volumes to save your added functionality. You can also use any Bluemix services (like a database) with IBM Containers.
The article below provides more details and step by step instructions to create an IBM Container for Wordpress. You can easily modify it for Joomla:
http://blog.ibmjstart.net/2015/05/22/wordpress-on-bluemix-containers/
When you push an application on a runtime, php Java or whatever, it will restage all the application sources, included what has been configured and modified before through the cms interface, leaving the db databases untouched. And it is for joomla, but also for drupal or WP or any other cms. By this way to achieve what you wish you have 3 options:
- push exactly the filesystem structure you need on Bluemix, including the configuration files and modules to use on it
- use (as suggested above) a container instead of a runtime: anyway also with a container you have to install your cms on an external docker volume, otherwise the cms will be reset every time you restart the container
- use a Bluemix VM

magento 1.3.2 3 chaging server from 5.2 to 5.3 php will it effect the website

i am using magento 1.3.2 3 changing server from 5.2php to 5.3 php will it effect the website
would there be any compatibility issues ?
hosting people:
As discussed on live chat we have migrated your all account from your VPS to new dedicated server.
Also, the OLD server has php version 5.2 ,cPanel is no longer providing support for php 5.2. Your server has php version 5.3. Please check if your all sites are compatible with the php 5.3 and let us know the convenient time period to change the nameserver IPs as bellow.
would there be issues with magento functionality ?
will it effect the website
Yes.
would there be any compatibility issues
Magento didn't support PHP 5.3 until version 1.4
would there be issues with magento functionality ?
Again, yes, but they're too myriad to list. Upgrading to modern version of Magento won't be a turn key project. Get a 5.3 server, practice moving your site and fixing all the bugs. Do it again. Keep doing it until you're ready to move your production system.

Resources