You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@vcl.apache.org by "ben.macy@valpo.edu" <be...@gmail.com> on 2011/11/29 22:06:03 UTC

Testing the VCL Frontend Code

Hi,

I'm having issues testing the VCL frontend code.  I'm trying to open the
testsetup.php file in firefox, but it Firefox is prompting to have me open
or download the file.  I am trying to open this up locally for now, but I
don't know if I did something wrong when modifying conf.php or secrets.php,
or if it's something with the server.  If anyone has any insight, I'd
appreciate it.

Thanks,

--
Benjamin B. Macy

Valparaiso University
Student Senate Junior Representative
Student Alumni Association
Sigma Phi Epsilon
Electrical Engineering Student
Ben.Macy@valpo.edu
616.648.3516

Re: Testing the VCL Frontend Code

Posted by Dmitri Chebotarov <4d...@gmail.com>.
Ben 

This looks right. This is what I have (CentOS 5.x):

php.x86_64                               5.1.6-27.el5_5.3              installed
php-cli.x86_64                           5.1.6-27.el5_5.3              installed
php-common.x86_64                        5.1.6-27.el5_5.3              installed
php-gd.x86_64                            5.1.6-27.el5_5.3              installed
php-ldap.x86_64                          5.1.6-27.el5_5.3              installed
php-mcrypt.x86_64                        5.1.6-15.el5.centos.1         installed
php-mysql.x86_64                         5.1.6-27.el5_5.3              installed
php-pdo.x86_64                           5.1.6-27.el5_5.3              installed
php-xml.x86_64                           5.1.6-27.el5_5.3              installed
php-xmlrpc.x86_64                        5.1.6-27.el5_5.3              installed

