Tag Archives: PHP

Learning System Administration: What to focus on?

By ScottLew

In the fall I am taking courses in System Admin and Networking Admin, along with Cisco classes. Sometime next year I hope to get Red Hat and CCNA certifications, then try to get some experience and a job.

I am wondering what I can focus on in the meantime (and in my spare time) that will contribute to my knowledge of systems administration.

I have some experience with C++, PHP and MySql programming but they’re not really related to SysAdmin.

I was thinking learning Perl would be more helpful. Or if I could do some type of project. I’d appreciate any other ideas though. I would like to focus on something that I can put to use and/or gain experience in SysAdmin.

Any ideas would be appreciated.

…read more

Source: FULL ARTICLE at The UNIX and Linux Forums

How to send mail using PHP mail function On apache server.?

By Kiran ursal

Hello,
I am using centos-6.2

Quote:

[root@localhost sbin]# uname -a
‘Linux localhost.localdomain 2.6.32-220.el6.i686 #1 SMP Tue Dec 6 16:15:40 GMT 2011 i686 i686 i386 GNU/Linux


I have apache server,php5 on my system and I want to send mail using sendmail on my system.
when I try to send mail from shell that time mail is succesfully sent to respective address(

Quote:

php -r ‘mail(“K.u@gmail.com”,”hi”,”hello”,”r.u@gmail.com”);’


)

but when I try to send it through webbrowser I am not able to send it.
so please help me if anybuddy knows the solution on this problem

Source: FULL ARTICLE at The UNIX and Linux Forums

Vanguard Health Systems' Phoenix Health Plan Subsidiary Accepts a Capped Contract in Maricopa County

By Business Wirevia The Motley Fool

Filed under:

Vanguard Health Systems’ Phoenix Health Plan Subsidiary Accepts a Capped Contract in Maricopa County

NASHVILLE, Tenn.–(BUSINESS WIRE)– Vanguard Health Systems, Inc. (NYS: VHS) (the “Company”) today announced that its Phoenix, Arizona health plan subsidiary, VHS Phoenix Health Plan, LLC (“PHP“), agreed with the Arizona Health Care Cost Containment System (“AHCCCS“) on the general terms of a capped contract for Maricopa County for the three-year period commencing October 1, 2013. Approximately 98,300 of PHP‘s members resided in Maricopa County as of December 31, 2012. Pursuant to the terms of PHP‘s agreement with AHCCCS, PHP will not file a protest of any of AHCCCS‘ decisions. In addition, PHP agreed that enrollment will be capped effective October 1, 2013 and the enrollment cap will not be lifted at any time during the total contracting period, except in AHCCCS‘ discretion if certain conditions occur as outlined in the original request for proposal. AHCCCS has also indicated that it intends to hold an open enrollment for PHP members in Maricopa County sometime in calendar year 2014.

About Phoenix Health Plan, www.phoenixhealthplan.com

In partnership with the Arizona Health Care Cost Containment System (AHCCCS), Phoenix Health Plan (PHP) makes it easy for its members to access care from more than 12,350 physicians and providers, nearly 50 hospitals and 860 pharmacies across the State of Arizona. We are proud to serve over 186,000 PHP members across nine Arizona counties: Apache, Coconino, Gila, Maricopa, Mohave, Navajo, Pima, Pinal, and Yavapai. Headquartered in Phoenix, Arizona, PHP employs over 350 employees across Arizona. PHP is proud to have served Arizona residents since 1983.

About Vanguard Health Systems, www.vanguardhealth.com

The Company owns and operates 28 acute care and specialty hospitals and complementary facilities and services in metropolitan Chicago, Illinois; metropolitan Phoenix, Arizona; metropolitan Detroit, Michigan; San Antonio, Texas; Harlingen and Brownsville, Texas; and Worcester and metropolitan Boston, Massachusetts. The Company’s strategy is to develop locally branded, comprehensive health care delivery networks in urban markets.

Cautionary Statement about Forward -Looking Information

This press release contains “forward-looking statements” within the meaning of the federal securities laws that are intended to be covered by safe harbors created thereby. Forward-looking statements are those statements that are based upon management’s current plans, objectives, goals, strategies, intentions and expectations that is not historical information, and are …read more
Source: FULL ARTICLE at DailyFinance

Dynamically added text fields passed to PHP script

By GroveTuckey

If I am posting this to the wrong section please move it somewhere it fits. I apologize if this is not the correct section.

I have a site where I want to have form that in a “Visitor name” section to be able to add fieldets as needed. I think I have that worked out.

So the below code is the text area boxes. There is a First Name, Last Name and a Job Title field.

Code:

Visitor Name


and the js code to recreate the fieldset is

Code:

var _counter = 0;
function Add() {
_counter++;
var oClone = document.getElementById("addmore").cloneNode(true);
oClone.id += (_counter + "");
document.getElementById("placeholder").appendChild(oClone);
}


That creates the fields when the “Add Visitor” button is pushed with no limit to the amount of dynamic fileds that can be created. It basically just copies the fieldset.

So I guess the PHP part is where I am getting hung up.

How do I pass those dynamic values into the php script and place them in a file.

When I use

Code:

foreach($_POST['name'] as $info) {
fwrite($file, "$companyname,$info,$boxes,$boxes1,$boxes2,$boxes3,$boxes4,$boxes5,$boxes6,$boxes7,$boxes8,$boxes9,$boxes10,$boxes11 n");
}


I get

Code:

Company,Fred,No,No,No,No,Yes,No,No,No,No,Yes,No,Yes
Company,Williams,No,No,No,No,Yes,No,No,No,No,Yes,No,Yes
Company,Hello,No,No,No,No,Yes,No,No,No,No,Yes,No,Yes
Company,Todd,No,No,No,No,Yes,No,No,No,No,Yes,No,Yes
Company,Williams,No,No,No,No,Yes,No,No,No,No,Yes,No,Yes
Company,Hello,No,No,No,No,Yes,No,No,No,No,Yes,No,Yes


Instead of

Code:

Company,Fred,Williams,Hello,No,No,No,No,Yes,No,No,No,No,Yes,No,Yes
Company,Todd,Williams,Hello,No,No,No,No,Yes,No,No,No,No,Yes,No,Yes


So I guess I am getting the data but I need it put in the above format. I assume …read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Vanguard Health Systems Receives Arizona Medicaid Agency Contract Award Notification

By Business Wirevia The Motley Fool

Filed under:

Vanguard Health Systems Receives Arizona Medicaid Agency Contract Award Notification

NASHVILLE, Tenn.–(BUSINESS WIRE)– Vanguard Health Systems, Inc. (NYS: VHS) (the “Company”) today announced that its Phoenix, Arizona health plan subsidiary, VHS Phoenix Health Plan, LLC (“PHP“), received a letter from the Arizona Health Care Cost Containment System (“AHCCCS“) on Friday March 22, 2013, informing PHP that it was not awarded an acute care program contract for the program year commencing October 1, 2013. Under its current contract with AHCCCS, which expires on September 30, 2013, PHP covers members in nine Arizona counties: Apache, Coconino, Gila, Maricopa, Mohave, Navajo, Pima, Pinal and Yavapai. PHP has served Arizona residents since 1983.

Pursuant to the terms of AHCCCS‘s request for proposal, pursuant to which PHP submitted its bid (the “RFP“), PHP, as an unsuccessful incumbent acute care contractor in Maricopa and Pima counties, filed a formal request on March 23, 2013, to receive a capped contract in those two counties. If AHCCCS exercises its discretion to grant PHP‘s request with respect to either or both of those counties, PHP would continue to provide services to its existing members in those counties under the terms and conditions of the RFP, but would not receive any new members as long as enrollment remains capped. PHP anticipates a response to its formal request by March 31, 2013.

PHP also has the right to protest AHCCCS‘s decision. PHP is evaluating the scoring of its bid as well as other relevant information to determine whether to file a protest. AHCCCS scored all bids submitted under the RFP based on four weighted criteria: capitation (33%); program (33%); access of care/network (17%); and organization (17%). If it chooses to do so, PHP must file its protest no later than April 1, 2013.