Can you check if you have php.conf in /etc/httpd/conf.d/ folder?
Is apache configured to Include conf.d/*.conf?

Also, try to disable selinux in /etc/sysconfig/selinux, SELINUX=disabled.

Thanks.

On Dec 6, 2011, at 14:52 , ben.macy@valpo.edu wrote:

> Hi,
> 
> I did the 'yum list installed | grep php' command and got:
> [root@vcl web]# yum list installed | grep php
> php.x86_64                       5.3.8-3.fc15       @updates                    
> php-cli.x86_64                   5.3.8-3.fc15       @updates                    
> php-common.x86_64                5.3.8-3.fc15       @updates                    
> php-gd.x86_64                    5.3.8-3.fc15       @updates                    
> php-ldap.x86_64                  5.3.8-3.fc15       @updates                    
> php-mcrypt.x86_64                5.3.8-3.fc15       @updates                    
> php-mysql.x86_64                 5.3.8-3.fc15       @updates                    
> php-pdo.x86_64                   5.3.8-3.fc15       @updates                    
> php-xml.x86_64                   5.3.8-3.fc15       @updates                    
> php-xmlrpc.x86_64                5.3.8-3.fc15       @updates  
> 
> I also tried Josh's code and that didn't work after I restarted the httpd service:
> [root@vcl web]# service httpd restart
> Restarting httpd (via systemctl):                          [  OK  ]
> 
> I'm guessing I have to reinstall php or update it, but I'm not sure how.  Any other suggestions?
> 
> Thanks
> 
> --
> Benjamin B. Macy
> 
> Valparaiso University 
> Student Senate Junior Representative
> Student Alumni Association
> Sigma Phi Epsilon
> Electrical Engineering Student
> Ben.Macy@valpo.edu
> 616.648.3516
> 
> 
> 
> On Tue, Nov 29, 2011 at 4:08 PM, Dmitri Chebotarov <4d...@gmail.com> wrote:
> 
> Ben,
> 
> On RedHat/CentOS 'yum install php' doesn't restart httpd service.
> 
> * On Ubuntu it will restart apache service as part of install (apt-get install php).
> 
> Thanks.
> 
> On Nov 29, 2011, at 16:59 , James O'Dell wrote:
> 
> >
> > Hash: SHA1
> >
> > Wouldn't a 'yum install php' force the httpd service
> > to restart?
> >
> > On 11/29/2011 1:55 PM, Dmitri Chebotarov wrote:
> >> Ben
> >>
> >> Could you please restart httpd service and try to access testsetup.php again?
> >>
> >> You probably installed all necessary PHP packages, but httpd task needs to restarted to re-read .conf files to include PHP.
> >>
> >> Thanks
> >> On Nov 29, 2011, at 16:06 , ben.macy@valpo.edu wrote:
> >>
> >>> Hi,
> >>>
> >>> I'm having issues testing the VCL frontend code.  I'm trying to open the testsetup.php file in firefox, but it Firefox is prompting to have me open or download the file.  I am trying to open this up locally for now, but I don't know if I did something wrong when modifying conf.php or secrets.php, or if it's something with the server.  If anyone has any insight, I'd appreciate it.
> >>>
> >>> Thanks,
> >>>
> >>> --
> >>> Benjamin B. Macy
> >>>
> >>> Valparaiso University
> >>> Student Senate Junior Representative
> >>> Student Alumni Association
> >>> Sigma Phi Epsilon
> >>> Electrical Engineering Student
> >>> Ben.Macy@valpo.edu
> >>> 616.648.3516
> >>>
> >>
> >
> >
> > - --
> > Jim O'Dell
> > Network Analyst
> > California State University Fullerton
> > Email: jodell@fullerton.edu
> > Phone: (657) 278-2256
> >
> 
> 
> -----BEGIN PGP SIGNATURE-----
> 
> iQEcBAEBAgAGBQJO1VfYAAoJEDBNySRmLs4GMj0IALfL2whbTMb2fzxXQ5BdZYV3
> 150JKBKI491UJs8G+HsvhdLEhnifFb97k25r6JK9wBFZxJ52TncY/4q0laX9aBDS
> IpAwUoWTk38h6Akfno+RQ12goNCF9Gzagd5KigATUuDmf0qZBiquz87GxHJXAQ/O
> BvMxAQTrGlyxZA0HORoAIanVSEiQC5Cpqsoo2mIZy1hSO1EnLZhUHsZbzaKSw2R2
> O9SAmTA9k2kV6W+CjdafI1okWCdyHHA531T5hUG5n4pkdDf878GuglL88zYtu8bU
> 9YbX5jWrcIQitHGCFiySvFVE7s1t+KV3lvuFwjIlZvIUvlz+2MKKZbVuPTA7yCE=
> =UJTR
> -----END PGP SIGNATURE-----
> 
> 


Re: Testing the VCL Frontend Code

Posted by "ben.macy@valpo.edu" <be...@gmail.com>.
Hi,

I did the 'yum list installed | grep php' command and got:
[root@vcl web]# yum list installed | grep php
php.x86_64                       5.3.8-3.fc15
@updates
php-cli.x86_64                   5.3.8-3.fc15
@updates
php-common.x86_64                5.3.8-3.fc15
@updates
php-gd.x86_64                    5.3.8-3.fc15
@updates
php-ldap.x86_64                  5.3.8-3.fc15
@updates
php-mcrypt.x86_64                5.3.8-3.fc15
@updates
php-mysql.x86_64                 5.3.8-3.fc15
@updates
php-pdo.x86_64                   5.3.8-3.fc15
@updates
php-xml.x86_64                   5.3.8-3.fc15
@updates
php-xmlrpc.x86_64                5.3.8-3.fc15       @updates

I also tried Josh's code and that didn't work after I restarted the httpd
service:
[root@vcl web]# service httpd restart
Restarting httpd (via systemctl):                          [  OK  ]

I'm guessing I have to reinstall php or update it, but I'm not sure how.
Any other suggestions?

Thanks

--
Benjamin B. Macy

Valparaiso University
Student Senate Junior Representative
Student Alumni Association
Sigma Phi Epsilon
Electrical Engineering Student
Ben.Macy@valpo.edu
616.648.3516



On Tue, Nov 29, 2011 at 4:08 PM, Dmitri Chebotarov <4d...@gmail.com>wrote:

>
> Ben,
>
> On RedHat/CentOS 'yum install php' doesn't restart httpd service.
>
> * On Ubuntu it will restart apache service as part of install (apt-get
> install php).
>
> Thanks.
>
> On Nov 29, 2011, at 16:59 , James O'Dell wrote:
>
> >
> > Hash: SHA1
> >
> > Wouldn't a 'yum install php' force the httpd service
> > to restart?
> >
> > On 11/29/2011 1:55 PM, Dmitri Chebotarov wrote:
> >> Ben
> >>
> >> Could you please restart httpd service and try to access testsetup.php
> again?
> >>
> >> You probably installed all necessary PHP packages, but httpd task needs
> to restarted to re-read .conf files to include PHP.
> >>
> >> Thanks
> >> On Nov 29, 2011, at 16:06 , ben.macy@valpo.edu wrote:
> >>
> >>> Hi,
> >>>
> >>> I'm having issues testing the VCL frontend code.  I'm trying to open
> the testsetup.php file in firefox, but it Firefox is prompting to have me
> open or download the file.  I am trying to open this up locally for now,
> but I don't know if I did something wrong when modifying conf.php or
> secrets.php, or if it's something with the server.  If anyone has any
> insight, I'd appreciate it.
> >>>
> >>> Thanks,
> >>>
> >>> --
> >>> Benjamin B. Macy
> >>>
> >>> Valparaiso University
> >>> Student Senate Junior Representative
> >>> Student Alumni Association
> >>> Sigma Phi Epsilon
> >>> Electrical Engineering Student
> >>> Ben.Macy@valpo.edu
> >>> 616.648.3516
> >>>
> >>
> >
> >
> > - --
> > Jim O'Dell
> > Network Analyst
> > California State University Fullerton
> > Email: jodell@fullerton.edu
> > Phone: (657) 278-2256
> >
>
>
> -----BEGIN PGP SIGNATURE-----
>
> iQEcBAEBAgAGBQJO1VfYAAoJEDBNySRmLs4GMj0IALfL2whbTMb2fzxXQ5BdZYV3
> 150JKBKI491UJs8G+HsvhdLEhnifFb97k25r6JK9wBFZxJ52TncY/4q0laX9aBDS
> IpAwUoWTk38h6Akfno+RQ12goNCF9Gzagd5KigATUuDmf0qZBiquz87GxHJXAQ/O
> BvMxAQTrGlyxZA0HORoAIanVSEiQC5Cpqsoo2mIZy1hSO1EnLZhUHsZbzaKSw2R2
> O9SAmTA9k2kV6W+CjdafI1okWCdyHHA531T5hUG5n4pkdDf878GuglL88zYtu8bU
> 9YbX5jWrcIQitHGCFiySvFVE7s1t+KV3lvuFwjIlZvIUvlz+2MKKZbVuPTA7yCE=
> =UJTR
> -----END PGP SIGNATURE-----
>
>

Re: Testing the VCL Frontend Code

Posted by Dmitri Chebotarov <4d...@gmail.com>.
Ben, 

On RedHat/CentOS 'yum install php' doesn't restart httpd service. 

* On Ubuntu it will restart apache service as part of install (apt-get install php). 

Thanks.

On Nov 29, 2011, at 16:59 , James O'Dell wrote:

> 
> Hash: SHA1
> 
> Wouldn't a 'yum install php' force the httpd service
> to restart?
> 
> On 11/29/2011 1:55 PM, Dmitri Chebotarov wrote:
>> Ben
>> 
>> Could you please restart httpd service and try to access testsetup.php again? 
>> 
>> You probably installed all necessary PHP packages, but httpd task needs to restarted to re-read .conf files to include PHP.
>> 
>> Thanks
>> On Nov 29, 2011, at 16:06 , ben.macy@valpo.edu wrote:
>> 
>>> Hi,
>>> 
>>> I'm having issues testing the VCL frontend code.  I'm trying to open the testsetup.php file in firefox, but it Firefox is prompting to have me open or download the file.  I am trying to open this up locally for now, but I don't know if I did something wrong when modifying conf.php or secrets.php, or if it's something with the server.  If anyone has any insight, I'd appreciate it.
>>> 
>>> Thanks,
>>> 
>>> --
>>> Benjamin B. Macy
>>> 
>>> Valparaiso University 
>>> Student Senate Junior Representative
>>> Student Alumni Association
>>> Sigma Phi Epsilon
>>> Electrical Engineering Student
>>> Ben.Macy@valpo.edu
>>> 616.648.3516
>>> 
>> 
> 
> 
> - -- 
> Jim O'Dell
> Network Analyst
> California State University Fullerton
> Email: jodell@fullerton.edu
> Phone: (657) 278-2256
> 


Re: Testing the VCL Frontend Code

Posted by James O'Dell <jo...@fullerton.edu>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Wouldn't a 'yum install php' force the httpd service
to restart?

On 11/29/2011 1:55 PM, Dmitri Chebotarov wrote:
> Ben
> 
> Could you please restart httpd service and try to access testsetup.php again? 
> 
> You probably installed all necessary PHP packages, but httpd task needs to restarted to re-read .conf files to include PHP.
> 
> Thanks
> On Nov 29, 2011, at 16:06 , ben.macy@valpo.edu wrote:
> 
>> Hi,
>>
>> I'm having issues testing the VCL frontend code.  I'm trying to open the testsetup.php file in firefox, but it Firefox is prompting to have me open or download the file.  I am trying to open this up locally for now, but I don't know if I did something wrong when modifying conf.php or secrets.php, or if it's something with the server.  If anyone has any insight, I'd appreciate it.
>>
>> Thanks,
>>
>> --
>> Benjamin B. Macy
>>
>> Valparaiso University 
>> Student Senate Junior Representative
>> Student Alumni Association
>> Sigma Phi Epsilon
>> Electrical Engineering Student
>> Ben.Macy@valpo.edu
>> 616.648.3516
>>
> 


- -- 
Jim O'Dell
Network Analyst
California State University Fullerton
Email: jodell@fullerton.edu
Phone: (657) 278-2256
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7VVdsACgkQREVHAOnXPYRiZgCgwZXZdByEjQP2vvnb4OA285gB
ZMAAn1U2tjac2b54roQaNhcDyhVMWZyK
=gxRe
-----END PGP SIGNATURE-----

Re: Testing the VCL Frontend Code

Posted by Dmitri Chebotarov <4d...@gmail.com>.
Ben

Could you please restart httpd service and try to access testsetup.php again? 

You probably installed all necessary PHP packages, but httpd task needs to restarted to re-read .conf files to include PHP.

Thanks
On Nov 29, 2011, at 16:06 , ben.macy@valpo.edu wrote:

> Hi,
> 
> I'm having issues testing the VCL frontend code.  I'm trying to open the testsetup.php file in firefox, but it Firefox is prompting to have me open or download the file.  I am trying to open this up locally for now, but I don't know if I did something wrong when modifying conf.php or secrets.php, or if it's something with the server.  If anyone has any insight, I'd appreciate it.
> 
> Thanks,
> 
> --
> Benjamin B. Macy
> 
> Valparaiso University 
> Student Senate Junior Representative
> Student Alumni Association
> Sigma Phi Epsilon
> Electrical Engineering Student
> Ben.Macy@valpo.edu
> 616.648.3516
> 


Re: Testing the VCL Frontend Code

Posted by James O'Dell <jo...@fullerton.edu>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


It doesn't sound like php is installed correctly.
Php code is normally interpreted by the web server.
Which, in turn, returns HTML code to the
web browser.

For example, the Redhat Apache file
'/etc/httpd/conf.d/php.ini' contains
the line 'AddHandler php5-script .php'
which tells the Apache web server to run
files with the '.php' extension through the php
interpreter.

Also, HTML code normally contains a header that the browser
should recognize.

i.e. 'view source' contains the document type of HTML at the top
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

If the browser recognizes the document type as html,
it shouldn't ask you to 'save to file'.

Try 'yum list installed | grep php' to see if php
is installed.

You should see something like:

> [root@vcl conf.d]# yum list installed | grep php
> php.x86_64                                 5.1.6-27.el5_5.3            installed
> php-cli.x86_64                             5.1.6-27.el5_5.3            installed
> php-common.x86_64                          5.1.6-27.el5_5.3            installed
> php-devel.x86_64                           5.1.6-27.el5_5.3            installed
> php-gd.x86_64                              5.1.6-27.el5_5.3            installed
> php-ldap.x86_64                            5.1.6-27.el5_5.3            installed
> php-mbstring.x86_64                        5.1.6-27.el5_5.3            installed
> php-mcrypt.x86_64                          5.1.6-15.el5.centos.1       installed
> php-mysql.x86_64                           5.1.6-27.el5_5.3            installed
> php-pdo.x86_64                             5.1.6-27.el5_5.3            installed
> php-pear.noarch                            1:1.4.9-6.el5               installed
> php-pecl-apc.x86_64                        3.0.19-2.el5                installed
> php-pecl-memcache.x86_64                   2.2.6-1.el5                 installed
> php-xml.x86_64                             5.1.6-27.el5_5.3            installed
> php-xmlrpc.x86_64                          5.1.6-27.el5_5.3            installed

I'm guessing we've got a chicken and the egg problem. How go you run
'testsetup.php' to test your php installation before you've installed
php?

On 11/29/2011 1:06 PM, ben.macy@valpo.edu wrote:
> Hi,
> 
> I'm having issues testing the VCL frontend code.  I'm trying to open the
> testsetup.php file in firefox, but it Firefox is prompting to have me
> open or download the file.  I am trying to open this up locally for now,
> but I don't know if I did something wrong when modifying conf.php or
> secrets.php, or if it's something with the server.  If anyone has any
> insight, I'd appreciate it.
> 
> Thanks,
> 
> --
> Benjamin B. Macy
> 
> Valparaiso University
> Student Senate Junior Representative
> Student Alumni Association
> Sigma Phi Epsilon
> Electrical Engineering Student
> Ben.Macy@valpo.edu <ma...@valpo.edu>
> 616.648.3516
> 


- -- 
Jim O'Dell
Network Analyst
California State University Fullerton
Email: jodell@fullerton.edu
Phone: (657) 278-2256
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk7VUdQACgkQREVHAOnXPYQuHwCgtuJLh18JwWjMlna2n5+jtkTL
gtIAoJmDL8NjjrRuauET1tW5fM29tTXS
=KCfI
-----END PGP SIGNATURE-----

Re: Testing the VCL Frontend Code

Posted by Josh Thompson <jo...@ncsu.edu>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ben,

It sounds like your web server might not be executing the php code but just 
giving you the php file directly.  If you download the file, does it contain 
php code?

As a simpler test, you could create a simple php script with the following in 
it:

- ------- don't include this line --------
<?php
print "Hello world";
?>
- ------- don't include this line --------

If you load that page and get only "Hello world", it is processing php 
correctly.  If it prompts you to open or download the file, you have a php 
processing problem, in which case you'll need to look at the documentation for 
your linux distro on setting up php.

Josh

On Tuesday November 29, 2011, ben.macy@valpo.edu wrote:
> Hi,
> 
> I'm having issues testing the VCL frontend code.  I'm trying to open the
> testsetup.php file in firefox, but it Firefox is prompting to have me open
> or download the file.  I am trying to open this up locally for now, but I
> don't know if I did something wrong when modifying conf.php or secrets.php,
> or if it's something with the server.  If anyone has any insight, I'd
> appreciate it.
> 
> Thanks,
> 
> --
> Benjamin B. Macy
> 
> Valparaiso University
> Student Senate Junior Representative
> Student Alumni Association
> Sigma Phi Epsilon
> Electrical Engineering Student
> Ben.Macy@valpo.edu
> 616.648.3516
- -- 
- -------------------------------
Josh Thompson
VCL Developer
North Carolina State University

my GPG/PGP key can be found at pgp.mit.edu
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)

iEYEARECAAYFAk7VTvIACgkQV/LQcNdtPQPWDQCeJnaQ3GmP2WAlUdHWFP9wUQqo
W7sAn3VKBWmgQrQzE5KKte0LLuL1ucgw
=M4b7
-----END PGP SIGNATURE-----