PHP represented approximately 80% of the segment revenues, and substantially all of the segment EBITDA and income from continuing operations before income taxes associated with the Health Plans segment as reported in the Company’s Form 10-Q for the six months ended December 31, 2012. As of December 31, 2012, PHP‘s membership was 186,200, which represented 79% of the Company’s total health plan membership. Approximately 116,200 of the PHP members resided in Maricopa and Pima counties as of December 31, 2012. As of December 31, 2012, the Company had goodwill and net intangible assets of approximately $85 million related to PHP on its balance sheet.

“After serving the residents of Arizona for nearly 30 years under the AHCCCS program, we were both surprised …read more
Source: FULL ARTICLE at DailyFinance

Red Hat Collaborates with Code for America to Bring Further Cloud Enablement to City Governments

By Business Wirevia The Motley Fool

Filed under:

Red Hat Collaborates with Code for America to Bring Further Cloud Enablement to City Governments

Collaboration Brings Red Hat OpenShift Platform-as-a-Service to Local Government Agencies Free-of-Charge

RALEIGH, N.C.–(BUSINESS WIRE)– Red Hat, Inc. (NYS: RHT) , the world’s leading provider of open source solutions, today announced a collaboration with Code for America (CfA), a non-profit organization that partners with local governments to foster civic innovation, focused on using technology to increase civic engagement. The collaboration brings Red Hat‘s OpenShift Platform-as-a-Service (PaaS) offering to CfA Fellows and partner communities free-of-charge to help achieve CfA’s goal of fostering collaboration between city hall and city residents and innovative problem solving through technology. With OpenShift, CfA Fellows will be able to build, test, deploy and manage applications with the benefits of ease of use, flexibility and scalability for their applications.

The pairing of OpenShift’s rapid deployment capabilities with the innovative applications built by CfA Fellows is a compelling mix for moving civic technology capability forward. Rather than the municipal IT staff or Fellows having to provision and maintain servers, the application developers can focus on what they do best: writing code. Code for America matches Red Hat‘s vision of community-powered innovation, and open source technology gives civic groups the opportunity to not only solve pain points for IT and developers, but also improve service to end users.

The CfA Fellows will receive access to OpenShift free-of-charge for one year. CfA’s 2013 partner cities – Kansas City (Missouri and Kansas); Las Vegas; Louisville, Ken.; New York; Oakland, Calif.; San Francisco; San Mateo County, Calif.; South Bend, Ind.; and Summit County, Ohio – will also receive an option of one additional year of free hosting and services. In total, the value of Red Hat‘s contribution to CfA is worth approximately $300,000 in hosting and service per year.

OpenShift offers developers a cloud application platform with a choice of programming languages, frameworks and application lifecycle tools to build their applications. With built-in platform support for Node.js, Ruby, Python, PHP, Perl and Java and customizable cartridge functionality, developers can also add additional languages that they choose to develop in. OpenShift also supports many popular frameworks, such as Zend, Java EE, Spring, Rails, Play and more.

Supporting Quotes:

Ashesh Badani, global leader, Cloud and …read more
Source: FULL ARTICLE at DailyFinance

Aaron Toponce: Tiny Tiny RSS – The Google Reader Replacement

With all the weeping, wailing and gnashing of teeth about Google killing Reader, I figured I’d blog something productive. Rather than piss and moan, here is a valid solution you can build for at most two bucks, using entirely Free Software, running on your own server, under your control. The solution is to install Tiny Tiny RSS on your own server, and if you have an Android smartphone, the official Tiny Tiny RSS app ($2 for the unlock key (support the developer- this stuff rocks)). Here are the step-by-step installation directions that should get you an up-and-running Reader replacement in less than 30 minutes.

First, create a directory on your webserver where you will install Tiny Tiny RSS. You will need Apache, lighttpd, Cherokee, or some other web server, PHP with the necessary modules as well as the PHP CLI interpreter, and either MySQL or PostgreSQL as prerequisites.:

# mkdir /var/www/rss
# wget https://github.com/gothfox/Tiny-Tiny-RSS/archive/1.7.4.tar.gz
# tar -xf 1.7.4.tar.gz -C /var/www/rss/
# chown -R root.www-data /var/www/rss/
# chmod -R g+w,o+ /var/www/rss/

Pull up the web interface by navigating to http://example.com/rss/ (replace “example.com” with your domain name). The default login credentials are “admin” and “password”. Make sure to change the default password. Also, Tiny Tiny RSS uses a multiuser setup by default. You can add additional users, including one for yourself that isn’t “admin”, or you can change it to single user mode in the preferences.

After the setup is the way you want it, you’ll want to get your Google Reader feeds into Tiny Tiny RSS. Navigate to Reader, and export your data. This will take you to Google Takeout, and you’ll download a massive ZIP archive, that contains an OPML file, as well as a ton of other data. Grab your “subscriptions.xml” from that ZIP file, and import them into your Tiny Tiny RSS installation.

One awesome benefit of Tiny Tiny RSS, is that it has a built-in mobile version, if browsing the install from a mobile browser. It looks good too.

The only thing left to do, is navigate to the preferences, and enable the external API. There are additional 3rd party desktop-based readers that have Tiny Tiny RSS support, such as Liferea and Newsbeuter. Even the official Android app will need the option enabled. This will give you full synchronization between the web interface, your Android app, and your desktop RSS reader.

Unfortunately, Tiny Tiny RSS doesn’t update the feeds by default. You need to setup a script that manages this for you. The best solution is to write a proper init script that starts and stops the updating daemon. I didn’t do this. Instead, I did the next best thing. I put the following into my /etc/rc.local configuration file:

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

sudo -u www-data php /var/www/rss/update_daemon2.php > /dev/null&
exit 0

A couple …read more
Source: FULL ARTICLE at Planet Ubuntu

Problem with files/dirs deletion

By pentago

Hi,

The other day i installed a PHP based CMS (modx) on my shell account and noticed that i couldn’t delete any of files/dirs it created after.

Also, i noticed that all that stuff is owned by username-www instead of username.

I tried chown, chmod and using a PHP script to do the same wti those files but to no avail. All i get is:

rm: cannot remove `somedir’: Permission denied

Environment is somewhat restrictive so i don’t have access to root.

Could someone land a helping hand?

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Memory issue on My CentOS 5.8 x64 bit server

By sunnysthakur

Hello,

I am using CentOS 5.8 x64 server for our one of internal application which is developed on PHP and Mysql as DB.
Currently there are 8-10 instances deployed on this server some of them are rarely used.

Below is the H/W specification fort the same :-


Procesor :- Intel(R) Xeon(R) CPU X3470 @ 2.93GHz [7 cores]
RAM :- 15GB

Now the issue is when i check my RAM it shows 15GB all in user how ever there are no instances running and server load is also OK.


[root@server]# free -g
total used free shared buffers cached
Mem: 15 15 0 0 0 14
-/+ buffers/cache: 0 15
Swap: 15 0 15
[root@server]#

Below is the top output

top – 18:28:01 up 65 days, 7:04, 1 user, load average: 0.08, 0.14, 0.10
Tasks: 194 total, 1 running, 187 sleeping, 6 stopped, 0 zombie
Cpu(s): 0.1%us, 0.2%sy, 0.0%ni, 99.6%id, 0.0%wa, 0.0%hi, 0.0%si, 0.0%st
Mem: 16622452k total, 16162080k used, 460372k free, 215596k buffers
Swap: 16386292k total, 84k used, 16386208k free, 15405992k cached

PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
1 root 15 0 2160 644 556 S 0.0 0.0 0:01.12 init
2 root RT -5 0 0 0 S …read more
Source: FULL ARTICLE at The UNIX and Linux Forums

FOSDEM talk reflections 3/3: HipHop, communities, public procurement

Nikerabbit arrives at the MediaWiki meetup at FOSDEM

Meetup of MediaWiki community. Or Wikimedia tech? How to call the Wikimedia software development ecosystem? (Photo by henna, copyright status unknown.)

This is the third post about FOSDEM 2013; see 1/3: I18n in the WEB, Mozilla i18n and L20n for the first and2/3: docs, code and community health, stabilityfor the second. Links to the abstracts in the headers.

Scaling PHP with HipHop

HipHop is still alive, and faster than ever. It has evolved from PHP to C translator to a JIT bytecode interpreter system, just like PHP itself is, without JIT of course. The speedups they are seeing are impressive (it was deployed on Facebook about a month ago). Given that they have removed the compile everything before deploy step, it is now much more feasible to use.

I’m considering to give HipHop a try on translatewiki.net later this year, probably after we have upgraded to at least Ubuntu 12.04, where Facebook provides packages for it. It is still a pain in the ass to set up manually, as it was few years ago. Wikimedia Foundation (WMF) has dropped its evaluation, but perhaps they will reconsider after our experiences, and HipHop, or hhvm as it is called now, has indeed changed a lot since then.

It was highlighted that the supported language features and libraries of hhvm and PHP vary to an extent. hhvm provides some nice features like strict type hinting, but it is unlikely I can use those anytime soon, since there is no way to take advantage of these on hhvm without breaking support for normal PHP, which is something that really cannot be done in the MediaWiki ecosystem.

Community/BOF meetup

Almost 20 people were around, a few outside of WMF. Discussions circled around events like the Amsterdam Hackathon and MediaWiki groups. The most interesting part (to me) is how to call the Wikimedia software development ecosystem, so it can be marketed properly. Suggestions ranged from extending the meaning of MediaWiki to cover everything including mobile, gadgets and so on; using Wikipedia as it is the brand most well known; or creating a new Wikitech brand.

There are pros and cons to each of the above, but one thing is true: There is no name that can currently be used to refer to everything technical done around MediaWiki and Wikimedia that would also be understood by potential participants. Also, MediaWiki development is not perceived to be cool anymore, because it’s PHP. But it isn’t. MediaWiki development is also Redis, Varnish, puppet, git, Solr, HipHop, semantic, node.js, mobile, OpenStack, and more. Quim Gil will continue work on coming up with a brand. Curious visitors can also compare this to what KDE did recently when they expanded the meaning of KDE to be not only the desktop, but also the community and everything they do. The change process wasn’t painless for them, and wouldn’t be for us, but at the same time (<a target=_blank …read more
Source: FULL ARTICLE at Planet KDE

Marcin Juszkiewicz: Nine years of embedded Linux

Nine years ago I bought Sharp Zaurus SL-5500 as my first Linux PDA. And due to this I am where I am.

I could say that it started two years earlier when I saw PalmOS devices at local geek meetings. But it took me over year before Palm m105… Then was Sony Clie SJ30 — gorgeous device. High resolution, memory card, 16bit colour. Too bad that applications did not make use of it.

So I went for Linux. There were two options: Zaurus or iPaq. Went for former one as it had keyboard. It was good choice.

Quickly started development of packages and joined OpenEmbedded team. Then became one of OpenZaurus developers. After year or something took over release maintenance and released few last versions. 3.5.4(.1) were the best tested releases of OZ ever — I had over hundred testers for each RC image and they provided installation reports, bug reports and fixes. And it had unified installer for whole range of devices (took me several months to get it polished and few guys added own tweaks). When Ångström distribution started I was the one who officially ended OpenZaurus development.

And all that was in free time. But in mean time I created my consulting company. CELF was my first customer 😉

One nice evening I got question on irc and due to that I left dark side of IT and went from PHP programming to embedded Linux full-time. OpenedHand had interesting projects and clients with many devices. Imagine operating system + kernel + Python + GStreamer in 16 megabytes of flash… And I managed to get it done. While working for them I used proper developer boards (not only customer devices) and there were funny moments…

When we worked with ST Microelectronics on NDK-15 (later replaced by NHK-15 from ST Ericsson) I had to merge two kernel trees from two separate teams. Took me 2 days of mangling 20-30MB diffs but got it done. There are people at ST-E which reminded me this during one of Linaro Connects ;D

Also on GUADEC 2007 when we presented new interface for Openmoko phones NDK-15 had to wait for me as no one at stand was able to get it running (U-Boot config needed changes).

But then Intel acquired OpenedHand… The craziest trip of my life was return from London to my parents place. For three months I even had @linux.intel.com email but never used it due to problems with Intel corporate network and Linux (do not ask).

Next was Bug Labs and their BUG device. I cleaned their Poky trees, migrated to latest version and later to use OpenEmbedded directly. Less challenges but I also had few other customers at that time to keep me busy. Some of them were OH customers before and went to me for help.

Time passed, 2010 came. One day Canonical made another attempt to seduce me and this time I decided that it looks like good opportunity so I accepted. Sent BUG 2.0 prototype back to NYC and few weeks later I made crazy train …read more
Source: FULL ARTICLE at Planet Ubuntu

Solaris,PHP,Expect support

By kaf3773

Hello All,

I installed php5 from OpenCSW but i believe it does not support the expect module.
I tried to run a php script to call expect to do a telnet to a device but i got this error

PHP Warning: fopen(): Unable to find the wrapper “expect” – did you forget to enable it when you configured PHP? in /export/home/php_expect.php on line 5

I will appreciate very much if you can help me configure the expect wrapper into php.

Thanks

Source: FULL ARTICLE at The UNIX and Linux Forums

Wrap-up: Live Linux Q&A on Getting Started with Linux

By jennifercloer

 

Facebook Live QAWe recently conducted a Live Linux Q&A on Facebook, which was our first in a new series of live Q&A opportunities with Linux experts hosted on The Linux Foundation’s social channels. This debut Q&A featured Linux.com freelance contributor Carla Schroder, who answered questions about how to get started with Linux.

Questions were received by community members on topics ranging from malware to popular OEMs and distributions to virtualizaiton software choices, and much more.

Generally for new users, Carla recommended “getting familiar with how to install and remove software. Linux distro’s have centralized software repositories – – kind of like app stores, but Linux has had them almost from inception – – so managing software is super easy.”

Carla wasn’t the only one answering questions, either. Members of the community chimed in with helpful advice for everyone. David Chiodo suggested Linux User Groups as one place to start for newbies, for example.

There was some debate about whether or not CentOS was the best distro choice for noobs. Carla suggested it for system and network admins wanting to learn their way around Linux. Other Q&A participants suggested Ubuntu and Peppermint.

Some members of the Live Linux Q&A wanted to know more about going from newbie to pro and how to become certified. Carla suggested that the top three skills to get under your belt before choosing a specialty would be: bash scripting, basic network and system administration, and proficiency in another scripting language like Python, Ruby or PHP. She also suggested Red Hat, LPI and The Linux Foundation for Linux training and certification.

Carla suggested not to rely just on books, since Linux is developed so rapidly and books can become out of date quickly. She suggested reading distribution documentation to keep up to date. Specifically she recommended Red Hat documentation, as well as Arch Linux, which she said is great choice for new sysadmins. Carla also suggested online resources such as Linux.com, LinuxToday, LWN.net, The H and Lxer.

To review the comments and conversation in more detail, you can visit the Live Linux Q&A on Facebook.

These Live Linux Q&As will rotate throughout our social channels, from Facebook to Google+ and Twitter to LinkedIn, so you can connect when/where it makes the most sense for you. And, we’ll be sourcing experts from a variety of places that include Linux.com, our Linux training instructors, the Linux kernel development community, Linux community projects, our members and more. Stay tuned here at my blog and in our social channels for updates on the next Live Linux Q&A.

In the mean time, you can find lots of resources from throughout the community. Keep an eye on our Linux training opportunities, as well as Linux.com for free tutorials and tips.

Source: FULL ARTICLE at Linux Foundation